:root {
  --bg: #fffdf9;
  --text: #24211d;
  --muted: #736b60;
  --rule: #ebe4d8;
  --accent: #b3471d;
  --code-bg: #f4efe6;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161412;
    --text: #e9e3d9;
    --muted: #a0968a;
    --rule: #2d2925;
    --accent: #f08a5d;
    --code-bg: #211e1b;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto;
  max-width: 44rem;
  padding: 0 22px;
  background: var(--bg);
  color: var(--text);
  font: 19px/1.7 Charter, "Bitstream Charter", "Iowan Old Style", ui-serif, Georgia, Cambria, serif;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

header.site, footer.site {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.85rem;
}
header.site {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  padding: 36px 0 28px;
}
.brand { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand::after { content: "."; color: var(--accent); }
header.site nav { display: flex; gap: 18px; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover { color: var(--accent); }

footer.site { margin: 64px 0 0; padding: 20px 0 40px; border-top: 1px solid var(--rule); color: var(--muted); }
footer.site a { color: inherit; }

.intro { font-size: 1.15rem; color: var(--muted); margin: 8px 0 32px; }
.intro p { margin: 0; }

.posts { list-style: none; margin: 0; padding: 0; }
.posts li {
  display: grid;
  grid-template-columns: 8.5em 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.posts time { color: var(--muted); font: 0.85rem/2.1 ui-sans-serif, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.posts a { text-decoration: none; color: var(--text); font-weight: 600; }
.posts a:hover { color: var(--accent); }
@media (max-width: 520px) { .posts li { grid-template-columns: 1fr; gap: 0; } }
.empty { color: var(--muted); }
.more { margin-top: 20px; }

.page-title { font-size: 2rem; line-height: 1.2; margin: 8px 0 20px; }
.year { font: 700 0.8rem/1 ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.12em; color: var(--muted); margin: 32px 0 4px; }

.post-head h1 { font-size: clamp(1.9rem, 5vw, 2.5rem); line-height: 1.15; letter-spacing: -0.015em; margin: 8px 0 8px; }
.meta { color: var(--muted); font: 0.85rem/1.4 ui-sans-serif, system-ui, sans-serif; margin: 0 0 28px; }

.prose h2 { font-size: 1.4rem; margin: 2em 0 0.4em; line-height: 1.25; }
.prose h3 { font-size: 1.15rem; margin: 1.6em 0 0.3em; }
.prose img { max-width: 100%; height: auto; border-radius: 4px; }
.prose blockquote { margin: 1.4em 0; padding: 0 0 0 1em; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }
code, pre { font: 0.82em/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
:not(pre) > code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 3px; }
pre { background: var(--code-bg); padding: 14px 16px; overflow-x: auto; border-radius: 6px; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font: 0.9rem/1.4 ui-sans-serif, system-ui, sans-serif;
}
.pager a { text-decoration: none; }
