/* ==========================================================================
   khudirambose.com — The Archive of a Young Revolutionary
   Design system: archival paper, Indian printing ink, museum typography
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Archival palette */
  --ivory:        #F2EDE1;
  --cream:        #FAF7EF;
  --cream-deep:   #EBE3D2;
  --paper-edge:   #DED3BC;

  --ink:          #221F1B;
  --ink-soft:     #4A443B;
  --ink-faint:    #6B6355;

  --indigo:       #1D2B4C;
  --indigo-deep:  #141E36;
  --indigo-soft:  #3C4B70;

  --terracotta:   #A84E33;
  --sienna:       #83432C;
  --saffron:      #C08432;

  /* Semantic */
  --bg:           var(--cream);
  --bg-alt:       var(--ivory);
  --surface:      #FFFDF8;
  --text:         var(--ink);
  --text-muted:   var(--ink-soft);
  --text-faint:   var(--ink-faint);
  --rule:         rgba(34, 31, 27, 0.16);
  --rule-soft:    rgba(34, 31, 27, 0.09);
  --accent:       var(--terracotta);
  --focus:        #1D2B4C;

  /* Type */
  --font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-body:    "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Fluid scale */
  --step--2: clamp(0.69rem, 0.67rem + 0.10vw, 0.75rem);
  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.90rem);
  --step-0:  clamp(1.00rem, 0.96rem + 0.20vw, 1.11rem);
  --step-1:  clamp(1.20rem, 1.13rem + 0.36vw, 1.45rem);
  --step-2:  clamp(1.44rem, 1.32rem + 0.60vw, 1.89rem);
  --step-3:  clamp(1.73rem, 1.53rem + 0.98vw, 2.46rem);
  --step-4:  clamp(2.07rem, 1.76rem + 1.55vw, 3.20rem);
  --step-5:  clamp(2.49rem, 2.01rem + 2.40vw, 4.16rem);
  --step-6:  clamp(2.99rem, 2.27rem + 3.58vw, 5.41rem);

  /* Space */
  --sp-1: 0.375rem;
  --sp-2: 0.75rem;
  --sp-3: 1.25rem;
  --sp-4: 2rem;
  --sp-5: 3rem;
  --sp-6: 4.5rem;
  --sp-7: 7rem;
  --sp-8: 10rem;

  /* Layout */
  --shell:  min(100% - 2.5rem, 1240px);
  --narrow: min(100% - 2.5rem, 760px);
  --wide:   min(100% - 2.5rem, 1480px);

  --nav-h: 84px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1.5rem);
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.72;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

/* Paper grain — a single inline SVG turbulence, no network request */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23g)'/%3E%3C/svg%3E");
}

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.018em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.15em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

ul, ol { margin: 0 0 1.15em; padding-left: 1.15rem; }
li { margin-bottom: 0.5em; max-width: 66ch; }

strong { font-weight: 600; }

::selection { background: var(--indigo); color: var(--cream); }

/* --------------------------------------------------------------------------
   3. ACCESSIBILITY
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
.no-fv :focus { outline: none; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 10000;
  background: var(--indigo);
  color: var(--cream);
  padding: 0.85rem 1.4rem;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   4. LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.shell  { width: var(--shell);  margin-inline: auto; }
.narrow { width: var(--narrow); margin-inline: auto; }
.wide   { width: var(--wide);   margin-inline: auto; }

.section { padding-block: var(--sp-7); position: relative; }
.section--tight { padding-block: var(--sp-6); }
.section--tall  { padding-block: var(--sp-8); }

.bg-ivory  { background: var(--ivory); }
.bg-deep   { background: var(--indigo-deep); color: var(--cream); }
.bg-deep h1, .bg-deep h2, .bg-deep h3, .bg-deep h4,
.bg-deep .prose h3, .bg-deep .prose h4 { color: var(--cream); }
.bg-deep .eyebrow { color: var(--saffron); }
.bg-deep .lede,
.bg-deep p,
.bg-deep .prose p,
.bg-deep .prose li,
.bg-deep .prose strong,
.bg-deep li { color: rgba(250,247,239,0.86); }
.bg-deep .cat-label,
.bg-deep .breadcrumbs,
.bg-deep .hero__meta { color: rgba(250,247,239,0.72); }
.bg-deep .record__date,
.bg-deep .timeline__year,
.bg-deep .route__when,
.bg-deep .memory .cat-label { color: var(--saffron); }
.bg-deep .record__entry::before,
.bg-deep .timeline__item::before { border-color: var(--saffron); background: transparent; }
.bg-deep .quote { border-left-color: var(--saffron); }
.bg-deep .quote blockquote { color: var(--cream); }
.bg-deep .quote figcaption { color: rgba(250,247,239,0.72); }

/* Torn-paper divider between bands */
.band-rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

/* --------------------------------------------------------------------------
   5. TYPOGRAPHIC COMPONENTS
   -------------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 var(--sp-3);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.34;
  max-width: 120px;
}
.eyebrow--plain::after { display: none; }

.h-display { font-size: var(--step-6); letter-spacing: -0.03em; }
.h-1 { font-size: var(--step-5); }
.h-2 { font-size: var(--step-4); }
.h-3 { font-size: var(--step-3); }
.h-4 { font-size: var(--step-2); }
.h-5 { font-size: var(--step-1); letter-spacing: -0.01em; }

.lede {
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 60ch;
  font-weight: 400;
}

.prose > * + * { margin-top: 1.15em; }
.prose h3 {
  font-size: var(--step-2);
  margin-top: 2.2em;
  margin-bottom: 0.1em;
}
.prose h4 {
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 2em;
  margin-bottom: 0.1em;
}
.prose p { color: var(--text-muted); }
.prose li { color: var(--text-muted); }
.prose strong { color: var(--text); }

/* Drop-cap opener for editorial pages */
.prose--opened > p:first-of-type::first-letter {
  font-family: var(--font-display);
  float: left;
  font-size: 3.9em;
  line-height: 0.78;
  padding: 0.08em 0.11em 0 0;
  color: var(--terracotta);
  font-weight: 500;
}

/* Oversized archival date numeral */
.date-marker {
  font-family: var(--font-display);
  font-size: var(--step-6);
  line-height: 0.86;
  letter-spacing: -0.045em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(34,31,27,0.30);
  font-weight: 500;
  user-select: none;
}
.bg-deep .date-marker { -webkit-text-stroke-color: rgba(250,247,239,0.34); }
.date-marker--solid {
  color: var(--terracotta);
  -webkit-text-stroke: 0;
}

/* Archive catalogue label */
.cat-label {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Editorial pull quote — clearly marked as sourced or as editorial */
.quote {
  border-left: 3px solid var(--terracotta);
  padding: 0.2rem 0 0.2rem var(--sp-4);
  margin: var(--sp-5) 0;
  max-width: 44ch;
}
.quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.32;
  color: var(--text);
  font-style: italic;
}
.quote figcaption {
  margin-top: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  line-height: 1.6;
}

/* Explicit "this is editorial writing, not a historical quotation" note */
.note {
  border: 1px solid var(--rule);
  background: rgba(29,43,76,0.035);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--step--1);
  line-height: 1.65;
  color: var(--text-muted);
  margin: var(--sp-4) 0;
  max-width: 62ch;
}
.note strong {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sienna);
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.bg-deep .note {
  border-color: rgba(250,247,239,0.22);
  background: rgba(250,247,239,0.05);
}
.bg-deep .note strong { color: var(--saffron); }

/* --------------------------------------------------------------------------
   6. HISTORICAL IMAGE PLATE — never crops, never stretches
   -------------------------------------------------------------------------- */
.plate {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--paper-edge);
  padding: clamp(0.9rem, 2.4vw, 1.6rem);
  position: relative;
  box-shadow: 0 1px 0 rgba(34,31,27,0.05), 0 18px 40px -30px rgba(34,31,27,0.55);
}
.plate__mount {
  background: var(--cream-deep);
  padding: clamp(0.75rem, 2vw, 1.35rem);
  display: flex;
  align-items: center;
  justify-content: center;
}
.plate img {
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}
.plate figcaption {
  margin-top: var(--sp-3);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--rule-soft);
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 52ch;
}
.plate figcaption b {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

/* Registration marks — museum print corners */
.plate--marked::before,
.plate--marked::after {
  content: "";
  position: absolute;
  width: 13px; height: 13px;
  border: 1px solid var(--terracotta);
  opacity: 0.5;
}
.plate--marked::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.plate--marked::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.plate--deep {
  background: rgba(250,247,239,0.05);
  border-color: rgba(250,247,239,0.20);
}
.plate--deep .plate__mount { background: rgba(250,247,239,0.07); }
.plate--deep figcaption { color: rgba(250,247,239,0.72); border-top-color: rgba(250,247,239,0.16); }
.plate--deep figcaption b { color: rgba(250,247,239,0.5); }

/* Subtle hover on interactive plates only */
.plate--zoom img { transition: transform 0.7s var(--ease-out); }
.plate--zoom:hover img { transform: scale(1.022); }

/* --------------------------------------------------------------------------
   7. BUTTONS & LINKS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 48px;
  padding: 0.9rem 1.6rem;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--indigo);
  background: var(--indigo);
  color: var(--cream);
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn:hover { background: var(--indigo-deep); border-color: var(--indigo-deep); }
.btn svg { flex: none; transition: transform 0.35s var(--ease-out); }
.btn:hover svg { transform: translateX(5px); }

.btn--ghost {
  background: transparent;
  color: var(--indigo);
}
.btn--ghost:hover { background: var(--indigo); color: var(--cream); }

.btn--light {
  background: var(--cream);
  color: var(--indigo-deep);
  border-color: var(--cream);
}
.btn--light:hover { background: transparent; color: var(--cream); border-color: var(--cream); }

/* Text link with animated underline */
.link {
  color: var(--sienna);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  padding-bottom: 1px;
  transition: background-size 0.35s var(--ease-out);
}
.link:hover { background-size: 0% 1px; background-position: 100% 100%; }
.bg-deep .link { color: var(--saffron); }

/* --------------------------------------------------------------------------
   8. HEADER / NAVIGATION
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: height 0.4s var(--ease), background-color 0.4s var(--ease),
              border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header__inner {
  width: var(--wide);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

/* Solid state — used on scroll and on every non-hero page from load */
.site-header.is-solid,
body.header-solid .site-header {
  background: var(--cream);
  border-bottom-color: var(--rule);
  box-shadow: 0 10px 30px -28px rgba(34,31,27,0.9);
}
.site-header.is-solid { height: 66px; }

.wordmark {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
  color: var(--ink);
}
.wordmark__name {
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 1.4vw, 1.32rem);
  letter-spacing: -0.015em;
  font-weight: 500;
  white-space: nowrap;
}
.wordmark__sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 5px;
  transition: opacity 0.3s var(--ease);
}
.site-header.is-solid .wordmark__sub { opacity: 0; height: 0; margin-top: 0; }

.nav { display: flex; align-items: center; gap: clamp(1rem, 1.9vw, 2.1rem); }
.nav__link {
  position: relative;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.015em;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.4rem 0;
  white-space: nowrap;
  transition: color 0.25s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__link[aria-current="page"] { color: var(--terracotta); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--rule);
  cursor: pointer;
  padding: 0;
}
.nav-toggle__bars { position: relative; width: 20px; height: 12px; }
.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%; height: 1.5px;
  background: var(--ink);
  transition: transform 0.36s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 5px; }
.nav-toggle__bars span:nth-child(3) { top: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Mobile drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: var(--cream);
  padding: calc(var(--nav-h) + 2rem) 0 3rem;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-nav__list { list-style: none; margin: 0; padding: 0; width: var(--shell); margin-inline: auto; }
.mobile-nav__list li { margin: 0; border-bottom: 1px solid var(--rule-soft); max-width: none; }
.mobile-nav__link {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.05rem 0;
  font-family: var(--font-display);
  font-size: var(--step-2);
  text-decoration: none;
  color: var(--ink);
  transition: color 0.25s var(--ease);
}
.mobile-nav__link:hover,
.mobile-nav__link[aria-current="page"] { color: var(--terracotta); }
.mobile-nav__link i {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}
.mobile-nav__foot {
  width: var(--shell);
  margin: var(--sp-5) auto 0;
  font-size: var(--step--1);
  color: var(--text-muted);
}
.mobile-nav__foot a { color: var(--sienna); text-decoration: none; display: block; margin-top: 0.35rem; }
body.nav-open { overflow: hidden; }

/* Scroll progress */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--terracotta);
  z-index: 300;
  pointer-events: none;
}

/* Page spacer for non-hero pages */
.page-top { padding-top: var(--nav-h); }

/* --------------------------------------------------------------------------
   9. HOME — asymmetric archive hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + 3.5rem);
  padding-bottom: var(--sp-6);
  background: var(--ivory);
  overflow: hidden;
}
.hero__paper {
  position: absolute;
  inset: -12% -6%;
  pointer-events: none;
  opacity: 0.5;
  background:
    radial-gradient(60% 50% at 78% 20%, rgba(192,132,50,0.16), transparent 70%),
    radial-gradient(55% 45% at 12% 78%, rgba(29,43,76,0.10), transparent 72%);
  will-change: transform;
}
.hero__grid {
  position: relative;
  width: var(--wide);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hero__title {
  font-size: clamp(2.9rem, 7.4vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.038em;
  margin: 0 0 var(--sp-3);
}
.hero__title span { display: block; }
.hero__title em {
  font-style: normal;
  display: block;
  color: var(--terracotta);
}
.hero__descriptor {
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 30ch;
  margin: 0 0 var(--sp-4);
  font-family: var(--font-display);
}
.hero__rule { height: 1px; background: var(--rule); margin-bottom: var(--sp-4); max-width: 420px; }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.hero__meta b { color: var(--ink); font-weight: 500; display: block; margin-top: 4px; letter-spacing: 0.1em; }

.hero__figure { position: relative; will-change: transform; }
.hero__figure .plate { max-width: 420px; margin-inline: auto; }
/* Vertical date rail beside the portrait */
.hero__rail {
  position: absolute;
  left: -2.9rem;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}
.hero__rail::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 1rem);
  width: 1px; height: 56px;
  background: var(--terracotta);
}

.scroll-cue {
  width: var(--wide);
  margin: var(--sp-6) auto 0;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-decoration: none;
}
.scroll-cue i {
  display: block;
  width: 44px; height: 1px;
  background: var(--terracotta);
  position: relative;
  overflow: hidden;
}
.scroll-cue i::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--ivory);
  animation: sweep 2.6s var(--ease) infinite;
}
@keyframes sweep {
  0%   { transform: translateX(-100%); }
  55%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

/* Introduction band */
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.intro-grid__aside { position: sticky; top: calc(var(--nav-h) + 2rem); }
.intro-statement {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.28;
  letter-spacing: -0.022em;
  color: var(--text);
  max-width: 24ch;
  margin: 0 0 var(--sp-4);
}

/* Facts strip */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: var(--sp-5);
}
.facts__item { background: var(--bg); padding: var(--sp-3) var(--sp-3); }
.bg-ivory .facts__item { background: var(--ivory); }
.facts__k {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: block;
  margin-bottom: 0.4rem;
}
.facts__v { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.25; }

/* --------------------------------------------------------------------------
   10. TIMELINE — exhibition rail
   -------------------------------------------------------------------------- */
.timeline { position: relative; margin-top: var(--sp-6); }
.timeline__track {
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--rule);
}
.timeline__track i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 1px;
  background: var(--terracotta);
  transform: scaleY(var(--tl, 0));
  transform-origin: top;
  transition: transform 0.15s linear;
}
.timeline__list { list-style: none; margin: 0; padding: 0; }
.timeline__item {
  position: relative;
  padding-left: clamp(2.4rem, 5vw, 4rem);
  padding-bottom: var(--sp-5);
  max-width: none;
  margin: 0;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.55rem;
  width: 11px; height: 11px;
  border: 1px solid var(--terracotta);
  background: var(--bg);
  border-radius: 50%;
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.bg-ivory .timeline__item::before { background: var(--ivory); }
.timeline__item:hover::before { background: var(--terracotta); transform: scale(1.18); }
.timeline__year {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  color: var(--terracotta);
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 500;
}
.timeline__head { font-size: var(--step-2); margin-bottom: 0.45rem; }
.timeline__body { color: var(--text-muted); font-size: var(--step-0); max-width: 56ch; margin: 0; }

/* --------------------------------------------------------------------------
   11. CHAPTER INDEX — editorial list with hover reveal
   -------------------------------------------------------------------------- */
.chapters { position: relative; border-top: 1px solid var(--rule); }
.chapter {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-3);
  padding: clamp(1.4rem, 3vw, 2.3rem) 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: padding-left 0.45s var(--ease-out);
}
.chapter::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(168,78,51,0.05);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.chapter:hover { padding-left: clamp(0.6rem, 1.6vw, 1.4rem); }
.chapter:hover::before { opacity: 1; }
.chapter__num {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  color: var(--text-faint);
  transition: color 0.3s var(--ease);
}
.chapter:hover .chapter__num { color: var(--terracotta); }
.chapter__title {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.chapter__desc {
  display: block;
  font-family: var(--font-body);
  font-size: var(--step--1);
  color: var(--text-muted);
  letter-spacing: 0;
  margin-top: 0.35rem;
  max-width: 46ch;
}
.chapter__arrow { color: var(--text-faint); transition: transform 0.4s var(--ease-out), color 0.3s var(--ease); }
.chapter:hover .chapter__arrow { transform: translateX(8px); color: var(--terracotta); }

/* Closing statement */
.closing {
  text-align: center;
  max-width: 22ch;
  margin-inline: auto;
  font-size: var(--step-4);
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   12. PAGE MASTHEADS — one variant per page
   -------------------------------------------------------------------------- */
.masthead { padding-top: calc(var(--nav-h) + var(--sp-5)); padding-bottom: var(--sp-5); position: relative; }
.masthead__title { margin-bottom: var(--sp-3); }
.masthead__lede { max-width: 56ch; }

.breadcrumbs {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--sp-4);
}
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 0; padding: 0; }
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.55rem; opacity: 0.5; }
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs a:hover { color: var(--terracotta); }
.bg-deep .breadcrumbs { color: rgba(250,247,239,0.55); }

/* Magazine two-column feature (His Life) */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.feature--flip { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr); }
.feature--flip .feature__media { order: -1; }
.feature__media { position: sticky; top: calc(var(--nav-h) + 2rem); }

/* Document / dossier composition (Revolutionary Journey) */
.dossier {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: clamp(1.5rem, 4vw, 3rem);
  position: relative;
}
.dossier::before {
  content: attr(data-stamp);
  position: absolute;
  top: clamp(1rem, 2.5vw, 1.6rem);
  right: clamp(1rem, 2.5vw, 1.6rem);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sienna);
  border: 1px solid currentColor;
  padding: 0.3rem 0.6rem;
  opacity: 0.55;
  transform: rotate(-3deg);
  pointer-events: none;
}
.dossier__rows { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: var(--sp-4); }
.dossier__row {
  background: var(--surface);
  padding: var(--sp-3);
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: var(--sp-3);
}
.dossier__row dt {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0;
}
.dossier__row dd { margin: 0; color: var(--text-muted); font-size: var(--step--1); line-height: 1.65; }

/* Cinematic route (Muzaffarpur) */
.route { display: grid; gap: 0; border-top: 1px solid rgba(250,247,239,0.18); }
.route__stop {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.6rem, 3.4vw, 2.6rem) 0;
  border-bottom: 1px solid rgba(250,247,239,0.18);
  align-items: start;
}
.route__when {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--saffron);
  line-height: 1.5;
}
.route__what h3 { font-size: var(--step-2); margin-bottom: 0.5rem; }
.route__what p { color: rgba(250,247,239,0.78); max-width: 62ch; }

/* Schematic map — original explanatory diagram, drawn in SVG */
.mapfig { margin: 0; }
.mapfig svg { width: 100%; height: auto; }
.mapfig figcaption {
  margin-top: var(--sp-3);
  font-size: var(--step--1);
  color: rgba(250,247,239,0.68);
  max-width: 60ch;
}

/* Solemn record (Trial & Final Days) */
.record {
  border-left: 1px solid var(--rule);
  padding-left: clamp(1.4rem, 4vw, 3rem);
  margin-top: var(--sp-5);
}
.record__entry { padding-bottom: var(--sp-6); position: relative; }
.record__entry:last-child { padding-bottom: 0; }
.record__date {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  display: block;
  margin-bottom: var(--sp-2);
}
.record__entry::before {
  content: "";
  position: absolute;
  left: clamp(-1.4rem, -4vw, -3rem);
  top: 0.62rem;
  width: clamp(0.7rem, 2vw, 1.5rem);
  height: 1px;
  background: var(--terracotta);
}

/* Legacy — cultural memory cards, deliberately not a uniform grid */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.memory {
  background: var(--bg);
  padding: clamp(1.4rem, 3vw, 2.1rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.bg-ivory .memory { background: var(--ivory); }
.memory h3 { font-size: var(--step-1); }
.memory p { font-size: var(--step--1); color: var(--text-muted); margin: 0; }
.memory .cat-label { margin-top: auto; padding-top: 0.6rem; }

.places { display: grid; gap: var(--sp-3); }
.place {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--sp-3);
  align-items: baseline;
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--rule-soft);
}
.place h3 { font-size: var(--step-1); }
.place p { margin: 0.3rem 0 0; font-size: var(--step--1); color: var(--text-muted); }
.place__where {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   13. GALLERY — museum collection
   -------------------------------------------------------------------------- */
.collection { margin-top: var(--sp-5); }
.collection + .collection { margin-top: var(--sp-7); }
.collection__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--ink);
  margin-bottom: var(--sp-5);
}
.collection__head h2 { font-size: var(--step-3); }

.objects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: clamp(1.6rem, 3.5vw, 3rem);
  align-items: start;
}
.object { display: flex; flex-direction: column; }
.object__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
  font: inherit;
  color: inherit;
}
.object__frame {
  background: var(--surface);
  border: 1px solid var(--paper-edge);
  padding: clamp(0.8rem, 2vw, 1.25rem);
  position: relative;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.object__btn:hover .object__frame,
.object__btn:focus-visible .object__frame {
  border-color: var(--terracotta);
  box-shadow: 0 20px 44px -34px rgba(34,31,27,0.85);
}
.object__mount {
  background: var(--cream-deep);
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.7rem, 1.8vw, 1.1rem);
  overflow: hidden;
}
.object__mount img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  transition: transform 0.6s var(--ease-out);
}
.object__btn:hover .object__mount img { transform: scale(1.03); }
.object__zoom {
  position: absolute;
  right: clamp(0.8rem, 2vw, 1.25rem);
  bottom: clamp(0.8rem, 2vw, 1.25rem);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--indigo);
  padding: 0.35rem 0.6rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.object__btn:hover .object__zoom,
.object__btn:focus-visible .object__zoom { opacity: 1; transform: none; }
.object__meta { padding-top: var(--sp-3); }
.object__meta h3 { font-size: var(--step-1); margin-bottom: 0.3rem; }
.object__meta .cat-label { display: block; margin-bottom: 0.55rem; }
.object__meta p { font-size: var(--step--1); color: var(--text-muted); margin: 0; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  background: rgba(20,30,54,0.97);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s var(--ease), visibility 0.32s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 1rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid rgba(250,247,239,0.16);
  flex: none;
}
.lightbox__count {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250,247,239,0.66);
}
.lightbox__stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2.2rem);
}
.lightbox__stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: var(--cream-deep);
  padding: clamp(0.6rem, 1.6vw, 1rem);
  transition: opacity 0.25s var(--ease);
}
.lightbox__cap {
  flex: none;
  padding: clamp(1rem, 2.5vw, 1.6rem) clamp(1rem, 3vw, 2rem) clamp(1.4rem, 3vw, 2rem);
  border-top: 1px solid rgba(250,247,239,0.16);
  color: rgba(250,247,239,0.82);
}
.lightbox__cap h2 { font-size: var(--step-1); color: var(--cream); margin-bottom: 0.35rem; }
.lightbox__cap p { font-size: var(--step--1); margin: 0; max-width: 76ch; color: rgba(250,247,239,0.72); }
.lightbox__cap .cat-label { color: rgba(250,247,239,0.5); display: block; margin-bottom: 0.4rem; }

.lb-btn {
  width: 48px; height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(250,247,239,0.3);
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.lb-btn:hover { background: rgba(250,247,239,0.14); border-color: var(--cream); }
.lightbox__nav { display: flex; gap: 0.6rem; }

/* --------------------------------------------------------------------------
   14. CONTACT
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.contact-lines { display: grid; gap: var(--sp-4); margin-top: var(--sp-5); }
.contact-line { border-top: 1px solid var(--rule); padding-top: var(--sp-3); }
.contact-line .cat-label { display: block; margin-bottom: 0.5rem; }
.contact-line a {
  font-family: var(--font-display);
  font-size: var(--step-2);
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.015em;
  transition: color 0.25s var(--ease);
  word-break: break-word;
}
.contact-line a:hover { color: var(--terracotta); }

.form { display: grid; gap: var(--sp-3); }
.field { display: grid; gap: 0.45rem; }
.field label {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 0;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
.field input:hover, .field textarea:hover { border-color: var(--ink-faint); }
.field input:focus, .field textarea:focus { outline: 2px solid var(--indigo); outline-offset: 1px; border-color: var(--indigo); }
.field__err {
  font-size: var(--step--2);
  color: var(--sienna);
  min-height: 1.1em;
  font-weight: 600;
}
.form__status {
  border: 1px solid var(--rule);
  background: rgba(29,43,76,0.05);
  padding: var(--sp-3);
  font-size: var(--step--1);
  color: var(--text-muted);
  line-height: 1.6;
}
.form__status[hidden] { display: none; }

/* --------------------------------------------------------------------------
   15. SOCIAL ICONS
   -------------------------------------------------------------------------- */
.socials { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.socials li { margin: 0; }
.social {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  transition: color 0.28s var(--ease), border-color 0.28s var(--ease), background-color 0.28s var(--ease);
}
.social svg { width: 17px; height: 17px; fill: currentColor; }
a.social:hover { color: var(--cream); background: var(--indigo); border-color: var(--indigo); }
span.social { cursor: default; opacity: 0.62; }
.site-footer .social { border-color: rgba(250,247,239,0.24); color: rgba(250,247,239,0.78); }
.site-footer a.social:hover { background: var(--cream); color: var(--indigo-deep); border-color: var(--cream); }

/* --------------------------------------------------------------------------
   16. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--indigo-deep);
  color: rgba(250,247,239,0.78);
  padding-top: var(--sp-6);
  padding-bottom: var(--sp-4);
}
.site-footer h2, .site-footer h3 { color: var(--cream); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid rgba(250,247,239,0.16);
}
.footer__brand { font-family: var(--font-display); font-size: var(--step-3); color: var(--cream); line-height: 1.05; }
.footer__desc { font-size: var(--step--1); max-width: 34ch; margin-top: var(--sp-2); color: rgba(250,247,239,0.66); }
.footer__title {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250,247,239,0.5);
  margin: 0 0 var(--sp-3);
  font-weight: 500;
}
.footer-nav { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: var(--sp-3); }
.footer-nav li { margin: 0 0 0.55rem; break-inside: avoid; }
.footer-nav a {
  font-size: var(--step--1);
  text-decoration: none;
  color: rgba(250,247,239,0.78);
  transition: color 0.25s var(--ease);
}
.footer-nav a:hover { color: var(--saffron); }
.footer-contact { list-style: none; margin: 0 0 var(--sp-4); padding: 0; }
.footer-contact li { margin: 0 0 0.7rem; }
.footer-contact a {
  font-size: var(--step-0);
  text-decoration: none;
  color: var(--cream);
  transition: color 0.25s var(--ease);
  word-break: break-word;
}
.footer-contact a:hover { color: var(--saffron); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
  padding-top: var(--sp-4);
  font-size: var(--step--2);
  color: rgba(250,247,239,0.56);
}
.footer-bottom a { color: rgba(250,247,239,0.78); text-decoration: none; }
.footer-bottom a:hover { color: var(--saffron); text-decoration: underline; }

/* --------------------------------------------------------------------------
   17. MOTION — reveal on scroll
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .hero__paper, .hero__figure { transform: none !important; }
  .scroll-cue i::after { display: none; }
}
