/* ============================================================
   AML — Integrated Concept
   Base structure: Concept B (numbered sections). Hero + mission
   display: Concept A. Palette: Concept A. Selected Work: Concept C
   mosaic. Typography: Titillium Web throughout (DIN Mittelschrift
   substitute — see note in index.html <head>).
   ============================================================ */

:root {
  --font-display: "Titillium Web", system-ui, sans-serif;
  --font-body: "Titillium Web", system-ui, sans-serif;

  --bg: #f9f8f6;
  --surface: #efece5;
  --surface-2: #e4e0d7;
  --ink: #15140f;
  --ink-muted: #57534a;
  --line: #ddd8cd;
  --accent: #ff5a1f;
  --accent-ink: #15140f;
  --on-accent: #15140f;
  --placeholder-bg: #e9e6dd;
  --placeholder-line: #b9b3a3;
  --shadow: 0 20px 60px -30px rgba(21, 20, 15, 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131210;
    --surface: #1c1a17;
    --surface-2: #26221d;
    --ink: #f3f1ec;
    --ink-muted: #b3ac9f;
    --line: #34302a;
    --accent: #ff6a35;
    --accent-ink: #15140f;
    --on-accent: #15140f;
    --placeholder-bg: #201d18;
    --placeholder-line: #4a4437;
    --shadow: 0 20px 60px -30px rgba(0, 0, 0, 0.7);
  }
}
:root[data-theme="dark"] {
  --bg: #131210;
  --surface: #1c1a17;
  --surface-2: #26221d;
  --ink: #f3f1ec;
  --ink-muted: #b3ac9f;
  --line: #34302a;
  --accent: #ff6a35;
  --accent-ink: #15140f;
  --on-accent: #15140f;
  --placeholder-bg: #201d18;
  --placeholder-line: #4a4437;
  --shadow: 0 20px 60px -30px rgba(0, 0, 0, 0.7);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
}
a { text-decoration: none; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  text-wrap: balance;
  letter-spacing: -0.005em;
  margin: 0;
}
.eyebrow, .section-kicker {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- header ----------
   Floats, transparent + blurred, on top of the hero/project-hero image
   (removed from flow so the hero fills the viewport right to the top —
   no solid bar above it). JS (initHeaderOverHero in shared.js) adds
   .is-scrolled once the header is no longer over the dark hero image,
   swapping it to a solid, dark-text version for legibility over the
   light page background. The .is-scrolled state is also the no-JS /
   initial-paint-safe fallback on pages with no hero. */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: linear-gradient(to bottom, rgba(8, 7, 6, 0.46), rgba(8, 7, 6, 0.32));
  backdrop-filter: blur(22px) saturate(110%);
  -webkit-backdrop-filter: blur(22px) saturate(110%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 97%, transparent);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header-inner {
  max-width: 1400px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.wordmark {
  display: flex; flex-direction: column;
  font-family: var(--font-display); font-weight: 900; font-size: 22px;
  color: #fff; line-height: 1; transition: color 0.3s ease;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}
.wordmark-sub {
  font-weight: 600; font-size: 10.5px; letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.85); margin-top: 5px; text-transform: uppercase;
  transition: color 0.3s ease;
}
.site-header.is-scrolled .wordmark { color: var(--ink); text-shadow: none; }
.site-header.is-scrolled .wordmark-sub { color: var(--ink-muted); }
.site-nav { display: flex; align-items: center; gap: 24px; font-size: 13.5px; font-weight: 600; }
.site-nav a {
  color: rgba(255, 255, 255, 0.88); position: relative; padding: 4px 0;
  border-bottom: 2px solid transparent; transition: color 0.3s ease;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}
.site-nav a:hover, .site-nav a.is-active { color: #fff; border-color: var(--accent); }
.site-header.is-scrolled .site-nav a { color: var(--ink-muted); text-shadow: none; }
.site-header.is-scrolled .site-nav a:hover, .site-header.is-scrolled .site-nav a.is-active { color: var(--ink); }
.nav-cta {
  background: var(--accent); color: var(--on-accent);
  padding: 10px 20px; border-radius: 999px; font-weight: 700;
  transition: transform 0.2s ease; display: inline-block;
}
.nav-cta:hover { transform: translateY(-1px); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: #fff; display: block; transition: background 0.3s ease; }
.site-header.is-scrolled .nav-toggle span { background: var(--ink); }

/* pages/sections rendered right under the fixed header need their own
   top clearance; the hero sections intentionally have none, so the
   header floats transparently over them. */
body { padding-top: 0; }

/* ---------- hero (Concept A style) ---------- */
.hero {
  position: relative; overflow: hidden; background: #0a0907;
  height: 100vh; height: 100svh; min-height: 560px;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10,9,7,0.84) 0%, rgba(10,9,7,0.4) 45%, rgba(10,9,7,0.15) 100%);
}
.hero-content {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0 24px 56px; max-width: 1400px; margin: 0 auto; color: #fff;
}
.hero-eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: 12.5px;
  letter-spacing: 0.06em; text-transform: uppercase; color: #f4d9c9; margin: 0 0 18px;
}
.hero-title { font-size: clamp(2.4rem, 6.4vw, 5rem); line-height: 1.02; color: #fff; font-weight: 900; }
.hero-tagline { margin: 22px 0 0; max-width: 640px; font-size: clamp(1rem, 1.6vw, 1.25rem); color: #f2efe9; font-weight: 400; }

/* ---------- numbered sections (Concept B skeleton) ---------- */
.numbered-section {
  max-width: 1360px; margin: 0 auto; padding: 68px 24px;
  display: grid; grid-template-columns: 190px 1fr; gap: 48px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 100px;
}
.ns-rail { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 6px; }
.ns-num { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--accent); }
.ns-label { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--ink); }
.ns-content { min-width: 0; }
.section-intro { color: var(--ink-muted); max-width: 62ch; margin: 0 0 30px; font-size: 15px; }

@media (max-width: 780px) {
  .numbered-section { grid-template-columns: 1fr; gap: 16px; }
  .ns-rail { position: static; flex-direction: row; align-items: baseline; gap: 12px; }
}

/* ---------- mission (Concept A display style) ----------
   Mission copy is a full paragraph (not a short display statement), so
   this reads as comfortable body text rather than a giant headline. */
.mission-statement {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1rem, 1.35vw, 1.3rem);
  line-height: 1.68;
  color: var(--ink);
  max-width: 72ch;
  margin: 0 0 22px;
}
.history-text { color: var(--ink-muted); max-width: 64ch; font-size: 15px; }

/* ---------- research themes ---------- */
.research-areas-label {
  font-family: var(--font-display); font-weight: 700; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted);
  margin: 0 0 14px;
}
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.theme-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.theme-card-icon-wrap {
  width: 40px; height: 40px; border-radius: 8px; margin: 0 0 14px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
}
.theme-card-icon { width: 22px; height: 22px; }
.theme-card h3 { font-size: 1.02rem; font-weight: 700; margin: 0 0 10px; }
.theme-card p { font-size: 13.8px; color: var(--ink-muted); margin: 0; }
@media (max-width: 640px) { .theme-grid { grid-template-columns: 1fr; } }

/* ---------- selected work mosaic ----------
   Scales to any number of projects: each group (e.g. "Current Research —
   Georgia Tech", "Prior Work — Penn & UCL") renders as its own labeled,
   uniform grid of equal-size tiles. No CSS grid auto-placement spans, so
   a growing project count never produces a hidden/isolated tile. */
.mosaic-group { margin-bottom: 40px; }
.mosaic-group:last-child { margin-bottom: 0; }
.mosaic-group-label {
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted);
  margin: 0 0 16px;
}
.mosaic-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.mosaic-tile { position: relative; display: block; overflow: hidden; border-radius: 6px; cursor: pointer; border: 1px solid var(--line); height: 240px; }
.mosaic-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.mosaic-tile:hover img { transform: scale(1.06); }
.mosaic-tile-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px;
  background: linear-gradient(0deg, rgba(10,9,7,0.86) 0%, transparent 100%);
  color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 12px;
}
@media (max-width: 900px) {
  .mosaic-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .mosaic-grid { grid-template-columns: 1fr; }
  .mosaic-tile { height: 220px; }
}

/* ---------- publications (Concept B row-list, repurposed) ---------- */
.publication-list { display: flex; flex-direction: column; }
.pub-group { margin-bottom: 36px; }
.pub-group:last-child { margin-bottom: 0; }
.pub-group-label {
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted);
  margin: 0 0 4px;
}
.pub-group-rows { display: flex; flex-direction: column; }
.publication-row {
  display: grid; grid-template-columns: 148px 1fr auto; gap: 24px; align-items: stretch;
  padding: 22px 0; border-top: 1px solid var(--line); cursor: pointer;
}
.pub-group-rows .publication-row:first-child { border-top: none; }
.publication-row--no-thumb { grid-template-columns: 1fr auto; }
.pub-row-thumb {
  width: 100%; height: 100%; min-height: 128px; max-height: 190px; border-radius: 8px; object-fit: cover;
  background: var(--surface); flex-shrink: 0;
}
.pub-row-body { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.pub-row-title { font-size: 1.08rem; font-weight: 700; margin: 0 0 8px; max-width: 62ch; }
.pub-row-desc { font-size: 13.8px; color: var(--ink-muted); margin: 0 0 12px; max-width: 62ch; }
.pub-row-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 10px; }
.pub-row-citation { font-size: 12.5px; color: var(--ink-muted); margin: 0; max-width: 62ch; }
.pub-row-tags li {
  font-family: var(--font-display); font-weight: 600; font-size: 10.5px;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--ink-muted);
}
.pub-row-arrow { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--accent); white-space: nowrap; align-self: center; }
@media (max-width: 640px) {
  .pub-row-arrow { display: none; }
  .publication-row { grid-template-columns: 84px 1fr; gap: 14px; }
  .publication-row--no-thumb { grid-template-columns: 1fr; }
  .pub-row-thumb { min-height: 84px; max-height: 120px; }
}

/* ---------- team ---------- */
.director-card {
  display: flex; gap: 32px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 32px; margin-bottom: 24px;
}
.director-card-photo, .director-card-photo--placeholder {
  width: 148px; height: 148px; border-radius: 8px; flex-shrink: 0;
  object-fit: cover; border: 1px solid var(--line);
}
.director-card-photo--placeholder {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 28px; color: var(--ink-muted);
  border-style: dashed;
}
.director-card-body { min-width: 0; }
.director-card-name { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; margin: 0 0 6px; }
.director-card-role { font-size: 14px; color: var(--ink-muted); font-weight: 600; margin: 0 0 16px; line-height: 1.5; }
.director-card-bio { font-size: 14px; color: var(--ink-muted); line-height: 1.68; max-width: 72ch; }
.director-card-bio p { margin: 0 0 14px; }
.director-card-bio p:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .director-card { flex-direction: column; gap: 20px; padding: 22px; }
  .director-card-photo, .director-card-photo--placeholder { width: 96px; height: 96px; }
}

.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-bottom: 8px; }
.team-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.avatar-placeholder, .avatar-photo {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--ink-muted);
  margin-bottom: 16px;
}
.avatar-placeholder { border: 1px dashed var(--ink-muted); }
.avatar-photo { object-fit: cover; border: 1px solid var(--line); }
.team-card-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin: 0 0 6px; }
.team-card-role { font-size: 13.3px; color: var(--ink-muted); margin: 0; line-height: 1.5; }
.team-note { margin: 0 0 34px; font-size: 12.5px; color: var(--ink-muted); }

.past-team { border-top: 1px solid var(--line); padding-top: 28px; }
.past-team-heading { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin: 0 0 8px; }
.past-team-note { font-size: 12.5px; color: var(--ink-muted); margin: 0 0 18px; max-width: 62ch; }
.past-team-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; }
.past-team-list li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-muted);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px 6px 6px;
}
.past-team-avatar-photo {
  width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.past-team-avatar-placeholder {
  width: 24px; height: 24px; border-radius: 50%; border: 1px dashed var(--ink-muted);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 9.5px; color: var(--ink-muted);
}
.past-team-bio-tab {
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--ink-muted);
  background: transparent; color: var(--ink-muted);
  font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; padding: 0; margin-left: 2px; line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.past-team-bio-tab:hover,
.past-team-bio-tab:focus-visible {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
}

/* ---------- bio modal ---------- */
.aml-modal-bio .aml-modal-panel { max-width: 560px; }
.bio-modal-photo {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  margin: 0 0 16px; border: 1px solid var(--line);
}
.bio-modal-text { font-size: 14px; line-height: 1.7; color: var(--ink-muted); margin: 10px 0 0; white-space: pre-line; }

/* ---------- join the lab ---------- */
.join { background: var(--ink); color: var(--bg); padding: 88px 24px; scroll-margin-top: 60px; }
.join-inner { max-width: 860px; margin: 0 auto; }
.join-eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin: 0 0 14px;
}
.join h2 { color: var(--bg); font-size: clamp(1.9rem, 4.6vw, 3rem); margin-bottom: 20px; font-weight: 900; }
.join-body { font-size: 1.03rem; color: #e4e0d7; margin: 0 0 40px; max-width: 62ch; opacity: 0.82; }

.positions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.position-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px; padding: 22px;
}
.position-card--primary {
  background: color-mix(in srgb, var(--accent) 13%, rgba(255, 255, 255, 0.045));
  border-top-color: var(--accent);
}
.position-card h3 { color: var(--bg); font-size: 0.98rem; font-weight: 700; margin: 0 0 10px; }
.position-card p { color: #e4e0d7; margin: 0 0 14px; font-size: 12.8px; line-height: 1.55; opacity: 0.78; }
.position-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-weight: 600; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.04em; color: #e4e0d7; opacity: 0.7;
}
.position-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
.position-contact { margin: 10px 0 0 !important; font-size: 12px !important; }
@media (max-width: 720px) { .positions-grid { grid-template-columns: 1fr; } }

.funding-block {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px; padding: 22px; margin-bottom: 30px;
}
.funding-label {
  font-family: var(--font-display); font-weight: 700; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--accent); margin: 0 0 8px;
}
.funding-text { color: #e4e0d7; font-size: 13.3px; max-width: 62ch; opacity: 0.78; }
.funding-text p { margin: 0 0 10px; }
.funding-text p:last-child { margin-bottom: 0; }
.funding-text a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.join-meta { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: #e4e0d7; opacity: 0.68; margin: 0 0 8px; }
.tbd { border-bottom: 1px dashed currentColor; opacity: 0.85; }

/* ---------- footer ---------- */
.site-footer { padding: 52px 24px 40px; scroll-margin-top: 100px; }
.footer-inner {
  max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  font-size: 13.5px; color: var(--ink-muted);
}
.footer-wordmark { font-family: var(--font-display); font-weight: 900; font-size: 20px; color: var(--ink); margin: 0; }
.footer-lab-name { margin: 6px 0 0; }
.footer-address p, .footer-note p { margin: 0 0 6px; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }

/* ---------- mobile nav ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(78vw, 320px);
    background: var(--bg); flex-direction: column; align-items: flex-start;
    padding: 90px 28px; gap: 20px; transform: translateX(100%);
    transition: transform 0.3s ease; box-shadow: var(--shadow);
  }
  .site-nav.is-open { transform: translateX(0); }
  .nav-cta { align-self: flex-start; }
  /* the open mobile panel is always a solid light surface, regardless
     of whether the header itself is in its transparent (over-hero) or
     scrolled state, so its text stays dark for contrast either way */
  .site-header .site-nav a { color: var(--ink-muted); }
  .site-header .site-nav a:hover, .site-header .site-nav a.is-active { color: var(--ink); }
}

/* ---------- shared modal base (project modal, from shared.js) ---------- */
.aml-modal { position: fixed; inset: 0; z-index: 100; display: none; }
.aml-modal.is-open { display: block; }
.aml-modal-backdrop { position: absolute; inset: 0; background: rgba(10,9,7,0.72); }
.aml-modal-panel {
  position: relative; max-width: 880px; margin: 4vh auto; max-height: 92vh; overflow-y: auto;
  background: var(--bg); border-radius: 10px; box-shadow: var(--shadow);
}
.aml-modal-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 20px; line-height: 1; z-index: 2;
}
.aml-modal-image { width: 100%; max-height: 46vh; object-fit: cover; border-radius: 10px 10px 0 0; }
.aml-modal-body { padding: 32px; }
.aml-modal-title { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; margin: 0 0 6px; }
.modal-subtitle { color: var(--ink-muted); font-size: 14.5px; margin: 0 0 16px; }
.modal-themes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; }
.modal-themes li {
  font-family: var(--font-display); font-weight: 600; font-size: 11px;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; color: var(--ink-muted);
}
.modal-description { line-height: 1.7; margin: 0 0 20px; }
.modal-description--tbd { font-style: italic; color: var(--ink-muted); }
.modal-image-credit { font-size: 12px; color: var(--ink-muted); margin: -10px 0 20px; }
.modal-credits-label, .modal-publications h4 {
  font-family: var(--font-display); font-weight: 700; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink-muted); margin: 0 0 10px;
}
.credit-group { margin-bottom: 14px; }
.credit-group h4 { font-size: 12.5px; font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.credit-group ul, .modal-publications ul { padding: 0; }
.credit-group li, .modal-publications li { font-size: 13.5px; line-height: 1.6; }
.modal-publications { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.modal-publications li { margin-bottom: 10px; }
.modal-publications a { color: var(--accent); }
body.aml-modal-lock { overflow: hidden; }

/* ---------- project detail pages ---------- */
.project-hero { position: relative; height: min(64vh, 620px); min-height: 340px; overflow: hidden; cursor: zoom-in; }
.project-hero-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10,9,7,0.82) 0%, rgba(10,9,7,0.28) 55%, rgba(10,9,7,0.05) 100%);
}
.project-hero-content { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 24px 40px; max-width: 1360px; margin: 0 auto; color: #fff; }
.project-title { font-size: clamp(1.9rem, 4.6vw, 3.2rem); line-height: 1.08; color: #fff; font-weight: 900; margin: 0 0 10px; max-width: 26ch; }
.project-subtitle { font-size: clamp(0.95rem, 1.6vw, 1.1rem); color: #f2efe9; font-weight: 400; margin: 0; max-width: 62ch; }

.project-body { max-width: 1360px; margin: 0 auto; padding: 56px 24px 24px; display: grid; grid-template-columns: 1fr 320px; gap: 56px; }
.project-main { min-width: 0; }
.project-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.project-meta-row li {
  font-family: var(--font-display); font-weight: 600; font-size: 11.5px;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; color: var(--ink-muted);
}
.project-description { line-height: 1.75; font-size: 15.5px; margin: 0 0 36px; max-width: 68ch; }
.project-description.modal-description--tbd { font-style: italic; color: var(--ink-muted); }
.project-image-credit { font-size: 12px; color: var(--ink-muted); margin: -20px 0 32px; }

.project-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 0 0 40px; }
.gallery-item { position: relative; overflow: hidden; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; padding: 0; background: var(--surface); aspect-ratio: 4 / 3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.05); }

.project-sidebar { font-size: 13.5px; }
.project-sidebar h4 {
  font-family: var(--font-display); font-weight: 700; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink-muted); margin: 0 0 12px;
}
.project-sidebar .credit-group { margin-bottom: 16px; }
.project-sidebar .credit-group h4 { font-size: 12.5px; text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.project-sidebar .credit-group ul { padding: 0; margin: 0; }
.project-sidebar .credit-group li { font-size: 13px; line-height: 1.6; }
.project-publications { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 24px; }
.project-publications ul { padding: 0; margin: 0; }
.project-publications li { font-size: 12.8px; line-height: 1.6; margin-bottom: 12px; }
.project-publications a { color: var(--accent); }

@media (max-width: 900px) {
  .project-body { grid-template-columns: 1fr; padding-top: 40px; }
}

.back-link {
  position: absolute; top: 90px; left: 24px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display);
  font-weight: 600; font-size: 13px; color: #fff;
  background: rgba(10, 9, 7, 0.4); backdrop-filter: blur(6px);
  padding: 9px 16px 9px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.2);
}
.back-link:hover { background: rgba(10, 9, 7, 0.6); }
@media (max-width: 640px) { .back-link { top: 76px; left: 16px; } }

.project-nav { max-width: 1360px; margin: 24px auto 0; padding: 32px 24px 64px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.project-nav a { display: block; }
.project-nav-label { display: block; font-family: var(--font-display); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted); margin-bottom: 6px; }
.project-nav-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.project-nav-next { text-align: right; }
@media (max-width: 640px) { .project-nav { grid-template-columns: 1fr; } .project-nav-next { text-align: left; } }

/* ---------- lightbox ---------- */
.aml-lightbox .aml-modal-backdrop { background: rgba(8,7,6,0.92); }
.lightbox-panel {
  position: relative; max-width: 1200px; margin: 4vh auto; padding: 0 64px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 80vh;
}
.lightbox-image { max-width: 100%; max-height: 76vh; object-fit: contain; border-radius: 4px; }
.lightbox-caption { color: #d8d4cb; font-size: 12.5px; margin: 14px 0 0; text-align: center; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.1); color: #fff; font-size: 18px; z-index: 2;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }

/* ---------- publication modal (v2-specific) ---------- */
.aml-modal-pub .aml-modal-panel { max-width: 720px; }
.pub-modal-meta { color: var(--ink-muted); font-size: 13.5px; margin: 0 0 4px; }
.pub-modal-authors { font-size: 14px; margin: 0 0 22px; }
.pub-modal-section-label {
  font-family: var(--font-display); font-weight: 700; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink-muted); margin: 22px 0 8px;
}
.pub-modal-section-label:first-of-type { margin-top: 0; }
.pub-modal-desc { line-height: 1.7; margin: 0; }
.pub-modal-abstract { line-height: 1.7; margin: 0; color: var(--ink-muted); font-style: italic; }
.pub-modal-citation { font-size: 13.5px; color: var(--ink-muted); line-height: 1.6; margin: 0; }
.pub-modal-link { display: inline-block; margin-top: 16px; font-weight: 700; color: var(--accent); font-size: 14px; }
.pub-modal-link[hidden] { display: none; }
