:root {
  --bg: #fdfcfa;
  --fg: #23211f;
  --muted: #7b7570;
  --line: #e6e1da;
  --accent: #9a5b3d;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17171a;
    --fg: #e6e3df;
    --muted: #8d8880;
    --line: #2c2c31;
    --accent: #d99a6c;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding: 0 1.25rem;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.75 -apple-system, "PingFang SC", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  text-rendering: optimizeLegibility;
}
main, .site { max-width: 43rem; margin: 0 auto; }
header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
}
header.site .brand {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
  font-size: 1.05rem;
}
header.site nav { display: flex; gap: 1rem; }
header.site nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
header.site nav a:hover, header.site nav a.active { color: var(--accent); }
main { padding: 2.25rem 0 4rem; }
h1, h2, h3 { line-height: 1.3; letter-spacing: -0.015em; }
h1 { font-size: 1.7rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.3rem; margin: 2.2rem 0 0.6rem; }
h3 { font-size: 1.1rem; margin: 1.8rem 0 0.5rem; }
h1.lead { font-size: 2rem; font-weight: 700; }
p.intro { color: var(--muted); margin-top: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
ul.posts { list-style: none; padding: 0; margin: 2.5rem 0 0; }
li.post { padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
li.post:first-child { border-top: 1px solid var(--line); }
li.post a { font-size: 1.12rem; font-weight: 600; text-decoration: none; }
li.post a:hover { text-decoration: underline; }
li.post time { display: block; margin-top: 0.15rem; }
li.post time, .meta { color: var(--muted); font-size: 0.85rem; }
li.post p { margin: 0.45rem 0 0; color: var(--muted); font-size: 0.95rem; }
.posthead { margin-bottom: 2rem; }
.posthead h1 { font-size: 1.65rem; }
.posthead .meta { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.5rem;
  font-size: 0.78rem;
}
article img { max-width: 100%; border-radius: 6px; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: color-mix(in srgb, var(--fg) 7%, transparent);
  padding: 0.12em 0.35em;
  border-radius: 4px;
}
pre {
  background: color-mix(in srgb, var(--fg) 5%, transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  line-height: 1.55;
}
pre code { background: none; padding: 0; font-size: 0.85rem; }
blockquote {
  margin: 1.5rem 0;
  padding: 0.1rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
blockquote p { margin: 0.6rem 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.back { margin-top: 3rem; font-size: 0.95rem; }
footer.site {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}
footer.site a { color: var(--muted); }
