:root {
  --text: #222;
  --muted: #666;
  --link: #1a6dcc;
  --bg: #fff;
  --max-width: 780px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

header {
  margin-bottom: 3rem;
}

header nav a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

main { min-height: 60vh; }

/* Home - post list */
.post-entry {
  margin-bottom: 1.5rem;
}

.post-entry h2 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.post-entry h2 a {
  color: var(--link);
  text-decoration: none;
}

.post-entry h2 a:hover {
  text-decoration: underline;
}

.post-entry time {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Post */
article h1 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

article > time {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

article h2 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }
article h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
article p { margin-bottom: 1rem; }
article a { color: var(--link); }

article ul, article ol {
  margin: 0 0 1rem 1.5rem;
}

article blockquote {
  border-left: 3px solid #ddd;
  padding-left: 1rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

article code {
  font-size: 0.9em;
  background: #f5f5f5;
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

article pre {
  background: #f5f5f5;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  border-radius: 4px;
}

article pre code {
  background: none;
  padding: 0;
}

article img {
  max-width: 100%;
  height: auto;
}

/* Tables */
article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

article th, article td {
  border: 1px solid #ddd;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

article th {
  background: #f5f5f5;
  font-weight: 600;
}

article tr:nth-child(even) {
  background: #fafafa;
}

footer {
  margin-top: 4rem;
  font-size: 0.8rem;
  color: var(--muted);
}
