/* ==========================================================================
   ramakrishnanchander.com — core stylesheet
   Visual system: architectural / modernist / documentary editorial
   Devices: hairline rules, modular grid, oversized serif display,
            monospace technical metadata, structured asymmetry.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Palette — deep ink / warm stone paper / muted cobalt / soft clay */
  --ink:        #15181d;
  --ink-2:      #23282f;
  --graphite:   #545b66;
  --mute:       #5f6672;
  --paper:      #f5f2eb;
  --paper-2:    #ebe7dd;
  --paper-3:    #ded9cc;
  --stone:      #c0bbaf;
  --numeral:    #8e8677;
  --cobalt:     #27456f;
  --cobalt-mid: #3c6094;
  --cobalt-pale:#9fb6d4;
  --clay:       #a05534;
  --clay-deep:  #84422a;
  --clay-pale:  #d6a184;

  --line:        rgba(21, 24, 29, 0.16);
  --line-soft:   rgba(21, 24, 29, 0.09);
  --line-strong: rgba(21, 24, 29, 0.42);
  --line-dark:   rgba(245, 242, 235, 0.20);
  --line-dark-2: rgba(245, 242, 235, 0.10);

  /* Type families */
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino,
           "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans:  "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
           "Helvetica Neue", Arial, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
           Consolas, "Liberation Mono", monospace;

  /* Type scale */
  --t-display: clamp(2.85rem, 10.2vw, 9.25rem);
  --t-h1:      clamp(2.05rem, 5.2vw, 4.25rem);
  --t-h2:      clamp(1.55rem, 3.1vw, 2.55rem);
  --t-h3:      clamp(1.1rem, 1.35vw, 1.375rem);
  --t-lead:    clamp(1.125rem, 0.85vw + 0.95rem, 1.5rem);
  --t-body:    clamp(1rem, 0.28vw + 0.94rem, 1.0938rem);
  --t-small:   0.875rem;
  --t-caption: 0.8125rem;
  --t-label:   0.6875rem;

  /* Structure */
  --pad:   clamp(20px, 5vw, 84px);
  --shell: 1560px;
  --gap:   clamp(18px, 2.2vw, 40px);
  --band:  clamp(56px, 8vw, 132px);

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

/* --------------------------------------------------------------------------
   2. GATE GUARD — fail closed until the auth module verifies the session
   -------------------------------------------------------------------------- */
html.gate-checking body { display: none !important; }

/* --------------------------------------------------------------------------
   3. RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.72;
  letter-spacing: 0.001em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

img, svg { display: block; max-width: 100%; }

/* Portraits are never cropped: natural ratio is always preserved. */
img { width: 100%; height: auto; object-fit: contain; }

a { color: inherit; }

button, input { font: inherit; color: inherit; }

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

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

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}
.on-ink :focus-visible { outline-color: var(--clay-pale); }
.on-ink .label,
.on-ink .caption,
.on-ink .note { color: var(--stone); }
.on-ink .num { color: var(--clay-pale); }
.on-ink .rrow__desc { color: var(--stone); }

.skip-link {
  position: absolute;
  top: 0; left: 0;
  z-index: 999;
  transform: translateY(-120%);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.18s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* --------------------------------------------------------------------------
   5. TYPOGRAPHY
   -------------------------------------------------------------------------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--t-display);
  line-height: 0.9;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

h1, .h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--t-h1);
  line-height: 1.04;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h2, .h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--t-h2);
  line-height: 1.12;
  letter-spacing: -0.008em;
  text-wrap: balance;
}

h3, .h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--t-h3);
  line-height: 1.32;
  letter-spacing: -0.004em;
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.5;
  color: var(--ink-2);
  letter-spacing: -0.004em;
  max-width: 26ch;
}
.lead--wide { max-width: 42ch; }

.prose p { max-width: 68ch; }
.prose p + p { margin-top: 1.15em; }
.prose p + h3 { margin-top: 2.2em; }
.prose h3 + p { margin-top: 0.6em; }
.prose strong { font-weight: 600; }

.prose--tight p { max-width: 62ch; }

/* Monospace technical labels */
.label {
  display: block;
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.185em;
  text-transform: uppercase;
  color: var(--mute);
  line-height: 1.5;
}
.label--ink   { color: var(--ink); }
.label--clay  { color: var(--clay-deep); }
.label--stone { color: var(--stone); }

.num {
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--clay-deep);
}

.caption {
  font-family: var(--mono);
  font-size: var(--t-caption);
  line-height: 1.62;
  color: var(--mute);
  letter-spacing: 0.005em;
}

.note {
  font-size: var(--t-small);
  line-height: 1.66;
  color: var(--graphite);
  max-width: 62ch;
}

/* Inline text link — hairline underline that thickens on hover */
.tlink {
  text-decoration: none;
  color: var(--cobalt);
  background-image: linear-gradient(var(--cobalt), var(--cobalt));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  padding-bottom: 1px;
  transition: background-size 0.22s var(--ease), color 0.22s var(--ease);
}
.tlink:hover { background-size: 100% 2px; color: var(--ink); }
.on-ink .tlink {
  color: var(--cobalt-pale);
  background-image: linear-gradient(var(--cobalt-pale), var(--cobalt-pale));
}
.on-ink .tlink:hover { color: var(--paper); }

/* --------------------------------------------------------------------------
   6. LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}

.band { padding-block: var(--band); }
.band--tight { padding-block: clamp(40px, 5vw, 76px); }

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  height: 0;
  margin: 0;
}
.rule--strong { border-top-color: var(--line-strong); }
.rule--dark { border-top-color: var(--line-dark); }

.ink-block {
  background: var(--ink);
  color: var(--paper);
}
.ink-block .label { color: var(--stone); }
.ink-block .caption { color: var(--stone); }
.ink-block .note { color: var(--stone); }

.stone-block { background: var(--paper-2); }

/* Faint architectural gridlines, purely decorative */
.gridlines { position: relative; }
.gridlines::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to right,
    var(--line-soft) 0 1px,
    transparent 1px calc(100% / 6)
  );
  background-position: left top;
}

/* Section head: mono index + serif title, divided by a hairline */
.shead {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
  margin-bottom: clamp(28px, 3.4vw, 56px);
}
.shead__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: baseline;
}
.shead__title { max-width: 22ch; }

/* --------------------------------------------------------------------------
   7. HEADER + NAVIGATION
   -------------------------------------------------------------------------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.masthead__inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding-block: 14px;
  flex-shrink: 0;
}
.wordmark__tick {
  width: 10px; height: 10px;
  background: var(--clay);
  flex-shrink: 0;
}
.wordmark__name {
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--ink);
}
.wordmark__role {
  display: block;
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  color: var(--mute);
}

.nav { display: flex; align-items: stretch; }
.nav__list { display: flex; align-items: stretch; }
.nav__item { display: flex; }

.nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 clamp(10px, 1.05vw, 18px);
  text-decoration: none;
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--graphite);
  border-left: 1px solid var(--line-soft);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav__item:last-child .nav__link { border-right: 1px solid var(--line-soft); }
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--clay);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.26s var(--ease);
}
.nav__link:hover { color: var(--ink); background: var(--paper-2); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--ink); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__idx { color: var(--clay-deep); font-size: 0.5625rem; }

/* Mobile toggle */
.navtoggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  border-left: 1px solid var(--line-soft);
  padding: 0 2px 0 16px;
  margin: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  min-height: 48px;
}
.navtoggle__bars { display: grid; gap: 4px; width: 22px; }
.navtoggle__bars span {
  display: block; height: 1.5px; background: var(--ink);
  transition: transform 0.24s var(--ease), opacity 0.18s var(--ease);
}

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.42s var(--ease), visibility 0s linear 0.42s;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.drawer.is-open {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.42s var(--ease), visibility 0s;
}
.drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  border-bottom: 1px solid var(--line-dark);
}
.drawer__close {
  background: none;
  border: 0;
  color: var(--paper);
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
}
.drawer__close svg { width: 14px; height: 14px; }
.drawer__list { flex: 1; padding-block: clamp(8px, 3vw, 28px); }
.drawer__link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  min-height: 56px;
  text-decoration: none;
  border-bottom: 1px solid var(--line-dark-2);
  color: var(--paper);
}
.drawer__link .num { color: var(--clay-pale); }
.drawer__link span:last-child {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 8vw, 2.5rem);
  line-height: 1;
}
.drawer__link[aria-current="page"] span:last-child { color: var(--clay-pale); }
.drawer__foot { padding-block: 24px 32px; border-top: 1px solid var(--line-dark); }

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

/* --------------------------------------------------------------------------
   8. BUTTONS / ACTIONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 52px;
  padding: 14px 22px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  text-decoration: none;
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.24s var(--ease), color 0.24s var(--ease);
}
.btn:hover { background: var(--cobalt); border-color: var(--cobalt); }
.btn svg { width: 14px; height: 10px; flex-shrink: 0; }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Ruled link row — used for "explore" and archive listings */
.rrow {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: clamp(12px, 2vw, 32px);
  padding: clamp(20px, 2.4vw, 30px) 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  transition: padding-left 0.3s var(--ease), background-color 0.3s var(--ease);
}
.rrow:last-child { border-bottom: 1px solid var(--line); }
.rrow__title {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.rrow__desc {
  display: block;
  color: var(--graphite);
  font-size: var(--t-small);
  line-height: 1.6;
  margin-top: 8px;
  max-width: 54ch;
}
.rrow__go {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay-deep);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rrow__go svg { width: 16px; height: 10px; transition: transform 0.3s var(--ease); }
.rrow:hover { background: var(--paper-2); padding-left: clamp(10px, 1.4vw, 22px); }
.rrow:hover .rrow__go svg { transform: translateX(6px); }

/* --------------------------------------------------------------------------
   9. FIGURES — natural aspect ratio, never cropped
   -------------------------------------------------------------------------- */
.fig { display: block; }
.fig__frame {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: clamp(10px, 1vw, 16px);
}
.fig__frame img { display: block; }
.fig__cap {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.ink-block .fig__frame { background: var(--ink-2); border-color: var(--line-dark); }
.ink-block .fig__cap { border-top-color: var(--line-dark); }

/* --------------------------------------------------------------------------
   10. DEFINITION REGISTER (key/value rows)
   -------------------------------------------------------------------------- */
.reg { border-top: 1px solid var(--line-strong); }
.reg__row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(0, 2.4fr);
  gap: 6px clamp(16px, 3vw, 48px);
  padding: clamp(14px, 1.6vw, 20px) 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.reg__row dd { font-size: var(--t-small); line-height: 1.6; }
.ink-block .reg { border-top-color: var(--line-dark); }
.ink-block .reg__row { border-bottom-color: var(--line-dark-2); }

/* --------------------------------------------------------------------------
   11. QUOTATION
   -------------------------------------------------------------------------- */
.quote { display: grid; gap: 22px; }
.quote__text {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.4vw, 2.9rem);
  line-height: 1.16;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}
.quote__text em { font-style: italic; }
.quote__src {
  display: grid;
  gap: 3px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  max-width: 46ch;
}
.ink-block .quote__src { border-top-color: var(--line-dark); }

/* --------------------------------------------------------------------------
   12. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding-top: clamp(48px, 6vw, 88px);
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: clamp(32px, 4vw, 52px);
  padding-bottom: clamp(40px, 5vw, 70px);
}
.footer__brand { grid-column: span 4; }
.footer__col   { grid-column: span 3; }
.footer__col--nav { grid-column: span 2; }

.footer__name {
  font-family: var(--serif);
  font-size: clamp(1.65rem, 2.6vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.footer__colhead {
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line-dark);
}
.footer__items { display: grid; gap: 10px; }
.footer__items a {
  text-decoration: none;
  font-size: var(--t-small);
  color: var(--paper);
  display: inline-block;
  background-image: linear-gradient(var(--clay-pale), var(--clay-pale));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size 0.26s var(--ease), color 0.2s var(--ease);
  min-height: 26px;
}
.footer__items a:hover { background-size: 100% 1px; color: var(--clay-pale); }
.footer__items li { line-height: 1.5; }

.footer__contactname { font-size: var(--t-small); margin-bottom: 4px; }

/* Social icons — real marks; rendered inactive until verified profile URLs exist */
.social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.social__i {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-dark);
  color: var(--stone);
  text-decoration: none;
  transition: background-color 0.24s var(--ease), color 0.24s var(--ease),
              border-color 0.24s var(--ease);
}
.social__i svg { width: 17px; height: 17px; fill: currentColor; }
a.social__i:hover, a.social__i:focus-visible {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.social__i[data-inactive] { cursor: default; }
.social__i[data-inactive]:hover { color: var(--paper); border-color: var(--stone); }

.footer__base {
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding-block: 22px 26px;
}
.footer__base p, .footer__base a { font-size: var(--t-caption); }
.footer__credit {
  text-decoration: none;
  color: var(--stone);
  display: inline-block;
  padding-block: 7px;
  min-height: 30px;
}
.footer__credit strong { color: var(--paper); font-weight: 500; }
.footer__credit:hover strong { color: var(--clay-pale); }

.endsession {
  background: none;
  border: 1px solid var(--line-dark);
  color: var(--stone);
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 9px 14px;
  min-height: 36px;
  cursor: pointer;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease);
}
.endsession:hover { background: var(--paper); color: var(--ink); }

/* --------------------------------------------------------------------------
   13. REVEAL MOTION
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.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;
  }
  .reveal { opacity: 1; transform: none; }
  .drawer { transition: none; }
}

/* ==========================================================================
   14. GATE — index.html (authentication only)
   ========================================================================== */
.gate {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  background: var(--ink);
  color: var(--paper);
}
.gate__panel {
  grid-row: 2;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  padding-inline: clamp(22px, 6vw, 40px);
  padding-block: 40px;
}
.gate__mark {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-dark);
  margin-bottom: 30px;
}
.gate__mark span:first-child {
  width: 10px; height: 10px; background: var(--clay-pale); flex-shrink: 0;
}
.gate__mark span:last-child {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
}
.gate__title {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 7vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.014em;
  margin-bottom: 10px;
}
.gate__hint {
  font-family: var(--mono);
  font-size: var(--t-caption);
  color: var(--stone);
  margin-bottom: 30px;
  line-height: 1.6;
}
.gate__field { display: grid; gap: 10px; margin-bottom: 18px; }
.gate__label {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}
.gate__inputwrap { position: relative; display: flex; }
.gate__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 1.0625rem;
  letter-spacing: 0.18em;
  padding: 16px 52px 16px 16px;
  min-height: 56px;
  transition: border-color 0.22s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.gate__input::placeholder { color: rgba(245,242,235,0.45); letter-spacing: 0.12em; }
.gate__input:focus { outline: 2px solid var(--clay-pale); outline-offset: 2px; border-color: transparent; }
.gate__peek {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 50px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: var(--stone);
  cursor: pointer;
}
.gate__peek svg { width: 18px; height: 18px; }
.gate__peek:hover { color: var(--paper); }

.gate__submit {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--paper);
  border-radius: 0;
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease);
}
.gate__submit svg { width: 16px; height: 10px; }
.gate__submit:hover { background: var(--clay-pale); border-color: var(--clay-pale); }
.gate__submit[disabled] { opacity: 0.55; cursor: progress; }

.gate__msg {
  margin-top: 16px;
  min-height: 1.4em;
  font-family: var(--mono);
  font-size: var(--t-caption);
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: var(--stone);
}
.gate__msg[data-state="error"] { color: #f0a58a; }
.gate__msg[data-state="ok"] { color: var(--cobalt-pale); }

.gate__form.is-wrong { animation: gate-shake 0.4s var(--ease); }
@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

/* ==========================================================================
   15. HOME
   ========================================================================== */
.plate { padding-top: clamp(34px, 5vw, 76px); padding-bottom: clamp(28px, 3vw, 48px); }
.plate__grid { align-items: start; row-gap: clamp(22px, 3vw, 40px); }

.plate__meta { grid-column: 1 / span 4; grid-row: 1; display: grid; gap: 18px; align-content: start; }
.plate__stamp {
  grid-column: 10 / span 3; grid-row: 1;
  justify-self: end; text-align: right; display: grid; gap: 5px;
}
.plate__metarow { display: grid; gap: 3px; }
.plate__metarow strong {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--t-small);
  letter-spacing: 0.002em;
}

.plate__namewrap { grid-column: 1 / span 9; grid-row: 2; }
.plate__name { display: block; }
.plate__name .l1, .plate__name .l2 { display: block; }
.plate__name .l2 { padding-left: clamp(0px, 8vw, 150px); }
.plate__hair {
  margin: clamp(14px, 1.6vw, 24px) 0;
  border-top: 1px solid var(--line-strong);
}

.plate__lead { grid-column: 1 / span 4; grid-row: 3; }

.plate__figure { grid-column: 7 / span 4; grid-row: 3; align-self: start; }
.plate__figure .fig__frame { max-width: 400px; }

.plate__index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  margin-top: clamp(28px, 3.4vw, 56px);
}
.plate__index li {
  padding: clamp(16px, 1.8vw, 24px) clamp(12px, 1.6vw, 26px);
  border-left: 1px solid var(--line);
  display: grid;
  gap: 8px;
  align-content: start;
}
.plate__index li:first-child { border-left: 0; padding-left: 0; }
.plate__index b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.1rem, 1.9vw, 1.6rem);
  line-height: 1.14;
  letter-spacing: -0.008em;
}

/* Home — statement band */
.stmt__grid { row-gap: clamp(24px, 3vw, 42px); }
.stmt__head { grid-column: 1 / span 6; }
.stmt__body { grid-column: 7 / span 5; }

/* Home — record + offices */
.rec__grid { row-gap: clamp(30px, 4vw, 56px); }
.rec__left  { grid-column: 1 / span 5; }
.rec__right { grid-column: 7 / span 6; }

.offices { border-top: 1px solid var(--line-strong); }
.offices li {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  gap: 6px clamp(14px, 2vw, 30px);
  align-items: baseline;
  padding: clamp(13px, 1.5vw, 18px) 0;
  border-bottom: 1px solid var(--line);
}
.offices b { font-weight: 500; font-size: var(--t-small); line-height: 1.45; }
.offices .caption { text-align: right; }

/* Home — on the record */
.onrec__grid { row-gap: clamp(32px, 4vw, 56px); align-items: end; }
.onrec__quote { grid-column: 1 / span 7; }
.onrec__fig   { grid-column: 9 / span 4; }

/* Home — explore */
.explore__head { margin-bottom: clamp(24px, 3vw, 42px); }

/* ==========================================================================
   16. ABOUT
   ========================================================================== */
.ahead__grid { row-gap: clamp(22px, 2.6vw, 36px); align-items: end; }
.ahead__title { grid-column: 1 / span 8; }
.ahead__aside { grid-column: 9 / span 4; }

.abody__grid { row-gap: clamp(36px, 4vw, 56px); align-items: start; }
.abody__rail { grid-column: 1 / span 3; position: sticky; top: 92px; }
.abody__main { grid-column: 5 / span 7; }

.toc { border-top: 1px solid var(--line-strong); }
.toc a {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: var(--t-small);
  color: var(--graphite);
  transition: color 0.2s var(--ease), padding-left 0.24s var(--ease);
}
.toc a:hover { color: var(--ink); padding-left: 8px; }

.chapter { scroll-margin-top: 90px; }
.chapter + .chapter { margin-top: clamp(44px, 5vw, 78px); }
.chapter__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line-strong);
}
.chapter__head h2 { flex: 1 1 16ch; }

.dropcap::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 3.9em;
  line-height: 0.82;
  padding: 0.06em 0.11em 0 0;
  color: var(--cobalt);
}

.pullout {
  margin: clamp(28px, 3vw, 42px) 0;
  padding: clamp(20px, 2.4vw, 30px) 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.pullout p {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.3vw, 1.85rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  max-width: 24ch;
}

.aportrait { margin: clamp(30px, 3.4vw, 46px) 0; }
.aportrait .fig__frame { max-width: 380px; }

/* ==========================================================================
   17. JOURNEY
   ========================================================================== */
.jhead__grid { row-gap: clamp(20px, 2.4vw, 34px); align-items: end; }
.jhead__title { grid-column: 1 / span 7; }
.jhead__note  { grid-column: 9 / span 4; }

.chron { border-top: 1px solid var(--line-strong); }
.chron__entry {
  display: grid;
  grid-template-columns: minmax(0, 3.1fr) minmax(0, 4.4fr) minmax(0, 4.5fr);
  gap: 10px clamp(18px, 2.6vw, 46px);
  padding: clamp(26px, 3vw, 44px) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
/* structured asymmetry: alternate entries step inward */
.chron__entry:nth-child(even) { padding-left: clamp(0px, 4vw, 84px); }

.chron__year {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5.6vw, 4.6rem);
  line-height: 0.86;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.chron__year--undated {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  line-height: 1.6;
  padding-top: 6px;
  display: block;
  border-left: 2px solid var(--paper-3);
  padding-left: 12px;
}
.chron__role { display: grid; gap: 8px; }
.chron__role h3 { max-width: 24ch; }
.chron__where {
  font-family: var(--mono);
  font-size: var(--t-caption);
  color: var(--clay-deep);
  letter-spacing: 0.04em;
}
.chron__note p { font-size: var(--t-small); line-height: 1.66; color: var(--graphite); max-width: 46ch; }

.chron__break {
  padding: clamp(30px, 3.6vw, 52px) 0;
  border-bottom: 1px solid var(--line);
}
.chron__break .grid { align-items: end; row-gap: 24px; }
.chron__break .fig { grid-column: 1 / span 6; }
.chron__break .chron__breaktext { grid-column: 8 / span 5; }

/* ==========================================================================
   18. CAREER
   ========================================================================== */
.chead__grid { row-gap: clamp(22px, 2.6vw, 36px); align-items: end; }
.chead__title { grid-column: 1 / span 7; }
.chead__lead  { grid-column: 8 / span 5; }

.module { border-top: 2px solid var(--ink); padding-top: clamp(22px, 2.6vw, 34px); }
.module + .module { margin-top: clamp(48px, 5.4vw, 84px); }
.module__grid { row-gap: clamp(22px, 2.6vw, 34px); align-items: start; }
.module__idx { grid-column: 1 / span 2; position: sticky; top: 92px; display: grid; gap: 10px; }
.module__idxnum {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  line-height: 0.86;
  color: var(--numeral);
  letter-spacing: -0.02em;
}
.module__title { grid-column: 3 / span 4; display: grid; gap: 12px; align-content: start; }
.module__body  { grid-column: 8 / span 5; }

.tagline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay-deep);
  border: 1px solid var(--paper-3);
  padding: 5px 10px;
  margin-bottom: 10px;
}
.module__body .tagline:not(:first-child) { margin-top: 26px; }

/* ==========================================================================
   19. CONTRIBUTIONS
   ========================================================================== */
.case { border-top: 2px solid var(--ink); }
.case + .case { margin-top: clamp(50px, 5.6vw, 90px); }
.case__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 30px;
  align-items: baseline;
  padding: 20px 0 24px;
}
.case__bar h2 { max-width: 20ch; }
.case__grid { row-gap: clamp(24px, 3vw, 38px); align-items: start; }
.case__col { grid-column: span 4; display: grid; gap: 12px; align-content: start; }
.case__col > .label { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.case__col p { font-size: var(--t-small); line-height: 1.68; }

.sourcestrip {
  margin-top: clamp(24px, 2.8vw, 36px);
  padding: clamp(18px, 2.2vw, 28px) clamp(18px, 2.2vw, 30px);
  background: var(--paper-2);
  border-left: 2px solid var(--cobalt);
  display: grid;
  gap: 12px;
}
.sourcestrip q {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.9vw, 1.55rem);
  line-height: 1.28;
  letter-spacing: -0.006em;
  quotes: "\201C" "\201D";
}

/* ==========================================================================
   20. PERSPECTIVE
   ========================================================================== */
.pstate { padding-block: clamp(44px, 5.6vw, 92px); border-bottom: 1px solid var(--line); }
.pstate__grid { row-gap: clamp(18px, 2.4vw, 32px); align-items: start; }
.pstate__aside { grid-column: 1 / span 3; display: grid; gap: 12px; }
.pstate__main  { grid-column: 5 / span 8; }
.pstate__big {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4.2vw, 3.3rem);
  line-height: 1.14;
  letter-spacing: -0.014em;
  text-wrap: pretty;
}
.pstate__big em { font-style: italic; color: var(--cobalt); }
.pstate__after { margin-top: clamp(20px, 2.4vw, 30px); }

.attrib {
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: clamp(22px, 2.6vw, 36px);
  display: grid;
  gap: 14px;
}

.pplate__grid { align-items: end; row-gap: 28px; }
.pplate__fig { grid-column: 1 / span 4; }
.pplate__txt { grid-column: 6 / span 6; }

/* ==========================================================================
   21. ARCHIVE
   ========================================================================== */
.arcfeat__grid { row-gap: clamp(28px, 3.4vw, 48px); align-items: end; }
.arcfeat__fig { grid-column: 1 / span 5; }
.arcfeat__txt { grid-column: 7 / span 6; }

.arcsecond__grid { row-gap: clamp(28px, 3.4vw, 48px); align-items: start; }
.arcsecond__txt { grid-column: 1 / span 4; }
.arcsecond__fig { grid-column: 6 / span 7; }

.plateopen {
  background: none;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  display: block;
  width: 100%;
  text-align: left;
}
.plateopen .fig__frame { transition: border-color 0.24s var(--ease); }
.plateopen:hover .fig__frame { border-color: var(--line-strong); }

.metatable { border-top: 1px solid var(--line); margin-top: 16px; }
.metatable div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 4px 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}
.metatable dt { font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.metatable dd { font-size: var(--t-caption); line-height: 1.5; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(21, 24, 29, 0.96);
  display: none;
  padding: clamp(16px, 3vw, 44px);
  overflow: auto;
}
.lightbox[open], .lightbox.is-open { display: grid; grid-template-rows: auto 1fr; gap: 18px; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lightbox__close {
  background: none;
  border: 1px solid var(--line-dark);
  color: var(--paper);
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 11px 16px;
  min-height: 44px;
  cursor: pointer;
}
.lightbox__close:hover { background: var(--paper); color: var(--ink); }
.lightbox__stage { display: grid; place-items: center; min-height: 0; }
.lightbox__stage img { max-height: 78vh; width: auto; max-width: 100%; }
.lightbox__cap { font-family: var(--mono); font-size: var(--t-caption); color: var(--stone); }

/* Documentary source rows */
.srcrow {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) minmax(0, 0.9fr) auto;
  gap: 8px clamp(14px, 2vw, 34px);
  align-items: baseline;
  padding: clamp(16px, 2vw, 24px) 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.srcrow:last-of-type { border-bottom: 1px solid var(--line); }
.srcrow b { font-weight: 500; font-size: var(--t-small); line-height: 1.5; }
.srcrow:hover { background: var(--paper-2); }

/* ==========================================================================
   22. CONTACT
   ========================================================================== */
.khead__grid { row-gap: clamp(20px, 2.4vw, 34px); align-items: end; }
.khead__title { grid-column: 1 / span 7; }
.khead__note  { grid-column: 9 / span 4; }

.kcard { border-top: 2px solid var(--ink); }
.kline {
  display: grid;
  grid-template-columns: minmax(150px, 3fr) minmax(0, 8fr);
  gap: 8px clamp(18px, 3vw, 56px);
  padding: clamp(22px, 2.8vw, 36px) 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.kline__value {
  padding: 12px 0 8px;
  min-height: 44px;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3.4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.012em;
  text-decoration: none;
  display: inline-block;
  background-image: linear-gradient(var(--clay), var(--clay));
  background-repeat: no-repeat;
  background-position: 0 calc(100% - 8px);
  background-size: 0 2px;
  transition: background-size 0.3s var(--ease), color 0.24s var(--ease);
  word-break: break-word;
}
a.kline__value:hover { background-size: 100% 2px; color: var(--cobalt); }
.kline__sub { margin-top: 8px; }

.kgrid { row-gap: clamp(30px, 4vw, 50px); align-items: start; }
.kgrid__a { grid-column: 1 / span 6; }
.kgrid__b { grid-column: 8 / span 5; }
