:root {
  --bg: #0e1013;
  --surface: #161a20;
  --text: #e7e5e1;
  --muted: #8d939c;
  --accent: #c9a227;
  --accent-dim: #8a6f1c;
  --border: #262b33;
  --max: 68ch;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #faf8f5;
    --surface: #ffffff;
    --text: #1b1d21;
    --muted: #5d626b;
    --accent: #8a6d1f;
    --accent-dim: #b39433;
    --border: #e2ded7;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: 24px;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  padding-block: 22px;
  margin-bottom: 64px;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 28px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}

.brand::before {
  content: "ᚱ";
  color: var(--accent);
  margin-right: 0.5em;
  font-weight: 400;
}

nav.site-nav {
  display: flex;
  gap: 22px;
  font-size: 0.9375rem;
}

nav.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

nav.site-nav a:hover,
nav.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

@media (max-width: 480px) {
  .wrap { padding-inline: 20px; }
  .site-header { margin-bottom: 44px; }
  .brand { font-size: 1.05rem; }
  nav.site-nav { gap: 16px; font-size: 0.875rem; }
}

/* ---------- type ---------- */

main { padding-bottom: 96px; }

h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5.5vw, 2.85rem); margin: 0 0 16px; }
h2 { font-size: 1.5rem; margin: 56px 0 16px; }
h3 { font-size: 1.15rem; margin: 36px 0 10px; }

p { margin: 0 0 20px; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }

.lede {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 40px;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 56px 0;
}

blockquote {
  margin: 32px 0;
  padding-left: 20px;
  border-left: 2px solid var(--accent-dim);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
}

code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

pre code { background: none; border: none; padding: 0; font-size: inherit; }

ul, ol { padding-left: 1.3em; margin: 0 0 20px; }
li { margin-bottom: 8px; }

/* ---------- post list ---------- */

.posts { list-style: none; padding: 0; margin: 0; }

.posts li {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.posts li:first-child { border-top: 1px solid var(--border); }

.posts a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 20px;
  padding: 18px 0;
  color: var(--text);
  text-decoration: none;
}

.posts a:hover .post-title {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-title { font-family: var(--serif); font-size: 1.0625rem; }

time {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
}

.post-meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin: -6px 0 40px;
}

/* ---------- misc ---------- */

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; }

.tags li {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 11px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 28px 48px;
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

.center { text-align: center; }

.back {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 32px;
}

.back:hover { color: var(--accent); }
