:root {
  --bg: #fafafa;
  --fg: #1a1a1a;
  --muted: #666;
  --accent: #2563eb;
  --border: #e5e5e5;
  --radius: 6px;
  --max-w: 48rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111;
    --fg: #e5e5e5;
    --muted: #999;
    --accent: #60a5fa;
    --border: #333;
  }
}

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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

nav .site-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
  text-decoration: none;
}

.nav-links a {
  margin-left: 1.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

main {
  max-width: var(--max-w);
  margin: 2rem auto;
  padding: 0 1.5rem;
}

h1, h2, h3 { margin-top: 1.5em; margin-bottom: 0.5em; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

p, ul, ol { margin-bottom: 1em; }

a { color: var(--accent); }

time {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1em;
}

article.summary {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

article.summary h2,
article.summary h3 { margin-top: 0; }

article.summary a { text-decoration: none; }
article.summary a:hover { text-decoration: underline; }

code {
  background: var(--border);
  padding: 0.15em 0.4em;
  border-radius: var(--radius);
  font-size: 0.9em;
}

pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1em;
}

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

footer {
  max-width: var(--max-w);
  margin: 4rem auto 2rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}
