:root {
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --tint: #EFF2F6;
  --navy: #0B1F3A;
  --navy-hover: #17325A;
  --muted: #4A586B;
  --line: rgba(11, 31, 58, 0.12);
  --human: #F4B63F;
  --human-soft: #FCEBC8;
  --agent: #CBD5E1;
  --agent-soft: #E4E9F0;

  --font-heading: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --pad-x: clamp(24px, 6.67vw, 96px);
  --pad-y: clamp(72px, 8.33vw, 120px);
  --label-col: 260px;
  --col-gap: 96px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote, hr { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { max-width: 100%; }

a { color: inherit; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--human); outline-offset: 3px; }

.wrap { max-width: 1248px; margin: 0 auto; }

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Typography ---------- */

h1, h2, h3 { font-family: var(--font-heading); font-weight: 500; }

h1 {
  font-size: clamp(40px, 4.17vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(32px, 3.33vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.021em;
  text-wrap: balance;
}

.lead {
  max-width: 640px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--muted);
}

.label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.154em;
  color: var(--muted);
}

.label--sm { font-size: 12px; letter-spacing: 0.167em; }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.154em;
  color: var(--muted);
}

.fineprint { font-size: 13px; line-height: 1.5; color: var(--muted); }

/* ---------- Layout helpers ---------- */

.section { padding: var(--pad-y) var(--pad-x); }
.section--white { background: var(--surface); }
.section--tint { background: var(--tint); }
.section--bg { background: var(--bg); }

.stack-md { display: flex; flex-direction: column; gap: 24px; }
.stack-lg { display: flex; flex-direction: column; gap: clamp(48px, 5.5vw, 72px); }

.header-grid {
  display: grid;
  grid-template-columns: var(--label-col) minmax(0, 1fr);
  gap: var(--col-gap);
}

.side-grid {
  display: grid;
  grid-template-columns: var(--label-col) minmax(0, 1fr);
  gap: var(--col-gap);
}
.side-grid--top { align-items: start; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 28px;
  border-radius: 999px;
  background: var(--navy);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--navy-hover); }
.btn .icon { width: 18px; height: 18px; }
.btn--block { display: flex; padding: 20px 32px; font-size: 17px; }

/* ---------- Portrait ---------- */

.portrait {
  display: block;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--tint);
}
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.portrait--sm { width: 56px; height: 56px; }
.portrait--lg { width: 72px; height: 72px; }

/* ---------- Hero ---------- */

.hero { background: var(--bg); padding: clamp(48px, 5vw, 72px) var(--pad-x) clamp(64px, 7.8vw, 112px); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 640px) minmax(0, 1fr);
  gap: 72px;
  align-items: center;
}

.hero__copy { display: flex; flex-direction: column; gap: 32px; }

.byline {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.byline__name { font-size: 16px; font-weight: 600; }

.bottleneck {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 36px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(11, 31, 58, 0.08);
}
.bottleneck .label { font-size: 12px; letter-spacing: 0.167em; }
.bottleneck hr { border: 0; height: 1px; background: var(--line); }
.bottleneck__takeaway { font-family: var(--font-heading); font-size: 22px; line-height: 1.35; }

.bars { display: flex; flex-direction: column; gap: 20px; }

.bar-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}
.bar-row__who { display: flex; flex-direction: column; gap: 2px; }
.bar-row__who strong { font-size: 16px; font-weight: 600; }
.bar-row__who span { font-size: 13px; color: var(--muted); }
.bar-row__value { font-size: 15px; font-weight: 500; white-space: nowrap; }

.bar { height: 36px; border-radius: 6px; }
.bar--build { width: 19%; background: var(--agent); }
.bar--review { width: 82%; background: var(--human); }

/* ---------- Problem ---------- */

.key-figure { display: flex; flex-direction: column; gap: 16px; }
.key-figure__number {
  font-family: var(--font-heading);
  font-size: 96px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.031em;
}
.key-figure__caption { font-size: 15px; line-height: 1.55; color: var(--muted); }
.key-figure__source { font-size: 13px; line-height: 1.4; color: var(--muted); }
.key-figure__source a { color: var(--navy); text-underline-offset: 3px; text-decoration-thickness: 1px; }

.evidence li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.evidence__num { font-family: var(--font-heading); font-size: 20px; color: var(--muted); }
.evidence h3 { font-size: 26px; line-height: 1.2; margin-bottom: 8px; }
.evidence p { font-size: 16px; line-height: 1.6; color: var(--muted); }

/* ---------- Quotes ---------- */

.quote {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-left: 32px;
  border-left: 3px solid var(--navy);
}
.quote blockquote {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.014em;
}
.quote--lg blockquote { font-size: clamp(26px, 2.5vw, 36px); }
.quote--md blockquote { font-size: clamp(22px, 1.95vw, 28px); }
.quote figcaption { font-size: 14px; font-weight: 600; line-height: 1.4; }

.rule-top { padding-top: 56px; border-top: 1px solid var(--line); }

/* ---------- Q&A ---------- */

.qa__row {
  display: grid;
  grid-template-columns: var(--label-col) minmax(0, 1fr);
  gap: var(--col-gap);
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
.qa dt { font-family: var(--font-heading); font-size: 26px; font-weight: 500; line-height: 1.2; }
.qa dd { margin: 0; font-size: 18px; line-height: 1.6; }

/* ---------- Approach ---------- */

.legend { display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 14px; font-weight: 500; }
.legend li { display: flex; align-items: center; gap: 10px; }
.swatch { width: 28px; height: 8px; border-radius: 4px; }
.swatch--human { background: var(--human); }
.swatch--agent { background: var(--agent); }

.diagram {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(24px, 3.2vw, 40px);
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.diagram > .label { font-size: 12px; letter-spacing: 0.167em; }
.diagram figcaption { font-size: 13px; line-height: 1.5; color: var(--muted); }

.diagram__row,
.diagram__connectors {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) 20px minmax(0, 1fr) 20px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.diagram__arrow { color: var(--muted); }

.node {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 132px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1.5px solid;
}
.node h3 { font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1.2; }
.node p { font-size: 14px; line-height: 1.5; color: var(--muted); }
.node--human { background: var(--human-soft); border-color: var(--human); }
.node--agent { background: var(--agent-soft); border-color: var(--agent); }

.diagram__note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.diagram__note span { max-width: 200px; }
.diagram__note--up { grid-column: 1; }
.diagram__note--down { grid-column: 7; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 48px;
}
.step { display: flex; flex-direction: column; gap: 16px; }
.step::before { content: ""; display: block; height: 4px; border-radius: 2px; }
.step--human::before { background: var(--human); }
.step--agent::before { background: var(--agent); }
.step__head { display: flex; align-items: baseline; gap: 14px; padding-top: 8px; }
.step__head span { font-family: var(--font-heading); font-size: 20px; color: var(--muted); }
.step__head h3 { font-size: 28px; line-height: 1.15; }
.step p { font-size: 16px; line-height: 1.6; color: var(--muted); }

.chip {
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.chip--human { background: var(--human-soft); }
.chip--agent { background: var(--agent-soft); }

/* ---------- Karpathy ---------- */

.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.points li { display: flex; flex-direction: column; gap: 16px; padding-top: 28px; border-top: 1px solid var(--line); }
.points__num { font-family: var(--font-heading); font-size: 20px; color: var(--muted); }
.points h3 { font-size: 28px; line-height: 1.15; }
.points p { font-size: 16px; line-height: 1.6; color: var(--muted); }

/* ---------- Sources ---------- */

.sources li {
  display: grid;
  grid-template-columns: var(--label-col) minmax(0, 1fr);
  gap: var(--col-gap);
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.sources li > div { display: flex; flex-direction: column; gap: 6px; }
.sources h3 { font-size: 26px; line-height: 1.2; }
.sources p { font-size: 15px; line-height: 1.5; color: var(--muted); }
.sources a {
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.sources a:hover { text-decoration-thickness: 2px; }

/* ---------- Contact ---------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 72px;
  align-items: center;
  padding: clamp(32px, 5vw, 72px);
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.contact__copy { display: flex; flex-direction: column; gap: 20px; }
.contact__copy h2 { font-size: clamp(30px, 3.05vw, 44px); line-height: 1.12; letter-spacing: -0.023em; }
.contact__copy .lead { font-size: 18px; }
.contact__actions { display: flex; flex-direction: column; gap: 14px; }
.person { display: flex; align-items: center; gap: 16px; }
.person__name { font-size: 17px; font-weight: 600; }

/* ---------- Footer ---------- */

.footer { background: var(--bg); border-top: 1px solid var(--line); padding: 32px var(--pad-x); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; }
.footer__brand { font-family: var(--font-heading); font-size: 22px; font-weight: 600; }
.footer p { font-size: 14px; color: var(--muted); }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  :root { --col-gap: 48px; --label-col: 200px; }
  .hero__grid { gap: 48px; }
  .steps, .points { gap: 40px 32px; }
}

@media (max-width: 960px) {
  :root { --col-gap: 16px; }

  .header-grid, .side-grid, .qa__row, .sources li { grid-template-columns: minmax(0, 1fr); }
  .side-grid__spacer { display: none; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .steps, .points { grid-template-columns: minmax(0, 1fr); }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .lead { font-size: 18px; }
  .key-figure__number { font-size: 80px; }

  .diagram__row { display: flex; flex-direction: column; align-items: stretch; }
  .diagram__row--ship { flex-direction: column-reverse; }
  .diagram__arrow { display: none; }
  .node { min-height: 0; }
  .diagram__connectors { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
  .diagram__note { justify-content: flex-start; }
  .diagram__note--up, .diagram__note--down { grid-column: auto; }
  .diagram__note span { max-width: none; }
}

@media (max-width: 520px) {
  .bottleneck { padding: 24px; }
  .bar-row { grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; }
  .quote { padding-left: 20px; }
  .rule-top { padding-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
