:root {
  --bg: #fbfbf9;
  --fg: #1c1b18;
  --muted: #6b6a63;
  --rule: #dedcd4;
  --accent: #2f5d50;
  --code: #f2f1ec;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16161a;
    --fg: #e8e6e1;
    --muted: #9a978f;
    --rule: #2e2e33;
    --accent: #8fc7b4;
    --code: #1f1f24;
  }
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  padding: 0 1.25rem 4rem;
  background: var(--bg);
  color: var(--fg);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
    "Songti SC", "Noto Serif CJK SC", serif;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

header.site-header, main, footer {
  max-width: 41rem;
  margin: 0 auto;
}

header.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.4rem 0 1.6rem;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}

.brand {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--fg);
  font-weight: 600;
}

.brand span { color: var(--muted); font-weight: 400; }

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-left: 1.1rem;
  border-bottom: 1px solid transparent;
}

nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

h1 {
  font-size: 2rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 2.4rem 0 1rem;
  font-weight: 600;
}

h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  margin: 2.4rem 0 1.2rem;
}

h3 {
  font-size: 1.16rem;
  margin: 0 0 0.35rem;
  font-weight: 600;
  line-height: 1.4;
}

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

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

.post-card { margin-bottom: 2.2rem; }

.post-card a { color: inherit; text-decoration: none; }
.post-card a:hover h3 { color: var(--accent); }

.meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  color: var(--muted);
  margin: 0 0 0.55rem;
  letter-spacing: 0.02em;
}

p { margin: 0 0 1rem; }

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  background: var(--code);
  padding: 0.12em 0.34em;
  border-radius: 3px;
}

pre {
  background: var(--code);
  padding: 0.9rem 1rem;
  border-radius: 5px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.6;
}

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

.about-short { color: var(--muted); font-size: 0.92rem; }

ul.plain { padding-left: 1.1rem; }
ul.plain li { margin-bottom: 0.5rem; }

footer {
  margin-top: 3.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.8rem;
}

/* 404 */
.center { text-align: center; padding-top: 4rem; }
.center h1 { font-size: 3rem; }