:root {
  --bg: #fcfcfb;
  --fg: #171a19;
  --muted: #666d69;
  --accent: #0f766e;
  --accent-soft: #0b5d56;
  --border: #e2e5e3;
  --code-bg: #f0f2f1;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101211;
    --fg: #e6e8e5;
    --muted: #969b96;
    --accent: #2dd4bf;
    --accent-soft: #5eead4;
    --border: #272a28;
    --code-bg: #1a1d1c;
  }
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

main, .site-header, .site-footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header { padding-top: 1.5rem; padding-bottom: 0.5rem; }
.site-header nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--fg);
}
.brand .tld { color: var(--accent); }

.nav-links { display: flex; gap: 1.1rem; font-size: 0.9rem; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--accent); }

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

h1 {
  font-size: 2.2rem;
  letter-spacing: -0.03em;
  margin: 2.5rem 0 0.4rem;
  line-height: 1.15;
}

h2 {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 3rem 0 1rem;
  font-weight: 600;
}

h3 { font-size: 1.08rem; margin: 0 0 0.2rem; line-height: 1.4; }

.tagline {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.lede { margin: 0 0 1.5rem; }

.elsewhere {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 0.88rem;
}
.elsewhere li::before { content: "→ "; color: var(--accent); }

.post { margin-bottom: 1.6rem; }
.post-meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0.1rem 0 0.3rem;
}
.post h3 a { text-decoration: none; }
.post h3 a:hover { text-decoration: underline; }
.lang { color: var(--muted); font-size: 0.85em; font-weight: 400; }

.post code, .project code {
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

.section-note { color: var(--muted); font-size: 0.9rem; margin-top: -0.4rem; }

.project { margin-bottom: 1.2rem; }
.project p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.project h3 a { text-decoration: none; }
.project h3 a:hover { text-decoration: underline; }

.more-link { margin-top: 1.5rem; }

.site-footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  html { font-size: 16px; }
  h1 { margin-top: 1.75rem; }
}
