:root {
  --bg: #f5f2ea;
  --bg-raised: #eee9dc;
  --text: #201c14;
  --text-muted: #6b6355;
  --border: #d9d2bf;
  --accent: #1f6b4f;
  --accent-strong: #15503a;
  --accent-soft: #e3ede6;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17140e;
    --bg-raised: #201a12;
    --text: #ece6d7;
    --text-muted: #a89b82;
    --border: #362f1f;
    --accent: #45b389;
    --accent-strong: #63cda3;
    --accent-soft: #1b2b23;
  }
}
:root[data-theme="dark"] {
  --bg: #17140e;
  --bg-raised: #201a12;
  --text: #ece6d7;
  --text-muted: #a89b82;
  --border: #362f1f;
  --accent: #45b389;
  --accent-strong: #63cda3;
  --accent-soft: #1b2b23;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-strong); }
::selection { background: var(--accent-soft); color: var(--accent-strong); }

.wrap { max-width: 700px; margin: 0 auto; padding: 0 24px; }

nav {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.nav-inner { max-width: 700px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-family: var(--font-mono); font-weight: 600; font-size: 14px; text-decoration: none; color: var(--text); }
.brand .dot { color: var(--accent); }
.nav-links { display: flex; gap: 20px; font-size: 13px; }
.nav-links a { color: var(--text-muted); text-decoration: none; }
.nav-links a:hover { color: var(--text); }

article { padding: 56px 0 80px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}
h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 18px;
  text-wrap: balance;
}
.dek {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.55;
}
.meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

article h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 44px 0 16px;
}
article h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 30px 0 12px;
}
article p { margin: 0 0 20px; }
article ul, article ol { margin: 0 0 20px; padding-left: 1.3em; }
article li { margin-bottom: 8px; }
article strong { color: var(--text); }
article code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-raised);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}
article pre {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0 0 24px;
}
article pre code { background: none; padding: 0; font-size: 0.85em; line-height: 1.6; }
article blockquote {
  border-left: 3px solid var(--accent);
  margin: 0 0 24px;
  padding: 4px 0 4px 18px;
  color: var(--text-muted);
  font-style: italic;
}
.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 14px 18px;
  font-size: 0.92em;
  margin: 0 0 24px;
}
.callout strong { color: var(--accent-strong); }

table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 0.92em; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); }
th { font-family: var(--font-mono); font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }

.post-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.92em;
  color: var(--text-muted);
}
.post-footer a { color: var(--accent-strong); }

footer.site {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  max-width: 700px; margin: 0 auto; padding: 0 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 12.5px; color: var(--text-muted); font-family: var(--font-mono);
}
.footer-inner a { color: var(--text-muted); text-decoration: none; }
.footer-inner a:hover { color: var(--accent-strong); }

@media (max-width: 560px) {
  .nav-links { display: none; }
}
