:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-subtle: #f1f5f9;
  --surface-dark: #090d16;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-red: #e11d48;
  --muscle-gradient: linear-gradient(90deg, #2563eb 0%, #0ea5e9 35%, #f59e0b 70%, #e11d48 100%);
  --rule-gradient: linear-gradient(135deg, #2563eb 0%, #e11d48 100%);
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 44px rgba(15, 23, 42, 0.14);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --container-narrow: 980px;
  --container-wide: 1240px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-primary);
}

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

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-blue-hover);
}

button, input, select {
  font: inherit;
}

/* ==========================================================================
   Fixed Navigation (Hidden in 100svh Hero, Slides Down on Scroll)
   ========================================================================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-nav.is-shown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.nav-brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rule-gradient);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

/* ==========================================================================
   ENPIRE-Style Full-Bleed 100svh Cinema Hero
   ========================================================================== */
.enpire-hero {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 560px;
  background: #05070e;
  overflow: hidden;
}

.enpire-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.06) contrast(1.03);
}

.enpire-hero__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(5, 7, 14, 0.14) 0%, rgba(5, 7, 14, 0.56) 85%),
    linear-gradient(180deg, rgba(5, 7, 14, 0.45) 0%, rgba(5, 7, 14, 0.16) 44%, rgba(5, 7, 14, 0.78) 100%);
  pointer-events: none;
  z-index: 1;
}

.enpire-hero__center {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92%, 1040px);
  z-index: 2;
  text-align: center;
  pointer-events: none;
}

.enpire-hero__wordmark {
  display: inline-flex;
  justify-content: center;
  font-size: clamp(58px, 12.2vw, 168px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-shadow: 0 6px 48px rgba(0, 0, 0, 0.72), 0 2px 12px rgba(0, 0, 0, 0.5);
}

.enpire-hero__letter {
  display: inline-block;
  opacity: 0;
}

.enpire-hero__center[data-revealed="true"] .enpire-hero__letter {
  animation: hero-letter-in 1.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.enpire-hero__tagline {
  margin: 18px auto 0;
  max-width: 720px;
  font-size: clamp(0.98rem, 1.65vw, 1.28rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(241, 245, 249, 0.9);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
  opacity: 0;
  transform: translateY(12px);
}

.enpire-hero__center[data-revealed="true"] .enpire-hero__tagline {
  animation: hero-tagline-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.72s forwards;
}

@keyframes hero-letter-in {
  0% {
    opacity: 0;
    filter: blur(18px);
    transform: translateY(0.42em) scale(1.14);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes hero-tagline-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
  animation: scroll-cue-float 1.8s ease-in-out infinite;
}

.scroll-cue:hover {
  color: #ffffff;
}

.scroll-cue::after {
  content: '';
  display: block;
  width: 2px;
  height: 24px;
  margin: 10px auto 0;
  background: #ffffff;
  border-radius: 2px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}

@keyframes scroll-cue-float {
  0%, 100% {
    opacity: 0.76;
    transform: translate(-50%, 0);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -6px);
  }
}

/* ==========================================================================
   Scroll-Reveal Utility
   ========================================================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ==========================================================================
   Containers, Bands & Paper Header
   ========================================================================== */
.container {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 24px;
}

.band {
  padding: 64px 0;
  background: var(--bg-primary);
}

.band-alt {
  padding: 64px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.paper-header-section {
  padding: 72px 0 36px;
  background: var(--bg-primary);
  text-align: center;
}

.paper-title {
  margin: 0 auto;
  max-width: 920px;
  font-size: clamp(1.95rem, 3.8vw, 2.85rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.paper-title-accent {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 42%, #e11d48 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.paper-authors {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.paper-author sup {
  font-size: 0.72em;
  font-weight: 700;
  color: var(--accent-blue);
  margin-left: 2px;
}

.paper-affiliations {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  font-size: 0.96rem;
  color: var(--text-secondary);
}

.paper-affiliations sup {
  font-weight: 700;
  color: var(--accent-blue);
  margin-right: 3px;
}

.paper-equal-note {
  margin-top: 6px;
  font-size: 0.86rem;
  color: var(--text-muted);
  font-style: italic;
}

.paper-equal-note sup {
  font-style: normal;
  font-weight: 700;
  color: var(--accent-blue);
  margin-right: 2px;
}

/* Clean 2-Button Bar: Paper + Code (Coming Soon) */
.paper-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 10px;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-primary);
  background: #ffffff;
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-xs);
  transition: all 0.18s ease;
  cursor: pointer;
}

.action-btn.is-primary {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.action-btn.is-primary:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.24);
}

.action-btn.is-code-soon:hover {
  background: var(--bg-secondary);
  border-color: #94a3b8;
  color: var(--text-primary);
}

.action-btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.soon-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.metrics-row {
  margin: 34px auto 0;
  max-width: 920px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.metric-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
}

.metric-val {
  display: block;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.metric-lbl {
  display: block;
  margin-top: 3px;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 32px;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-blue);
  margin-bottom: 8px;
}

.section-title {
  margin: 0;
  font-size: clamp(1.65rem, 2.8vw, 2.12rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.2;
}

.section-rule {
  width: 54px;
  height: 3.5px;
  border-radius: 999px;
  background: var(--rule-gradient);
  margin: 13px auto 0;
}

.section-lead {
  max-width: 760px;
  margin: 15px auto 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
}

/* ==========================================================================
   Full Video Section (Placed First) & Complete Timestamp Tags
   ========================================================================== */
.full-video-section {
  padding: 20px 0 64px;
  background: var(--bg-primary);
}

.video-showcase {
  background: var(--surface-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.video-showcase video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #090d16;
}

.chapter-groups {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chapter-group-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.chapter-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-right: 4px;
}

.chapter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chapter-chip code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent-blue);
  font-weight: 600;
}

.chapter-chip:hover,
.chapter-chip.is-active {
  border-color: var(--accent-blue);
  color: var(--text-primary);
  background: #eff6ff;
}

/* Abstract Prose */
.abstract-box {
  max-width: 820px;
  margin: 0 auto;
  font-size: 1.04rem;
  line-height: 1.78;
  color: #334155;
  text-align: justify;
}

/* Figures */
.figure-frame {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-md);
}

.figure-frame img {
  margin: 0 auto;
  border-radius: var(--radius-sm);
}

.figure-caption {
  margin: 14px auto 0;
  max-width: 880px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: left;
}

.figure-caption strong {
  color: var(--text-primary);
}

.activation-bar {
  display: inline-block;
  width: 56px;
  height: 8px;
  border-radius: 999px;
  background: var(--muscle-gradient);
}

/* ==========================================================================
   Interactive Mesh-to-Surface Split Viewer
   ========================================================================== */
.inspector-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.inspector-toolbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--bg-secondary);
}

.inspector-title-group h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.inspector-title-group p {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.segmented-group {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: #e2e8f0;
  gap: 2px;
}

.segmented-btn {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.segmented-btn.is-active {
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

.mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.mode-dot.split { background: linear-gradient(135deg, #0ea5e9 50%, #e11d48 50%); }
.mode-dot.wire { background: #0ea5e9; }
.mode-dot.solid { background: #e11d48; }

.inspector-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
}

.inspector-stage-wrap {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inspector-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1536 / 916;
  background: #1a2230;
  border-radius: var(--radius-md);
  overflow: hidden;
  user-select: none;
}

.inspector-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.inspector-overlay-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.split-handle {
  position: absolute;
  z-index: 4;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  cursor: grab;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  touch-action: none;
  padding: 0;
  transition: transform 0.12s ease, background 0.15s ease;
}

.split-handle:hover, .split-handle.is-dragging {
  background: var(--accent-blue);
  transform: translate(-50%, -50%) scale(1.08);
}

.split-handle.is-dragging { cursor: grabbing; }
.split-handle[hidden] { display: none; }

.split-handle span {
  font-size: 16px;
  font-weight: 700;
  transform: rotate(34deg);
  line-height: 1;
  pointer-events: none;
}

.inspector-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  font-size: 0.82rem;
}

.ctrl-btn {
  border: 1px solid var(--border-medium);
  background: #ffffff;
  color: var(--text-primary);
  border-radius: 7px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.ctrl-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.inspector-scrubber {
  flex: 1;
  min-width: 120px;
  accent-color: var(--accent-blue);
}

.inspector-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.inspector-sliders {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 4px 2px 0;
}

.inspector-sliders[hidden] { display: none; }

.inspector-sliders label {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.inspector-sliders input[type="range"] {
  flex: 1;
  accent-color: #0ea5e9;
}

.inspector-playlist {
  border-left: 1px solid var(--border-light);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 560px;
  overflow-y: auto;
  background: #fcfdff;
}

.inspector-clip-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inspector-clip-btn:hover { background: var(--bg-subtle); }

.inspector-clip-btn.is-active {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.inspector-clip-btn img {
  width: 64px;
  height: 42px;
  object-fit: cover;
  border-radius: 5px;
  background: #1e293b;
  flex-shrink: 0;
}

.inspector-clip-meta strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.inspector-clip-meta span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   3-Column Motion Gallery
   ========================================================================== */
.gallery-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tab {
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-tab:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.filter-tab.is-active {
  background: #1e293b;
  border-color: #1e293b;
  color: #ffffff;
}

.filter-tab .tab-count {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.71rem;
  background: rgba(100, 116, 139, 0.14);
}

.filter-tab.is-active .tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.gallery-search {
  position: relative;
  min-width: 230px;
}

.gallery-search input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border-radius: 999px;
  border: 1px solid var(--border-medium);
  background: #ffffff;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.gallery-search input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.gallery-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-muted);
}

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

.demo-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 13px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.demo-card:hover {
  box-shadow: var(--shadow-md);
}

.demo-card.is-wide {
  grid-column: 1 / -1;
}

.demo-media {
  position: relative;
  background: #0f172a;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.demo-card.is-wide .demo-media {
  aspect-ratio: 21 / 9;
}

.demo-media video,
.demo-media img.demo-poster {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0f172a;
}

.demo-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.1));
  border: 0;
  width: 100%;
  cursor: pointer;
  transition: background 0.2s ease;
}

.demo-play-overlay:hover {
  background: linear-gradient(to top, rgba(15, 23, 42, 0.32), rgba(15, 23, 42, 0.04));
}

.play-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.demo-play-overlay:hover .play-circle {
  transform: scale(1.08);
  background: var(--accent-blue);
  color: #ffffff;
}

.play-circle svg {
  width: 20px;
  height: 20px;
  margin-left: 2px;
}

.demo-body {
  padding: 13px 15px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.demo-badge {
  display: inline-block;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 5px;
  background: #eff6ff;
  color: var(--accent-blue);
}

.demo-title {
  margin: 4px 0 0;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.34;
}

.demo-desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.variant-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.variant-pill {
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.variant-pill:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.variant-pill.is-active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #ffffff;
}

.demo-footer {
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px solid var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.speed-pills {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.speed-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.speed-btn.is-active {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-weight: 500;
}

.download-link:hover { color: var(--accent-blue); }

.gallery-more-wrap {
  margin-top: 26px;
  text-align: center;
}

.more-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: all 0.18s ease;
}

.more-pill-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* Two-Column Grids & Tables */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.table-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.table-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.table-card p {
  margin: 0 0 16px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.academic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.academic-table th {
  text-align: left;
  padding: 8px;
  border-top: 2px solid #0f172a;
  border-bottom: 1px solid #cbd5e1;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.academic-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border-light);
  color: #334155;
}

.academic-table tbody tr:last-child td {
  border-bottom: 2px solid #0f172a;
}

.academic-table tr.is-highlight td {
  background: #f0f7ff;
  font-weight: 600;
  color: var(--text-primary);
}

/* Tabbed Deep-Dive Studies */
.study-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.study-panel[hidden] { display: none; }

/* BibTeX */
.bibtex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.bibtex-header h2 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 0;
  background: var(--accent-blue);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.copy-btn:hover { background: var(--accent-blue-hover); }

.bibtex-pre {
  margin: 0;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.65;
  color: #1e293b;
  overflow-x: auto;
}

/* Footer */
.site-footer {
  padding: 40px 0 48px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  font-size: 0.86rem;
  color: var(--text-muted);
}

.footer-inner {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.footer-inner p { margin: 6px 0; }

/* Scroll to top */
.scroll-top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.32);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 40;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-btn:hover { background: var(--accent-blue-hover); }

@media (max-width: 1024px) {
  .inspector-body {
    grid-template-columns: 1fr;
  }
  .inspector-playlist {
    border-left: 0;
    border-top: 1px solid var(--border-light);
    max-height: 240px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .two-col-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .enpire-hero { height: 78svh; min-height: 440px; }
  .band, .band-alt { padding: 48px 0; }
  .gallery-grid { grid-template-columns: 1fr; }
  .demo-card.is-wide .demo-media { aspect-ratio: 16 / 10; }
  .inspector-playlist { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-on-scroll { opacity: 1; transform: none; transition: none; }
}
