/* ============================================================
   LaST-HD project page
   Design system: warm paper canvas, human (coral) <-> robot (indigo)
   dual accents merging into a signature alignment gradient.
   ============================================================ */

:root {
  /* Surfaces & ink */
  --bg: #f6f4ef;
  --bg-tint: #faf8f3;
  --surface: #ffffff;
  --ink: #181a1f;
  --ink-soft: #3b3f48;
  --muted: #6b727d;
  --line: #e7e3d9;
  --line-soft: #f0ece3;

  /* Robot = cool indigo */
  --robot: #3a5fd9;
  --robot-ink: #2542a6;
  --robot-soft: #eaeefc;

  /* Human = warm coral */
  --human: #ee6a3a;
  --human-ink: #be4519;
  --human-soft: #fcefe7;

  /* Blend (shared latent space) */
  --blend: #9b45c6;

  /* Signature gradient: human -> blend -> robot */
  --grad: linear-gradient(112deg, #ef6a38 0%, #c44fbf 50%, #3a5fd9 100%);
  --grad-soft: linear-gradient(112deg, #fcefe7 0%, #f3eafb 50%, #eaeefc 100%);

  --shadow-sm: 0 1px 2px rgba(24, 26, 31, 0.04), 0 5px 14px -6px rgba(24, 26, 31, 0.08);
  --shadow: 0 12px 34px -14px rgba(28, 34, 64, 0.16);
  --shadow-lg: 0 34px 80px -28px rgba(30, 38, 80, 0.30);

  --radius: 18px;
  --radius-lg: 26px;
  --radius-sm: 11px;
  --container: 1180px;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgba(155, 69, 198, 0.18);
}

:focus-visible {
  outline: 2px solid var(--robot);
  outline-offset: 3px;
  border-radius: 6px;
}

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 60;
  background: transparent;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  transition: width 0.1s linear;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(24, 26, 31, 0.06);
  background: rgba(246, 244, 239, 0.78);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
}

.nav {
  width: min(100% - 40px, var(--container));
  min-height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 17px;
  height: 17px;
  border-radius: 6px;
  background: var(--grad);
  box-shadow: 0 2px 8px rgba(155, 69, 198, 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav-links a {
  position: relative;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 550;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(24, 26, 31, 0.05);
}

.nav-links a.active {
  color: var(--robot-ink);
  background: var(--robot-soft);
}

/* ---------- Layout ---------- */
.container {
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
}

.section-pad {
  padding: 104px 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------- Typography ---------- */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h2 {
  margin: 0;
  font-size: clamp(1.85rem, 3.4vw, 2.85rem);
  line-height: 1.08;
}

h3 {
  margin: 0;
  font-size: 1.14rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.kicker {
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  color: var(--robot-ink);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--robot);
}

.kicker-human {
  color: var(--human-ink);
}

.kicker-human::before {
  background: var(--human);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-top: 70px;
  padding-bottom: 78px;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfaf7 0%, #f4f1ea 100%);
}

.hero-glow {
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 720px;
  z-index: -2;
  background:
    radial-gradient(38% 55% at 18% 12%, rgba(238, 106, 58, 0.30), transparent 70%),
    radial-gradient(40% 60% at 84% 8%, rgba(58, 95, 217, 0.26), transparent 72%),
    radial-gradient(36% 50% at 56% 0%, rgba(155, 69, 198, 0.20), transparent 70%);
  filter: blur(18px);
  opacity: 0.9;
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(24, 26, 31, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(24, 26, 31, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 35%, transparent 78%);
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 35%, transparent 78%);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 26px;
  padding: 7px 15px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 4px rgba(155, 69, 198, 0.14);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.4rem, 11vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0;
}

h1 {
  max-width: 940px;
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.author-line {
  max-width: 880px;
  margin: 30px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.04rem;
  line-height: 1.5;
  color: var(--ink);
}

.author-line span {
  white-space: nowrap;
}

.author-line sup {
  color: var(--robot-ink);
  font-weight: 700;
  font-size: 0.66em;
}

.affil-line {
  max-width: 920px;
  margin: 12px auto 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.affil-line p {
  margin: 2px 0;
}

.affil-line sup {
  color: var(--robot-ink);
  font-weight: 700;
}

.author-notes {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 600;
}

.hero-copy {
  max-width: 730px;
  margin: 26px auto 0;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
}

.tag {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.9em;
}

/* Color convention: human data = blue, robot data = orange.
   (--human* holds coral and --robot* holds indigo, so map the labels across.) */
.tag-human {
  color: var(--robot-ink);
  background: var(--robot-soft);
}

.tag-robot {
  color: var(--human-ink);
  background: var(--human-soft);
}

/* ---------- Figures ---------- */
.hero-figure {
  width: 100%;
  margin: 48px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero-figure img {
  width: 100%;
  max-height: min(64vh, 540px);
  object-fit: contain;
  background: var(--bg-tint);
}

.figure-shell {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.figure-shell img {
  width: 100%;
  height: auto;
  background: var(--bg-tint);
}

.figure-feature {
  margin-bottom: 28px;
}

figcaption {
  padding: 15px 20px 17px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-tint);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: left;
}

[data-zoom] {
  cursor: zoom-in;
}

[data-zoom] img {
  transition: opacity 0.2s ease;
}

[data-zoom]:hover img {
  opacity: 0.94;
}

/* ---------- Section heading ---------- */
.section-heading {
  max-width: 780px;
  margin-bottom: 46px;
}

.section-heading.center {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading.compact {
  margin-bottom: 26px;
}

.section-heading.center .kicker {
  justify-content: center;
}

.section-heading p:not(.kicker) {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.section-heading.center p:not(.kicker) {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Abstract ---------- */
.abstract-body {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}

.abstract-body p {
  margin: 0 0 20px;
  font-size: 1.12rem;
  line-height: 1.74;
  color: var(--ink-soft);
}

.abstract-body p:last-child {
  margin-bottom: 0;
}

.abstract-body strong {
  color: var(--ink);
  font-weight: 650;
  background: linear-gradient(transparent 62%, rgba(155, 69, 198, 0.14) 0);
  padding: 0 1px;
}

/* ---------- Metrics ---------- */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 26px;
}

.metric-card {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-card strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.metric-card strong small {
  font-size: 0.42em;
  font-weight: 600;
  margin-left: 4px;
  letter-spacing: 0;
  color: var(--muted);
}

.metric-card span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
}

/* ---------- Cards (contributions) ---------- */
.contribution-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.content-card {
  position: relative;
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.accent-robot::before {
  background: var(--robot);
}
.accent-human::before {
  background: var(--human);
}
.accent-blend::before {
  background: var(--grad);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.accent-robot .card-icon {
  background: var(--robot-soft);
  color: var(--robot-ink);
}
.accent-human .card-icon {
  background: var(--human-soft);
  color: var(--human-ink);
}
.accent-blend .card-icon {
  background: var(--grad-soft);
  color: var(--blend);
}

.card-index {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
}

.content-card h3 {
  margin-bottom: 10px;
}

.content-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* ---------- Method steps ---------- */
.method-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.step-card {
  position: relative;
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-tint);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--robot-ink);
}

.step-card h3 {
  margin-bottom: 10px;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* ---------- Split layout (glove) ---------- */
.split-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 48px;
}

.split-copy p:not(.kicker) {
  color: var(--muted);
  font-size: 1.06rem;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.spec-grid div {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--human-soft);
}

.spec-grid strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--human-ink);
}

.spec-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.figure-compact img {
  object-fit: contain;
}

/* Embodiments grid */
.embodiment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.embodiment-card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.embodiment-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--grad);
}

.embodiment-index {
  display: inline-block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--robot-ink);
}

.embodiment-card h3 {
  margin-bottom: 7px;
}

.embodiment-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---------- Results summary ---------- */
.result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.result-summary article {
  position: relative;
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.result-summary article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
}

.result-summary .accent-robot::before {
  background: var(--robot);
}
.result-summary .accent-human::before {
  background: var(--human);
}
.result-summary .accent-blend::before {
  background: var(--grad);
}

.result-summary strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 4.5vw, 3.3rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.result-summary .accent-robot strong {
  color: var(--robot-ink);
}
.result-summary .accent-human strong {
  color: var(--human-ink);
}

.result-summary span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 500;
}

/* ---------- Tables ---------- */
.table-wrap {
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

caption {
  padding: 18px 20px 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.04rem;
  color: var(--ink);
  text-align: left;
}

th,
td {
  padding: 13px 16px;
  text-align: left;
  white-space: nowrap;
}

thead th {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-tint);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

tbody td {
  border-top: 1px solid var(--line-soft);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

tbody td:first-child,
thead th:first-child {
  position: sticky;
  left: 0;
  background: var(--surface);
  font-weight: 600;
  color: var(--ink);
}

thead th:first-child {
  background: var(--bg-tint);
}

tbody tr:hover td {
  background: var(--bg-tint);
}

.highlight-row td {
  background: var(--robot-soft);
  color: var(--robot-ink);
  font-weight: 700;
}

.highlight-row td:first-child {
  background: var(--robot-soft);
  color: var(--robot-ink);
  box-shadow: inset 3px 0 0 var(--robot);
}

.highlight-row.muted td {
  background: var(--human-soft);
  color: var(--human-ink);
}

.highlight-row.muted td:first-child {
  background: var(--human-soft);
  color: var(--human-ink);
  box-shadow: inset 3px 0 0 var(--human);
}

.highlight-row:hover td {
  background: var(--robot-soft);
}
.highlight-row.muted:hover td {
  background: var(--human-soft);
}

/* ---------- Figure grid ---------- */
.figure-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 28px;
}

.figure-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.figure-grid-two .figure-wide {
  grid-column: 1 / -1;
}

/* ---------- Videos ---------- */
.video-showcase {
  min-width: 0;
  display: grid;
  gap: 38px;
}

.video-block {
  min-width: 0;
}

.video-block-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.video-block-header h3 {
  margin: 0;
  font-size: 1.34rem;
}

.video-block-header p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.video-block-header p span {
  display: block;
}

.video-pair-scroll {
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-color: rgba(58, 95, 217, 0.42) transparent;
}

.video-pair-grid {
  min-width: 1180px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.video-task-heading {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-tint);
}

.video-task-heading span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.video-task-heading strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  line-height: 1.15;
  color: var(--ink);
}

.video-row-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 -2px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--human-ink);
}

.video-row-heading::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--human);
}

.video-row-heading strong {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--human-soft);
  color: var(--human-ink);
  font-size: 0.66rem;
}

.video-row-heading-human {
  margin-top: 10px;
  color: var(--robot-ink);
}

.video-row-heading-human::before {
  background: var(--robot);
}

.video-row-heading-human strong {
  background: var(--robot-soft);
  color: var(--robot-ink);
}

.video-test-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.video-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.video-card-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.video-card-compact .video-chip {
  align-self: stretch;
  max-width: none;
  min-height: 27px;
}

.video-meta {
  min-height: 46px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.video-meta strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.93rem;
  line-height: 1.22;
}

.video-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 104px;
  padding: 4px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

.chip-robot {
  color: var(--human-ink);
  background: var(--human-soft);
}

.chip-human {
  color: var(--robot-ink);
  background: var(--robot-soft);
}

.video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border-radius: var(--radius-sm);
  background: #080a0e;
  object-fit: cover;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-tint);
}

.footer-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink-soft);
}

.footer-links {
  display: inline-flex;
  gap: 20px;
}

.footer-links a {
  font-weight: 600;
  color: var(--ink-soft);
  transition: color 0.18s ease;
}

.footer-links a:hover {
  color: var(--robot-ink);
}

/* ---------- Reveal animations ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

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

/* Stagger children in grids */
.js .reveal.delay-1 { transition-delay: 0.07s; }
.js .reveal.delay-2 { transition-delay: 0.14s; }
.js .reveal.delay-3 { transition-delay: 0.21s; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
  background: rgba(16, 16, 20, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  cursor: zoom-out;
}

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

.lightbox img {
  max-width: 96vw;
  max-height: 92vh;
  border-radius: 12px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  transform: scale(0.97);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.18s ease;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .section-pad {
    padding: 80px 0;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contribution-grid,
  .method-steps,
  .result-summary,
  .figure-grid-two,
  .video-test-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .video-block-header {
    display: block;
  }

  .video-block-header p {
    margin-top: 8px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .site-header {
    position: static;
  }

  .nav {
    width: min(100% - 28px, var(--container));
    min-height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    gap: 2px;
  }

  .container {
    width: min(100% - 28px, var(--container));
  }

  .section-pad {
    padding: 64px 0;
  }

  .hero {
    padding-top: 52px;
    padding-bottom: 56px;
  }

  .hero-figure {
    margin-top: 36px;
    border-radius: var(--radius);
  }

  .section-heading {
    margin-bottom: 34px;
  }

  .metric-grid,
  .contribution-grid,
  .method-steps,
  .result-summary,
  .figure-grid-two,
  .video-test-grid,
  .spec-grid,
  .embodiment-grid {
    grid-template-columns: 1fr;
  }

  .video-pair-grid {
    min-width: 1080px;
  }

  .abstract-body p {
    font-size: 1.04rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

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

  .content-card:hover {
    transform: none;
  }

  .lightbox,
  .lightbox img {
    transition: none;
  }
}
