:root {
  --bg: #fdfcfa;
  --text: #1f1f1f;
  --muted: #6b6b6b;
  --rule: #e6e3de;
  --accent: #2b5fd9;
  --code-bg: #f3f1ed;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161616;
    --text: #e8e6e3;
    --muted: #9a9a9a;
    --rule: #2c2c2c;
    --accent: #8ab0ff;
    --code-bg: #222;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0 auto;
  max-width: 40rem;
  padding: 2.5rem 1.25rem 4rem;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.65 Charter, "Bitstream Charter", "Iowan Old Style", Georgia, serif;
}

a { color: var(--accent); text-underline-offset: 0.15em; }

header.site, footer.site, time, .posts, .back {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

header.site {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3rem;
  font-size: 0.9rem;
}
header.site .name { color: var(--text); font-weight: 600; text-decoration: none; }
header.site nav a { color: var(--muted); text-decoration: none; margin-left: 1rem; }
header.site nav a:hover { color: var(--text); }

.intro { margin-bottom: 2.5rem; }

.posts { list-style: none; padding: 0; margin: 0; }
.posts li {
  display: flex;
  gap: 1.25rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--rule);
}
.posts li:last-child { border-bottom: 1px solid var(--rule); }
.posts time { flex: 0 0 9.5rem; color: var(--muted); font-size: 0.9rem; padding-top: 0.1rem; }
.posts a { color: var(--text); text-decoration: none; font-weight: 500; }
.posts a:hover { color: var(--accent); }

h1, h2, h3 { line-height: 1.25; font-weight: 700; }
h1 { font-size: 2rem; margin: 0 0 0.4rem; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin: 2.2rem 0 0.6rem; }
h3 { font-size: 1.1rem; margin: 1.8rem 0 0.5rem; }

article > time { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }

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

code {
  font: 0.85em ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--code-bg);
  padding: 0.1em 0.3em;
  border-radius: 4px;
}
pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.45;
}
pre code { background: none; padding: 0; }

img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

.back { margin-top: 3rem; font-size: 0.9rem; }

footer.site { margin-top: 4rem; color: var(--muted); font-size: 0.85rem; }

@media (max-width: 520px) {
  body { font-size: 17px; padding-top: 1.5rem; }
  .posts li { flex-direction: column; gap: 0; }
  .posts time { flex: none; font-size: 0.8rem; }
}
