:root {
  --bg: #f5f5f4;
  --ink: #18181a;
  --muted: #5f5e5a;
  --line: rgba(24, 24, 26, 0.12);
  --accent: #b33a0b;
  --serif: 'Source Serif 4', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414;
    --ink: #e8e7e3;
    --muted: #a19f99;
    --line: rgba(232, 231, 227, 0.14);
    --accent: #fb8a5c;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 1.125rem/1.7 var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: 40rem; margin: 0 auto; padding: 0 1rem; }

/* Masthead */
.masthead {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1.5rem; padding-top: 2rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px;
  font: 600 1.25rem/1 var(--serif); letter-spacing: -0.01em; text-decoration: none;
}
.dial {
  display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem;
  border: 1.5px solid var(--ink); border-radius: 50%;
  font: 500 0.8rem/1 var(--mono); color: var(--accent);
}
nav { display: flex; gap: 1.25rem; font: 400 0.875rem/1 var(--mono); }
nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--muted); }
nav a:hover, nav a[aria-current] { color: var(--ink); }
nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.45em; }

main.wrap { padding-top: 2.5rem; padding-bottom: 3rem; min-height: 60vh; }

.intro p { font-size: 1.5rem; line-height: 1.35; font-style: italic; margin-bottom: 2.5rem; padding-bottom: 0.25rem; max-width: 30rem; }
.section-title { font-size: 2rem; line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 2rem; }

/* Lists */
.item { padding: 1.75rem 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; padding-top: 0; }
.meta {
  display: flex; gap: 0.75rem; align-items: baseline; margin-bottom: 0.5rem;
  font: 400 0.8125rem/1.4 var(--mono); color: var(--muted);
}
.meta .kind { color: var(--accent); text-decoration: none; }
.meta .date { text-decoration: none; }
.item h2 { font-size: 1.45rem; line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 0.4rem; }
.item h2 a { text-decoration: none; }
.item h2 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.excerpt { color: var(--muted); }
.empty { color: var(--muted); font-style: italic; }

/* Reading */
.entry h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0.25rem 0 1.75rem; }
.prose > * + * { margin-top: 1.1em; }
.prose a { text-decoration-color: var(--accent); }
.prose h1, .prose h2, .prose h3 { line-height: 1.3; margin-top: 1.8em; }
.prose h1 { font-size: 1.6rem; } .prose h2 { font-size: 1.35rem; } .prose h3 { font-size: 1.15rem; }
.prose blockquote { border-left: 2px solid var(--accent); padding-left: 1rem; font-style: italic; color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: 4px; margin: 1.5em auto; }
.prose code { font: 0.85em var(--mono); background: var(--line); padding: 0.1em 0.35em; border-radius: 4px; }
.prose pre { overflow-x: auto; background: var(--line); padding: 1rem; border-radius: 4px; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); width: 4rem; margin: 2.5em auto; }
.back { margin-top: 3rem; font: 0.875rem var(--mono); }
.back a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--muted); }
.back a:hover { color: var(--ink); }

.wrap.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem;
  border-top: 1px solid var(--line); padding-top: 0.75rem; padding-bottom: 3rem;
  font: 0.8125rem/1.5 var(--mono); color: var(--muted);
}
.foot a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.foot a:hover { color: var(--ink); }
