:root {
  color-scheme: light;
  --ink: oklch(0.18 0.018 70);
  --muted: oklch(0.43 0.021 70);
  --faint: oklch(0.62 0.017 70);
  --paper: oklch(0.965 0.011 84);
  --paper-deep: oklch(0.925 0.018 82);
  --panel: oklch(0.99 0.007 84);
  --line: oklch(0.78 0.024 76);
  --rust: oklch(0.48 0.145 41);
  --rust-dark: oklch(0.34 0.09 39);
  --moss: oklch(0.35 0.052 138);
  --steel: oklch(0.34 0.022 238);
  --coal: oklch(0.17 0.02 64);
  --cream: oklch(0.985 0.014 88);
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --radius-sm: 0.45rem;
  --radius-md: 0.85rem;
  --radius-lg: 1.4rem;
  --shadow: 0 24px 70px color-mix(in oklch, var(--coal) 13%, transparent);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Chivo", ui-sans-serif, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -8%, color-mix(in oklch, var(--rust) 16%, transparent), transparent 32rem),
    radial-gradient(circle at 90% 0%, color-mix(in oklch, var(--moss) 14%, transparent), transparent 30rem),
    linear-gradient(180deg, var(--paper), oklch(0.948 0.014 82));
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(color-mix(in oklch, var(--line) 36%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklch, var(--line) 36%, transparent) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, black, transparent 72%);
}

a { color: var(--rust-dark); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--rust); }

.skip {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(-140%);
  background: var(--coal);
  color: var(--cream);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  z-index: 10;
}
.skip:focus { transform: translateY(0); }

.hero {
  min-height: 92vh;
  padding: clamp(1rem, 2vw, 2rem);
  padding-top: clamp(5.6rem, 8vw, 7.25rem);
  display: grid;
  align-content: space-between;
  gap: var(--space-3xl);
}

.nav {
  position: fixed;
  top: 1rem;
  right: max(1rem, calc((100vw - 1180px) / 2 + 2rem));
  z-index: 20;
  width: max-content;
  max-width: calc(100% - 2rem);
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding: 0.45rem;
  border: 1px solid color-mix(in oklch, var(--line) 74%, transparent);
  border-radius: 999px;
  background: color-mix(in oklch, var(--paper) 70%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: 0 16px 46px color-mix(in oklch, var(--coal) 10%, transparent);
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
  padding: 0.5rem 0.72rem;
  background: transparent;
}
.nav a:hover { background: color-mix(in oklch, var(--panel) 74%, transparent); }

.hero-grid {
  width: min(100%, 1180px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 25rem);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: end;
}

.eyebrow, .section-kicker, .stamp {
  margin: 0 0 var(--space-md);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: var(--rust-dark);
}

h1, h2, h3 {
  font-family: "Asul", Georgia, serif;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
}
h1 {
  max-width: 11ch;
  font-size: clamp(4.2rem, 14vw, 10.8rem);
  font-weight: 700;
}
h2 {
  font-size: clamp(2.1rem, 5.5vw, 4.4rem);
  font-weight: 700;
}
h3 {
  font-size: clamp(1.45rem, 2.3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-md);
}

.lede {
  max-width: 46rem;
  margin: var(--space-xl) 0 0;
  font-size: clamp(1.08rem, 2vw, 1.55rem);
  line-height: 1.42;
  color: var(--muted);
}

.source-note {
  background: var(--coal);
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  transform: rotate(-1.2deg);
}
.source-note p { margin: 0 0 var(--space-md); }
.source-note p:last-child { margin-bottom: 0; }
.source-note .stamp { color: oklch(0.82 0.078 78); }

main {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 0 clamp(1rem, 2vw, 2rem) var(--space-4xl);
}

.panel {
  scroll-margin-top: 8rem;
  background: color-mix(in oklch, var(--panel) 82%, transparent);
  border: 1px solid color-mix(in oklch, var(--line) 80%, transparent);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 18px 60px color-mix(in oklch, var(--coal) 7%, transparent);
}
.summary { margin-bottom: var(--space-4xl); }
.summary p, .references p { max-width: 75ch; font-size: 1.04rem; }

.section-grid {
  scroll-margin-top: 8rem;
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  padding: var(--space-4xl) 0;
  border-top: 1px solid color-mix(in oklch, var(--line) 80%, transparent);
}

.rail {
  position: sticky;
  top: 6.25rem;
  align-self: start;
}
.rail span {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-weight: 800;
  margin-bottom: var(--space-md);
}
.rail h2 { font-size: clamp(1.7rem, 3vw, 2.7rem); }

.content-stack { display: grid; gap: var(--space-xl); }
.card {
  background: color-mix(in oklch, var(--panel) 86%, transparent);
  border: 1px solid color-mix(in oklch, var(--line) 86%, transparent);
  border-radius: var(--radius-md);
  padding: clamp(1.2rem, 3vw, 2rem);
}
.card.large { padding: clamp(1.4rem, 4vw, 2.7rem); }
.card p { margin: 0 0 var(--space-md); max-width: 76ch; }
.card p:last-child { margin-bottom: 0; }
.card ul, .card ol { margin: 0; padding-left: 1.25rem; }
.card li { margin: 0.62rem 0; }

.callout {
  margin-top: var(--space-lg);
  background: color-mix(in oklch, var(--paper-deep) 68%, var(--rust) 7%);
  border: 1px solid color-mix(in oklch, var(--rust) 30%, var(--line));
  border-radius: var(--radius-sm);
  padding: var(--space-lg);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl);
}
.two-col.asym { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }

.metrics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.12fr) minmax(0, 1fr);
  gap: clamp(1rem, 2.4vw, 2rem);
  align-items: stretch;
}
.metric {
  background: var(--moss);
  color: var(--cream);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 2.4vw, 2rem);
  min-height: 13rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.metric:nth-child(2) { background: var(--rust-dark); transform: translateY(1rem); }
.metric:nth-child(3) { background: var(--steel); }
.metric-value {
  display: block;
  font-family: "Asul", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.85rem, 4.1vw, 4.05rem);
  letter-spacing: -0.06em;
  line-height: 0.9;
  white-space: nowrap;
}
.metric:nth-child(2) .metric-value { font-size: clamp(2.55rem, 3.55vw, 3.55rem); }
.metric-label { display: block; margin-top: var(--space-lg); font-weight: 700; }
.metric a { color: var(--cream); }

.profile { min-height: 100%; }
.dark-card {
  background: var(--coal);
  color: var(--cream);
  border-color: color-mix(in oklch, var(--coal) 70%, var(--cream));
}
.dark-card h3 { color: oklch(0.88 0.064 78); }
.dark-card p { font-size: clamp(1.08rem, 2vw, 1.35rem); line-height: 1.45; }

.project-list {
  columns: 2;
  column-gap: var(--space-2xl);
}
.questions ol { counter-reset: q; list-style: none; padding-left: 0; }
.questions li {
  counter-increment: q;
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: var(--space-md);
  align-items: start;
}
.questions li::before {
  content: counter(q, decimal-leading-zero);
  font-weight: 800;
  color: var(--rust-dark);
}

sup { line-height: 0; }
sup a {
  display: inline-block;
  padding: 0 0.14rem;
  font-size: 0.72em;
  font-weight: 800;
  text-decoration: none;
  color: var(--rust-dark);
}

.references { margin-top: var(--space-3xl); }
.footnotes {
  margin: var(--space-xl) 0 0;
  padding-left: 1.4rem;
  max-width: 88ch;
}
.footnotes li {
  margin: var(--space-md) 0;
  padding-left: var(--space-xs);
}

.footer {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: var(--space-2xl) clamp(1rem, 2vw, 2rem) var(--space-3xl);
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  color: var(--muted);
  border-top: 1px solid color-mix(in oklch, var(--line) 80%, transparent);
}
.footer p { margin: 0; }

@media (max-width: 900px) {
  .hero { min-height: auto; padding-top: 7rem; }
  .nav {
    left: 50%;
    right: auto;
    width: min(calc(100% - 2rem), 1010px);
    transform: translateX(-50%);
    justify-content: center;
    border-radius: var(--radius-lg);
  }
  .nav a { font-size: 0.7rem; padding: 0.42rem 0.58rem; }
  .hero-grid, .section-grid, .two-col, .two-col.asym, .metrics-grid {
    grid-template-columns: 1fr;
  }
  .source-note { transform: none; }
  .rail { position: static; display: flex; align-items: center; gap: var(--space-md); }
  .rail span { margin-bottom: 0; }
  .metric:nth-child(2) { transform: none; }
  .metric-value, .metric:nth-child(2) .metric-value { font-size: clamp(3rem, 14vw, 4.4rem); }
  .project-list { columns: 1; }
  .footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
