:root {
  --bg: #fbfaf8;
  --fg: #1c1b19;
  --muted: #6b6862;
  --rule: #e2ded6;
  --accent: #2f6f5e;
  --code-bg: #f1efe9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16151a;
    --fg: #e6e3dd;
    --muted: #9a958c;
    --rule: #2b2930;
    --accent: #7fc4ac;
    --code-bg: #201f26;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

header.site {
  border-bottom: 1px solid var(--rule);
  padding: 1.6rem 0 1.1rem;
  margin-bottom: 2.6rem;
}

header.site .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.2rem;
  font-size: 0.94rem;
}

nav a:hover, nav a[aria-current="page"] { color: var(--fg); }

h1, h2, h3 {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 { font-size: 2rem; margin: 0 0 0.4rem; }
h2 { font-size: 1.35rem; margin: 2.4rem 0 0.6rem; }

.lede { color: var(--muted); font-size: 1.05rem; margin-top: 0; }

a { color: var(--accent); }

article.post { margin: 0 0 2.2rem; }

.post-title { margin: 0 0 0.2rem; font-size: 1.22rem; }
.post-title a { color: var(--fg); text-decoration: none; }
.post-title a:hover { color: var(--accent); }

.meta {
  color: var(--muted);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  margin: 0 0 0.5rem;
}

article.post p { margin: 0.4rem 0 0; color: var(--muted); }

hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 2.2rem 0; }

pre, code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

code {
  background: var(--code-bg);
  padding: 0.12em 0.35em;
  border-radius: 4px;
}

pre {
  background: var(--code-bg);
  padding: 1rem 1.1rem;
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.5;
}

pre code { background: none; padding: 0; }

blockquote {
  margin: 1.4rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}

footer.site {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding: 1.4rem 0 2.4rem;
  color: var(--muted);
  font-size: 0.86rem;
}

footer.site .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.empty {
  border: 1px dashed var(--rule);
  border-radius: 8px;
  padding: 1.4rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  nav a { margin-left: 0.9rem; }
}
