:root {
  color-scheme: light dark;
  --bg: #f7f7f4;
  --text: #1c1d1f;
  --muted: #6e747c;
  --line: #d9ddd8;
  --panel: #ffffff;
  --accent: #176f7a;
  --accent-weak: #e4f4f2;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111315;
    --text: #eeefec;
    --muted: #a2a9b0;
    --line: #2b3032;
    --panel: #181b1e;
    --accent-weak: #102a2d;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
.site-header, .site-footer {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}
.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 760; letter-spacing: 0; }
nav { display: flex; gap: 16px; color: var(--muted); font-size: 14px; }
nav a:hover, .post-card a:hover h2, .related a:hover { color: var(--accent); }
main {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}
.hero {
  padding: 72px 0 42px;
  max-width: 760px;
}
.eyebrow {
  color: var(--accent);
  font-weight: 720;
  margin: 0 0 12px;
}
h1, h2, h3 { line-height: 1.18; letter-spacing: 0; }
.hero h1 {
  font-size: clamp(40px, 8vw, 76px);
  margin: 0 0 18px;
}
.hero p:last-child {
  font-size: 19px;
  color: var(--muted);
  margin: 0;
}
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  padding: 0 0 72px;
}
.post-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.post-card a {
  display: block;
  padding: 22px;
  min-height: 210px;
}
time {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}
.post-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}
.post-card p, .post-header p, .muted { color: var(--muted); }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.tags span {
  background: var(--accent-weak);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 680;
}
.post {
  max-width: 760px;
  padding: 44px 0 56px;
}
.back-link {
  color: var(--accent);
  font-size: 14px;
}
.post-header h1 {
  font-size: clamp(34px, 7vw, 58px);
  margin: 12px 0 16px;
}
.content {
  margin-top: 38px;
  font-size: 18px;
}
.content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.content code {
  background: var(--accent-weak);
  border-radius: 5px;
  padding: 2px 5px;
  font-size: 0.9em;
}
pre {
  overflow-x: auto;
  background: #0f1318;
  color: #f3f6f7;
  border-radius: 8px;
  padding: 18px;
}
pre code { background: transparent; padding: 0; }
blockquote {
  border-left: 3px solid var(--accent);
  margin: 24px 0;
  padding: 4px 0 4px 18px;
  color: var(--muted);
}
.wiki-link {
  color: var(--accent);
  font-weight: 650;
}
.disclaimer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 18px;
  color: var(--muted);
  font-size: 14px;
}
.related {
  max-width: 760px;
  border-top: 1px solid var(--line);
  padding: 28px 0 72px;
}
.related h2 { font-size: 20px; }
.related ul { padding-left: 20px; }
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  padding: 22px 0 32px;
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 0;
  }
  nav { flex-wrap: wrap; }
  .hero { padding-top: 48px; }
}