/* ===========================================================
   NITE Lab — v6
   dark default · light toggle · UMass maroon accent
   editorial layout · vertical rail · ⌘K · drawer
   =========================================================== */

:root {
  /* === DARK (default) === */
  --bg:       #0d0e10;
  --bg-card:  #16181c;
  --bg-tint:  #1a1c20;
  --panel:    #050608;
  --ink:      #f0eee9;
  --ink-2:    #c2c4c8;
  --muted:    #888a90;
  --muted-2:  #5d6066;
  --rule:     #25272d;
  --rule-2:   #3a3d44;
  --maroon:   #c84e4e;       /* brighter for contrast on dark */
  --maroon-2: #d96666;
  --accent-cy:#41d6dc;
  --footer-bg:#050608;

  /* hero scene atom colors (theme-aware) */
  --atom-ti:  #6a6d75;
  --atom-o:   #b4b6bc;
  --atom-pt:  #d8d9dc;

  /* type */
  --f-display: 'Instrument Sans', system-ui, sans-serif;
  --f-mark:    'Montserrat', system-ui, sans-serif;
  --f-body:    'Source Serif 4', Georgia, serif;
  --f-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* metrics */
  --maxw: 1200px;
  --pad:  clamp(20px, 4vw, 56px);
  --rail-w: 78px;
  --radius: 18px;
  --radius-lg: 28px;
  --ease: cubic-bezier(.22,.61,.36,1);

  color-scheme: dark;
}

[data-theme="light"] {
  --bg:       #f5f5f3;
  --bg-card:  #ffffff;
  --bg-tint:  #efeeeb;
  --panel:    #111111;
  --ink:      #0e1014;
  --ink-2:    #1d2027;
  --muted:    #5b6068;
  --muted-2:  #8b8f97;
  --rule:     #e3e3df;
  --rule-2:   #d2d1cc;
  --maroon:   #881c1c;
  --maroon-2: #6a1515;
  --footer-bg:#0d0d0d;

  --atom-ti:  #2c2e36;
  --atom-o:   #9da1a9;
  --atom-pt:  #d0d0d0;

  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--maroon); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg); padding: 10px 14px; z-index: 99;
}
.skip:focus { left: 12px; top: 12px; }

/* ============== type primitives ============== */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--maroon);
  margin: 0 0 14px;
}
.eyebrow--mono { color: var(--maroon); }
.display {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(28px, 4.5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 18px;
}
.display em {
  font-family: var(--f-body);
  font-style: italic;
  font-weight: 500;
  color: var(--ink-2);
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-family: var(--f-display);
  font-weight: 600; font-size: 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn--primary { background: var(--maroon); color: #fff; }
.btn--primary:hover { background: var(--maroon-2); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.link-arrow {
  appearance: none; border: 0; background: transparent;
  font-family: var(--f-mono); font-size: 13px; color: var(--maroon);
  letter-spacing: .03em; cursor: pointer;
  padding: 0;
}
.link-arrow:hover { text-decoration: underline; text-underline-offset: 3px; }

/* placeholders are visually distinct so PI can spot what to fill */
.placeholder {
  display: inline-block;
  background: color-mix(in oklab, var(--maroon) 10%, transparent);
  border-bottom: 1px dashed var(--maroon);
  color: var(--ink-2);
  padding: 1px 4px;
  font-style: italic;
}

/* page is offset right of the rail on desktop */
@media (min-width: 1000px) {
  main, .footer { padding-left: var(--rail-w); }
}

/* ============== rail ============== */
.rail {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--rail-w);
  z-index: 30;
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: 22px 0;
  pointer-events: none;
}
.rail > * { pointer-events: auto; }
.rail-mark {
  font-family: var(--f-mark); font-weight: 900; font-size: 14px;
  letter-spacing: .04em; color: var(--ink);
  writing-mode: vertical-rl; transform: rotate(180deg);
}
.rail-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 18px;
  position: relative;
}
.rail-list::before {
  content: ''; position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px; background: var(--rule-2);
  transform: translateX(-.5px); z-index: -1;
}
.rail-list li { position: relative; }
.rail-list a {
  display: flex; align-items: center; padding: 6px 0;
  font-size: 0; /* dot only by default */
  color: var(--muted-2);
  position: relative;
  transition: color .25s var(--ease);
}
.rail-list a::before {
  content: '';
  display: block;
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--bg);
  border: 1.5px solid var(--rule-2);
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.rail-list a::after {
  content: attr(data-rail-target);
  position: absolute;
  left: 18px; top: 50%; transform: translateY(-50%) translateX(-4px);
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink-2);
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  padding: 4px 10px; border-radius: 999px;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  backdrop-filter: blur(6px);
}
.rail-list li:hover a::after,
.rail-list a:focus-visible::after { opacity: 1; transform: translateY(-50%) translateX(0); }
.rail-list a:hover::before,
.rail-list a:focus-visible::before { border-color: var(--ink); transform: scale(1.15); }
.rail-list a.is-active::before { background: var(--maroon); border-color: var(--maroon); transform: scale(1.2); }
.rail-list a.is-active::after { opacity: 1; transform: translateY(-50%) translateX(0); color: var(--maroon); }
.rail-utils {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.rail-kbd {
  appearance: none; border: 0; background: transparent;
  display: inline-flex; gap: 2px; cursor: pointer; padding: 0;
}
.rail-kbd kbd {
  font-family: var(--f-mono); font-size: 10px;
  background: var(--bg-card);
  border: 1px solid var(--rule-2);
  border-radius: 6px;
  padding: 3px 6px;
  color: var(--ink-2);
  box-shadow: 0 1px 0 var(--rule-2);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.rail-kbd:hover kbd { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.rail-toggle {
  appearance: none;
  width: 30px; height: 30px;
  border-radius: 999px;
  border: 1px solid var(--rule-2);
  background: var(--bg-card);
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.rail-toggle:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
/* show sun in dark mode (click to flip to light), moon in light mode */
.rail-toggle__sun { display: none; }
.rail-toggle__moon { display: none; }
:root:not([data-theme="light"]) .rail-toggle__sun { display: block; }
[data-theme="light"] .rail-toggle__moon { display: block; }

@media (max-width: 999px) {
  .rail {
    flex-direction: row; height: auto; bottom: auto;
    width: 100%;
    justify-content: space-between;
    padding: 14px var(--pad);
    background: color-mix(in oklab, var(--bg) 80%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rule);
  }
  .rail-mark { writing-mode: horizontal-tb; transform: none; }
  .rail-list { display: none; }
}

/* ============== command palette ============== */
.palette {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: start center;
  padding-top: 12vh;
}
.palette[hidden] { display: none; }
.palette__backdrop {
  position: absolute; inset: 0;
  background: rgba(10,12,16,.55);
  backdrop-filter: blur(8px);
  animation: palette-fade .2s var(--ease);
}
@keyframes palette-fade { from { opacity: 0; } to { opacity: 1; } }
.palette__panel {
  position: relative;
  width: min(640px, 92vw);
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--rule);
  box-shadow: 0 30px 80px -10px rgba(10,12,16,.45);
  overflow: hidden;
  animation: palette-rise .25s var(--ease);
}
@keyframes palette-rise {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
.palette__inputrow {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
}
.palette__icon { color: var(--muted); font-size: 18px; }
.palette__input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-family: var(--f-display); font-size: 17px; color: var(--ink);
}
.palette__esc {
  font-family: var(--f-mono); font-size: 11px;
  background: var(--bg-tint); border: 1px solid var(--rule);
  border-radius: 6px; padding: 3px 8px; color: var(--muted);
}
.palette__results { max-height: 50vh; overflow-y: auto; padding: 8px 0; }
.palette__group-label {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .15em;
  text-transform: uppercase; color: var(--muted-2);
  padding: 12px 18px 6px;
}
.palette__item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  cursor: pointer;
  font-family: var(--f-display); font-size: 15px; color: var(--ink-2);
  border-left: 2px solid transparent;
  transition: background .12s var(--ease);
}
.palette__item:hover, .palette__item.is-selected {
  background: var(--bg-tint);
  border-left-color: var(--maroon);
  color: var(--ink);
}
.palette__item__type {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted-2);
  margin-left: auto;
}
.palette__empty { padding: 28px 18px; color: var(--muted); font-size: 14px; }
.palette__hint {
  display: flex; gap: 18px;
  padding: 10px 18px; border-top: 1px solid var(--rule);
  font-family: var(--f-mono); font-size: 11px; color: var(--muted);
  background: var(--bg-tint);
}
.palette__hint kbd {
  font-family: var(--f-mono); font-size: 10px;
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: 4px; padding: 1px 5px; color: var(--ink-2);
  margin-right: 4px;
}

/* ============== hero ============== */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid; align-items: center;
  padding: 120px var(--pad) 100px;
  overflow: hidden;
  isolation: isolate;
}
.hero__canvas { position: absolute; inset: 0; z-index: -2; }
.hero__canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.hero__noise {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg,
      var(--bg) 0%,
      color-mix(in oklab, var(--bg) 92%, transparent) 30%,
      color-mix(in oklab, var(--bg) 60%, transparent) 45%,
      transparent 60%),
    linear-gradient(180deg, transparent 60%, var(--bg) 100%),
    radial-gradient(900px 500px at 78% 30%, color-mix(in oklab, var(--maroon) 12%, transparent), transparent 55%);
}
.hero__content {
  position: relative; max-width: var(--maxw); width: 100%; margin: 0 auto;
}
@media (min-width: 900px) {
  .hero__content > * { max-width: 56%; }
  .hero__content .wordmark { max-width: none; }
}
/* NITE wordmark + tagline justified to wordmark width */
.hero__title {
  display: inline-block;
  width: max-content;
  max-width: 100%;
}
.wordmark {
  display: block;
  font-family: var(--f-mark);
  font-weight: 900;
  font-size: clamp(96px, 18vw, 240px);
  line-height: .85; letter-spacing: -0.04em;
  color: var(--ink);
  margin: 0;
  text-transform: uppercase;
}
.hero__sub {
  display: block;
  margin: 12px 0 24px;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: clamp(11px, 1.05vw, 14px);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
/* matsci-slang highlight in lede (cooking / looking) */
.hero__lede {
  line-height: 1.35;
}
.hero__lede .slang {
  color: var(--maroon);
  font-style: italic;
}
.hero__lede .amp {
  display: inline-block;
  color: var(--maroon);
  font-family: var(--f-body);
  font-style: italic;
  font-size: 1.1em;
  line-height: 1;
  margin: 2px 0;
}
.hero__lede {
  max-width: 56ch; font-size: 18px; color: var(--muted);
  margin: 0 0 20px;
}
.hero__scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--muted);
}
.hero__hint {
  font-size: 10px; letter-spacing: .04em; text-transform: none;
  color: var(--muted-2); margin-bottom: 4px;
}
.hero__scroll-line {
  width: 1px; height: 36px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%   { transform: scaleY(.3); transform-origin: top;    opacity: .3; }
  50%  { transform: scaleY(1);  transform-origin: top;    opacity: 1;  }
  100% { transform: scaleY(.3); transform-origin: bottom; opacity: .3; }
}

/* ============== essay (research) ============== */
.essay {
  padding: clamp(100px, 14vh, 180px) var(--pad) clamp(80px, 10vh, 120px);
  max-width: var(--maxw); margin: 0 auto;
}
.essay__head { margin-bottom: clamp(72px, 10vh, 120px); }
.essay__display {
  font-size: clamp(26px, 3.4vw, 42px);
  letter-spacing: -.02em;
  margin: 8px 0 22px;
}
.essay__lede {
  font-family: var(--f-body); font-size: 19px; line-height: 1.55;
  color: var(--ink-2); max-width: 56ch; margin: 0;
}
.essay__section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 60px 0;
  border-top: 1px solid var(--rule);
  position: relative;
}
.essay__section .eyebrow { margin: 0 0 10px; }
.essay__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -.015em;
  margin: 0 0 28px;
  color: var(--ink);
}
.essay__layout {
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.essay__prose { max-width: 100%; }
/* single (non-split) figures get a reasonable centered max-width */
.essay__fig:not(.essay__fig--split) {
  max-width: 820px;
  margin-left: 0;
  margin-right: auto;
  width: 100%;
}
.essay__fig--split { width: 100%; }
.essay__prose p {
  font-family: var(--f-body);
  font-size: 17px;
  color: var(--ink-2);
  margin: 0 0 18px;
  max-width: none;
}
.essay__prose p:last-child { margin-bottom: 0; }

/* figure placeholder block */
.essay__fig {
  margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.essay__fig-frames {
  display: grid; gap: 10px;
  grid-template-columns: 1fr;
}
.essay__fig--split .essay__fig-frame {
  aspect-ratio: 1 / 1;
}
@media (min-width: 600px) {
  .essay__fig--split .essay__fig-frames { grid-template-columns: 1fr 1fr; }
}
.essay__fig-frame {
  background: var(--bg-card);
  border: 1px dashed var(--rule-2);
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--muted-2);
}
.essay__fig-frame--placeholder {
  background: var(--bg-card);
}
.essay__fig-frame--image {
  border: 0;
  background: var(--panel);
  padding: 0;
  position: relative;
  overflow: hidden;
}
.essay__fig-frame--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.essay__fig-frame--inline-svg {
  background: var(--panel);
  border: 0;
  position: relative;
  overflow: hidden;
}
.essay__fig-frame--annotated {
  aspect-ratio: auto;
}
.essay__fig-frame--annotated img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.essay__fig-frame--annotated .annot {
  position: absolute;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow:
    0 0 6px rgba(0,0,0,0.9),
    0 0 3px rgba(0,0,0,0.95),
    0 1px 2px rgba(0,0,0,0.8);
  white-space: nowrap;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}
@media (max-width: 720px) {
  .essay__fig-frame--annotated .annot { font-size: 9px; letter-spacing: .05em; }
}
.essay__fig-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.essay__fig-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.essay__fig-tag {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0;
  text-align: left;
}
.essay__fig-hint {
  font-family: var(--f-body); font-size: 13px;
  color: var(--muted-2); margin: 0;
  max-width: 32ch;
}
.essay__fig figcaption {
  font-family: var(--f-mono); font-size: 11px; color: var(--muted);
  letter-spacing: .03em;
}

/* find panel SVG widgets — heterointerface coloring */
.essay-find__lattice circle.left  { fill: rgba(180,180,180,.55); }
.essay-find__lattice circle.right { fill: var(--maroon); opacity: 0.78; }
.essay-find__vacancy circle {
  fill: none;
  stroke: rgba(255, 220, 120, 0.85);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}
.essay-find__glow {
  animation: vacancyPulse 3.2s var(--ease) infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes vacancyPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50%      { opacity: 1;    transform: scale(1.12); }
}
.essay-find__path { stroke: rgba(255,255,255,.18); stroke-width: 1; stroke-dasharray: 2 4; }
.essay-find__particles circle {
  fill: var(--accent-cy);
  filter: drop-shadow(0 0 6px rgba(65,214,220,.7));
}
.essay-find__free circle {
  fill: var(--accent-cy);
  opacity: 0.55;
  filter: drop-shadow(0 0 4px rgba(65,214,220,.45));
}

/* margin notes (used in research section) */
.margin-note {
  font-family: var(--f-mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  border-left: 2px solid var(--rule-2);
  padding: 6px 0 6px 14px;
  margin-top: 24px;
  max-width: 36ch;
}
.margin-note p { margin: 0 0 6px; }
.margin-note p:last-child { margin: 0; }
.margin-note__label {
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--maroon); margin-bottom: 6px;
}
.margin-note em { font-style: italic; color: var(--ink-2); }

/* ============== selected work (picks) ============== */
.work {
  padding: clamp(80px, 12vh, 140px) var(--pad);
  max-width: var(--maxw); margin: 0 auto;
  border-top: 1px solid var(--rule);
}
.section-head { margin-bottom: 48px; }
.section-head--row {
  display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}

/* areas: one paper per current research line on the homepage */
.areas {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
}
.area {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding: 36px 0;
  border-top: 1px solid var(--rule);
}
.area:first-of-type { border-top: 0; }
.area__head {
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 4px;
}
.area__label {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--maroon);
  margin: 0;
}
.area__year {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.area__tag {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--maroon);
  background: color-mix(in oklab, var(--maroon) 14%, transparent);
  padding: 2px 7px;
  border-radius: 999px;
}
.pub__tag {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--maroon);
  background: color-mix(in oklab, var(--maroon) 14%, transparent);
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}
.area__body { min-width: 0; }
.area__title {
  font-family: var(--f-body);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0;
}
.area__title em { font-weight: 600; }
.area__authors {
  font-family: var(--f-body);
  font-size: 15px;
  color: var(--ink-2);
  margin: 8px 0 0;
}
.area__venue {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  margin: 6px 0 0;
}
.area__second {
  margin: 16px 0 0;
  padding: 14px 16px;
  background: var(--bg-tint);
  border-left: 2px solid var(--rule-2);
  border-radius: 0 8px 8px 0;
  display: flex; gap: 14px; align-items: flex-start;
}
.area__second-body {
  flex: 1;
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0;
}
.area__second-title {
  margin: 0;
  font-family: var(--f-body);
  font-style: italic;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
  color: var(--ink);
}
.area__second-authors {
  margin: 0;
  font-family: var(--f-body);
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.45;
}
.area__second-venue {
  margin: 0;
  font-family: var(--f-body);
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.area__venue-inline { font-style: italic; color: var(--muted); }
.area__doi {
  font-family: var(--f-mono);
  font-style: normal;
  font-size: 12px;
  letter-spacing: .03em;
  color: var(--maroon);
  text-decoration: none;
  margin-left: 6px;
  white-space: nowrap;
}
.area__doi:hover { text-decoration: underline; }
.area__second-year {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--maroon);
  letter-spacing: .03em;
  white-space: nowrap;
  padding-top: 4px;
}
.work__cta { margin-top: 48px; text-align: center; }

@media (max-width: 700px) {
  .area { grid-template-columns: 1fr; gap: 12px; }
}

/* essay support line (funding mention) */
.essay__support {
  margin: 60px 0 0;
  padding-top: 36px;
  border-top: 1px solid var(--rule);
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.essay__support-label {
  margin: 0;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.sponsors {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center;
  gap: clamp(24px, 5vw, 56px);
}
.sponsors li { margin: 0; display: flex; align-items: center; }
.sponsors img {
  height: 52px; width: auto;
  display: block;
  opacity: .9;
  transition: opacity .2s var(--ease);
}
.sponsors img:hover { opacity: 1; }
@media (max-width: 720px) {
  .sponsors img { height: 40px; }
  .sponsors { gap: 24px; }
}

/* ============== drawer (full pubs index) ============== */
.drawer {
  position: fixed; inset: 0; z-index: 70;
}
.drawer[hidden] { display: none; }
.drawer__backdrop {
  position: absolute; inset: 0;
  background: rgba(10,12,16,.55);
  backdrop-filter: blur(8px);
  animation: palette-fade .2s var(--ease);
}
.drawer__panel {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: min(880px, 92vw);
  background: var(--bg);
  box-shadow: -30px 0 80px -10px rgba(10,12,16,.45);
  display: flex; flex-direction: column;
  animation: drawer-slide .3s var(--ease);
}
@keyframes drawer-slide {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.drawer__head {
  display: flex; align-items: start; justify-content: space-between; gap: 20px;
  padding: 28px 32px 18px;
  border-bottom: 1px solid var(--rule);
}
.drawer__title {
  font-family: var(--f-display); font-weight: 700;
  font-size: 24px; letter-spacing: -.01em;
  margin: 8px 0 0; color: var(--ink);
}
.drawer__scholar { margin: 6px 0 0; }
.drawer__scholar a {
  font-family: var(--f-mono); font-size: 12px;
  letter-spacing: .03em;
  color: var(--maroon); text-decoration: none;
}
.drawer__scholar a:hover { text-decoration: underline; }
.drawer__close {
  appearance: none; border: 1px solid var(--rule);
  background: var(--bg-card);
  width: 36px; height: 36px; border-radius: 999px;
  cursor: pointer;
  font-size: 20px; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.drawer__close:hover { background: var(--ink); color: var(--bg); }
.drawer__controls {
  display: flex; gap: 16px; flex-wrap: wrap;
  padding: 18px 32px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-tint);
}
.drawer .pubs__list { padding: 0 32px; flex: 1; overflow-y: auto; }
.drawer .pubs__note { margin: 24px 32px 32px; }

/* publication search + year select */
.pubs__search {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  flex: 1; min-width: 260px;
  transition: border-color .2s var(--ease);
}
.pubs__search:focus-within { border-color: var(--ink); }
.pubs__search > span { color: var(--muted); font-size: 16px; }
.pubs__search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-family: var(--f-display); font-size: 14px; color: var(--ink);
}
.pubs__count {
  font-family: var(--f-mono); font-size: 12px; color: var(--muted-2);
}
.pubs__year-select {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.pubs__year-select span {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.pubs__year-select select {
  appearance: none;
  border: 0; outline: 0; background: transparent;
  font-family: var(--f-display); font-size: 14px; color: var(--ink);
  padding-right: 18px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 6' fill='%235b6068'><path d='M0 0l4 6 4-6z'/></svg>") right center / 8px no-repeat;
  cursor: pointer;
}

/* publication rows (used inside drawer) */
.pubs__list { list-style: none; padding: 0; margin: 0; }
.pub { border-top: 1px solid var(--rule); }
.pub:last-of-type { border-bottom: 1px solid var(--rule); }
.pub[hidden] { display: none; }
.pub__row {
  appearance: none; border: 0; background: transparent;
  width: 100%; cursor: pointer; text-align: left;
  display: grid;
  grid-template-columns: 44px 56px 1fr 24px;
  gap: 16px 18px;
  padding: 18px 4px;
  transition: background .15s var(--ease);
}
.pub__row:hover { background: var(--bg-tint); }
.pub__num {
  font-family: var(--f-mono); font-size: 12px; color: var(--muted-2);
  letter-spacing: .04em; align-self: center;
  font-variant-numeric: tabular-nums;
}
.pub__year {
  font-family: var(--f-mono); font-size: 13px; color: var(--maroon);
  letter-spacing: .03em; align-self: center;
}
.pub__lead { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pub__title {
  font-family: var(--f-body);
  font-style: italic;
  font-weight: 500;
  font-size: 16px; line-height: 1.4; color: var(--ink);
}
.pub__short {
  font-family: var(--f-mono); font-size: 12px; color: var(--muted);
}
.pub__chev {
  align-self: center;
  font-family: var(--f-mono); font-size: 18px;
  color: var(--muted-2);
  transition: transform .25s var(--ease), color .2s var(--ease);
}
.pub[data-open] .pub__chev { transform: rotate(45deg); color: var(--maroon); }
.pub__detail {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 4px 18px;
  padding: 0 4px 18px 4px;
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .35s var(--ease), opacity .25s var(--ease);
}
.pub__detail > * { grid-column: 2; }
.pub[data-open] .pub__detail { max-height: 600px; opacity: 1; }
.pub__authors {
  margin: 0;
  font-family: var(--f-body); font-size: 14.5px; color: var(--ink-2); line-height: 1.5;
}
.pub__venue {
  margin: 4px 0 0;
  font-family: var(--f-body);
  font-style: italic;
  font-size: 13.5px;
  color: var(--muted);
}
.pub__doi {
  margin: 6px 0 0;
}
.pub__doi a {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .03em;
  color: var(--maroon);
  text-decoration: none;
}
.pub__doi a:hover { text-decoration: underline; }
.pub__summary {
  margin: 10px 0 0;
  font-family: var(--f-body);
  font-style: italic;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 78ch;
}
.pubs__note {
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px dashed var(--rule);
  border-radius: 12px;
  font-size: 13px; color: var(--muted);
}
.pubs__note strong { color: var(--ink); font-family: var(--f-display); }

/* ============== people ============== */
.people {
  padding: clamp(80px, 12vh, 140px) var(--pad);
  max-width: var(--maxw); margin: 0 auto;
  border-top: 1px solid var(--rule);
}
.pi {
  display: grid; grid-template-columns: 1fr; gap: 28px;
  padding: 36px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
  margin-bottom: 56px;
}
@media (min-width: 720px) {
  .pi { grid-template-columns: 220px 1fr; gap: 40px; align-items: center; padding: 40px; }
}
.pi__photo {
  aspect-ratio: 1 / 1;
  background: var(--bg-tint);
  border-radius: 12px;
  overflow: hidden;
  max-width: 220px;
}
.pi__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
}
.pi h3 {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(24px, 3vw, 34px); margin: 0 0 8px; color: var(--ink);
}
.pi__title {
  font-family: var(--f-display);
  color: var(--ink-2);
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.5;
}
.pi__bio   { color: var(--muted); margin: 0; font-size: 14px; line-height: 1.55; }
.pi__contact { font-family: var(--f-mono); font-size: 13px; color: var(--muted); margin: 0; }
.pi__contact a { color: var(--maroon); }

/* PI degrees list (inside Background details) */
.pi__degrees {
  list-style: none; padding: 0; margin: 10px 0 0;
  display: flex; flex-direction: column;
  gap: 6px;
}
.pi__degrees li {
  font-family: var(--f-body);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}
.pi__degrees strong {
  color: var(--ink-2);
  font-family: var(--f-display);
  font-weight: 600;
}

/* People section: team intro lede */
.people__lede {
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 14px 0 0;
  max-width: 60ch;
}
.people__head { align-items: start; }
.news {
  flex: 0 1 380px;
  min-width: 260px;
  border-left: 2px solid var(--rule-2);
  padding-left: 20px;
}
.news__list {
  list-style: none; padding: 0;
  margin: 12px 0 0;
  display: flex; flex-direction: column; gap: 18px;
}
.news__item { margin: 0; }
.news__item--has-photo {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.news__photo-link {
  flex-shrink: 0;
  display: block;
  width: 96px; height: 96px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  transition: transform .25s var(--ease), border-color .2s var(--ease);
}
.news__photo-link:hover {
  transform: translateY(-1px);
  border-color: var(--maroon);
}
.news__photo {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.news__text { flex: 1; min-width: 0; }
.news__date {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--maroon);
  margin: 0 0 4px;
}
.news__body {
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
}
@media (max-width: 720px) {
  .news {
    flex-basis: 100%;
    border-left: 0;
    padding-left: 0;
    margin-top: 8px;
    border-top: 1px solid var(--rule-2);
    padding-top: 24px;
  }
}

/* Alumni list */
.alumni {
  display: flex; flex-direction: column;
  gap: 40px;
  margin-top: 4px;
}
.alumni__group-h {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--maroon);
  margin: 0 0 16px;
}
.alumni__list {
  list-style: none; padding: 0; margin: 0;
}
.alumni__list li {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 4px 18px;
  padding: 14px 0;
  align-items: start;
  border-top: 1px solid var(--rule);
}
.alumni__list li:first-child { border-top: 0; }
.alumni__main {
  display: flex; flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.alumni__name {
  font-family: var(--f-display); font-weight: 600;
  font-size: 15px; color: var(--ink);
}
.alumni__home {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
}
.alumni__li, .person__li {
  display: inline-flex; align-items: center;
  margin-right: 6px;
  color: var(--muted-2);
  text-decoration: none;
  vertical-align: middle;
  transition: color .15s var(--ease);
}
.alumni__li:hover, .person__li:hover { color: var(--maroon); }
.alumni__li svg, .person__li svg { display: block; }
.person__li { margin-left: 6px; margin-right: 0; }
.alumni__dept {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  font-weight: 400;
  color: var(--muted);
  margin-left: 8px;
}
.alumni__when {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  padding-top: 4px;
}
.alumni__now {
  font-size: 14px;
  color: var(--ink-2);
}
@media (max-width: 700px) {
  .alumni__list li {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 0;
  }
  .alumni__now { font-size: 13.5px; }
}

/* Collapsible "Background" details (degrees, education) */
.pi__more {
  margin: 0 0 18px;
}
.pi__more-summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s var(--ease);
  user-select: none;
}
.pi__more-summary::-webkit-details-marker { display: none; }
.pi__more-summary::after {
  content: '+';
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--maroon);
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.pi__more-summary:hover { color: var(--ink); }
.pi__more-summary:hover::after { border-color: var(--maroon); }
.pi__more[open] .pi__more-summary::after { content: '−'; }
.pi__more .pi__bio { margin-top: 10px; max-width: 60ch; }

.people__tab-list {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 32px;
}
.people__tab {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 10px 18px; border-radius: 999px;
  font-family: var(--f-display); font-size: 14px; font-weight: 500;
  color: var(--ink-2);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.people__tab:hover { color: var(--maroon); }
.people__tab.is-active { background: var(--ink); color: var(--bg); }
@media (max-width: 720px) {
  .people__tab-list { gap: 4px; padding: 4px; }
  .people__tab { padding: 8px 14px; font-size: 13px; }
}
.people__panel[hidden] { display: none; }
.people__grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  justify-content: start;
}
.person {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px;
  max-width: 320px;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.person:hover { transform: translateY(-2px); border-color: var(--ink); }
.person__photo {
  aspect-ratio: 1 / 1;
  background: var(--bg-tint);
  border-radius: 12px; overflow: hidden; margin-bottom: 16px;
}
.person__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* crop from top so head/shoulders show, hiding any export bleed below */
  object-position: top center;
}
/* Initial-letter fallback when no photo is provided */
.person__photo--initial {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mark);
  font-weight: 900;
  font-size: clamp(48px, 6vw, 72px);
  color: var(--maroon);
  letter-spacing: -0.02em;
  user-select: none;
}
.people__inquiry {
  margin: 28px 0 0;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px dashed var(--rule);
  border-radius: 12px;
  font-family: var(--f-body);
  font-size: 14px;
  color: var(--muted);
}
.people__inquiry a { color: var(--maroon); }
.person h4 {
  font-family: var(--f-display); font-weight: 600; font-size: 17px;
  margin: 0 0 4px; color: var(--ink);
}
.person__role {
  font-family: var(--f-mono); font-size: 12px; color: var(--maroon);
  letter-spacing: .04em; margin: 0 0 10px;
  display: flex; flex-direction: column; gap: 2px;
  line-height: 1.4;
}
.person__role span { display: block; }
.person__bio { font-size: 14px; color: var(--muted); margin: 0 0 14px; }

/* Collapsible "Background" details on student cards */
.person__more {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.person__more-summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s var(--ease);
  user-select: none;
}
.person__more-summary::-webkit-details-marker { display: none; }
.person__more-summary::after {
  content: '+';
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--maroon);
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  transition: border-color .2s var(--ease);
}
.person__more-summary:hover { color: var(--ink); }
.person__more-summary:hover::after { border-color: var(--maroon); }
.person__more[open] .person__more-summary::after { content: '−'; }
.person__more-body {
  margin-top: 12px;
  display: flex; flex-direction: column;
  gap: 4px;
}
.person__more-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--maroon);
  margin: 6px 0 0;
}
.person__more-label:first-child { margin-top: 0; }
.person__more-text {
  font-family: var(--f-body);
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.people__placeholder {
  background: var(--bg-card); border: 1px dashed var(--rule);
  border-radius: var(--radius); padding: 28px; color: var(--muted);
  font-size: 15px;
  margin-top: 28px;
}

/* group photo gallery */
.people__photos {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.people__photos .eyebrow { margin: 0 0 18px; }
.group-gallery {
  list-style: none; padding: 0 0 12px; margin: 0;
  display: flex; gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--rule-2) transparent;
}
.group-gallery::-webkit-scrollbar { height: 6px; }
.group-gallery::-webkit-scrollbar-track { background: transparent; }
.group-gallery::-webkit-scrollbar-thumb {
  background: var(--rule-2);
  border-radius: 3px;
}
.group-gallery li {
  margin: 0;
  flex: 0 0 280px;
  scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 8px;
}
@media (max-width: 720px) {
  .group-gallery li { flex: 0 0 220px; }
}
.group-gallery a {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.group-gallery a:hover { transform: translateY(-2px); border-color: var(--ink); text-decoration: none; }
.group-gallery img {
  width: 100%; height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.group-gallery p {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em;
  color: var(--muted); margin: 0;
}

/* ============== apply ============== */
.apply {
  padding: clamp(80px, 12vh, 140px) var(--pad);
  max-width: var(--maxw); margin: 0 auto;
  border-top: 1px solid var(--rule);
}
.apply__grid {
  display: grid; gap: 60px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .apply__grid { grid-template-columns: 1fr 1fr; }
}
.apply__sub {
  font-family: var(--f-display); font-size: 18px; font-weight: 600;
  margin: 0 0 18px; color: var(--ink);
}
.apply__list {
  list-style: none; padding: 0; margin: 0 0 28px;
  display: flex; flex-direction: column; gap: 22px;
}
.apply__list li {
  font-family: var(--f-body); font-size: 15.5px; color: var(--ink-2);
}
.apply__list strong { color: var(--ink); font-family: var(--f-display); font-weight: 600; }
.apply__contact {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 0;
}
.apply__contact > div { margin: 0; }
.apply__contact dt {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .15em;
  text-transform: uppercase; color: var(--maroon); margin-bottom: 8px;
}
.apply__contact dd { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }

/* ============== footer ============== */
.footer {
  background: var(--footer-bg);
  color: #c8c9cb;
  padding: 60px var(--pad) 36px;
  margin-top: 80px;
  border-top: 1px solid var(--rule);
}
.footer__grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; gap: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .footer__grid { grid-template-columns: 1fr auto; align-items: end; }
  .footer__legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid #232323; }
}
.footer__mark {
  font-family: var(--f-mark); font-weight: 900; color: #fff;
  font-size: 22px; letter-spacing: .02em; margin: 0 0 4px;
}
.footer__sub { font-family: var(--f-mono); font-size: 12px; color: #8a8d92; margin: 0; }
.footer__links { list-style: none; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.footer__links a { color: #c8c9cb; font-family: var(--f-mono); font-size: 13px; }
.footer__links a:hover { color: #fff; }
.footer__legal { font-family: var(--f-mono); font-size: 12px; color: #71747a; margin: 0; }

/* ============== lightbox (group photo viewer) ============== */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  animation: palette-fade .18s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(10px);
  cursor: zoom-out;
}
.lightbox__panel {
  position: relative;
  max-width: 92vw; max-height: 88vh;
  margin: 0;
  display: flex; flex-direction: column; gap: 12px;
  align-items: center;
  pointer-events: none;
}
.lightbox__panel img {
  max-width: 100%;
  max-height: calc(88vh - 36px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 80px -10px rgba(0,0,0,.6);
  pointer-events: auto;
  background: #000;
}
.lightbox__panel figcaption {
  font-family: var(--f-mono); font-size: 12px;
  color: rgba(255,255,255,.75);
  letter-spacing: .04em;
  pointer-events: auto;
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  appearance: none;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.55);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
  z-index: 2;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); }
.lightbox__close {
  top: 18px; right: 18px;
  width: 44px; height: 44px;
  border-radius: 999px;
  font-size: 24px; line-height: 1;
}
.lightbox__nav {
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 999px;
  font-size: 28px; line-height: 1;
}
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }
.lightbox__nav:hover { transform: translateY(-50%) scale(1.05); }
@media (max-width: 600px) {
  .lightbox__nav { width: 38px; height: 38px; font-size: 22px; }
}

/* ============== reveals + reduced motion ============== */
[data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .hero__scroll-line { display: none; }
}
