:root {
  --bg: oklch(99.3% 0.004 90);
  --surface: oklch(100% 0 0);
  --surface-soft: oklch(97.8% 0.006 90);
  --fg: oklch(14% 0.015 90);
  --muted: oklch(51% 0.012 75);
  --border: oklch(89% 0.012 90);
  --accent: oklch(61% 0.22 32);
  --info: oklch(57% 0.20 252);
  --success: oklch(63% 0.17 145);
  --font-sans: "NotionInter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Lyon Text", Georgia, ui-serif, serif;
  --font-mono: "iA Writer Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --radius: 8px;
  --shadow: 0 18px 48px color-mix(in oklch, var(--fg) 9%, transparent);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font: 16px/1.78 var(--font-sans);
  text-rendering: optimizeLegibility;
}
a { color: var(--info); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
img { max-width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid color-mix(in oklch, var(--border) 78%, transparent);
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
}
.site-header-inner {
  width: min(1160px, calc(100% - 40px));
  min-height: 64px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  color: var(--fg);
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}
.site-nav { display: flex; align-items: center; gap: 18px; }
.site-nav a { color: var(--muted); font-size: 14px; font-weight: 700; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fg); }

.article-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 760px) 260px;
  gap: 72px;
  align-items: start;
}
.article-hero { padding: 72px 0 40px; border-bottom: 1px solid var(--border); }
.article-kicker { margin: 0 0 20px; color: var(--accent); font: 700 12px/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.article-hero h1 { max-width: 980px; margin: 0 0 24px; font-size: clamp(40px, 6vw, 72px); line-height: 1.06; letter-spacing: -.055em; }
.article-dek { max-width: 780px; margin: 0; color: var(--muted); font-size: clamp(17px, 2vw, 21px); }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 30px; color: var(--muted); font: 12px/1.5 var(--font-mono); }
.article-meta span + span::before { content: "•"; margin-right: 18px; color: var(--border); }

.article-body { min-width: 0; padding: 48px 0 96px; }
.article-body > h1:first-child { display: none; }
.article-body h2 { scroll-margin-top: 92px; margin: 72px 0 20px; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.2; letter-spacing: -.035em; }
.article-body h3 { scroll-margin-top: 92px; margin: 40px 0 14px; font-size: 24px; line-height: 1.3; letter-spacing: -.02em; }
.article-body p { margin: 0 0 20px; }
.article-body strong { font-weight: 780; }
.article-body blockquote {
  margin: 28px 0;
  padding: 22px 24px;
  border: 1px solid color-mix(in oklch, var(--info) 28%, var(--border));
  background: color-mix(in oklch, var(--info) 5%, var(--surface));
  font: 18px/1.7 var(--font-serif);
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body ul, .article-body ol { margin: 0 0 24px; padding-left: 24px; }
.article-body li { margin: 7px 0; }
.article-body pre { overflow: auto; margin: 28px 0; padding: 22px; color: #f8fafc; background: #17191d; border-radius: var(--radius); font: 13px/1.7 var(--font-mono); }
.article-body code { padding: 2px 5px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 4px; font: .9em/1.4 var(--font-mono); }
.article-body pre code { padding: 0; border: 0; color: inherit; background: transparent; }
.table-wrap { overflow-x: auto; margin: 28px 0; border: 1px solid var(--border); background: var(--surface); }
.article-table { width: 100%; border-collapse: collapse; min-width: 620px; font-size: 14px; }
.article-table th, .article-table td { padding: 14px 16px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.article-table th:last-child, .article-table td:last-child { border-right: 0; }
.article-table tr:last-child td { border-bottom: 0; }
.article-table th { background: var(--surface-soft); font-weight: 780; }

.article-aside { position: sticky; top: 92px; margin-top: 48px; padding: 20px; border: 1px solid var(--border); background: var(--surface); }
.article-aside h2 { margin: 0 0 14px; font-size: 14px; letter-spacing: .02em; }
.article-aside ol { margin: 0; padding-left: 20px; }
.article-aside li { margin: 9px 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.article-aside a { color: inherit; text-decoration: none; }
.article-aside a:hover { color: var(--fg); }

.article-footer { border-top: 1px solid var(--border); background: var(--surface); }
.article-footer-inner { width: min(1160px, calc(100% - 40px)); margin: auto; padding: 48px 0 64px; }
.author-card { display: grid; grid-template-columns: 72px 1fr; gap: 20px; max-width: 760px; }
.author-mark { width: 72px; height: 72px; display: grid; place-items: center; color: white; background: var(--fg); border-radius: 50%; font: 800 24px/1 var(--font-mono); }
.author-card h2 { margin: 0 0 8px; font-size: 22px; }
.author-card p { margin: 0; color: var(--muted); }
.article-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 36px; }
.pager-link { min-height: 112px; padding: 18px; border: 1px solid var(--border); color: var(--fg); text-decoration: none; background: var(--bg); }
.pager-link small { display: block; margin-bottom: 8px; color: var(--muted); font: 11px/1.4 var(--font-mono); }
.pager-link strong { display: block; line-height: 1.45; }

.index-hero { width: min(1160px, calc(100% - 40px)); margin: auto; padding: 88px 0 52px; }
.index-hero h1 { max-width: 900px; margin: 0 0 20px; font-size: clamp(48px, 8vw, 94px); line-height: .98; letter-spacing: -.065em; }
.index-hero p { max-width: 720px; margin: 0; color: var(--muted); font-size: 19px; }
.article-grid { width: min(1160px, calc(100% - 40px)); margin: 0 auto 96px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.index-card { min-height: 310px; padding: 28px; display: grid; grid-template-rows: auto 1fr auto; color: var(--fg); text-decoration: none; background: var(--surface); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transition: background .18s ease, transform .18s ease; }
.index-card:hover { color: var(--fg); background: var(--surface-soft); transform: translateY(-2px); }
.index-card-top { display: flex; justify-content: space-between; gap: 18px; color: var(--muted); font: 11px/1.5 var(--font-mono); text-transform: uppercase; }
.index-card-number { color: var(--fg); font-size: 32px; font-weight: 800; letter-spacing: -.07em; }
.index-card h2 { margin: 42px 0 14px; font-size: clamp(25px, 3vw, 38px); line-height: 1.2; letter-spacing: -.04em; }
.index-card p { margin: 0; color: var(--muted); }
.index-card-footer { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--border); font-weight: 750; }

.skip-link { position: fixed; left: 12px; top: -80px; z-index: 99; padding: 10px 14px; color: white; background: var(--fg); }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--info); outline-offset: 3px; }

@media (max-width: 900px) {
  .article-shell { grid-template-columns: 1fr; gap: 0; }
  .article-aside { position: static; order: -1; margin-top: 36px; }
  .article-body { padding-top: 32px; }
  .article-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-header-inner, .article-shell, .article-footer-inner, .index-hero, .article-grid { width: min(100% - 28px, 1160px); }
  .site-nav { gap: 12px; }
  .site-nav a:first-child { display: none; }
  .article-hero { padding: 48px 0 32px; }
  .article-hero h1 { font-size: clamp(36px, 11vw, 54px); }
  .article-meta span + span::before { display: none; }
  .article-body h2 { margin-top: 54px; }
  .article-body blockquote { padding: 18px; font-size: 17px; }
  .author-card { grid-template-columns: 52px 1fr; }
  .author-mark { width: 52px; height: 52px; font-size: 18px; }
  .article-pager { grid-template-columns: 1fr; }
  .index-hero { padding-top: 64px; }
  .index-card { min-height: 270px; padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
