
:root {
  --color-bg: #121212;
  --color-surface: #1F1B24;
  --color-primary: #FF6E6C;
  --color-secondary: #F2A365;
  --color-cta: #FDD85D;
  --color-text-primary: #E7E5E9;
  --color-text-secondary: #BDBBC2;
  --border: 1px solid rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 14px 36px rgba(0, 0, 0, 0.3);
}
@media (prefers-color-scheme: light) {
  :root {
    --color-bg: #F7F5F0;
    --color-surface: #FFFFFF;
    --color-primary: #E75F5D;
    --color-secondary: #F6A86E;
    --color-cta: #F5C85A;
    --color-cta-hover: #E4B14C;
    --color-text-primary: #333333;
    --color-text-secondary: #666666;
    --border: 1px solid #E6E4E2;
    --shadow: 0 8px 18px rgba(0,0,0,0.08);
    --shadow-sm: 0 4px 10px rgba(0,0,0,0.06);
  }
  body {
    background: linear-gradient(135deg, #FFF5E0 0%, #FEEBE3 100%);
  }
  .content { box-shadow: var(--shadow); }
  .lead { background: linear-gradient(135deg, #FFF5E0 0%, #FEEBE3 100%); }
  .lead::after { background: radial-gradient(50% 50% at 75% 10%, rgba(246,168,110,0.24), transparent 55%); }
  .stat-track { background: #F1E0D3; }
  .side-nav.bottom .progress-bar { background: #F1EDEA; border: 1px solid #E6E4E2; }
  .side-nav .progress-bar { background: #E6E4E2; border: 1px solid #E6E4E2; }
  .side-nav li .dot { background-color: var(--color-secondary); }
  .side-nav li.active .dot { background-color: var(--color-primary); }
  footer.content { background: var(--color-surface) !important; box-shadow: var(--shadow) !important; }
  .btn.primary:hover { background: var(--color-cta-hover); }
}
    * { box-sizing: border-box; }
    body {
      margin: 0;
      padding: 2.5rem 1rem 3.5rem;
      background: radial-gradient(900px 700px at 12% 5%, rgba(242, 163, 101, 0.12), transparent 52%),
        radial-gradient(800px 600px at 88% 8%, rgba(255, 110, 108, 0.12), transparent 55%),
        var(--color-bg);
      color: var(--color-text-primary);
      font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
      line-height: 1.6;
      scroll-behavior: smooth;
      background-attachment: fixed;
    }
    .content {
      width: min(1080px, calc(100% - 2.5rem));
      margin: 24px auto;
      padding: clamp(22px, 3vw, 38px) clamp(20px, 3vw, 46px);
      background: var(--color-surface);
      border-radius: var(--radius-lg);
      border: var(--border);
      box-shadow: var(--shadow);
      backdrop-filter: blur(8px);
    }
    @media (max-width: 900px) {
      body { padding: 1.5rem 0.65rem 3rem; }
      .content { width: min(100%, calc(100% - 0.5rem)); padding: 20px 16px; margin: 18px auto; }
    }
    h1, h2, h3 { font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif; letter-spacing: -0.02em; color: var(--color-text-primary); margin-top: 0; }
    h1 { font-size: clamp(32px, 4vw, 46px); line-height: 1.05; margin-bottom: 0.35rem; }
    h2 { font-size: clamp(30px, 3vw, 34px); margin-top: 3rem; margin-bottom: 1rem; color: var(--color-primary); }
    h3 { font-size: 1.4rem; margin-top: 2rem; margin-bottom: 0.6rem; color: var(--color-secondary); }
    .content h2:first-child { margin-top: 0.4rem; }
    p { color: var(--color-text-primary); line-height: 1.6; margin: 0.3rem 0 1rem; }
    a { color: var(--color-primary); text-decoration: none; }
    a:hover { color: #ff867f; }
    .muted { color: var(--color-text-secondary); }
    .center { text-align: center; }
    .subtitle { margin: 0.5rem 0 0.4rem; max-width: 900px; line-height: 1.6; color: var(--color-text-secondary); font-size: 1.06em; }
    .tagline { font-weight: 700; color: var(--color-primary); margin: 0.25rem 0 0.6rem; }

    /* Buttons / chips */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.75rem 1.2rem;
      min-height: 46px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.06);
      color: var(--color-text-primary);
      font-weight: 650;
      letter-spacing: -0.005em;
      box-shadow: var(--shadow-sm);
      transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    }
    .btn.primary { background: var(--color-cta); color: #121212; border-color: transparent; box-shadow: 0 14px 36px rgba(253, 216, 93, 0.35); }
    .btn.secondary { background: var(--color-primary); color: #121212; border-color: transparent; }
    .btn.ghost { background: rgba(255, 255, 255, 0.04); border-color: rgba(255,255,255,0.1); color: var(--color-text-secondary); }
    .btn.disabled { opacity: 0.55; pointer-events: none; }
    .btn:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(0,0,0,0.4); border-color: rgba(255,255,255,0.2); }
    .icon { width: 18px; height: 18px; color: currentColor; flex-shrink: 0; }
    .ms { font-family: 'Material Symbols Rounded'; font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24; font-size: 18px; line-height: 1; display: inline-flex; align-items: center; }

    .nav-row, .chip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.65rem; margin-top: 0.9rem; }
    .chip-row { gap: 0.45rem; }
    .chip {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      padding: 0.45rem 0.9rem;
      min-height: 38px;
      border-radius: 999px;
      background: rgba(255,255,255,0.06);
      color: var(--color-text-primary);
      font-weight: 600;
      font-size: 0.95em;
      border: 1px solid rgba(255,255,255,0.08);
      transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
    }
    .chip:hover { transform: translateY(-1px); background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.18); }
    .chip.active { background: rgba(255, 110, 108, 0.2); border-color: rgba(255, 110, 108, 0.6); color: #fff2f1; box-shadow: 0 10px 26px rgba(255, 110, 108, 0.25); }

    /* Tabs */
    .tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0 4px; }
    .tab {
      padding: 0.5rem 0.9rem;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,0.14);
      background: rgba(255,255,255,0.06);
      color: var(--color-text-primary);
      font-weight: 650;
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    }
    .tab.active { background: var(--color-primary); color: #121212; border-color: transparent; }
    .tab-panels { margin-top: 8px; }
    .tab-panel { display: none; }
    .tab-panel.active { display: block; }

    /* Hero */
    .lead {
      position: relative;
      overflow: hidden;
      padding: clamp(18px, 4vw, 32px);
      background: linear-gradient(135deg, rgba(255, 110, 108, 0.12), rgba(242, 163, 101, 0.12));
      border-radius: var(--radius-lg);
      border: 1px solid rgba(255,255,255,0.08);
      box-shadow: var(--shadow);
      display: flex;
      flex-direction: column;
      gap: clamp(14px, 2.1vw, 20px);
    }
    .lead::after {
      content: '';
      position: absolute;
      inset: -30%;
      background: radial-gradient(50% 50% at 75% 10%, rgba(253, 216, 93, 0.18), transparent 55%);
      pointer-events: none;
      mix-blend-mode: screen;
    }
    .lead-head {
      position: relative;
      z-index: 2;
      display: flex;
      flex-direction: column;
      gap: 4px;
      width: 100%;
      padding: clamp(12px, 2vw, 16px) clamp(14px, 2.6vw, 18px);
      background: radial-gradient(circle at 20% 20%, rgba(255,110,108,0.18), rgba(15,15,20,0.42));
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: var(--radius-lg);
      backdrop-filter: blur(8px);
      box-shadow: var(--shadow-sm);
    }
    .lead-head .eyebrow { color: var(--color-secondary); font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.82rem; }
    .lead-head h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); }
    .lead-head .tagline { margin: 0; color: var(--color-text-secondary); font-weight: 600; }
    .lead-figure {
      margin: 0;
      height: 100%;
      display: flex;
      align-items: stretch;
      border-radius: var(--radius-lg);
      border: 1px solid rgba(255,255,255,0.06);
      background: rgba(255,255,255,0.02);
      overflow: hidden;
    }
    .lead-figure img,
    .lead-figure video {
      width: 100%;
      height: 100%;
      border-radius: 0;
      border: none;
      box-shadow: var(--shadow);
      background: #050910;
      object-fit: cover;
      min-height: clamp(260px, 32vw, 420px);
    }
    .lead-approach img { object-fit: contain; padding: clamp(6px, 1vw, 12px); background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(12,16,26,0.45)); }
    .lead-bottom {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: minmax(320px, 1.15fr) minmax(260px, 0.85fr);
      gap: clamp(14px, 2vw, 22px);
      align-items: stretch;
    }
    .lead-cards {
      display: grid;
      gap: 12px;
      grid-template-rows: repeat(3, minmax(0, 1fr));
    }
    .nav-row.compact { justify-content: center; gap: 0.55rem; flex-wrap: wrap; margin-top: clamp(6px, 1.6vw, 14px); position: relative; z-index: 1; }

    @media (max-width: 640px) {
      .lead-head { text-align: center; align-items: center; }
    }
    @media (max-width: 980px) {
      .lead-bottom { grid-template-columns: 1fr; }
      .lead-cards { grid-template-rows: none; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
    }

    /* Grids & cards */
    .section-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; margin-bottom: 64px; }
    .grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 1.1rem; }
    .glance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 1rem; }
    .glance-grid .card { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; }
    .glance-grid .card h3 { margin-bottom: 6px; }
    .glance-grid .card a.chip { margin-top: auto; align-self: flex-start; }
    .card {
      border: var(--border);
      border-radius: var(--radius);
      padding: 16px 18px;
      background: var(--color-surface);
      box-shadow: var(--shadow-sm);
    }
    .card h3 { margin: 0 0 6px; font-size: 1.15em; font-weight: 650; color: var(--color-text-primary); }
    .card p { margin: 0; color: var(--color-text-secondary); text-align: left; line-height: 1.6; font-size: 0.98em; }
    .badge { display: inline-flex; align-items: center; gap: 6px; padding: 0.25rem 0.65rem; border-radius: 999px; background: rgba(242, 163, 101, 0.18); color: var(--color-text-primary); font-weight: 700; font-size: 0.85em; }
    .list-tight { margin: 0.4rem 0 0; padding-left: 0; color: var(--color-text-secondary); list-style: none; }
    .list-tight li { margin: 0.4rem 0; position: relative; padding-left: 1.3rem; line-height: 1.6; }
    .list-tight li::before { content: '•'; position: absolute; left: 0; color: var(--color-secondary); }

    .figure-small { max-width: 460px; margin: 18px auto 0; }
    figure { margin: 18px auto 0; max-width: 980px; padding: 0 8px; }
    figure img { width: 100%; border-radius: var(--radius-lg); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 18px 40px rgba(5, 9, 24, 0.35); background: #050910; }
    figcaption, .caption { margin-top: 8px; text-align: center; color: var(--color-text-secondary); font-size: 0.9rem; font-style: italic; line-height: 1.45; }
    .callout {
      padding: 16px 18px;
      margin-top: 16px;
      box-shadow: var(--shadow-sm);
      border: var(--border);
      border-radius: var(--radius);
      background: rgba(255,255,255,0.04);
    }
    .section-lead { text-align: center; max-width: 920px; margin: 0 auto 14px; line-height: 1.6; color: var(--color-text-secondary); }
    .section-lead.left { text-align: left; margin-left: 0; margin-right: 0; }

    /* Video grid */
    .video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 12px; }
    .video-card { text-align: center; background: var(--color-surface); border: var(--border); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center; gap: 10px; height: 100%; }
    .video-shell { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; }
    .video-card video { max-width: 100%; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4); background: #050910; }
    .video-caption { text-align: center; font-size: 0.95em; color: var(--color-text-secondary); margin-top: auto; margin-bottom: 0; line-height: 1.45; }

    /* Stats bars */
    .stat-bars { display: grid; gap: 10px; margin: 10px 0 16px; }
    .stat-bar { display: flex; flex-direction: column; gap: 6px; }
    .stat-label { font-weight: 650; color: var(--color-text-primary); display: flex; align-items: center; gap: 6px; }
    .stat-label .delta { color: var(--accent-warm); font-weight: 700; }
    .stat-track { width: 100%; height: 10px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; }
    .stat-track span { display: block; height: 100%; background: linear-gradient(90deg, var(--color-primary), var(--color-secondary)); box-shadow: 0 8px 18px rgba(255,110,108,0.28); }

    /* BibTeX */
    .bibtex-wrap { max-width: 920px; margin: 0 auto; border: var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); background: rgba(255,255,255,0.02); }
    .bibtex-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: rgba(255, 255, 255, 0.05); border-bottom: var(--border); color: var(--color-text-secondary); font-size: 0.95em; }
    .bibtex-toolbar button { appearance: none; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255,255,255,0.06); padding: 8px 10px; border-radius: 999px; cursor: pointer; font-weight: 650; color: var(--color-text-primary); transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease; }
    .bibtex-toolbar button:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.3); box-shadow: 0 10px 18px rgba(0,0,0,0.35); }
    pre { margin: 0; padding: 14px 16px; background: #050910; color: #e6edf7; overflow-x: auto; font-size: 0.95em; line-height: 1.55; }

    /* Dividers & misc */
    .divider_horizontal { border-top: 2px dashed rgba(255, 255, 255, 0.2); display: block; width: 100%; margin: 10px 0; }
    details summary { cursor: pointer; font-weight: 700; color: #dff7ff; list-style: none; }
    details summary::-webkit-details-marker { display: none !important; }
    details summary::marker { content: ""; }
    details summary::before { content: '▸'; display: inline-block; margin-right: 8px; transition: transform 0.2s ease; }
    details[open] summary::before { transform: rotate(90deg); }

    /* Sticky anchors & progress */
    #back-to-top { position: fixed; bottom: 18px; right: 18px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.08); color: #eaf5ff; display: grid; place-items: center; box-shadow: var(--shadow-sm); cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; z-index: 1101; }
    #back-to-top.visible { opacity: 1; pointer-events: auto; }
    #back-to-top:hover { transform: translateY(-2px); }

    /* Side navigation */
    .side-nav {
      position: fixed;
      top: 50%;
      left: auto;
      transform: translateY(-50%);
      width: 150px;
      z-index: 1100;
      display: flex;
      flex-direction: row;
      align-items: flex-start;
      gap: 10px;
      pointer-events: auto;
      background: transparent;
      border: none;
      padding: 0;
      box-shadow: none;
      backdrop-filter: none;
    }
    .side-nav.vertical { top: 50%; bottom: auto; transform: translateY(-50%); width: 150px; flex-direction: row; align-items: flex-start; }
    .side-nav.bottom {
      top: auto;
      bottom: 14px;
      transform: translateX(-50%);
      left: 50%;
      width: min(92vw, 540px);
      flex-direction: column;
      align-items: stretch;
      gap: 12px;
      padding: 12px 14px;
      background: rgba(0,0,0,0.5);
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 16px;
      box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    }
    .side-nav ul { list-style: none; padding: 0; margin: 0; width: auto; order: 2; }
    .side-nav li {
      cursor: pointer;
      margin: 8px 0;
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 8px;
      color: var(--color-text-secondary);
      font-size: 14px;
      transition: color 0.2s ease;
      pointer-events: auto;
    }
    .side-nav li.active { color: var(--color-primary); }
    .side-nav li .dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background-color: var(--color-secondary);
      transition: background-color 0.3s;
      flex-shrink: 0;
    }
    .side-nav li.active .dot { background-color: var(--color-primary); }
    .side-nav .label {
      opacity: 0;
      transform: translateX(8px);
      transition: opacity 0.3s, transform 0.3s;
      white-space: nowrap;
    }
    .side-nav li:hover .label,
    .side-nav li.active .label { opacity: 1; transform: translateX(0); }
    .side-nav .progress-bar {
      width: 6px;
      background-color: rgba(255,255,255,0.12);
      position: relative;
      border-radius: 3px;
      overflow: hidden;
      align-self: stretch;
      min-height: 140px;
      order: 1;
      pointer-events: none;
    }
    .side-nav .progress {
      width: 100%;
      background-color: var(--color-primary);
      height: 0;
      max-height: 100%;
      border-radius: 3px;
      transition: height 0.15s ease;
    }
    /* Bottom (fallback) layout */
    .side-nav.bottom { flex-direction: column; align-items: stretch; justify-content: center; width: min(92vw, 480px); gap: 10px; padding: 10px 12px; }
    .side-nav.bottom ul { display: none; }
    .side-nav.bottom .progress-bar {
      order: 1;
      width: 100%;
      height: 6px;
      min-height: 6px;
      border-radius: 3px;
    }
    .side-nav.bottom .progress { height: 100%; width: 0; transition: width 0.15s ease, height 0.15s ease; }
    /* Footer */
    .footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 14px; }
    .footer-links { list-style: none; padding: 0; margin: 0.2rem 0 0; }
    .footer-links li { margin: 0.3rem 0; }
    .footer-links a { color: var(--color-primary); font-weight: 600; }
    .footer-links a:hover { color: var(--color-secondary); }
    .footer-meta { color: var(--color-text-secondary); font-size: 0.95em; line-height: 1.6; }
    .footer-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
    .footer-chip { padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,0.06); color: var(--color-text-secondary); font-size: 0.9em; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,0.1); }
    footer.content { border-top: 1px solid rgba(255,255,255,0.12); background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.15)); padding: 20px 22px; }
    footer.content h2 { margin-bottom: 10px; }
    footer.content .eyebrow { margin-bottom: 6px; display: block; }

    /* Inline helpers */
    .pill-icon { width: 16px; height: 16px; }
    .eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8em; color: var(--color-secondary); font-weight: 700; }
  
