/* ═══════════════════════════════════════════════════════════
   HierLoc — Hyperbolic Observatory Design System
   Aesthetic: Dark Cosmos · Editorial Serif · Geodesic Gold
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Mono:wght@400;500&family=Syne:wght@400;600;700;800&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --ink:        #0a0a0f;
  --ink-2:      #111118;
  --ink-3:      #1a1a24;
  --surface:    #14141e;
  --rim:        rgba(255,255,255,0.06);
  --rim-strong: rgba(255,255,255,0.12);

  --gold:       #e8a838;
  --gold-light: #f5cc7a;
  --gold-dim:   rgba(232,168,56,0.18);

  --text:       #e8e4da;
  --text-muted: #8c8a84;
  --text-dim:   #4a4842;

  --serif:      'DM Serif Display', Georgia, serif;
  --sans:       'Syne', system-ui, sans-serif;
  --mono:       'DM Mono', 'Cascadia Code', monospace;

  --r-sm:   6px;
  --r-md:   12px;
  --r-lg:   20px;
  --r-xl:   32px;

  --ease:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --glow: 0 0 60px rgba(232,168,56,0.12), 0 0 120px rgba(232,168,56,0.05);
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--ink);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  line-height: 1.1;
  color: var(--text);
}

/* Override Bulma title */
.title {
  font-family: var(--serif) !important;
  color: var(--text) !important;
}

.title.is-1 { font-size: clamp(2.2rem, 5vw, 3.6rem) !important; }
.title.is-2 { font-size: clamp(1.8rem, 4vw, 2.8rem) !important; }
.title.is-3 { font-size: clamp(1.4rem, 3vw, 2rem) !important; }
.title.is-4 { font-size: 1.25rem !important; }

/* ── Hero 3D Background (Three.js) — fixed behind all content */
#hero-3d-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}
#hero-3d-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ── Hero Section ────────────────────────────────────────── */
.hero-main {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: transparent;
  overflow: hidden;
}

.hero-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 600px at 20% 30%, rgba(232,168,56,0.04) 0%, transparent 70%),
    radial-gradient(circle 400px at 80% 70%, rgba(120,80,200,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* Decorative arc lines */
.hero-arc {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(232,168,56,0.08);
  pointer-events: none;
  animation: arcPulse 8s ease-in-out infinite;
}
.hero-arc:nth-child(1) { width: 600px; height: 600px; top: -200px; right: -150px; animation-delay: 0s; }
.hero-arc:nth-child(2) { width: 900px; height: 900px; top: -350px; right: -300px; animation-delay: -2s; border-color: rgba(232,168,56,0.04); }
.hero-arc:nth-child(3) { width: 400px; height: 400px; bottom: -100px; left: -100px; animation-delay: -4s; border-color: rgba(120,80,200,0.06); }

@keyframes arcPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.03); }
}

.hero-body-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 8rem 2rem 6rem;
  text-align: center;
}

/* Venue badge */
.venue-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--gold-dim);
  border: 1px solid rgba(232,168,56,0.3);
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
  animation: fadeInDown 0.7s var(--ease) both;
}

.venue-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.4); }
}

/* Main title */
.hero-title {
  font-family: var(--serif) !important;
  font-size: clamp(2.4rem, 5.5vw, 4rem) !important;
  color: #f5f0e8 !important;
  letter-spacing: -0.02em;
  line-height: 1.08 !important;
  margin-bottom: 1.5rem !important;
  animation: fadeInUp 0.8s var(--ease) 0.1s both;
}

.hero-title .accent {
  color: var(--gold);
  font-style: italic;
}

/* Divider */
.title-rule {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 2rem;
  animation: fadeInUp 0.8s var(--ease) 0.2s both;
}

/* Authors */
.publication-authors {
  font-family: var(--sans) !important;
  font-size: 1rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 0.75rem !important;
  animation: fadeInUp 0.8s var(--ease) 0.3s both;
}

.publication-authors a {
  color: var(--text) !important;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
  border-bottom: 1px solid transparent;
}

.publication-authors a:hover {
  color: var(--gold) !important;
  border-bottom-color: var(--gold);
}

.author-block { display: inline; }

.affiliation-line {
  font-family: var(--sans) !important;
  font-size: 0.85rem !important;
  color: var(--text-dim) !important;
  letter-spacing: 0.03em;
  animation: fadeInUp 0.8s var(--ease) 0.4s both;
}

/* CTA Buttons */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
  animation: fadeInUp 0.8s var(--ease) 0.5s both;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--r-md);
  transition: all 0.25s var(--ease);
  cursor: pointer;
  border: none;
}

.cta-btn-primary {
  background: var(--gold);
  color: #0a0a0f;
}
.cta-btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232,168,56,0.35);
}

.cta-btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--rim-strong);
}
.cta-btn-outline:hover {
  background: var(--rim);
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

/* ── Stat Bar ─────────────────────────────────────────────── */
.stat-bar {
  position: relative;
  z-index: 2;
  background: transparent;
  border-top: 1px solid var(--rim);
  border-bottom: 1px solid var(--rim);
  padding: 1.5rem 0;
  overflow: hidden;
}

.stat-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(232,168,56,0.03), transparent);
}

.stat-bar-inner {
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 0.5rem 1rem;
  border-right: 1px solid var(--rim);
}
.stat-item:last-child { border-right: none; }

/* Stat count-up animation */
.stat-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.stat-animate.is-counting {
  opacity: 1;
  transform: translateY(0);
}
.stat-animate:nth-child(1) { transition-delay: 0s; }
.stat-animate:nth-child(2) { transition-delay: 0.12s; }
.stat-animate:nth-child(3) { transition-delay: 0.24s; }
.stat-animate:nth-child(4) { transition-delay: 0.36s; }

.stat-value {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--gold);
  line-height: 1;
  display: block;
}

.stat-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.25rem;
  display: block;
}

/* ── Section Base ─────────────────────────────────────────── */
.hl-section {
  padding: 5rem 2rem;
  position: relative;
  z-index: 2;
  background: transparent;
}

.hl-section-alt {
  background: transparent;
}

.section-eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
  display: block;
}

.section-heading {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: var(--text);
  margin-bottom: 0;
  line-height: 1.15;
}

.section-heading em { color: var(--gold); font-style: italic; }

.section-rule {
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin: 1.25rem 0 2.5rem;
  border: none;
}

.section-rule-center {
  margin: 1.25rem auto 2.5rem;
}

/* ── Abstract ─────────────────────────────────────────────── */
.abstract-section {
  background: transparent;
  border-top: 1px solid var(--rim);
  border-bottom: 1px solid var(--rim);
}

.abstract-card {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.abstract-text {
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-muted);
  text-align: left;
}

.abstract-text p { margin-bottom: 1.25rem; }
.abstract-text p:last-child { margin-bottom: 0; }

.abstract-text strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Carousel ─────────────────────────────────────────────── */
.carousel-section {
  background: transparent;
}

.results-carousel {
  overflow: hidden;
  padding: 0.5rem 0;
}

/* Let carousel adapt height per slide (tables are taller than images) */
.results-carousel .slider,
.results-carousel .slider-container {
  height: auto !important;
}

.results-carousel .slider-item {
  height: auto !important;
}

.results-carousel .item {
  margin: 0 0.5rem;
  padding: clamp(1rem, 4vw, 2rem);
  background: var(--ink-2);
  border: 1px solid var(--rim);
  border-radius: var(--r-xl);
  font-size: 0;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
  width: 100%;
}

.results-carousel .item:hover {
  border-color: var(--rim-strong);
  box-shadow: var(--glow);
}

.results-carousel .item img {
  max-width: 100%;
  width: 100%;
  height: auto;
  max-height: 60vw;
  display: block;
  margin: 0 auto;
  border-radius: var(--r-md);
  object-fit: contain;
}

.results-carousel .subtitle {
  font-family: var(--sans) !important;
  font-size: clamp(0.78rem, 2vw, 0.9rem) !important;
  color: var(--text-muted) !important;
  line-height: 1.6 !important;
  margin-top: 1rem !important;
  font-weight: 400 !important;
  text-align: center;
}

.results-carousel .subtitle strong {
  color: var(--text);
  font-weight: 600;
}

/* Table carousel items — constrain on mobile */
.results-carousel .item .table-container,
.results-carousel .item .hl-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Carousel nav arrows — restyle bulma's */
.carousel-container button.carousel-nav-left,
.carousel-container button.carousel-nav-right {
  background: var(--ink-3) !important;
  border: 1px solid var(--rim-strong) !important;
  border-radius: 50% !important;
  color: var(--text) !important;
  width: 36px !important;
  height: 36px !important;
  transition: background 0.2s, border-color 0.2s !important;
}

@media (max-width: 768px) {
  .results-carousel .item {
    margin: 0 0.25rem;
    border-radius: var(--r-lg);
  }

  .results-carousel .item img {
    max-height: 75vw;
  }

  .results-carousel .subtitle {
    font-size: 0.78rem !important;
    margin-top: 0.75rem !important;
  }

  /* Shrink table text further on mobile */
  .results-carousel .table th,
  .results-carousel .table td,
  .results-carousel .hl-table thead th,
  .results-carousel .hl-table tbody td {
    font-size: 0.68rem !important;
    padding: 0.5rem 0.4rem !important;
  }

  .results-carousel .table td:first-child,
  .results-carousel .hl-table tbody td:first-child {
    font-size: 0.72rem !important;
  }
}

.carousel-container button.carousel-nav-left:hover,
.carousel-container button.carousel-nav-right:hover {
  background: var(--ink-2) !important;
  border-color: var(--gold) !important;
  color: var(--gold) !important;
}

/* ── HierLoc Table Design System ──────────────────────────── */

/* Table item card overrides */
.item--table {
  font-size: 1rem !important;
}

/* Header: table number + title */
.hl-table-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.hl-table-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(232,168,56,0.15);
}
.hl-table-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.hl-table-caption {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}
.hl-table-caption strong {
  color: var(--gold-light);
  font-weight: 700;
}

/* Table wrapper */
.hl-table-wrap {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--rim);
  background:
    linear-gradient(180deg, rgba(232,168,56,0.03) 0%, transparent 40%),
    var(--ink);
}

/* Table base */
.hl-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text);
}

/* Header cells */
.hl-table thead th {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 14px 16px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid rgba(232,168,56,0.18);
  background: transparent;
  position: relative;
}
.hl-table thead th:not(:first-child) {
  text-align: right;
}
/* Subtle gold line under header */
.hl-table thead tr {
  background: rgba(232,168,56,0.04);
}

/* Data cells */
.hl-table tbody td {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s ease, color 0.15s ease;
  text-align: right;
}
.hl-table tbody td:first-child {
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  letter-spacing: -0.005em;
}

/* Alternating row tint */
.hl-table tbody tr:nth-child(even):not(.hl-row-ours):not(.hl-row-dataset) td {
  background: rgba(255,255,255,0.012);
}

/* Hover */
.hl-table tbody tr:not(.hl-row-dataset):hover td {
  background: rgba(255,255,255,0.03);
}

/* Best values: bold + underline */
.hl-table td strong {
  color: var(--text);
  font-weight: 600;
}
.hl-table td u {
  text-decoration: none;
  border-bottom: 1px dashed var(--text-muted);
  padding-bottom: 1px;
}

/* ── HierLoc rows (ours) ─────────────── */
.hl-row-ours td {
  position: relative;
}

/* Secondary variant (ViT-L/14) */
.hl-row-secondary td {
  background: rgba(232,168,56,0.03) !important;
  border-bottom-color: rgba(232,168,56,0.08) !important;
  border-top: 1px solid rgba(232,168,56,0.1);
}
.hl-row-secondary td:first-child {
  color: var(--gold-light) !important;
}
.hl-row-secondary td u {
  color: var(--gold-light);
  border-bottom-color: rgba(245,204,122,0.35);
}

/* Best variant — the star row */
.hl-row-best td {
  background: rgba(232,168,56,0.07) !important;
  color: var(--gold-light) !important;
  border-bottom-color: rgba(232,168,56,0.12) !important;
}
.hl-row-best td:first-child {
  color: var(--gold) !important;
  font-weight: 700 !important;
}
.hl-row-best td strong {
  color: var(--gold) !important;
  font-weight: 700;
}
.hl-row-best td u {
  color: var(--gold-light);
  border-bottom-color: rgba(245,204,122,0.4);
}
/* Gold left accent bar on best row */
.hl-row-best td:first-child::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(232,168,56,0.4);
}

/* Variant label */
.hl-variant {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.hl-row-best .hl-variant {
  color: rgba(245,204,122,0.6);
}

/* ── Dataset section headers (Table 2) ── */
.hl-row-dataset td {
  font-family: var(--sans) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted) !important;
  text-align: center !important;
  padding: 10px 16px !important;
  background: rgba(255,255,255,0.02) !important;
  border-bottom: 1px solid var(--rim) !important;
  border-top: 1px solid var(--rim) !important;
  position: relative;
}
/* Decorative dashes around dataset name */
.hl-row-dataset td::before,
.hl-row-dataset td::after {
  content: '—';
  margin: 0 10px;
  color: var(--text-dim);
  font-weight: 400;
}

/* ── Mobile table adjustments ─────────── */
@media (max-width: 768px) {
  .hl-table thead th {
    font-size: 0.6rem;
    padding: 10px 10px;
    letter-spacing: 0.08em;
  }
  .hl-table tbody td {
    font-size: 0.72rem;
    padding: 9px 10px;
  }
  .hl-table tbody td:first-child {
    font-size: 0.76rem;
  }
  .hl-table-title {
    font-size: 0.95rem;
  }
  .hl-table-caption {
    font-size: 0.75rem;
  }
}

/* ── Legacy Bulma table overrides (keep for any remaining tables) ── */
.table-container {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--rim);
  background: var(--ink-2);
}
.table {
  background: transparent !important;
  color: var(--text) !important;
  width: 100%;
}

/* ── Video Cards ─────────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr));
  gap: 1.5rem;
  max-width: 1040px;
  margin: 0 auto;
}

.video-card {
  background: var(--ink-2);
  border: 1px solid var(--rim);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}

.video-card:hover {
  border-color: rgba(232,168,56,0.25);
  transform: translateY(-4px);
  box-shadow: var(--glow);
}

.video-card-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--rim);
}

.video-card-number {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
}

.video-card-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0;
}

.video-card-desc {
  padding: 0.75rem 1.5rem 0;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.video-card-desc strong { color: var(--text); }

.video-card video {
  width: 100%;
  display: block;
  margin-top: 1rem;
}

/* ── Fullscreen Video Overlay ────────────────────────────── */
html.video-playing,
html.video-playing body {
  overflow: hidden !important;
  height: 100%;
}

.video-fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

.video-fullscreen-overlay video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-fullscreen-overlay.dismissed {
  opacity: 0;
  pointer-events: none;
}

.skip-video-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 0.6rem 1.3rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, opacity 0.4s;
  letter-spacing: 0.02em;
}

.skip-video-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.skip-video-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .video-fullscreen-overlay video {
    object-fit: contain;
    width: 100%;
    height: 100%;
  }
  .skip-video-btn {
    bottom: 1.2rem;
    right: 1.2rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  .video-showcase-inner {
    border-radius: var(--r-md, 8px);
  }
  .video-showcase {
    padding: 2rem 0.75rem;
  }
}

/* ── Video Showcase (inline replay) ─────────────────────── */
.video-showcase {
  padding: 3rem 1.5rem;
}

.video-showcase-inner {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--rim);
  box-shadow: var(--glow);
}

.video-showcase-inner video {
  width: 100%;
  display: block;
}

/* ── Post-video content reveal ──────────────────────────── */
.post-video-content {
  transition: opacity 0.8s ease, max-height 0.8s ease;
}

.post-video-hidden {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
}

.post-video-visible {
  opacity: 1;
  max-height: none;
  overflow: visible;
  pointer-events: auto;
}

/* ── Results Video ───────────────────────────────────────── */
.results-video-wrap {
  max-width: 780px;
  margin: 0 auto;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--rim);
  box-shadow: var(--glow);
}

.results-video-wrap video {
  width: 100%;
  display: block;
}

/* ── BibTeX ──────────────────────────────────────────────── */
.bibtex-section {
  background: transparent;
  border-top: 1px solid var(--rim);
}

.bibtex-card {
  max-width: 780px;
  margin: 0 auto;
  background: var(--ink-3);
  border: 1px solid var(--rim-strong);
  border-radius: var(--r-xl);
  overflow: hidden;
}

.bibtex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--rim);
  background: rgba(232,168,56,0.04);
}

.bibtex-header h2.title {
  font-family: var(--sans) !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  color: var(--gold) !important;
  text-transform: uppercase;
  margin: 0 !important;
}

pre {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 1.5rem !important;
  margin: 0 !important;
  overflow-x: auto;
}

code {
  font-family: var(--mono) !important;
  font-size: 0.82rem !important;
  color: var(--text-muted) !important;
  background: transparent !important;
  line-height: 1.7 !important;
}

.copy-bibtex-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  background: var(--gold-dim);
  border: 1px solid rgba(232,168,56,0.3);
  border-radius: var(--r-sm);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.copy-bibtex-btn:hover {
  background: rgba(232,168,56,0.25);
  border-color: var(--gold);
}

.copy-bibtex-btn.copied {
  background: rgba(34,197,94,0.15);
  border-color: rgba(34,197,94,0.4);
  color: #4ade80;
}

.copy-bibtex-btn.copied .copy-text::after {
  content: "ied!";
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 2;
  background: transparent !important;
  border-top: 1px solid var(--rim);
  padding: 3rem 2rem !important;
}

.footer .content {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--text-dim) !important;
  text-align: center;
  line-height: 1.7;
}

.footer a {
  color: var(--text-muted) !important;
  text-decoration: none;
  border-bottom: 1px solid var(--rim);
  transition: color 0.2s, border-color 0.2s;
}

.footer a:hover {
  color: var(--gold) !important;
  border-bottom-color: var(--gold);
}

/* ── Scroll-to-top ───────────────────────────────────────── */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--ink-3);
  border: 1px solid var(--rim-strong);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--ease);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-3px);
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

.reveal.will-animate {
  opacity: 0;
  transform: translateY(28px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > * {
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal-stagger > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.40s; }

/* ── Override Bulma hero ─────────────────────────────────── */
.hero.is-medium .hero-body { padding: 0; }
section.hero { background: transparent !important; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-body-inner { padding: 6rem 1.25rem 4rem; }

  .stat-bar-inner {
    flex-wrap: wrap;
    gap: 0;
  }
  .stat-item {
    flex: 0 0 50%;
    border-right: none;
    border-bottom: 1px solid var(--rim);
  }
  .stat-item:nth-child(1),
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(odd) { border-right: 1px solid var(--rim); }
  .stat-item:nth-child(3),
  .stat-item:nth-child(4) { border-bottom: none; }

  .hl-section { padding: 3.5rem 1.25rem; }

  .video-grid { grid-template-columns: 1fr; }

  .cta-btn { font-size: 0.82rem; padding: 0.65rem 1.2rem; }
}

@media (max-width: 480px) {
  .cta-row { flex-direction: column; align-items: center; }
  .cta-btn { width: 100%; max-width: 280px; justify-content: center; }
}

/* ── Accessibility ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  #hero-3d-container { opacity: 0.5; }
}

/* ── Utility ─────────────────────────────────────────────── */
.u-center { text-align: center; }
.u-max-content { max-width: 780px; margin: 0 auto; }
.u-max-wide { max-width: 1040px; margin: 0 auto; }

/* Bulma reset overrides */
.section { background: transparent; padding: 0; }
.hero-body { padding: 0; }
.content.has-text-justified p { margin-bottom: 1.25rem; }
