/* ============================================================
   ForceBand — project page stylesheet
   Clean academic layout with product-grade interactions.
   ============================================================ */

:root {
  --ink: #15181e;
  --body: #3d4350;
  --muted: #6b7280;
  --accent: #d26711;
  --accent-dark: #a84f08;
  --accent-soft: #fdf0e4;
  --blue: #4a8fd4;
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --line: #e7e9ee;
  --shadow-sm: 0 1px 2px rgba(21, 24, 30, .05), 0 2px 8px rgba(21, 24, 30, .05);
  --shadow-md: 0 2px 6px rgba(21, 24, 30, .06), 0 12px 32px rgba(21, 24, 30, .10);
  --radius: 24px;
  --nav-h: 64px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

section { scroll-margin-top: calc(var(--nav-h) + 16px); }

/* ---------- typography ---------- */

h1, h2, h3 { color: var(--ink); letter-spacing: -0.02em; }

h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
}

h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.lead {
  font-size: 19px;
  margin-bottom: 8px;
}

.lead strong, .split-text strong, .checklist strong { color: var(--ink); }
.lead strong em { color: var(--accent); font-style: normal; }

.caption, figcaption {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 12px;
}

/* ---------- progress bar ---------- */

.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 1001;
  background: transparent;
  pointer-events: none;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #e58a3a);
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}

.nav.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(21, 24, 30, .05);
}

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.brand img { height: 22px; width: auto; }
.brand em, .footer-brand em, .hero-title em { font-style: normal; color: var(--accent); }
.brand:hover { color: var(--ink); }

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--body);
  padding: 7px 12px;
  border-radius: 10px;
  transition: color .2s, background .2s;
}

.nav-links a:hover { color: var(--ink); background: var(--bg-alt); }
.nav-links a.active { color: var(--accent); background: var(--accent-soft); }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}

.nav-burger span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}

.btn svg { width: 17px; height: 17px; fill: currentColor; flex: none; }

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: #d8dbe2;
  color: var(--ink);
}

.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.btn-primary:hover { background: #000; color: #fff; }

.btn-sm { padding: 8px 16px; font-size: 14px; }
.nav-cta { box-shadow: none; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: calc(var(--nav-h) + 64px) 0 24px;
  text-align: center;
  background:
    radial-gradient(900px 420px at 12% -4%, rgba(210, 103, 17, .07), transparent 60%),
    radial-gradient(900px 420px at 88% -4%, rgba(74, 143, 212, .08), transparent 60%),
    var(--bg);
}

.hero-venue {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .7);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero-title {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: clamp(44px, 7.5vw, 76px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.hero-glasses { height: clamp(34px, 5.2vw, 56px); width: auto; }

.hero-sub {
  font-size: clamp(19px, 2.6vw, 26px);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin: 16px auto 26px;
  max-width: 760px;
  line-height: 1.35;
}

.authors {
  font-size: 16.5px;
  max-width: 760px;
  margin: 0 auto 4px;
}

.authors a { color: inherit; font-weight: inherit; border-bottom: 1.5px solid transparent; }
.authors a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.authors span { color: var(--muted); margin-right: 6px; }
.authors sup, .affil sup { font-size: 11px; color: var(--muted); }

figcaption code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
}

.affil { color: var(--muted); font-size: 15.5px; margin-bottom: 30px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 44px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 940px;
  margin: 0 auto;
  text-align: center;
}

.stat {
  background: rgba(255, 255, 255, .75);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 14px;
  box-shadow: var(--shadow-sm);
}

.stat strong {
  display: block;
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-bottom: 4px;
  white-space: nowrap;
}

.stat > span { font-size: 13.5px; color: var(--muted); line-height: 1.45; display: block; }

.hero-video { max-width: 1240px; margin: 18px auto 0; padding: 0 24px; }
.hero-video video { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.hero-video > video { margin-top: 26px; }

.hero-divider {
  border: 0;
  border-top: 1px solid #d3d7df;
  margin: 26px 0 0;
}

.hero-tagline {
  font-size: clamp(28px, 4.2vw, 46px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--ink);
  margin: 86px 0 78px;
}

.hero-tagline em { font-style: normal; color: var(--accent); }

/* column titles above the paired demos */
.pair-heads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  text-align: center;
}

.pair-heads h3 {
  font-size: clamp(21px, 2.6vw, 26px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
}

.pair-heads em { font-style: normal; color: var(--accent); }

/* paired human/robot force demos */
.pairs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 22px;
  margin-top: 22px;
  text-align: center;
}

.pair-cell { margin: 0; }

.pair-cell figcaption {
  font-size: 18.5px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 10px;
}

.force-val { color: var(--accent); font-variant-numeric: tabular-nums; }

.who-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(54, 122, 193, .9);
  padding: 4px 11px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.who-badge.human { background: rgba(210, 103, 17, .88); }

/* ---------- sections ---------- */

.section { padding: 96px 0; }
.section.alt { background: var(--bg-alt); }

.subsection { margin-top: 96px; }

.band {
  padding: 88px 0;
  background:
    radial-gradient(1100px 500px at 50% 0%, rgba(210, 103, 17, .05), transparent 65%),
    var(--bg);
  text-align: center;
}

.band .video-frame { margin-top: 28px; }

/* ---------- media frames ---------- */

.video-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0d0e10;
  box-shadow: var(--shadow-md);
}

.video-frame video { width: 100%; }

.figure { margin: 36px 0 0; }
.figure img { border-radius: var(--radius); }

.card-figure {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
}

.card-figure:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-figure img { border-radius: 16px; }
.card-figure figcaption { margin-top: 14px; }

.zoomable { cursor: zoom-in; }

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(13, 14, 16, .72);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 5px 11px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.sound-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(13, 14, 16, .65);
  backdrop-filter: blur(6px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .15s;
}

.sound-toggle:hover { background: rgba(13, 14, 16, .85); transform: scale(1.06); }
.sound-toggle svg { width: 21px; height: 21px; fill: #fff; }

/* ---------- pillars ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 40px;
}

.pillar {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}

.pillar:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #f0dcc8;
}

.pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.pillar-icon svg { width: 22px; height: 22px; fill: var(--accent); }
.pillar h3 { font-size: 17px; }
.pillar p { font-size: 14.5px; color: var(--muted); line-height: 1.6; }

/* ---------- method steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
}

.step {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 4px 10px;
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}

.step h3 { font-size: 18px; }
.step p { font-size: 15px; color: var(--muted); line-height: 1.62; }

.duo {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 22px;
  margin-top: 40px;
  align-items: start;
}

.duo .figure { margin-top: 0; }

/* ---------- data section ---------- */

.collect-grid {
  display: grid;
  grid-template-columns: minmax(240px, 330px) 1fr;
  gap: 22px;
  margin-top: 40px;
  align-items: start;
}

.aria-card { margin-top: 0; }
.collect-videos { display: grid; gap: 22px; }
.collect-videos .figure { margin-top: 0; }

.split {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 44px;
  align-items: center;
  margin-top: 56px;
}

.split.flip { grid-template-columns: 1fr 1.25fr; }
.split.flip .figure { order: 0; }
.split .figure { margin-top: 0; }

.split-text h3 { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 12px; }
.split-text p { margin-bottom: 12px; }

/* Dataset row: let the montage video dominate the split. */
.split.media-lg { grid-template-columns: 1.7fr 1fr; }
/* Flipped dataset row: narrow text left, wide montage video right. */
.split.media-lg.flip { grid-template-columns: 1fr 1.7fr; }
/* Media-dominant split: figure ~70% (left), text ~30%. */
.split.media-xl { grid-template-columns: 2fr 1fr; }
/* Minor portrait figure (image left, text right): keep the tall 16-channel photo from
   dominating its split — give the text the wider column and cap the image. */
.split.flip.media-sm { grid-template-columns: 1fr 1.6fr; }
.split.flip.media-sm .figure img { max-width: min(100%, 280px); margin-inline: auto; }

/* Standalone sub-block heading (e.g. the in-the-wild gallery). */
.block-heading { font-size: 24px; letter-spacing: -0.02em; margin-top: 72px; }

/* Hardware: wide hero video + "Muscle-aware by design" pillar cards below */
.hw-figure { margin-top: 48px; }
.hw-heading { font-size: 24px; letter-spacing: -0.02em; margin-top: 44px; }
.hw-heading + .pillars { margin-top: 18px; }

.checklist { list-style: none; }

.checklist li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
  font-size: 16px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23c8521c"><path d="M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6 12-12-1.4-1.4z"/></svg>') center/12px no-repeat;
}

/* ---------- rollouts ---------- */

.rollout-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 40px;
}

.rollout-grid.thirds { grid-template-columns: repeat(3, 1fr); margin-top: 28px; }

.rollout { margin: 0; }

.rollout figcaption {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 10px;
}

.rollout .video-frame { transition: transform .25s, box-shadow .25s; }
.rollout:hover .video-frame { transform: translateY(-3px); }

/* ---------- one-at-a-time gallery carousel ---------- */

.gallery { margin-top: 40px; }

.gallery-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0d0e10;
  box-shadow: var(--shadow-md);
}

.gallery-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease;
}

.gallery-slide.is-active { opacity: 1; visibility: visible; }
.gallery-slide video { width: 100%; height: 100%; object-fit: cover; }

.gallery-label {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  background: rgba(13, 14, 16, .6);
  backdrop-filter: blur(6px);
  padding: 5px 12px;
  border-radius: 999px;
  pointer-events: none;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(13, 14, 16, .5);
  backdrop-filter: blur(6px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  transition: background .2s, transform .15s;
}

.gallery-arrow.prev { left: 14px; }
.gallery-arrow.next { right: 14px; }
.gallery-arrow:hover { background: rgba(13, 14, 16, .8); transform: translateY(-50%) scale(1.07); }
.gallery-arrow svg { width: 24px; height: 24px; fill: #fff; }

.gallery-thumbs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.gallery-thumb {
  flex: 0 1 96px;
  min-width: 0;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: #0d0e10;
  cursor: pointer;
  opacity: .5;
  transition: opacity .2s, border-color .2s, transform .15s;
}

.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { opacity: .85; transform: translateY(-2px); }
.gallery-thumb.is-active { opacity: 1; border-color: var(--accent); }

/* ---------- horizontal scroller ---------- */

.hscroll-wrap { margin-top: 64px; }

.hscroll-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.hscroll-head h3 { font-size: 24px; letter-spacing: -0.02em; margin: 0; }

.hscroll-nav { display: flex; gap: 8px; }

.hbtn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .15s;
}

.hbtn:hover { background: var(--bg-alt); transform: scale(1.05); }
.hbtn svg { width: 18px; height: 18px; fill: var(--ink); }

.hscroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 360px);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 14px;
  scrollbar-width: thin;
  scrollbar-color: #d4d7de transparent;
}

.hscroll .rollout { scroll-snap-align: start; }

/* ---------- studies ---------- */

.studies {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 40px;
}

.study {
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
}

.study:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.study .video-frame { box-shadow: none; background: var(--bg); }
.study img { border-radius: 16px; }
.study figcaption { margin-top: 14px; }

/* ---------- planned-video placeholders ---------- */

.video-placeholder {
  aspect-ratio: var(--ar, 16 / 9);
  min-height: 240px;
  max-height: 640px;
  border: 2px dashed #d3d7df;
  border-radius: var(--radius);
  background:
    radial-gradient(420px 220px at 50% 0%, rgba(210, 103, 17, .05), transparent 70%),
    var(--bg-alt);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px 28px;
  text-align: center;
}

.vp-badge {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #f3dccc;
  padding: 4px 12px;
  border-radius: 999px;
}

.vp-play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 2px;
}

.vp-play svg { width: 22px; height: 22px; fill: var(--muted); margin-left: 2px; }

.vp-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.vp-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 58ch;
}

.vp-src {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 7px;
  margin-top: 2px;
}

/* ---------- small text helpers ---------- */

.task-type {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
}

.hscroll-note {
  font-size: 14.5px;
  color: var(--muted);
  max-width: 760px;
  margin: -6px 0 16px;
}

.ack {
  font-size: 14.5px;
  color: var(--muted);
  max-width: 820px;
  margin-top: 22px;
  line-height: 1.7;
}

/* ---------- team ---------- */

.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px 36px;
  margin-top: 44px;
}

.team-grid .member { width: 210px; }

.member {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  color: var(--body);
}

.member img {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
  box-shadow: var(--shadow-md);
  margin-bottom: 12px;
  transition: transform .25s, box-shadow .25s;
}

.member:hover img { transform: translateY(-4px) scale(1.03); }
.member strong { font-size: 16.5px; font-weight: 700; color: var(--ink); }
.member:hover strong { color: var(--accent); }
.member span { font-size: 13.5px; color: var(--muted); }

.member-tbd-circle {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 2px dashed #d3d7df;
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 44px;
  font-weight: 300;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.member-tbd strong { color: var(--muted); }

/* ---------- bibtex ---------- */

.bibtex-box {
  position: relative;
  margin-top: 28px;
  background: #14161b;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.bibtex-box pre {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  color: #e6e9f0;
  padding: 28px 30px;
  overflow-x: auto;
}

.copy-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  color: #e6e9f0;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.copy-btn:hover { background: rgba(255, 255, 255, .16); }
.copy-btn svg { width: 15px; height: 15px; fill: currentColor; }
.copy-btn.copied { background: rgba(80, 200, 120, .22); border-color: rgba(80, 200, 120, .4); }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 64px;
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

.footer-brand img { height: 24px; }
.footer-umd { height: 56px; width: auto; }
.footer p { font-size: 14px; color: var(--muted); }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(10, 11, 14, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
  cursor: zoom-out;
}

.lightbox.open { opacity: 1; visibility: visible; }

.lightbox img {
  max-width: min(1400px, 100%);
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  transform: scale(.96);
  transition: transform .25s;
}

.lightbox.open img { transform: scale(1); }

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s;
}

.lightbox-close:hover { background: rgba(255, 255, 255, .22); }

/* ---------- back to top ---------- */

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s, visibility .25s, transform .25s, background .2s;
}

.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: #fff; }
.to-top svg { width: 20px; height: 20px; fill: var(--ink); }

/* ---------- reveal animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}

.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .team-grid { gap: 24px 20px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .section { padding: 72px 0; }
  .subsection { margin-top: 72px; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 2px;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 12px 18px 16px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform .25s, opacity .25s, visibility .25s;
  }

  .nav-links.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a { padding: 12px 14px; font-size: 16px; }
  .nav-burger { display: flex; }
  .nav-cta { margin-left: auto; }
  .nav-burger { margin-left: 0; }

  .steps, .duo, .collect-grid,
  .rollout-grid, .rollout-grid.thirds, .studies { grid-template-columns: 1fr; }
  /* Collapse every left-right .split — flip / media-lg / media-xl / media-sm and their
     combos — to one stacked column on phones. The tripled class lifts specificity above the
     2–3-class layout variants (e.g. .split.media-lg.flip, .split.flip.media-sm) so they all
     yield here without needing !important. */
  .split.split.split { grid-template-columns: 1fr; }

  .split, .split.flip { gap: 24px; }
  .split.flip .figure { order: -1; }
  .duo { grid-template-columns: 1fr; }
  .duo .card-figure img { max-height: 420px; margin: 0 auto; }

  .hscroll { grid-auto-columns: 82%; }
  .hero-actions { gap: 10px; }
  .btn { padding: 10px 18px; font-size: 14.5px; }
  .pairs { grid-template-columns: 1fr; gap: 18px; }
  .pair-heads { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 560px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pillars { grid-template-columns: 1fr; }
  .team-grid .member { width: 150px; }
  .member img { width: 108px; height: 108px; }
  .lightbox { padding: 16px; }
  .video-placeholder { padding: 20px 16px; min-height: 200px; }
  .vp-desc { font-size: 13px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
