:root {
  --bg: #fdfdfb;
  --fg: #23211d;
  --muted: #6b6660;
  --rule: #e2ded6;
  --link: #7a4a1e;
  --accent: #a8621f;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614;
    --fg: #e6e2da;
    --muted: #9a948a;
    --rule: #302d28;
    --link: #d8a066;
    --accent: #e0b07c;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 Georgia, "Iowan Old Style", "Times New Roman", serif;
  -webkit-text-size-adjust: 100%;
}

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

.site-header,
.content,
.site-footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.25rem;
  padding-top: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

.site-title {
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.site-nav { margin-left: auto; display: flex; gap: 1rem; font-size: 0.85rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }

h1, h2, h3 { line-height: 1.25; font-weight: 700; }
.post-title, .list-title { font-size: 1.7rem; margin: 0 0 0.4rem; }

.post-meta { color: var(--muted); font-size: 0.85rem; margin: 0 0 2rem; }
.post-meta a { color: var(--muted); }

.post-content > :first-child { margin-top: 0; }

.post-content blockquote {
  margin: 1.5rem 0;
  padding: 0.2rem 0 0.2rem 1.25rem;
  border-left: 3px solid var(--rule);
  color: var(--fg);
}
.post-content blockquote footer {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: normal;
}

.post-content img { max-width: 100%; height: auto; }

.post-content pre {
  overflow-x: auto;
  padding: 0.9rem 1rem;
  background: var(--rule);
  border-radius: 4px;
  font-size: 0.85rem;
}
.post-content code { font-family: ui-monospace, "Source Code Pro", monospace; font-size: 0.88em; }

.post-tags, .post-list, .term-list {
  list-style: none;
  padding: 0;
}

.post-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 2rem 0 0; }
.post-tags a {
  display: inline-block;
  font-size: 0.78rem;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
}
.post-tags a:hover { border-color: var(--accent); color: var(--accent); }

.post-list-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.post-list-item time { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.post-list-link { text-decoration: none; }
.post-list-link:hover { text-decoration: underline; }

.archive-year h2 {
  font-size: 1rem;
  color: var(--muted);
  margin: 2rem 0 0.5rem;
  font-variant-numeric: tabular-nums;
}

.term-list li { padding: 0.35rem 0; border-bottom: 1px solid var(--rule); }
.term-count { color: var(--muted); font-size: 0.8rem; }

.post-nav, .pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
}
.post-nav .next, .pagination a:last-child { margin-left: auto; text-align: right; }
.page-of { color: var(--muted); }

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