:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #555e64;
  --faint: #9aa4ab;
  --line: #e6e9ea;
  --accent: #0a6cff;
  --accent-soft: #e8f0ff;
  --code-bg: #f6f8f8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font: 17px/1.75 Georgia, "Times New Roman", serif;
  color: var(--fg);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 24px; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: #fcfcfc;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font: 700 20px/1 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.brand .dot { color: var(--accent); }
.site-header nav { display: flex; gap: 24px; }
.site-header nav a {
  font: 500 15px/1 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--muted);
  text-decoration: none;
}
.site-header nav a:hover { color: var(--accent); }

main { flex: 1; }

.hero { padding: 88px 0 48px; }
.hero h1 { font-size: 40px; line-height: 1.2; letter-spacing: -0.8px; }
.hero .lede { margin-top: 20px; font-size: 19px; color: var(--muted); }

section.latest { padding: 24px 0 48px; }
section.latest > h2 {
  font: 600 14px/1 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-bottom: 28px;
}

.post-item { padding: 26px 0; border-top: 1px solid var(--line); }
.post-item time {
  font: 500 13px/1 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.post-item h3 { margin-top: 6px; font-size: 24px; line-height: 1.3; }
.post-item h3 a { color: var(--fg); text-decoration: none; }
.post-item h3 a:hover { color: var(--accent); }
.post-item .excerpt { margin-top: 8px; color: var(--muted); font-size: 16.5px; }

aside.note {
  margin: 24px 0 56px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  font-size: 16px;
  color: var(--muted);
}

/* ---------- posts / pages ---------- */
article.prose { padding: 56px 0 64px; }
article.prose header h1 { font-size: 34px; line-height: 1.25; letter-spacing: -0.5px; }
article.prose header .meta { margin-top: 14px; font-size: 14px; color: var(--faint); }
article.prose .body { margin-top: 32px; }
article.prose h2 { font-size: 27px; margin: 40px 0 14px; }
article.prose h3 { font-size: 21px; margin: 30px 0 10px; }
article.prose p { margin: 16px 0; }
article.prose ul, article.prose ol { margin: 16px 0; padding-left: 28px; }
article.prose li { margin: 6px 0; }
article.prose a { color: var(--accent); text-decoration: none; }
article.prose a:hover { text-decoration: underline; }
article.prose code {
  font: 13.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
}
article.prose pre {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 20px 0;
}
article.prose pre code { background: none; border: none; padding: 0; }

/* ---------- 404 ---------- */
.error { text-align: center; padding: 120px 0; }
.error h1 { font-size: 88px; color: var(--accent); }
.error p { color: var(--muted); margin-top: 8px; }

.site-footer { border-top: 1px solid var(--line); background: #fcfcfc; }
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  font: 500 13px/1 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--muted);
}
.site-footer .muted { color: var(--faint); }

@media (max-width: 560px) {
  .hero h1 { font-size: 30px; }
  article.prose header h1 { font-size: 27px; }
  .site-footer .wrap { flex-direction: column; justify-content: center; height: auto; gap: 6px; padding: 18px 24px; }
}