/* ============================================================
   KAPIL · About page stylesheet
   Mirrors the Homepage design system, adds chapter + map primitives.
   ============================================================ */

:root {
  --paper:        #ece6d9;
  --paper-light:  #f4efe5;
  --paper-deep:   #e2dbcb;
  --ink:          #1c1a17;
  --ink-soft:     #2c2925;
  --ink-quiet:    #5a5348;
  --taupe:        #877a63;
  --taupe-soft:   #a89c85;
  --rule:         #c9c0ae;
  --rule-soft:    #d9d1bf;
  --hairline:     #b5ac98;

  --serif: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --sans:  'Inter Tight', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --gutter: clamp(24px, 6vw, 96px);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
body {
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.11  0 0 0 0 0.10  0 0 0 0 0.08  0 0 0 0.22 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-attachment: fixed;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--paper-light); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.mono {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  font-weight: 500;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 22px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  backdrop-filter: blur(8px);
  background: rgba(236, 230, 217, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, padding 0.3s;
}
.nav.scrolled {
  border-bottom-color: var(--rule-soft);
  padding: 14px var(--gutter);
}
.nav-brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--ink);
  display: inline-flex; align-items: baseline; gap: 4px;
  white-space: nowrap;
}
.nav-brand .tm {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-quiet);
  letter-spacing: 0.05em;
  vertical-align: super;
  font-weight: 400;
}
.nav-links { display: flex; justify-content: center; gap: 42px; }
.nav-links a {
  position: relative;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink-quiet);
  padding: 8px 0;
  transition: color 0.25s;
}
.nav-links a::before {
  content: attr(data-idx);
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--taupe);
  margin-right: 6px;
  letter-spacing: 0.08em;
  vertical-align: super;
}
.nav-links a::after {
  content: ""; position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--ink);
  transition: right 0.4s cubic-bezier(.4,0,.2,1);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after { right: 0; }

.nav-cta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1px solid var(--ink);
  color: var(--ink);
  justify-self: end;
  transition: background 0.3s, color 0.3s;
}
.nav-cta:hover { background: var(--ink); color: var(--paper-light); }

.nav-left {
  display: inline-flex;
  align-items: baseline;
  gap: 18px;
}
.nav-home {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  padding: 6px 0;
  position: relative;
  transition: color 0.25s;
  white-space: nowrap;
}
.nav-home:hover { color: var(--ink); }
.nav-home::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--ink);
  transition: right 0.4s cubic-bezier(.4,0,.2,1);
}
.nav-home:hover::after { right: 0; }
.nav-home-arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  margin-right: 2px;
}
.nav-home:hover .nav-home-arrow { transform: translateX(-3px); }

@media (max-width: 480px) {
  .nav-home { display: none; }
}


/* ============================================================
   LOCAL SUBNAV — On this page
   ============================================================ */
.subnav {
  position: sticky;
  top: 56px;
  z-index: 90;
  margin-top: 72px;
  background: rgba(236, 230, 217, 0.78);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}
.subnav-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  gap: 32px;
}
.subnav-label {
  color: var(--taupe);
  letter-spacing: 0.14em;
  white-space: nowrap;
}
.subnav-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.subnav-links a {
  position: relative;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink-quiet);
  padding: 6px 0;
  transition: color 0.25s;
}
.subnav-links a::before {
  content: attr(data-idx);
  font-family: var(--mono);
  font-size: 8px;
  color: var(--taupe);
  margin-right: 6px;
  letter-spacing: 0.08em;
  vertical-align: super;
  text-transform: uppercase;
}
.subnav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--ink);
  transition: right 0.4s cubic-bezier(.4,0,.2,1);
}
.subnav-links a:hover { color: var(--ink); }
.subnav-links a:hover::after { right: 0; }
.subnav-links a.active { color: var(--ink); }
.subnav-links a.active::after { right: 0; }

@media (max-width: 720px) {
  .subnav-inner { gap: 16px; padding: 10px 20px; overflow-x: auto; }
  .subnav-label { display: none; }
  .subnav-links { gap: 18px; flex-wrap: nowrap; }
  .subnav-links a { font-size: 11.5px; white-space: nowrap; }
}



/* ============================================================
   HERO — Four Generations. One Standard.
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 48px var(--gutter) 80px;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 40px;
  overflow: hidden;
  color: var(--ink);
}

.hero-atmosphere {
  position: absolute; inset: 0;
  pointer-events: none;
  color: var(--ink-quiet);
  z-index: 0;
}
.atmos { position: absolute; }
.atmos-lines {
  inset: 0; width: 100%; height: 100%;
  opacity: 0.55;
  animation: atmos-drift 60s linear infinite alternate;
}
.atmos-lat {
  inset: 0; width: 100%; height: 100%;
  opacity: 0.6;
  animation: atmos-drift-slow 90s linear infinite alternate;
}
.atmos-compass {
  width: 420px; height: 420px;
  top: 8%; right: 6%;
  opacity: 0.28;
  animation: atmos-rotate 220s linear infinite;
}
@keyframes atmos-drift {
  from { transform: translate(-14px, -8px) scale(1.02); }
  to   { transform: translate(14px, 8px)  scale(1); }
}
@keyframes atmos-drift-slow {
  from { transform: translate(10px, 6px); }
  to   { transform: translate(-10px, -6px); }
}
@keyframes atmos-rotate {
  from { transform: rotate(0); }
  to   { transform: rotate(360deg); }
}

.hero-meta-top {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--rule-soft);
}

.hero-core {
  position: relative; z-index: 2;
  align-self: center;
  max-width: 1100px;
}
.hero-kicker {
  margin-bottom: 32px;
  color: var(--taupe);
}
.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(72px, 10vw, 168px);
  line-height: 0.94;
  letter-spacing: -0.03em;
  margin: 0 0 40px;
  color: var(--ink);
}
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title .line > * { display: inline-block; }
.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--ink-soft);
}

.hero-sub {
  font-family: var(--serif);
  font-size: clamp(20px, 1.9vw, 27px);
  line-height: 1.45;
  font-weight: 400;
  color: var(--ink-soft);
  max-width: 720px;
  margin: 0;
}

.hero-meta-bottom {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-soft);
}
.hero-meta-bottom > div > .v {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
  margin-top: 6px;
}

.hero-scrollcue {
  position: absolute;
  bottom: 30px;
  left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
  color: var(--ink-quiet);
  z-index: 2;
}
.cue-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--ink-quiet), transparent);
  animation: cue-drop 2.2s ease-in-out infinite;
}
@keyframes cue-drop {
  0%,100% { transform: scaleY(1); transform-origin: top; opacity: 0.8; }
  50%     { transform: scaleY(0.3); transform-origin: top; opacity: 0.3; }
}


/* ============================================================
   OPENING STATEMENT
   ============================================================ */
.opening {
  padding: 180px var(--gutter) 180px;
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 80px;
}
.opening-index {
  color: var(--taupe);
}
.opening-pull {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
  max-width: 1300px;
}
.opening-pull span {
  display: block;
}
.opening-pull em {
  font-style: italic;
  color: var(--taupe);
  font-weight: 400;
}
.opening-prose {
  max-width: 720px;
  margin-left: auto;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.opening-prose p {
  margin: 0 0 22px;
}
.opening-prose em {
  font-style: italic;
  color: var(--ink);
}


/* ============================================================
   SECTION-HEAD (shared)
   ============================================================ */
.section-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 80px;
}
.section-head .mono { color: var(--taupe); padding-top: 10px; }
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}
.section-title em {
  font-style: italic;
  color: var(--taupe);
  font-weight: 400;
}


/* ============================================================
   CHAPTERS — Generational Timeline
   ============================================================ */
.chapters {
  position: relative;
  padding: 120px var(--gutter) 120px;
  max-width: 1800px;
  margin: 0 auto;
}

.chapters-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 160px;
}
.chapters-head .mono { color: var(--taupe); padding-top: 10px; }
.chapters-head .section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
}
.chapters-head .section-title em {
  font-style: italic; color: var(--taupe); font-weight: 400;
}

/* Vertical spine running the length of the chapters section */
.spine {
  position: absolute;
  left: calc(var(--gutter) + 40px);
  top: 320px;
  bottom: 200px;
  width: 1px;
  background: linear-gradient(to bottom, transparent 0%, var(--hairline) 6%, var(--hairline) 94%, transparent 100%);
  opacity: 0.8;
  pointer-events: none;
}

/* Failsafe — if IntersectionObserver hasn't fired within 2s, reveal everything.
   Prevents empty-space bugs when content is above/far-below the initial viewport. */
@keyframes kapilForceReveal { to { opacity: 1; transform: none; clip-path: inset(0); } }
.reveal, .reveal-soft, .reveal-image, .reveal-mask > span, .reveal-rule, .plate-clip {
  animation: kapilForceReveal 0.01s linear 2s forwards;
}
.reveal.in, .reveal-soft.in, .reveal-image.in, .reveal-mask.in > span,
.reveal-rule.in, .plate-clip.in {
  animation: none;
}

/* A single generation block */
.gen {
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr 1.15fr;
  gap: 56px;
  padding: 120px 0 160px;
  border-bottom: 1px solid var(--rule-soft);
}
.gen:last-of-type { border-bottom: 0; }

/* Alternate portrait side on even generations.
   grid-row:1 on both children prevents the auto-placement algorithm
   from pushing the body to row 2 when the portrait claims column 3
   ahead of the body's grid-column:2 declaration. */
.gen.gen-2 {
  grid-template-columns: 80px 1.15fr 1fr;
}
.gen.gen-2 .gen-body {
  grid-column: 2;
  grid-row: 1;
}
.gen.gen-2 .gen-portrait {
  grid-column: 3;
  grid-row: 1;
}
.gen.gen-4 {
  grid-template-columns: 80px 1.15fr 1fr;
}
.gen.gen-4 .gen-body {
  grid-column: 2;
  grid-row: 1;
}
.gen.gen-4 .gen-portrait {
  grid-column: 3;
  grid-row: 1;
}

/* Rail — Roman numeral + vertical year */
.gen-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding-top: 20px;
  position: relative;
  z-index: 2;
}
.gen-rail::before {
  /* Node dot on the spine */
  content: "";
  position: absolute;
  top: 14px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink);
  z-index: 1;
}
.gen-idx {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 48px;
  line-height: 1;
  color: var(--ink);
  margin-top: 30px;
  letter-spacing: -0.01em;
}
.gen-year-vert {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.24em;
  color: var(--taupe);
  padding: 24px 0;
  font-size: 11px;
}

/* Portrait frame */
.gen-portrait {
  position: relative;
  align-self: start;
}
.portrait-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
  aspect-ratio: 4 / 5;
  max-height: 780px;
  box-shadow:
    0 1px 0 rgba(255, 252, 245, 0.6) inset,
    0 30px 80px -40px rgba(28, 26, 23, 0.45);
}
.portrait-frame img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.02);
  transition: transform 1.6s cubic-bezier(.2,.7,.2,1);
}
.gen:hover .portrait-frame img,
.gen.in-view .portrait-frame img {
  transform: scale(1.02);
}
.portrait-caption {
  position: absolute;
  bottom: 14px; left: 14px;
  background: var(--paper);
  padding: 6px 10px;
  border: 1px solid var(--rule);
  color: var(--ink-quiet);
}

/* Body */
.gen-body {
  align-self: start;
  padding-top: 14px;
  max-width: 640px;
}
.gen-kicker {
  color: var(--taupe);
  margin-bottom: 24px;
}
.gen-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 5.2vw, 78px);
  line-height: 1.0;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  color: var(--ink);
}
.gen-name em {
  font-style: italic;
  color: var(--taupe);
  font-weight: 400;
}
.gen-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule-soft);
}
.gen-prose {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.gen-prose p { margin: 0 0 20px; }
.gen-prose em { font-style: italic; color: var(--ink); }

.gen-meta {
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule-soft);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 32px;
}
.gen-meta > div { display: grid; gap: 4px; }
.gen-meta dt {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--taupe);
  margin: 0;
}
.gen-meta dd {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15.5px;
  color: var(--ink-soft);
  margin: 0;
}

/* Continuity — the two-shot between Gen 3 and Gen 4 */
.continuity {
  margin: 80px 0 40px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 56px;
  align-items: end;
}
.continuity-frame {
  position: relative;
  border: 1px solid var(--rule);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--paper-deep);
  box-shadow: 0 30px 80px -40px rgba(28, 26, 23, 0.45);
}
.continuity-frame img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.continuity-caption {
  margin: 0;
  padding-bottom: 14px;
}
.continuity-caption .mono { color: var(--taupe); margin-bottom: 14px; }
.continuity-caption p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
}


/* ============================================================
   LEGACY FOOTPRINT
   ============================================================ */
.footprint {
  padding: 180px var(--gutter) 180px;
  max-width: 1800px;
  margin: 0 auto;
}
.footprint-lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 900px;
  margin: 0 0 80px;
}
.footprint-lede em {
  font-style: italic; color: var(--taupe);
}

.footprint-stage {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 64px;
  align-items: start;
}

/* Archival plate frame — paper-deep ground, hairline border, soft shadow */
.map-plate {
  position: relative;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  padding: 8px;
  box-shadow:
    0 1px 0 rgba(255, 252, 245, 0.6) inset,
    0 30px 80px -40px rgba(28, 26, 23, 0.45);
}
.map-plate::before {
  /* Inner hairline — gives the plate two-rule editorial weight */
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--rule-soft);
  pointer-events: none;
}

.map {
  width: 100%; height: auto;
  color: var(--ink);
  aspect-ratio: 16 / 9;
  display: block;
}

/* Rings — slower, calmer breath. Not pulsing constantly — just barely. */
.map .fp-rings .ring { animation: ring-pulse 14s ease-in-out infinite; }
.map .fp-rings .ring-2 { animation-delay: 1.2s; }
.map .fp-rings .ring-3 { animation-delay: 2.4s; }
.map .fp-rings .ring-4 { animation-delay: 3.6s; }
@keyframes ring-pulse {
  0%, 100% { opacity: 0.40; }
  50%      { opacity: 0.22; }
}

/* Arcs — drawn only when the section enters the viewport, not on page load. */
.map .fp-arcs .arc {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: none;
}
.map.map-active .fp-arcs .arc {
  animation: arc-draw 3s cubic-bezier(.4,0,.2,1) forwards;
}
.map.map-active .fp-arcs .arc-1 { animation-delay: 0.20s; }
.map.map-active .fp-arcs .arc-2 { animation-delay: 0.55s; }
.map.map-active .fp-arcs .arc-3 { animation-delay: 0.90s; }
.map.map-active .fp-arcs .arc-4 { animation-delay: 0.40s; }
.map.map-active .fp-arcs .arc-5 { animation-delay: 0.65s; }
@keyframes arc-draw { to { stroke-dashoffset: 0; } }

/* Nodes — fade in only when section enters viewport */
.map .fp-nodes .node { opacity: 0; }
.map.map-active .fp-nodes .node { animation: node-in 0.7s ease forwards; }
.map.map-active .fp-nodes .node-delhi              { animation-delay: 0.10s; }
.map.map-active .fp-nodes .node:nth-child(2)       { animation-delay: 0.85s; }
.map.map-active .fp-nodes .node:nth-child(3)       { animation-delay: 1.30s; }
.map.map-active .fp-nodes .node:nth-child(4)       { animation-delay: 1.75s; }
.map.map-active .fp-nodes .node:nth-child(5)       { animation-delay: 0.65s; }
.map.map-active .fp-nodes .node:nth-child(6)       { animation-delay: 1.05s; }
@keyframes node-in { to { opacity: 1; } }

/* Delhi node — slow, deliberate breath after the map has drawn */
.map.map-active .node-delhi .node-pulse {
  animation: node-breath 5s ease-in-out 2.4s infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes node-breath {
  0%   { opacity: 0;    r: 14; }
  35%  { opacity: 0.55; r: 22; }
  100% { opacity: 0;    r: 34; }
}

/* Inscriptions and compass — held back until map draws */
.map .fp-inscription, .map .fp-compass, .map .fp-coords {
  opacity: 0;
  transition: opacity 1.4s var(--reveal-ease);
}
.map.map-active .fp-inscription { opacity: 1; transition-delay: 0.10s; }
.map.map-active .fp-compass     { opacity: 1; transition-delay: 0.25s; }
.map.map-active .fp-coords      { opacity: 1; transition-delay: 1.80s; }

@media (prefers-reduced-motion: reduce) {
  .map .fp-arcs .arc { stroke-dashoffset: 0; animation: none; }
  .map .fp-nodes .node { opacity: 1; animation: none; }
  .map .fp-rings .ring { animation: none; }
  .map .node-delhi .node-pulse { animation: none; opacity: 0; }
  .map .fp-inscription, .map .fp-compass, .map .fp-coords { opacity: 1; transition: none; }
}

.fp-log {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  gap: 28px;
}
.fp-log li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule-soft);
}
.fp-log li .mono {
  grid-row: span 3;
  color: var(--taupe);
  padding-top: 4px;
}
.fp-era {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}
.fp-place {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
}
.fp-place em { font-style: italic; color: var(--taupe); }
.fp-desc {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-quiet);
  line-height: 1.5;
}


/* ============================================================
   PRESENT-DAY KAPIL
   ============================================================ */
.present {
  padding: 180px var(--gutter) 180px;
  background: var(--paper-light);
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}
.present-lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 900px;
  margin: 0 auto 80px;
}
.present > .section-head { max-width: 1600px; margin: 0 auto 80px; }
.present-lede { max-width: 1600px; margin-left: auto; margin-right: auto; }

.capabilities {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
}
.cap {
  background: var(--paper-light);
  padding: 48px 40px 56px;
  transition: background 0.4s, transform 0.6s;
}
.cap:hover {
  background: var(--paper);
}
.cap-idx {
  color: var(--taupe);
  margin-bottom: 28px;
}
.cap h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.cap p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}


/* ============================================================
   WHAT ENDURES
   ============================================================ */
.endures {
  padding: 180px var(--gutter) 180px;
  max-width: 1600px;
  margin: 0 auto;
}
.endures-list { display: grid; gap: 0; }
.endure-row {
  display: grid;
  grid-template-columns: 80px 300px 1fr;
  gap: 48px;
  padding: 32px 0;
  border-top: 1px solid var(--rule-soft);
  align-items: baseline;
  transition: padding 0.4s;
}
.endure-row:last-child { border-bottom: 1px solid var(--rule-soft); }
.endure-row:hover { padding: 40px 0; }
.endure-idx {
  font-family: var(--serif);
  font-size: 36px;
  color: var(--taupe);
  font-style: italic;
  font-weight: 400;
}
.endure-name {
  font-family: var(--serif);
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.05;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.endure-body {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 560px;
}


/* ============================================================
   CLOSING
   ============================================================ */
.closing {
  padding: 200px var(--gutter) 200px;
  background: var(--ink);
  color: var(--paper-light);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.closing::before {
  /* Very faint paper texture */
  content: "";
  position: absolute; inset: 0;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.3' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.92  0 0 0 0 0.88  0 0 0 0 0.8  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.7;
  pointer-events: none;
}
.closing > * { position: relative; z-index: 1; }
.closing-kicker {
  color: var(--taupe-soft);
  margin-bottom: 80px;
}
.closing-line {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 76px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--paper-light);
}
.closing-line span {
  display: block;
}
.closing-line em {
  font-style: italic;
  color: var(--taupe-soft);
  font-weight: 400;
}

.closing-ctas {
  margin-top: 80px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 18px 28px;
  border: 1px solid var(--paper-light);
  transition: background 0.3s, color 0.3s;
}
.cta .arr {
  transition: transform 0.3s;
}
.cta-primary {
  background: var(--paper-light);
  color: var(--ink);
}
.cta-primary:hover {
  background: transparent;
  color: var(--paper-light);
}
.cta-primary:hover .arr { transform: translateX(6px); }
.cta-secondary {
  color: var(--paper-light);
  border-color: var(--taupe-soft);
}
.cta-secondary:hover {
  background: var(--paper-light);
  color: var(--ink);
  border-color: var(--paper-light);
}
.cta-secondary:hover .arr { transform: translateX(6px); }

.closing-sig {
  margin-top: 100px;
  color: var(--taupe-soft);
}


/* ============================================================
   FOOTER
   ============================================================ */
footer {
  padding: 100px var(--gutter) 50px;
  background: var(--paper);
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 80px;
}
.footer-col .h {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.footer-col a, .footer-col li {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink-soft);
  padding: 6px 0;
  list-style: none;
  transition: color 0.25s;
}
.footer-col ul { margin: 0; padding: 0; }
.footer-col a:hover { color: var(--ink); font-style: italic; }

.footer-wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(140px, 22vw, 340px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-align: center;
  margin: 40px 0;
  opacity: 0.98;
}

.footer-base {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  align-items: center;
}


/* Landscape variant for the Gen 4 two-shot */
.portrait-frame.portrait-landscape {
  aspect-ratio: 3 / 2;
  max-height: 680px;
}
.portrait-frame.portrait-landscape img {
  object-position: center center;
}

/* Coda — text-only handover beat */
.continuity-coda {
  margin: 64px 0 24px;
  display: block;
  padding: 40px 0 0;
  border-top: 1px solid var(--rule-soft);
  max-width: 860px;
}
.continuity-coda .continuity-caption p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
  max-width: none;
}
.continuity-coda .continuity-caption p em {
  color: var(--taupe);
}

/* ============================================================
   PORTRAIT INDEX — archival strip directly after hero
   ============================================================ */
.portrait-index {
  padding: 80px var(--gutter) 120px;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  background: var(--paper-light);
  position: relative;
}
.pi-head {
  max-width: 1700px;
  margin: 0 auto 56px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: baseline;
}
.pi-head .mono { color: var(--taupe); }
.pi-lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
  max-width: 900px;
}
.pi-strip {
  max-width: 1700px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.pi-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.pi-card:hover { transform: translateY(-3px); }
.pi-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  box-shadow:
    0 1px 0 rgba(255, 252, 245, 0.6) inset,
    0 20px 50px -30px rgba(28, 26, 23, 0.35);
}
.pi-frame img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.02);
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1), filter 0.6s;
}
.pi-card:hover .pi-frame img {
  transform: scale(1.025);
  filter: contrast(1.04);
}
.pi-meta {
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-rows: auto auto;
  row-gap: 4px;
  column-gap: 14px;
  padding-top: 16px;
  align-items: baseline;
}
.pi-roman {
  grid-row: span 2;
  font-family: var(--serif);
  font-size: 28px;
  font-style: italic;
  color: var(--taupe);
  align-self: start;
  line-height: 1;
  padding-top: 2px;
}
.pi-name {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.pi-name em {
  font-style: italic;
  color: var(--taupe);
}
.pi-years {
  color: var(--ink-quiet);
}

@media (max-width: 1100px) {
  .pi-head { grid-template-columns: 1fr; gap: 16px; }
  .pi-strip { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 640px) {
  .portrait-index { padding: 56px 24px 80px; }
  .pi-strip { grid-template-columns: 1fr 1fr; gap: 16px; }
  .pi-name { font-size: 17px; }
  .pi-roman { font-size: 22px; }
}


/* ============================================================
   SCROLL REVEAL — editorial motion system
   Tokens:
     --reveal-ease: shared easing across all reveals
     --reveal-dur:  default duration (overridden per variant)
     --d:           per-element delay for stagger
   ============================================================ */
:root {
  --reveal-ease: cubic-bezier(.2,.7,.2,1);
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity 900ms var(--reveal-ease) var(--d, 0s),
    transform 900ms var(--reveal-ease) var(--d, 0s);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: translate3d(0, 0, 0); }

/* Soft variant: small labels / eyebrows — quickest and lightest. */
.reveal-soft {
  opacity: 0;
  transform: translate3d(0, 6px, 0);
  transition:
    opacity 700ms var(--reveal-ease) var(--d, 0s),
    transform 700ms var(--reveal-ease) var(--d, 0s);
  will-change: opacity, transform;
}
.reveal-soft.in { opacity: 1; transform: translate3d(0, 0, 0); }

/* Image variant: deepest, slowest — barely-there scale. */
.reveal-image {
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(1.012);
  transition:
    opacity 1400ms var(--reveal-ease) var(--d, 0s),
    transform 1400ms var(--reveal-ease) var(--d, 0s);
  will-change: opacity, transform;
}
.reveal-image.in { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }

.reveal-mask { overflow: hidden; }
.reveal-mask > span {
  display: block;
  transform: translate3d(0, 105%, 0);
  transition: transform 1200ms var(--reveal-ease) var(--d, 0s);
  will-change: transform;
}
.reveal-mask.in > span { transform: translate3d(0, 0, 0); }
.reveal-mask > span:nth-child(2) { transition-delay: calc(var(--d, 0s) + 0.06s); }
.reveal-mask > span:nth-child(3) { transition-delay: calc(var(--d, 0s) + 0.12s); }

/* Hairline rule grow-out — nearly invisible, just enough to feel alive. */
.reveal-rule {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1100ms var(--reveal-ease) var(--d, 0s);
}
.reveal-rule.in { transform: scaleX(1); }

.plate-clip {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1400ms cubic-bezier(.5,.05,.15,1) var(--d, 0s);
}
.plate-clip.in { clip-path: inset(0 0 0 0); }

/* Reduced motion — collapse all reveal timings; no transforms, just appear. */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-soft, .reveal-image, .reveal-mask > span,
  .reveal-rule, .plate-clip {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .nav-links { gap: 24px; }
  .hero-title { font-size: clamp(56px, 12vw, 120px); }
  .gen, .gen.gen-2, .gen.gen-4 {
    grid-template-columns: 60px 1fr;
    gap: 32px;
    padding: 80px 0 100px;
  }
  .gen.gen-2 .gen-body, .gen.gen-4 .gen-body {
    grid-column: 2;
    grid-row: auto;
  }
  .gen.gen-2 .gen-portrait, .gen.gen-4 .gen-portrait {
    grid-column: 2;
    grid-row: auto;
    order: 2;
    margin-top: 40px;
    margin-bottom: 0;
  }
  .gen-portrait { grid-column: 2; order: 2; margin-top: 40px; }
  .gen-body     { grid-column: 2; order: 1; }
  .portrait-frame { max-height: 620px; aspect-ratio: 4 / 5; }
  .portrait-frame.portrait-landscape { max-height: 480px; aspect-ratio: 3 / 2; }
  .spine { display: none; }
  .capabilities { grid-template-columns: repeat(2, 1fr); }
  .footprint-stage { grid-template-columns: 1fr; gap: 40px; }
  .continuity { grid-template-columns: 1fr; gap: 32px; }
  .endure-row { grid-template-columns: 60px 1fr; gap: 24px; }
  .endure-row .endure-body { grid-column: 2; }
  .footer-top { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 120px 24px 60px; }
  .hero-meta-top, .hero-meta-bottom { grid-template-columns: 1fr 1fr; gap: 12px; }
  .section-head, .chapters-head {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .capabilities { grid-template-columns: 1fr; }
  .closing-ctas { flex-direction: column; align-items: stretch; }
  .cta { justify-content: space-between; }
}
