/* ====================================================================
   Human-as-Humanoid · Project Page
   Accent: electric blue + warm orange, light/dark adaptive
   ==================================================================== */

:root {
  --bg:          #ffffff;
  --surface:     #fafafa;
  --surface-2:   #f4f5f9;
  --card:        #ffffff;
  --ink:         #111827;
  --ink-2:       #374151;
  --ink-3:       #6b7280;
  --line:        #e5e7eb;
  --accent:      #1d53e0;
  --accent-b:    #1341bc;
  --accent-soft: #dbeafe;
  --accent-ghost:#eff6ff;
  --warm:        #dc5a0c;
  --warm-soft:   #ffedd5;
  --grad:        linear-gradient(100deg, #1341bc 0%, #1d53e0 48%, #dc5a0c 100%);
  --grad-soft:   linear-gradient(135deg, #f0f6ff 0%, #fafcff 60%, #fff6f0 100%);
  --nav-bg:      rgba(255,255,255,.72);
  --dot-grid:    rgba(55,65,81,.10);
  --blob-1:      #e0eaff;
  --blob-2:      #fff0e8;
  --blob-3:      #e8eeff;
  --shadow-sm:   0 1px 3px rgba(17,24,39,.06), 0 4px 12px rgba(17,24,39,.05);
  --shadow-md:   0 2px 6px rgba(17,24,39,.07), 0 10px 28px rgba(17,24,39,.08);
  --r:           10px;
  --r-lg:        20px;
  --nav-h:       76px;
  --font:        "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-serif:  "Source Serif 4", Georgia, serif;
  --font-mono:   "JetBrains Mono", "Roboto Mono", monospace;
}

html[data-theme="dark"] {
  --bg:          #0e1117;
  --surface:     #161b25;
  --surface-2:   #1c2333;
  --card:        #161b25;
  --ink:         #f0f2f6;
  --ink-2:       #cbd5e1;
  --ink-3:       #8b9ab2;
  --line:        #2d3748;
  --accent:      #93b4ff;
  --accent-b:    #6090ff;
  --accent-soft: rgba(99,144,255,.28);
  --accent-ghost:rgba(99,144,255,.10);
  --warm:        #fb923c;
  --warm-soft:   rgba(251,146,60,.22);
  --grad:        linear-gradient(100deg, #93b4ff 0%, #6090ff 48%, #fb923c 100%);
  --grad-soft:   linear-gradient(135deg, #12182b 0%, #0e1117 60%, #1a150e 100%);
  --nav-bg:      rgba(14,17,23,.78);
  --dot-grid:    rgba(200,210,230,.08);
  --blob-1:      #0e1c3d;
  --blob-2:      #2d1508;
  --blob-3:      #101828;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.28), 0 4px 12px rgba(0,0,0,.22);
  --shadow-md:   0 2px 6px rgba(0,0,0,.32), 0 10px 28px rgba(0,0,0,.28);
}
html[data-theme="dark"] body { color-scheme: dark; }

/* ─── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--accent-soft); }

/* ─── Utilities ──────────────────────────────────────────────────── */
.wrap       { max-width: 1600px; width: 80vw; margin: 0 auto; padding: 0 24px; }
.wrap-narrow{ max-width: 1200px; width: 80vw; margin: 0 auto; padding: 0 24px; }
.wrap-wide  { max-width: 1600px; width: 80vw; margin: 0 auto; padding: 0 24px; }

/* ─── Progress bar ───────────────────────────────────────────────── */
.progress-bar {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: var(--grad);
  z-index: 1100; pointer-events: none;
  transition: width .1s linear;
}

/* ─── Navigation ─────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: var(--nav-bg);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; width: 80vw; max-width: 1600px; margin: 0 auto; padding: 0 24px;
}
.nav-brand {
  display: flex; align-items: center; gap: 12px;
  font-size: 19px; font-weight: 700; color: var(--ink);
  white-space: nowrap; flex-shrink: 0;
}
.nav-brand:hover { text-decoration: none; color: var(--accent); }
.nav-gem {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--grad); flex-shrink: 0;
}
.nav-links {
  display: flex; gap: 4px;
  overflow-x: auto; scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  font-size: 16px; font-weight: 500; color: var(--ink-3);
  padding: 9px 16px; border-radius: 100px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--accent-ghost); color: var(--accent); text-decoration: none; }
.theme-btn {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); transition: background .15s, color .15s;
}
.theme-btn:hover { background: var(--accent-ghost); color: var(--accent); }
.theme-btn svg { width: 21px; height: 21px; }
.ic-sun  { display: none; }
.ic-moon { display: block; }
html[data-theme="dark"] .ic-sun  { display: block; }
html[data-theme="dark"] .ic-moon { display: none; }

/* ─── Hero ───────────────────────────────────────────────────────── */
.hero {
  position: relative; text-align: center;
  padding: 72px 0 56px; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 100% 70% at 50% 0%, rgba(29,83,224,.08) 0%, transparent 65%),
    radial-gradient(1.5px 1.5px at 50% 50%, var(--dot-grid) 0 1px, transparent 1.5px);
  background-size: 100% 100%, 28px 28px;
  background-repeat: no-repeat, repeat;
  mask-image: radial-gradient(ellipse 88% 80% at 50% 15%, #000 25%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 88% 80% at 50% 15%, #000 25%, transparent 70%);
}
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(68px); opacity: .5; z-index: -1; pointer-events: none;
}
.blob-1 { width: 500px; height: 500px; left: -160px; top: -100px; background: var(--blob-1); animation: drift 20s ease-in-out infinite alternate; }
.blob-2 { width: 440px; height: 440px; right: -140px; top:  20px; background: var(--blob-2); animation: drift 25s ease-in-out infinite alternate-reverse; }
.blob-3 { width: 380px; height: 380px; left: 36%; top: 320px; background: var(--blob-3); opacity: .35; animation: drift 30s ease-in-out infinite alternate; }
@keyframes drift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(36px,22px) scale(1.07); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .blob { animation: none !important; }
  .progress-bar { transition: none; }
}

.hero-venue {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-ghost);
  border: 1px solid var(--accent-soft);
  padding: 6px 16px; border-radius: 100px; margin-bottom: 24px;
}
.hero-venue-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}

.hero h1 {
  font-size: clamp(2.6rem, 6.6vw, 4.8rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -.02em;
  margin: 0 auto 24px; max-width: 34ch;
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.title-sub {
  display: block; font-size: .62em; font-weight: 600;
  letter-spacing: -.01em; color: var(--ink-2);
  -webkit-text-fill-color: var(--ink-2); /* override gradient-text on parent */
  margin-top: 6px;
}

.hero-sub {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: var(--ink-2); max-width: 76ch; margin: 0 auto 28px;
}
.hero-sub strong { color: var(--ink); }

.authors {
  font-size: 1.08rem; max-width: 980px; margin: 0 auto 10px; line-height: 1.85;
}
.authors a { color: var(--ink); font-weight: 500; }
.authors a:hover { color: var(--accent); }
.authors sup { color: var(--accent); font-size: .72em; font-weight: 600; }
.affils {
  font-size: .96rem; color: var(--ink-3); margin-bottom: 6px;
}
.affils sup { color: var(--accent); font-weight: 600; font-size: .72em; }
.author-note { font-size: .86rem; color: var(--ink-3); margin-bottom: 32px; }

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn-row {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 14px; margin-bottom: 48px;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15.5px; font-weight: 500;
  padding: 13px 26px; border-radius: 100px;
  border: 1px solid var(--line);
  color: var(--ink); background: var(--card);
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .15s, border-color .15s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover {
  text-decoration: none; transform: translateY(-2px);
  box-shadow: var(--shadow-sm); border-color: var(--ink-3);
}
.btn--primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.btn--primary:hover { background: var(--accent-b); border-color: var(--accent-b); box-shadow: 0 4px 16px rgba(29,83,224,.28); }
.btn--muted {
  color: var(--ink-3); background: var(--surface-2); border-color: var(--line);
}
.btn--muted:hover { color: var(--ink-2); background: var(--surface); box-shadow: none; }
.btn--disabled {
  color: var(--ink-3);
  background: var(--surface-2);
  cursor: default;
  pointer-events: none;
}
.btn-note {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--warm-soft);
  color: var(--warm);
  font-size: .72em;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
}

/* ─── Teaser figure ──────────────────────────────────────────────── */
.hero-teaser {
  max-width: 1600px; width: 80vw; margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(10px,1.5vw,18px);
  box-shadow: var(--shadow-md);
}
.hero-teaser img { width: 100%; border-radius: calc(var(--r-lg) - 4px); }
.hero-teaser figcaption {
  font-size: .875rem; color: var(--ink-3); margin-top: 14px;
  text-align: center; max-width: 72ch; margin-left: auto; margin-right: auto;
  line-height: 1.6;
}

/* ─── Video teaser ───────────────────────────────────────────────── */
.video-teaser {
  max-width: 1060px; margin: 0 auto;
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-md); border: 1px solid var(--line); background: #000;
}
.video-teaser video { width: 100%; }

/* ─── Stats band ─────────────────────────────────────────────────── */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-top: 56px;
}
.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px 22px 22px;
  text-align: left;
  transition: transform .25s, box-shadow .25s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.stat-num {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -.02em;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  margin-bottom: 6px;
}
.stat-label { font-size: .92rem; font-weight: 600; color: var(--ink); }
.stat-sub   { font-size: .82rem; color: var(--ink-3); margin-top: 2px; }

/* ─── Sections ───────────────────────────────────────────────────── */
.section       { padding: 88px 0 40px; }
.section--tint {
  background: var(--surface-2);
  border-radius: 28px;
  margin: 40px 16px; padding: 72px 0;
}

/* ─── Eyebrow labels ─────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 20px; height: 3px; border-radius: 2px;
  background: var(--grad);
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700; letter-spacing: -.02em; line-height: 1.18;
  color: var(--ink); margin-bottom: 14px; max-width: 24ch;
}
.section-title.wide { max-width: 34ch; }
.section-lede {
  font-size: 1.05rem; color: var(--ink-2); max-width: 60ch; margin-bottom: 36px;
}
.section-head { margin-bottom: 40px; text-align: center; }
.section-head .section-title { margin-left: auto; margin-right: auto; }
.section-head .section-lede { margin-left: auto; margin-right: auto; text-align: left; }

/* ─── Abstract ───────────────────────────────────────────────────── */
.abstract-text {
  font-family: var(--font-serif);
  font-size: 1.07rem; line-height: 1.82; color: var(--ink-2);
  text-align: justify;
}
.abstract-text .hl { color: var(--accent); font-weight: 600; font-style: normal; }
.abstract-text strong { color: var(--ink); }

/* ─── Requirement cards ──────────────────────────────────────────── */
.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.req-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 24px; text-align: left;
  transition: transform .25s, box-shadow .25s;
}
.req-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.req-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--grad); color: #fff;
  font-size: .8rem; font-weight: 700; margin-bottom: 14px;
}
.req-card h3 { font-size: .97rem; font-weight: 600; margin-bottom: 6px; }
.req-card p  { font-size: .87rem; color: var(--ink-3); line-height: 1.55; }

/* ─── Figure cards ───────────────────────────────────────────────── */
.figure-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(12px,2vw,24px);
  box-shadow: var(--shadow-sm); margin-bottom: 32px;
}
.figure-card img { width: 100%; border-radius: calc(var(--r-lg) - 4px); cursor: zoom-in; }
.figure-card video { width: 100%; border-radius: calc(var(--r-lg) - 4px); }
.fig-caption {
  font-size: .875rem; color: var(--ink-3); margin-top: 14px;
  line-height: 1.6; text-align: center;
  max-width: 72ch; margin-left: auto; margin-right: auto;
}
.fig-caption strong { color: var(--ink-2); }

/* ─── Data table ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin-bottom: 14px; }
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: .905rem; background: var(--card);
}
.data-table caption {
  caption-side: top; text-align: left;
  font-size: .82rem; color: var(--ink-3); margin-bottom: 10px;
}
.data-table th, .data-table td {
  padding: 11px 16px; border-bottom: 1px solid var(--line); text-align: left;
}
.data-table thead th {
  font-weight: 700; border-bottom: 2px solid var(--ink);
  background: var(--surface-2);
}
.data-table .th-sub { font-weight: 400; color: var(--ink-3); font-size: .78rem; }
.data-table tbody tr:hover { background: var(--surface-2); }

/* ─── Carousel ───────────────────────────────────────────────────── */
.carousel { position: relative; display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.carousel-track-wrap { overflow: hidden; border-radius: var(--r-lg); flex: 1; }
.carousel-track { display: flex; transition: transform .4s cubic-bezier(.4,0,.2,1); }
.carousel-slide { min-width: 100%; margin: 0; }
.carousel-slide img { width: 100%; border-radius: var(--r-lg); }
.carousel-slide figcaption { font-size: .875rem; color: var(--ink-3); margin-top: 12px; }
.carousel-arrow {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  color: var(--ink-2); font-size: 1rem; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  display: flex; align-items: center; justify-content: center;
}
.carousel-arrow:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── Task showcase ──────────────────────────────────────────────── */
.task-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.task-group + .task-group {
  margin-top: 46px;
}
.task-group-head {
  max-width: 760px;
  margin: 0 0 18px;
  text-align: left;
}
.task-group-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.task-group-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0;
}
.task-group-head p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.65;
}
.task-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.task-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-soft);
}
.task-card-head { margin-bottom: 12px; text-align: left; }
.task-card-head h3 {
  font-size: 1.2rem; font-weight: 700; color: var(--ink);
  letter-spacing: -.01em;
}
.task-video-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.task-video {
  position: relative; overflow: hidden;
  border-radius: calc(var(--r) - 2px);
  background: #000;
  box-shadow: inset 0 0 0 1px var(--line);
}
.task-video video {
  width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block;
}
.task-video-pair .task-video:first-child {
  grid-row: 1 / span 2;
}
.task-video-pair .task-video:first-child video {
  height: 100%;
  aspect-ratio: auto;
}
.task-video-tag {
  position: absolute; top: 10px; left: 10px;
  font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: rgba(17,24,39,.62);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  padding: 4px 11px; border-radius: 100px;
  pointer-events: none;
}

/* ─── Motion recovery grid ───────────────────────────────────────── */
.recovery-grid {
  display: flex; flex-direction: column;
  gap: 14px;
  margin-top: 56px;
}
.recovery-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.recovery-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-soft);
}
.recovery-cell {
  overflow: hidden; border-radius: calc(var(--r) - 2px);
  background: #000;
  box-shadow: inset 0 0 0 1px var(--line);
}
.recovery-cell video {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block;
}

/* ─── Video grid ─────────────────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; margin-top: 10px;
}
.video-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
}
.video-card video { width: 100%; aspect-ratio: 16/9; background: #111; }
.video-label {
  padding: 10px 14px;
  font-size: .84rem; font-weight: 600;
  border-top: 1px solid var(--line);
}
.video-note { font-size: .82rem; color: var(--ink-3); font-style: italic; margin-top: 12px; text-align: center; }
.video-note code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; }

/* ─── BibTeX ─────────────────────────────────────────────────────── */
.bibtex-box {
  position: relative; background: #111318; border-radius: var(--r-lg);
  padding: 28px; overflow-x: auto;
}
.bibtex-box pre {
  color: #e2e8f0; font-family: var(--font-mono); font-size: .83rem;
  line-height: 1.65; white-space: pre;
}
.copy-btn {
  position: absolute; top: 16px; right: 16px;
  padding: 6px 14px; border-radius: 100px;
  border: 1px solid #3a3f4b; background: #1e232e;
  color: #c8d0e0; font-size: .76rem; cursor: pointer;
  font-family: var(--font);
  transition: background .15s, color .15s;
}
.copy-btn:hover { background: #2a3040; }
.copy-btn.copied { background: #1a5c32; border-color: #22c55e; color: #bbf7d0; }

/* ─── Scroll reveal ──────────────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .65s cubic-bezier(.2,.6,.2,1), transform .65s cubic-bezier(.2,.6,.2,1);
  transition-delay: var(--d, 0ms);
}
.reveal.visible { opacity: 1; transform: none; }

/* ─── Org logos ──────────────────────────────────────────────────── */
.org-logos {
  display: flex; justify-content: center; align-items: center;
  gap: 48px; flex-wrap: nowrap; margin-bottom: 32px;
  overflow-x: auto; padding: 4px 0;
  scrollbar-width: none;
}
.org-logos::-webkit-scrollbar { display: none; }
.org-logos img {
  height: 64px; width: auto; object-fit: contain; flex-shrink: 0;
}
/* Badge-style logos: allow taller to be visible */
.org-logos img[alt="HKUST(GZ)"]   { height: 64px; }
.org-logos img[alt="DeepCybo"]     { height: 64px; }
.org-logos img[alt="Zhongguancun Academy"],
.org-logos img[alt="ZGCI"],
.org-logos img[alt="HUST"],
.org-logos img[alt="Beihang University"] { height: 96px; }

/* ─── Footer ─────────────────────────────────────────────────────── */
.footer {
  padding: 44px 0 60px; text-align: center;
  color: var(--ink-3); font-size: .85rem;
  border-top: 1px solid var(--line);
}
.footer p { max-width: 640px; margin: 0 auto 8px; }
.footer-credit { font-size: .76rem; opacity: .7; }

/* ─── Lightbox ───────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(5,5,10,.9); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 32px; cursor: zoom-out;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.lightbox.active { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 100%; max-height: 100%;
  border-radius: var(--r); box-shadow: 0 24px 80px rgba(0,0,0,.5);
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 720px) {
  :root { --nav-h: 58px; }
  html { scroll-padding-top: calc(var(--nav-h) + 12px); }
  body { font-size: 15px; }
  .wrap,
  .wrap-narrow,
  .wrap-wide {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }
  .nav-inner {
    width: 100%;
    padding: 0 14px;
    gap: 10px;
  }
  .nav-brand {
    gap: 9px;
    font-size: 17px;
  }
  .nav-gem {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }
  .theme-btn {
    width: 38px;
    height: 38px;
  }
  .hero {
    padding: 52px 0 40px;
    text-align: center;
  }
  .hero > .wrap {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 16px;
    padding-right: 16px;
    overflow: hidden;
  }
  .blob { opacity: .3; }
  .hero h1 {
    font-size: clamp(1.85rem, 10vw, 2.55rem);
    max-width: min(340px, 100%);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 18px;
    overflow-wrap: anywhere;
  }
  .hero h1 .grad-text { display: block; }
  .title-sub {
    max-width: min(28ch, 100%);
    margin-left: auto;
    margin-right: auto;
    font-size: .44em;
    line-height: 1.22;
    margin-top: 10px;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: balance;
  }
  .hero-sub {
    font-size: 1rem;
    line-height: 1.65;
    max-width: min(340px, 100%);
    margin-left: auto;
    margin-right: auto;
  }
  .authors {
    font-size: .94rem;
    line-height: 1.75;
    max-width: min(340px, 100%);
    overflow-wrap: anywhere;
    margin-left: auto;
    margin-right: auto;
  }
  .affils {
    font-size: .84rem;
    line-height: 1.7;
    max-width: min(340px, 100%);
    overflow-wrap: anywhere;
    margin-left: auto;
    margin-right: auto;
  }
  .section { padding: 60px 0 32px; }
  .section--tint {
    border-radius: 16px;
    margin: 24px 0;
    padding: 56px 0 34px;
  }
  .section-head {
    margin-bottom: 28px;
    text-align: left;
  }
  .section-head .section-title,
  .section-head .section-lede {
    margin-left: 0;
    margin-right: 0;
  }
  .section-title {
    font-size: clamp(1.45rem, 8vw, 2rem);
    max-width: 100%;
  }
  .section-title.wide { max-width: 100%; }
  .section-lede {
    font-size: .98rem;
    max-width: 100%;
    margin-bottom: 24px;
  }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .stat-card { padding: 18px 16px 16px; }
  .req-grid { grid-template-columns: 1fr; }
  .btn-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-width: 270px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 34px;
  }
  .btn {
    justify-content: center;
    padding: 9px 14px;
    font-size: 13px;
    min-height: 42px;
  }
  .btn svg { width: 16px; height: 16px; }
  .btn-note {
    font-size: .68em;
    padding: 2px 6px;
  }
  .nav-links { display: none; }
  .hero-teaser {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border-radius: 14px;
    overflow: hidden;
  }
  .hero-teaser figcaption,
  .fig-caption {
    font-size: .78rem;
    text-align: left;
  }
  .org-logos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: center;
    align-items: center;
    gap: 16px 18px;
    width: 100%;
    max-width: min(340px, calc(100vw - 32px));
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 24px;
    overflow: hidden;
    padding: 2px 0 6px;
  }
  .org-logos img,
  .org-logos img[alt="HKUST(GZ)"],
  .org-logos img[alt="DeepCybo"] {
    width: auto;
    min-width: 0;
    max-width: min(100%, 150px);
    height: auto;
    max-height: 42px;
  }
  .org-logos img[alt="Zhongguancun Academy"],
  .org-logos img[alt="ZGCI"],
  .org-logos img[alt="HUST"],
  .org-logos img[alt="Beihang University"] {
    width: auto;
    min-width: 0;
    max-width: min(100%, 74px);
    height: auto;
    max-height: 54px;
  }
  .carousel { flex-wrap: wrap; }
  .carousel-track-wrap { order: 1; width: 100%; }
  .carousel-arrow { order: 2; }
  .task-group + .task-group {
    margin-top: 34px;
  }
  .task-group-head {
    margin-bottom: 14px;
  }
  .task-group-head h3 {
    font-size: 1.28rem;
  }
  .task-group-head p {
    font-size: .95rem;
    line-height: 1.55;
  }
  .task-grid { grid-template-columns: 1fr; }
  .task-card {
    padding: 14px;
    border-radius: 14px;
  }
  .task-video-pair {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 10px;
  }
  .task-video-pair .task-video:first-child {
    grid-row: auto;
  }
  .task-video-pair .task-video:first-child video {
    height: auto;
    aspect-ratio: 16/10;
  }
  .figure-card {
    padding: 10px;
    border-radius: 14px;
  }
  .recovery-grid {
    gap: 12px;
    margin-top: 32px;
  }
  .recovery-row {
    grid-template-columns: repeat(5, minmax(132px, 1fr));
    gap: 8px;
    overflow-x: auto;
    padding: 8px;
    border-radius: 14px;
    scrollbar-width: thin;
  }
  .recovery-row:hover { transform: none; }
  .recovery-cell {
    min-width: 132px;
  }
  .table-wrap {
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 16px;
  }
  .data-table {
    min-width: 680px;
    font-size: .82rem;
  }
  .bibtex-box {
    padding: 20px 14px 16px;
    border-radius: 14px;
  }
  .bibtex-box pre {
    font-size: .68rem;
    line-height: 1.55;
  }
  .copy-btn {
    position: static;
    margin-bottom: 12px;
  }
}
@media (max-width: 480px) {
  .stats-band { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(1.85rem, 10vw, 2.35rem); }
  .recovery-row {
    grid-template-columns: repeat(5, 118px);
  }
  .recovery-cell {
    min-width: 118px;
  }
}
