/* ============================================================
   LFI — Local Frontier Intelligence
   Palette: paper white / graphite / ink black + NVIDIA green
   ============================================================ */

:root {
  --paper:      #f7f7f5;   /* page background          */
  --paper-alt:  #efefec;   /* alternating band         */
  --ink:        #16181d;   /* primary text             */
  --graphite:   #5b5f66;   /* secondary text           */
  --hairline:   #d9d9d4;   /* dividers / rules         */
  --green:      #76b900;   /* NVIDIA green accent       */
  --green-deep: #5a8f00;   /* hover / darker accent     */

  --maxw: 1080px;    /* hero splash only */
  --content: 1040px;  /* shared width for ALL section content */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* ---------- scroll progress bar ---------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  z-index: 50;
}
.progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--green);
  transition: width 0.08s linear;
}

/* ---------- shared layout ---------- */
.wrap {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 clamp(22px, 6vw, 64px);
}

.band {
  padding: clamp(80px, 14vh, 160px) 0;
  border-top: 1px solid var(--hairline);
}
.band.alt { background: var(--paper-alt); }

.section-index {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin: 0 0 1.4rem;
  font-weight: 600;
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 1.6rem;
}

.prose {
  max-width: none;
  color: var(--ink);
}
.prose p { margin: 0 0 1.15rem; color: var(--graphite); font-size: 1.06rem; }
.prose p strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 0 clamp(22px, 6vw, 64px);
  overflow: hidden;
}
/* faint radial glow behind the headline */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 55% at 50% 42%, rgba(118,185,0,0.10), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
  text-align: center;
}

.eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--graphite);
  margin: 0 0 1.8rem;
  font-weight: 500;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin: 0 auto 1rem;
  text-wrap: balance;
}

.abbr {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--graphite);
  margin: 0 auto 2rem;
  font-weight: 500;
}

.tagline {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  line-height: 1.45;
  color: var(--graphite);
  max-width: 30ch;
  margin: 0 auto 2.6rem;
}
.tagline strong { color: var(--ink); font-weight: 500; }

/* hero link row */
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.5rem;
  justify-content: center;
}
.hero-links a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease),
              transform 0.25s var(--ease);
}
.hero-links a:hover {
  border-color: var(--green);
  color: var(--green-deep);
  transform: translateY(-2px);
}
.hero-links .arrow { color: var(--green); font-size: 0.85em; }

/* small human-written note, bottom-left of the hero */
.human-note {
  position: absolute;
  left: clamp(22px, 6vw, 64px);
  bottom: clamp(20px, 4vh, 40px);
  margin: 0;
  max-width: 19rem;
  font-size: 0.7rem;
  line-height: 1.45;
  color: var(--graphite);
  opacity: 0.72;
  z-index: 1;
}

/* scroll cue */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(24px, 5vh, 48px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--graphite);
  z-index: 1;
}
.scroll-cue-label {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.scroll-cue-line {
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--graphite), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-cue-line::after {
  content: "";
  position: absolute;
  top: -50%;
  left: 0;
  width: 1px;
  height: 50%;
  background: var(--green);
  animation: cueDrop 2.2s var(--ease) infinite;
}
@keyframes cueDrop {
  0%   { top: -50%; opacity: 0; }
  25%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ============================================================
   PROGRAMS
   ============================================================ */
.programs {
  max-width: var(--content);
  margin: 3rem auto 0;
  padding: 0 clamp(22px, 6vw, 64px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: stretch;
}
.program-tag {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-deep);
  font-weight: 600;
  margin: 0 0 0.9rem;
}
.program h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 1.1rem;
}
.program-body {
  color: var(--graphite);
  font-size: 1.02rem;
  margin: 0 0 1.1rem;
  max-width: none;
}
.divider {
  width: 1px;
  background: linear-gradient(transparent, var(--hairline) 12%, var(--hairline) 88%, transparent);
}

/* ============================================================
   NOTIONS — adopted vs discarded, split by the vertical divider
   ============================================================ */
.notions {
  max-width: var(--content);
  margin: 3rem auto 0;
  padding: 0 clamp(22px, 6vw, 64px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: stretch;
}
.notions-label {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 1.4rem;
}
.notions-label.adopted { color: var(--green-deep); }
.notions-label.discarded { color: var(--graphite); }

.notion-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.notion-list li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hairline);
}
.notion-list li:first-child { padding-top: 0; }
.notion-title {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.42;
}
.notions-col.discarded .notion-title {
  color: var(--graphite);
}
.notion-desc {
  margin: 0.4rem 0 0;
  color: var(--graphite);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* three-step timeline under each program — dashed connector, staggered reveal */
.timeline {
  list-style: none;
  margin: 1.7rem 0 0;
  padding: 0;
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  align-items: start;
  padding-bottom: 1.9rem;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li:not(:last-child)::before {   /* dashed line to the next step */
  content: "";
  position: absolute;
  left: calc(0.95rem - 0.5px);
  top: 2.3rem;
  bottom: -0.1rem;
  border-left: 1px dashed var(--hairline);
}
.tl-num {
  position: relative;
  z-index: 1;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  border: 1px solid var(--green-deep);
  color: var(--green-deep);
  background: var(--paper-alt);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 600;
}
.tl-content { padding-top: 0.15rem; }
.tl-title {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
}
.tl-note {
  margin: 0.35rem 0 0;
  color: var(--graphite);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ============================================================
   LISTS: steps / updates / team
   ============================================================ */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
}
.steps li {
  position: relative;
  padding: 1rem 0 1rem 2rem;
  border-bottom: 1px solid var(--hairline);
  color: var(--graphite);
  font-size: 1.05rem;
}
.steps li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.55rem;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.updates {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
}
.updates li {
  display: flex;
  gap: 1.4rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}
.update-date {
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-deep);
  white-space: nowrap;
  min-width: 6.5rem;
  font-weight: 600;
}
.update-text { color: var(--graphite); }

.criteria {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  max-width: none;
}
.criteria li {
  display: flex;
  gap: 1.4rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}
.criteria-key {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-deep);
  font-weight: 600;
  flex: 0 0 8rem;
  white-space: nowrap;
}
.criteria-val { color: var(--graphite); }
.criteria-val strong { color: var(--ink); font-weight: 600; }

.prose a,
.criteria-val a {
  color: var(--green-deep);
  text-underline-offset: 3px;
  text-decoration-color: var(--hairline);
}
.prose a:hover { text-decoration-color: var(--green); }

/* ============================================================
   MOONSHOT INTERLUDE — scroll-driven bullet + moon
   ============================================================ */
.moon-stage {
  position: relative;
  height: 220vh;              /* scroll runway for the animation */
  background: var(--paper);
}
.moon-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.moon-svg {
  width: min(720px, 84vw);
  height: auto;
  overflow: visible;
}
.moon .maria ellipse {
  fill: #c4c4bb;
  opacity: 0.35;
}
.moon .craters circle {
  opacity: 0.7;
}
.moon .spots circle {
  fill: #f5f5ef;
  opacity: 0.7;
}
.moon-path {
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.65;
  /* revealed via stroke-dashoffset in JS (pathLength=100) */
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}
.moon-bullet {
  fill: var(--ink);
}
.moon-impact {
  fill: none;
  stroke: var(--green);
  stroke-width: 2.5;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  /* collapse the runway; show a settled "landed" state */
  .moon-stage { height: 100vh; }
  .moon-path { stroke-dashoffset: 0; }
  .moon-bullet { display: none; }
}

/* Comparison table (section 01) — wider than the prose column */
.table-wrap {
  margin: 2.8rem 0 0;
  overflow-x: auto;            /* graceful on very narrow screens */
}
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  min-width: 34rem;
}
.compare th,
.compare td {
  text-align: left;
  padding: 1rem 1.3rem;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.compare thead th {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.18rem;
  line-height: 1.2;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
}
.compare tbody th {                 /* row labels */
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-deep);
  white-space: nowrap;
  width: 10.5rem;
}
.compare td { color: var(--graphite); }

/* emphasize the "ours" column */
.compare .ours { background: rgba(118, 185, 0, 0.06); }
.compare thead th.ours { color: var(--green-deep); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* playful aside beneath the table */
.aside {
  margin: 1.5rem 0 0;
  font-size: 0.98rem;
  font-style: italic;
  color: var(--graphite);
  max-width: none;
}

/* Contributors — balanced, column-first two-column list
   (fills top-to-bottom down the left column, then the right). */
.contributors {
  list-style: none;
  padding: 0;
  margin: 1.8rem 0 0;
  max-width: none;
  column-count: 2;
  column-gap: clamp(28px, 6vw, 72px);
}
.contributors li {
  break-inside: avoid;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 1.05rem;
}

/* Things in Our Favor — evidence list with green check markers */
.favor {
  list-style: none;
  margin: 1.8rem 0 0;
  padding: 0;
  max-width: none;
}
.favor li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--hairline);
  align-items: start;
}
.favor-mark {
  color: var(--green-deep);
  font-size: 1rem;
  line-height: 1.5;
  margin-top: 0.1rem;
}
.favor-content { min-width: 0; }
.favor-title {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.42;
}
.favor-desc {
  margin: 0.4rem 0 0;
  color: var(--graphite);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Papers — linked list of publications */
.papers {
  list-style: none;
  padding: 0;
  margin: 1.7rem 0 0;
  max-width: none;
}
.papers li { border-bottom: 1px solid var(--hairline); }
.paper {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.2rem;
  padding: 1.25rem 0;
  text-decoration: none;
  color: var(--ink);
}
.paper-text { display: flex; flex-direction: column; gap: 0.3rem; }
.paper-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  transition: color 0.2s var(--ease);
}
.paper-meta {
  color: var(--graphite);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}
.paper-arrow {
  color: var(--green);
  font-size: 1.1rem;
  transition: transform 0.2s var(--ease);
}
.paper:hover .paper-title { color: var(--green-deep); }
.paper:hover .paper-arrow { transform: translate(2px, -2px); }

/* ============================================================
   CLOSING / CONTACT
   ============================================================ */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}
.cta {
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  background: var(--green);
  color: #14210a;
  border: 1px solid var(--green);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.cta:hover { background: var(--green-deep); transform: translateY(-2px); }
.cta.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline);
}
.cta.ghost:hover { border-color: var(--green); color: var(--green-deep); background: transparent; }
.cta .arrow { opacity: 0.7; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--hairline);
  padding: 2.2rem 0;
  font-size: 0.9rem;
  color: var(--graphite);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.to-top { text-decoration: none; }
.to-top:hover { color: var(--green-deep); }

/* NVIDIA-domain legal links */
.legal {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  font-size: 0.8rem;
  color: var(--graphite);
}
.legal a {
  text-decoration: none;
  color: var(--graphite);
  transition: color 0.2s var(--ease);
}
.legal a:hover { color: var(--green-deep); }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .programs,
  .notions {
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }
  .divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--hairline), transparent);
  }
  .updates li,
  .criteria li { flex-direction: column; gap: 0.3rem; }
  /* reset the fixed label sizing so captions hug their content when stacked */
  .update-date, .criteria-key { min-width: 0; flex: 0 0 auto; }
  .contributors { column-count: 1; }
}

/* ============================================================
   ACCESSIBILITY: reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue-line::after { animation: none; }
}
