 /* ======== DESIGN TOKENS ======== */
    :root {
      --bg: #0a0a0f;
      --surface: #111118;
      --surface2: #17171f;
      --border: rgba(255, 255, 255, 0.07);
      --border-accent: rgba(108, 99, 255, 0.35);

      --primary: #6c63ff;
      --primary-bright: #8b83ff;
      --accent: #ff6b6b;
      --accent2: #00d2c8;
      --gold: #ffd166;

      --text: #f0f0fa;
      --text-muted: #888899;
      --text-dim: #4a4a5a;

      --radius: 16px;
      --radius-sm: 8px;
      --radius-lg: 24px;

      --font-display: 'Google Sans', 'Noto Sans', sans-serif;
      --font-body: 'Google Sans', 'Noto Sans', sans-serif;
      --font-mono: 'DM Mono', monospace;

      --glow: 0 0 40px rgba(108, 99, 255, 0.2);
      --glow-sm: 0 0 20px rgba(108, 99, 255, 0.15);
      --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }

    /* Light mode */
    html.light {
      --bg: #f4f4fa;
      --surface: #ffffff;
      --surface2: #eeeef8;
      --border: rgba(0, 0, 0, 0.08);
      --border-accent: rgba(108, 99, 255, 0.25);
      --text: #0f0f1a;
      --text-muted: #5a5a75;
      --text-dim: #aaaabc;
      --glow: 0 0 40px rgba(108, 99, 255, 0.1);
      --shadow: 0 20px 60px rgba(108, 99, 255, 0.1);
    }

    /* ======== RESET ======== */
    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html {
      font-size: clamp(15px, 1.1vw, 20px);
      /* 15px at 1366px → 20px at 1800px+ */
      scroll-behavior: smooth;
    }

    body {
      font-family: var(--font-body);
      background: var(--bg);
      color: var(--text);
      line-height: 1.6;
      transition: background 0.4s, color 0.4s;
      overflow-x: hidden;
    }

    /* ======== NOISE TEXTURE OVERLAY ======== */
    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
      pointer-events: none;
      z-index: 0;
      opacity: 0.4;
    }

    /* ======== SCROLLBAR ======== */
    ::-webkit-scrollbar {
      width: 6px;
    }

    ::-webkit-scrollbar-track {
      background: var(--bg);
    }

    ::-webkit-scrollbar-thumb {
      background: var(--primary);
      border-radius: 3px;
    }

    /* ======== STICKY NAV ======== */
    .nav {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 100;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 clamp(1.5rem, 4vw, 5rem);
      height: clamp(60px, 5vw, 80px);
      background: rgba(10, 10, 15, 0.85);
      backdrop-filter: blur(20px) saturate(180%);
      border-bottom: 1px solid var(--border);
      transition: background 0.4s;
    }

    html.light .nav {
      background: rgba(244, 244, 250, 0.85);
    }

    .nav-logo {
      font-family: var(--font-display);
      font-weight: 800;
      font-size: 1.2rem;
      background: linear-gradient(135deg, var(--primary-bright), var(--accent2));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      letter-spacing: -0.02em;
    }

    .nav-links {
      display: flex;
      gap: 0.25rem;
      list-style: none;
    }

    .nav-links a {
      font-size: 0.85rem;
      font-weight: 500;
      color: var(--text-muted);
      text-decoration: none;
      padding: 0.4rem 0.8rem;
      border-radius: 999px;
      transition: color 0.2s, background 0.2s;
    }

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

    .nav-right {
      display: flex;
      gap: 0.75rem;
      align-items: center;
    }

    /* ======== THEME TOGGLE ======== */
    .theme-btn {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      border: 1px solid var(--border-accent);
      background: var(--surface2);
      color: var(--text-muted);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.9rem;
      transition: all 0.3s;
    }

    .theme-btn:hover {
      color: var(--primary-bright);
      border-color: var(--primary);
      transform: scale(1.05);
    }

    /* ======== SECTIONS & LAYOUT ======== */
    section {
      position: relative;
      z-index: 1;
    }

    .container {
      width: 92vw;
      max-width: 2200px;
      /* uncaps for 4K */
      margin: 0 auto;
      padding: 0 clamp(1.5rem, 3vw, 4rem);
    }

    .section-pad {
      padding: clamp(4rem, 7vw, 9rem) 0;
    }

    .section-label {
      font-family: var(--font-mono);
      font-size: 0.72rem;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: var(--primary-bright);
      margin-bottom: 0.75rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .section-label::before {
      content: '';
      width: 20px;
      height: 1px;
      background: var(--primary-bright);
    }

    .section-title {
      font-family: var(--font-display);
      font-size: clamp(1.8rem, 3.5vw, 2.6rem);
      font-weight: 700;
      line-height: 1.15;
      letter-spacing: -0.03em;
      color: var(--text);
      margin-bottom: 1.25rem;
    }

    .section-subtitle {
      font-size: 1.05rem;
      color: var(--text-muted);
      /* max-width: 840px; */
      line-height: 1.7;
      text-align: justify;
    }

    /* ======== HERO ======== */
    .hero {
      min-height: 100svh;
      /* svh = real viewport on mobile browsers */
      min-height: 100vh;
      /* fallback */
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 4rem 2rem 5rem;
      position: relative;
      overflow: hidden;
    }

    /* Animated gradient orbs */
    .hero-orb {
      position: absolute;
      border-radius: 50%;
      filter: blur(80px);
      pointer-events: none;
      animation: orb-float 8s ease-in-out infinite;
    }

    .hero-orb-1 {
      width: clamp(300px, 40vw, 700px);
      height: clamp(300px, 40vw, 700px);
      background: radial-gradient(circle, rgba(108, 99, 255, 0.18) 0%, transparent 70%);
      top: -100px;
      left: -100px;
      animation-delay: 0s;
    }

    .hero-orb-2 {
      width: clamp(250px, 32vw, 560px);
      height: clamp(250px, 32vw, 560px);
      background: radial-gradient(circle, rgba(0, 210, 200, 0.12) 0%, transparent 70%);
      bottom: 0;
      right: -50px;
      animation-delay: -3s;
    }

    .hero-orb-3 {
      width: clamp(200px, 24vw, 420px);
      height: clamp(200px, 24vw, 420px);
      background: radial-gradient(circle, rgba(255, 107, 107, 0.1) 0%, transparent 70%);
      top: 40%;
      left: 60%;
      animation-delay: -5s;
    }

    @keyframes orb-float {

      0%,
      100% {
        transform: translate(0, 0) scale(1);
      }

      33% {
        transform: translate(30px, -20px) scale(1.05);
      }

      66% {
        transform: translate(-20px, 30px) scale(0.95);
      }
    }

    /* Grid overlay */
    .hero::after {
      content: '';
      position: absolute;
      inset: 0;
      background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
      background-size: 60px 60px;
      mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
      pointer-events: none;
      opacity: 0.5;
    }

    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      background: var(--surface2);
      border: 1px solid var(--border-accent);
      border-radius: 999px;
      padding: 0.35rem 1rem;
      font-size: 0.78rem;
      font-family: var(--font-mono);
      color: var(--primary-bright);
      letter-spacing: 0.05em;
      margin-bottom: 2rem;
      animation: fade-up 0.6s ease both;
    }

    .hero-badge span.dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--accent2);
      animation: pulse 2s ease-in-out infinite;
    }

    @keyframes pulse {

      0%,
      100% {
        opacity: 1;
      }

      50% {
        opacity: 0.3;
      }
    }

    .hero-title {
      font-family: var(--font-display);
      font-size: clamp(2.5rem, 6vw, 5rem);
      font-weight: 800;
      letter-spacing: -0.04em;
      line-height: 1.05;
      margin-bottom: 1.5rem;
      animation: fade-up 0.6s 0.1s ease both;
    }

    .hero-title-line1 {
      background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .hero-title-line2 {
      background: linear-gradient(135deg, var(--primary-bright) 0%, var(--accent2) 50%, var(--accent) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .hero-desc {
      font-size: clamp(1rem, 1.5vw, 1.15rem);
      color: var(--text-muted);
      max-width: 580px;
      margin: 0 auto 2.5rem;
      line-height: 1.75;
      animation: fade-up 0.6s 0.2s ease both;
    }

    .hero-actions {
      display: flex;
      gap: 0.75rem;
      justify-content: center;
      flex-wrap: wrap;
      margin-bottom: 3rem;
      animation: fade-up 0.6s 0.3s ease both;
    }

    @keyframes fade-up {
      from {
        opacity: 0;
        transform: translateY(20px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* ======== BUTTONS ======== */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.6rem 1.4rem;
      border-radius: 999px;
      font-family: var(--font-body);
      font-size: 0.875rem;
      font-weight: 500;
      text-decoration: none;
      cursor: pointer;
      border: none;
      transition: all 0.25s;
      white-space: nowrap;
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--primary), #5250e0);
      color: #fff;
      box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4);
    }

    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 30px rgba(108, 99, 255, 0.5);
      filter: brightness(1.1);
    }

    .btn-outline {
      background: transparent;
      color: var(--text-muted);
      border: 1px solid var(--border);
    }

    .btn-outline:hover {
      color: var(--text);
      border-color: var(--primary);
      background: rgba(108, 99, 255, 0.06);
      transform: translateY(-2px);
    }

    .btn-ghost {
      background: var(--surface2);
      color: var(--text-muted);
      border: 1px solid var(--border);
    }

    .btn-ghost:hover {
      color: var(--text);
      background: var(--surface);
      transform: translateY(-2px);
    }

    .btn-sm {
      padding: 0.4rem 1rem;
      font-size: 0.8rem;
    }


    /* ======== PAPER-STYLE HERO HEADER ======== */
    .hero-paper-title {
      font-family: var(--font-display);
      font-size: clamp(1.8rem, 4vw, 3.2rem);
      font-weight: 400;
      letter-spacing: -0.01em;
      line-height: 1.2;
      color: #3c3c3c;
      text-align: center;
      margin-bottom: 1.5rem;
      max-width: 1000px;
    }

    html.light .hero-paper-title {
      color: #3c3c3c;
    }

    html:not(.light) .hero-paper-title {
      color: #e8e8e8;
      font-weight: 400;
    }

    .hero-authors {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.4rem;
      margin-bottom: 1rem;
    }

    .hero-authors-row {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 0.2rem 1.4rem;
    }

    .hero-author-link {
      font-size: 1.2rem;
      color: #4a90e2;
      text-decoration: none;
      font-weight: 400;
      transition: color 0.2s;
    }

    .hero-author-link:hover {
      color: var(--primary-bright);
      text-decoration: underline;
    }

    .hero-author-link sup {
      font-size: 0.65rem;
      opacity: 0.85;
    }

    .hero-institutions {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 0.5rem 2rem;
      margin-bottom: 0.6rem;
      font-size: 0.99rem;
      color: var(--text-muted);
    }

    .hero-institutions span sup {
      font-size: 0.65rem;
    }

    .hero-note {
      font-size: 0.88rem;
      color: var(--text-muted);
      margin-bottom: 1.75rem;
      text-align: center;
    }

    /* ======== HERO GLASS BUTTONS ======== */

    /* Shared glass base */
    .hero-btn-arxiv,
    .hero-btn-paper,
    .hero-btn-code,
    .hero-btn-dataset {
      position: relative;
      overflow: hidden;
      color: #fff;
      font-weight: 600;
      letter-spacing: 0.02em;
      border: 1px solid rgba(255, 255, 255, 0.18);
      backdrop-filter: blur(16px) saturate(180%);
      -webkit-backdrop-filter: blur(16px) saturate(180%);
      box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
      transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    }

    /* Shimmer sweep on hover */
    .hero-btn-arxiv::before,
    .hero-btn-paper::before,
    .hero-btn-code::before,
    .hero-btn-dataset::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(105deg,
          transparent 40%,
          rgba(255, 255, 255, 0.18) 50%,
          transparent 60%);
      transform: translateX(-100%);
      transition: transform 0.5s ease;
      pointer-events: none;
    }

    .hero-btn-arxiv:hover::before,
    .hero-btn-paper:hover::before,
    .hero-btn-code:hover::before,
    .hero-btn-dataset:hover::before {
      transform: translateX(100%);
    }

    /* Individual tinted glass backgrounds — palette-matched */
    .hero-btn-arxiv {
      background: linear-gradient(135deg,
          rgba(108, 99, 255, 0.35) 0%,
          rgba(80, 72, 200, 0.25) 100%);
      border-color: rgba(139, 131, 255, 0.35);
    }

    .hero-btn-paper {
      background: linear-gradient(135deg,
          rgba(0, 210, 200, 0.28) 0%,
          rgba(0, 160, 155, 0.20) 100%);
      border-color: rgba(0, 210, 200, 0.35);
    }

    .hero-btn-code {
      background: linear-gradient(135deg,
          rgba(139, 131, 255, 0.30) 0%,
          rgba(108, 99, 255, 0.20) 100%);
      border-color: rgba(139, 131, 255, 0.32);
    }

    .hero-btn-dataset {
      background: linear-gradient(135deg,
          rgba(255, 107, 107, 0.28) 0%,
          rgba(220, 80, 80, 0.18) 100%);
      border-color: rgba(255, 107, 107, 0.32);
    }

    /* Hover states */
    .hero-btn-arxiv:hover {
      transform: translateY(-3px);
      box-shadow:
        0 8px 32px rgba(108, 99, 255, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
      border-color: rgba(139, 131, 255, 0.6);
      background: linear-gradient(135deg,
          rgba(108, 99, 255, 0.50) 0%,
          rgba(80, 72, 200, 0.38) 100%);
    }

    .hero-btn-paper:hover {
      transform: translateY(-3px);
      box-shadow:
        0 8px 32px rgba(0, 210, 200, 0.40),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
      border-color: rgba(0, 210, 200, 0.60);
      background: linear-gradient(135deg,
          rgba(0, 210, 200, 0.42) 0%,
          rgba(0, 160, 155, 0.32) 100%);
    }

    .hero-btn-code:hover {
      transform: translateY(-3px);
      box-shadow:
        0 8px 32px rgba(139, 131, 255, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
      border-color: rgba(139, 131, 255, 0.58);
      background: linear-gradient(135deg,
          rgba(139, 131, 255, 0.45) 0%,
          rgba(108, 99, 255, 0.32) 100%);
    }

    .hero-btn-dataset:hover {
      transform: translateY(-3px);
      box-shadow:
        0 8px 32px rgba(255, 107, 107, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
      border-color: rgba(255, 107, 107, 0.58);
      background: linear-gradient(135deg,
          rgba(255, 107, 107, 0.42) 0%,
          rgba(220, 80, 80, 0.30) 100%);
    }

    /* "Coming soon" — keep glass but muted & no shimmer */
    .btn-coming {
      pointer-events: none;
    cursor: not-allowed;
    filter: saturate(0.7);
    opacity: 0.52;
    }

    .btn-coming::before {
      display: none;
    }

    .btn-coming:hover {
      transform: none;
      box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    }

    /* ---- Light mode glass adjustments ---- */
    html.light .hero-btn-arxiv,
    html.light .hero-btn-paper,
    html.light .hero-btn-code,
    html.light .hero-btn-dataset {
      color: #fff;
      border-color: rgba(255, 255, 255, 0.45);
      box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.06);
    }

    html.light .hero-btn-arxiv {
      background: linear-gradient(135deg, rgba(72, 63, 210, 0.96), rgba(55, 48, 175, 0.92));
    }

    html.light .hero-btn-paper {
      background: linear-gradient(135deg, rgba(0, 135, 130, 0.96), rgba(0, 100, 96, 0.92));
    }

    html.light .hero-btn-code {
      background: linear-gradient(135deg, rgba(88, 78, 210, 0.96), rgba(68, 58, 185, 0.92));
    }

    html.light .hero-btn-dataset {
      background: linear-gradient(135deg, rgba(190, 45, 45, 0.96), rgba(155, 30, 30, 0.92));
    }

    /* ======== HERO TEASER IMAGE ======== */
    .hero-teaser {
      position: relative;
      max-width: 900px;
      margin: 0 auto;
      animation: fade-up 0.6s 0.4s ease both;
    }

    .hero-teaser img {
      width: 100%;
      /* border-radius: var(--radius-lg); */
      /* border: 1px solid var(--border-accent); */
      /* box-shadow: var(--shadow); */
    }

    .teaser-glow {
      position: absolute;
      inset: -20px;
      background: radial-gradient(ellipse at center, rgba(108, 99, 255, 0.15), transparent 70%);
      border-radius: inherit;
      pointer-events: none;
    }

    /* ======== AUTHORS ======== */
    .authors-section {
      background: var(--surface);
      border-top: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
      padding: 3rem 0;
    }

    .authors-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 0.6rem;
      justify-content: center;
      margin-bottom: 1.5rem;
    }

    .author-chip {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 999px;
      padding: 0.35rem 0.9rem;
      font-size: 0.85rem;
      color: var(--text-muted);
      transition: all 0.2s;
      text-decoration: none;
    }

    .author-chip:hover {
      color: var(--text);
      border-color: var(--primary);
      background: rgba(108, 99, 255, 0.08);
      transform: translateY(-2px);
    }

    .author-chip sup {
      font-size: 0.65rem;
      color: var(--primary-bright);
      font-family: var(--font-mono);
    }

    .institutions {
      display: flex;
      flex-wrap: wrap;
      gap: 1.5rem;
      justify-content: center;
      align-items: center;
    }

    .institution-tag {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.82rem;
      color: var(--text-muted);
    }

    .institution-tag sup {
      font-size: 0.65rem;
      color: var(--primary-bright);
      font-family: var(--font-mono);
    }

    /* ======== CARDS ======== */
    .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1.75rem;
      transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    }

    .card:hover {
      border-color: var(--border-accent);
      transform: translateY(-4px);
      box-shadow: var(--glow-sm);
    }

    /* ======== CONTRIBUTIONS ======== */
    .contrib-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(clamp(240px, 22vw, 320px), 1fr));
      gap: 1rem;
      margin-top: 2rem;
    }

    .contrib-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1.5rem;
      transition: all 0.3s;
      position: relative;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      text-decoration: none;
      cursor: pointer;
      padding-bottom: 3rem;
      /* make room for arrow */
    }

    .contrib-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, var(--primary), var(--accent2));
      transform: scaleX(0);
      transform-origin: left;
      transition: transform 0.3s;
    }

    .contrib-card:hover::before {
      transform: scaleX(1);
    }

    .contrib-card:hover {
      border-color: var(--border-accent);
      transform: translateY(-4px);
      box-shadow: var(--glow-sm);
    }

    .contrib-arrow {
      position: absolute;
      bottom: 1.25rem;
      right: 1.25rem;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--primary), var(--accent2));
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      opacity: 1;
      transform: translateX(-4px);
      /* Rotate 90 degrees */
      /* transform: rotate(90deg); */
      transition: opacity 0.25s, transform 0.25s;
    }

    .contrib-card:hover .contrib-arrow {
      /* opacity: 1; */
      transform: translateX(0);
      transform: rotate(90deg);
    }

    .contrib-icon {
      display: none;
    }


    .contrib-title {
      font-family: var(--font-display);
      font-size: 1rem;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 0.75rem;
      text-align: center;
      width: 100%;
    }

    .contrib-desc {
      font-size: 0.88rem;
      color: var(--text-muted);
      line-height: 1.65;
      text-align: justify;
      hyphens: auto;
      -webkit-hyphens: auto;
      -ms-hyphens: auto;
      overflow-wrap: break-word;
      word-break: break-word;
    }

    /* ======== PIPELINE ======== */
    .pipeline-img {
      width: 100%;
      /* border-radius: var(--radius);
      border: 1px solid var(--border); */
      margin-top: 2rem;
      /* box-shadow: var(--shadow); */
    }

    /* ======== ANNOTATION SLIDER ======== */
    .slider-shell {
      margin-top: 2rem;
      position: relative;
    }

    .slider-track {
      overflow: hidden;
      border-radius: var(--radius);
      border: 1px solid var(--border);
      background: var(--surface);
    }

    .slider-items {
      display: flex;
      transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .slider-item {
      min-width: 100%;
      padding: 1.5rem;
    }

    .slider-item iframe {
      width: 100%;
      height: 380px;
      border: none;
      border-radius: var(--radius-sm);
      background: var(--surface2);
    }

    .slider-caption {
      font-family: 'Caveat', cursive;
      font-size: 1.3rem;
      color: var(--text-muted);
      text-align: center;
      margin-top: 1rem;
      line-height: 1.4;
      padding: 0 1rem;
    }

    .slide-label {
      font-family: var(--font-display);
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--primary-bright);
      margin-bottom: 0.75rem;
      text-align: center;
    }

    .slider-controls {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 1rem;
      margin-top: 1.25rem;
    }

    .slider-arrow {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: 1px solid var(--border-accent);
      background: var(--surface);
      color: var(--text-muted);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.9rem;
      transition: all 0.2s;
    }

    .slider-arrow:hover {
      background: var(--primary);
      color: #fff;
      border-color: var(--primary);
      transform: scale(1.05);
    }

    .slider-dots {
      display: flex;
      gap: 6px;
      align-items: center;
    }

    .slider-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--text-dim);
      cursor: pointer;
      transition: all 0.2s;
      border: none;
      padding: 0;
    }

    .slider-dot.active {
      width: 20px;
      border-radius: 3px;
      background: var(--primary);
    }

    /* ======== 3D VIEWER GRID ======== */
    .viewer-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(clamp(220px, 20vw, 340px), 1fr));
      gap: 1rem;
      margin-top: 2rem;
    }

    .viewer-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1.25rem;
      transition: all 0.3s;
      position: relative;
    }

    .viewer-card:hover {
      border-color: var(--border-accent);
      box-shadow: var(--glow-sm);
    }

    .viewer-card model-viewer {
      width: 100%;
      height: 220px;
      border-radius: var(--radius-sm);
      background: var(--surface2);
    }

    .viewer-caption {
      font-family: 'Caveat', cursive;
      font-size: 1.1rem;
      color: var(--text-muted);
      margin-top: 0.75rem;
      text-align: center;
      line-height: 1.4;
    }

    .glb-badge {
      position: absolute;
      top: 1rem;
      right: 1rem;
      background: var(--primary);
      color: #fff;
      font-size: 0.65rem;
      font-family: var(--font-mono);
      padding: 0.2rem 0.5rem;
      border-radius: 4px;
      letter-spacing: 0.05em;
    }

    /* Viewer page nav */
    .viewer-nav {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 1rem;
      margin-top: 1.5rem;
    }

    /* ======== QUANTITATIVE — TABS ======== */
    .tabs-bar {
      display: flex;
      gap: 0.35rem;
      background: var(--surface2);
      border-radius: 999px;
      padding: 0.25rem;
      width: fit-content;
      margin: 0 auto 2rem;
      border: 1px solid var(--border);
      flex-wrap: wrap;
      justify-content: center;
    }

    .tab-btn {
      padding: 0.5rem 1.1rem;
      border-radius: 999px;
      border: none;
      background: transparent;
      color: var(--text-muted);
      font-family: var(--font-body);
      font-size: 0.82rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
      white-space: nowrap;
    }

    .tab-btn.active {
      background: var(--primary);
      color: #fff;
      box-shadow: 0 2px 12px rgba(108, 99, 255, 0.4);
    }

    .tab-btn:hover:not(.active) {
      color: var(--text);
      background: var(--surface);
    }

    .tab-panel {
      display: none;
    }

    .tab-panel.active {
      display: block;
    }

    .chart-wrap {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1.5rem;
      max-width: min(700px, 100%);
      margin: 0 auto;
    }

    /* ======== STATS ======== */
    .stats-row {
      display: flex;
      gap: 1px;
      background: var(--border);
      border-radius: var(--radius);
      overflow: hidden;
      margin-top: 2.5rem;
      border: 1px solid var(--border);
      max-width: 100%;
    }

    .stat-item {
      flex: 1;
      min-width: 0;
      /* prevents overflow on narrow viewports */
      background: var(--surface);
      padding: clamp(1.25rem, 2.5vw, 2.5rem) clamp(1rem, 2vw, 2rem);
      text-align: center;
      transition: background 0.2s;
    }

    .stat-item:hover {
      background: var(--surface2);
    }

    .stat-value {
      font-family: var(--font-display);
      font-size: 2.2rem;
      font-weight: 700;
      letter-spacing: -0.03em;
      background: linear-gradient(135deg, var(--primary-bright), var(--accent2));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    /* Light mode: softer, warmer gradient for stat values */
    html.light .stat-value {
      background: linear-gradient(135deg, #7c3aed 0%, #2563eb 50%, #0891b2 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .stat-label {
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--text);
      margin-top: 0.3rem;
    }

    .stat-sub {
      font-size: 0.75rem;
      color: var(--text-muted);
      margin-top: 0.2rem;
      line-height: 1.4;
    }

    html.light .stat-item {
      background: #ffffff;
    }

    html.light .stat-item:hover {
      background: #f0f0fa;
    }

    html.light .stats-row {
      background: rgba(79, 70, 229, 0.08);
      border-color: rgba(79, 70, 229, 0.12);
    }

    html.light .stat-label {
      color: #1e1b4b;
    }

    html.light .stat-sub {
      color: #6b7280;
    }

    /* ======== BIBTEX ======== */
    .bibtex-box {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1.5rem;
      position: relative;
      margin-top: 1.5rem;
    }

    .bibtex-code {
      font-family: var(--font-mono);
      font-size: 0.82rem;
      color: var(--text-muted);
      white-space: pre-wrap;
      word-break: break-word;
      line-height: 1.7;
    }

    .bibtex-code .k {
      color: var(--primary-bright);
    }

    .bibtex-code .v {
      color: rgb(197, 103, 231);
    }

    .bibtex-code .s {
      color: rgb(173, 133, 32);
    }

    .copy-btn {
      position: absolute;
      top: 1rem;
      right: 1rem;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      color: var(--text-muted);
      font-size: 0.78rem;
      padding: 0.4rem 0.75rem;
      cursor: pointer;
      font-family: var(--font-mono);
      display: flex;
      align-items: center;
      gap: 0.3rem;
      transition: all 0.2s;
    }

    .copy-btn:hover {
      color: var(--text);
      border-color: var(--primary);
    }

    .copy-btn.copied {
      color: rgb(170, 103, 233);
      border-color: rgb(170, 103, 233);
    }

    /* ======== FOOTER ======== */
    .footer {
      background: var(--surface);
      border-top: 1px solid var(--border);
      padding: 2.5rem 0;
      text-align: center;
    }

    .footer-text {
      font-size: 0.82rem;
      color: var(--text-dim);
    }

    /* ======== DIVIDERS ======== */
    .divider {
      width: 100%;
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
      margin: 0;
    }

    /* ======== SCROLL REVEAL ======== */
    .reveal {
      opacity: 0;
      transform: translateY(24px);
      transition: opacity 0.6s ease, transform 0.6s ease;
    }

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

    /* ======== MULTI-LEVEL ANNOTATION ======== */
    .annotation-img {
      width: 100%;
      border-radius: var(--radius);
      border: 1px solid var(--border);
      margin-top: 1.5rem;
      box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    }

    /* ======== PROGRESS BAR FOR ACCURACY ======== */
    .accuracy-list {
      margin-top: 1rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }

    .accuracy-item {
      display: flex;
      flex-direction: column;
      gap: 0.3rem;
    }

    .accuracy-label-row {
      display: flex;
      justify-content: space-between;
      font-size: 0.82rem;
      color: var(--text-muted);
    }

    .accuracy-label-row strong {
      color: var(--text);
    }

    .accuracy-bar-bg {
      height: 6px;
      background: var(--surface2);
      border-radius: 3px;
      overflow: hidden;
    }

    .accuracy-bar-fill {
      height: 100%;
      border-radius: 3px;
      transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* ======== MOBILE ======== */
    @media (max-width: 767px) {
      .nav-links {
        display: none;
      }

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

      .stats-row {
        flex-direction: column;
        gap: 1px;
      }

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

      .hero {
        padding: 5rem 1.5rem 3rem;
      }

      .container {
        padding: 0 1.25rem;
      }

      .section-pad {
        padding: 3.5rem 0;
      }
    }

    /* ======== HIGHLIGHT SPAN ======== */
    .hl {
      color: var(--primary-bright);
      font-weight: 600;
    }

    .hl-accent {
      color: var(--accent2);
      font-weight: 600;
    }

    /* ======== SECTION ALT BG ======== */
    .section-alt {
      background: var(--surface);
    }

    /* ======== SCROLL PROGRESS BAR ======== */
    .scroll-progress {
      position: fixed;
      top: clamp(60px, 5vw, 80px);
      left: 0;
      height: 2px;
      background: linear-gradient(90deg, var(--primary), var(--accent2));
      z-index: 200;
      transition: width 0.1s linear;
      width: 0%;
    }


    /* DreamCAD logo alignment */
    .logo-dreamcad {
      display: inline-block;
      vertical-align: middle;
    }

    .logo-dreamcad img {
      height: 1.45em;
      /* proportional to paragraph font */
      vertical-align: -0.1em;
      /* nudges downward for perfect baseline alignment */
      margin: 0 4px 0 0;
    }

    .logo-bezier-surface {
      display: inline-block;
      vertical-align: middle;
    }

    .logo-bezier-surface img {
      height: 1.5em;
      /* slightly smaller for visual balance */
      vertical-align: -0.1em;
      /* tuned offset for exact baseline match */
      margin: 0 0 0 1px;
      /* brighness adjustment */
    }

    /* CADCap-1M logo alignment */
    .logo-cadcap {
      display: inline-block;
      vertical-align: middle;
    }

    .logo-cadcap img {
      height: 1.45em;
      /* slightly smaller than DreamCAD logo for symmetry */
      vertical-align: -0.22em;
      /* tuned offset for exact baseline match */
      margin: 0 0 0 6px;
    }

    .contrib-grid-4 {
      grid-template-columns: repeat(4, 1fr);
    }

    @media (max-width: 1024px) {
      .contrib-grid-4 {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    @media (max-width: 600px) {
      .contrib-grid-4 {
        grid-template-columns: 1fr;
      }
    }

    .collapse-block {
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
      margin-top: 1rem;
      background: var(--surface);
      transition: border-color 0.3s;
    }

    .collapse-block:hover {
      border-color: var(--border-accent);
    }

    .collapse-btn {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1.25rem 1.5rem;
      background: none;
      border: none;
      cursor: pointer;
      color: var(--text);
      font-family: var(--font-display);
      font-size: 1rem;
      font-weight: 600;
      text-align: left;
      transition: background 0.2s;
    }

    .collapse-btn:hover {
      background: var(--surface2);
    }

    .collapse-label {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .collapse-tag {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--primary), var(--accent2));
      color: #fff;
      font-size: 0.75rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .collapse-icon {
      font-size: 0.8rem;
      color: var(--text-muted);
      transition: transform 0.3s ease;
      flex-shrink: 0;
    }

    .collapse-btn.open .collapse-icon {
      transform: rotate(180deg);
    }

    .collapse-body {
      display: none;
      padding: 0 1.5rem 1.5rem;
      border-top: 1px solid var(--border);
    }

    .collapse-body.open {
      display: block;
    }

    .collapse-desc {
      font-size: 0.92rem;
      color: var(--text-muted);
      line-height: 1.75;
      margin-bottom: 1.25rem;
      margin-top: 1.25rem;
      text-align: justify;
    }

    .collapse-img-slot img {
      width: 100%;
      /* border-radius: var(--radius-sm);
      border: 1px solid var(--border); */
    }

    /* ======== RESULT TABLES ======== */
    .result-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.875rem;
      font-family: var(--font-body);
    }

    .result-table th,
    .result-table td {
      padding: 0.75rem 1rem;
      text-align: center;
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
    }

    .result-table th {
      font-size: 0.78rem;
      font-weight: 700;
      letter-spacing: 0.04em;
      color: var(--text-muted);
      background: var(--surface2);
    }

    .result-table td:first-child,
    .result-table th:first-child {
      text-align: left;
      padding-left: 1.25rem;
    }

    .result-table tr:hover td {
      background: rgba(108, 99, 255, 0.04);
    }

    .result-table .col-up {
      color: var(--accent2);
    }

    .result-table .col-down {
      color: var(--primary-bright);
    }

    .result-table .ours-row td {
      background: linear-gradient(90deg, rgba(108, 99, 255, 0.07), rgba(0, 210, 200, 0.04));
      color: var(--text);
      border-top: 1px solid var(--border-accent);
      border-bottom: 1px solid var(--border-accent);
    }

    .result-table-panel {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
    }

    /* ======== GALLERY SLIDER ITEMS ======== */
    .gallery-panel .slider-item {
      padding: 2rem;
      background: var(--surface2);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1.25rem;
    }

    .gallery-panel .slider-track {
      border-radius: var(--radius);
      border: 1px solid var(--border-accent);
      background: var(--surface2);
      overflow: hidden;
    }

    .gallery-panel .slider-item img {
      border-radius: var(--radius-sm);
      border: 1px solid var(--border);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .gallery-panel .slider-item img:hover {
      transform: scale(1.01);
      box-shadow: 0 12px 48px rgba(108, 99, 255, 0.2);
    }

    /* Top decorative bar */
    .gallery-panel .slider-track::before {
      content: '';
      display: block;
      height: 3px;
      background: linear-gradient(90deg, var(--primary), var(--accent2), var(--accent));
    }

    /* ======== BÉZIER VISUALIZATION ======== */
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    .bezier-viz-wrap {
      position: relative;
      width: 100%;
      background: var(--surface, #111118);
      border: 1px solid var(--border-accent, rgba(108, 99, 255, 0.35));
      border-radius: 20px;
      overflow: hidden;
      margin-top: 2rem;
    }

    /* top gradient bar */
    .bezier-viz-wrap::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, #6c63ff, #00d2c8, #ff6b6b);
      z-index: 10;
    }

    .bezier-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1.1rem 1.5rem 0.9rem;
      border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.07));
      flex-wrap: wrap;
      gap: 0.75rem;
    }

    .bezier-header-left {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .bezier-tag {
      font-family: 'DM Mono', monospace;
      font-size: 0.68rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: #8b83ff;
      background: rgba(108, 99, 255, 0.1);
      border: 1px solid rgba(108, 99, 255, 0.2);
      border-radius: 6px;
      padding: 0.2rem 0.6rem;
    }

    .bezier-title {
      font-family: 'Google Sans', sans-serif;
      font-size: 0.92rem;
      font-weight: 600;
      color: var(--text, #f0f0fa);
    }

    .bezier-controls {
      display: flex;
      gap: 0.5rem;
      align-items: center;
      flex-wrap: wrap;
    }

    .bz-btn {
      font-family: 'DM Mono', monospace;
      font-size: 0.72rem;
      padding: 0.3rem 0.85rem;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(255, 255, 255, 0.04);
      color: var(--text-muted, #888899);
      cursor: pointer;
      transition: all 0.2s;
      letter-spacing: 0.04em;
    }

    .bz-btn:hover,
    .bz-btn.active {
      background: rgba(108, 99, 255, 0.15);
      border-color: rgba(108, 99, 255, 0.5);
      color: #8b83ff;
    }

    .bz-btn.active {
      background: rgba(108, 99, 255, 0.2);
    }

    #bezier-canvas {
      display: block;
      width: 100%;
      cursor: crosshair;
      background: linear-gradient(135deg,
          rgba(108, 99, 255, 0.06) 0%,
          rgba(0, 210, 200, 0.04) 50%,
          rgba(255, 107, 107, 0.05) 100%);
    }

    html.light #bezier-canvas {
      background: linear-gradient(135deg,
          rgba(67, 56, 202, 0.05) 0%,
          rgba(14, 116, 144, 0.04) 50%,
          rgba(194, 65, 12, 0.04) 100%);
    }

    .bezier-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.75rem 1.5rem;
      border-top: 1px solid var(--border, rgba(255, 255, 255, 0.07));
      flex-wrap: wrap;
      gap: 0.5rem;
    }

    .bezier-legend {
      display: flex;
      gap: 1.25rem;
      flex-wrap: wrap;
    }

    .legend-item {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      font-family: 'DM Mono', monospace;
      font-size: 0.68rem;
      color: var(--text-muted, #888899);
      letter-spacing: 0.04em;
    }

    .legend-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .legend-line {
      width: 18px;
      height: 2px;
      flex-shrink: 0;
    }

    .bezier-hint {
      font-family: 'DM Mono', monospace;
      font-size: 0.65rem;
      color: var(--text-dim, #4a4a5a);
      letter-spacing: 0.04em;
    }

    /* ---- Light mode overrides ---- */
    html.light .bezier-viz-wrap {
      background: #ffffff;
      border-color: rgba(108, 99, 255, 0.2);
    }

    html.light .bezier-tag {
      color: #5048cc;
      background: rgba(108, 99, 255, 0.08);
      border-color: rgba(108, 99, 255, 0.2);
    }

    html.light .bezier-title {
      color: #0f0f1a;
    }

    html.light .bz-btn {
      border-color: rgba(0, 0, 0, 0.1);
      background: rgba(0, 0, 0, 0.03);
      color: #5a5a75;
    }

    html.light .bz-btn:hover,
    html.light .bz-btn.active {
      background: rgba(108, 99, 255, 0.1);
      border-color: rgba(108, 99, 255, 0.4);
      color: #5048cc;
    }

    html.light .bezier-footer {
      border-top-color: rgba(0, 0, 0, 0.07);
    }

    html.light .legend-item {
      color: #5a5a75;
    }

    html.light .bezier-hint {
      color: #aaaabc;
    }

    /* Dark mode legend (default) */
    .bz-legend-mesh {
      background: #6c63ff;
      box-shadow: 0 0 6px #6c63ff88;
    }

    .bz-legend-iso {
      background: #00d2c8;
    }

    .bz-legend-corner {
      background: #ffd166;
      box-shadow: 0 0 6px #ffd16688;
    }

    .bz-legend-interior {
      background: #8b83ff;
    }

    .bz-legend-polygon {
      background: rgba(255, 255, 255, 0.15);
      border-top: 1px dashed rgba(255, 255, 255, 0.3);
    }

    /* Light mode legend */
    html.light .bz-legend-mesh {
      background: #4338ca;
      box-shadow: 0 0 6px #4338ca55;
    }

    html.light .bz-legend-iso {
      background: #0e7490;
    }

    html.light .bz-legend-corner {
      background: #c2410c;
      box-shadow: 0 0 6px #c2410c55;
    }

    html.light .bz-legend-interior {
      background: #1d4ed8;
    }

    html.light .bz-legend-polygon {
      background: rgba(0, 0, 0, 0.12);
      border-top: 1px dashed rgba(0, 0, 0, 0.25);
    }


    #hero-logo-row {
      gap: 0;
    }


    @media (max-width: 640px) {

      #hero-logo-row canvas,
      #hero-logo-spacer {
        display: none !important;
      }

      #hero-logo-row img {
        width: min(380px, 88vw) !important;
        margin-left: 0 !important;
      }
    }

    @keyframes arrow-bounce {

      0%,
      100% {
        transform: translateX(-50%) translateY(0);
        opacity: 0.6;
      }

      50% {
        transform: translateX(-50%) translateY(6px);
        opacity: 1;
      }
    }

    #hero-scroll-arrow:hover {
      background: var(--primary);
      border-color: var(--primary);
      color: #fff;
      box-shadow: 0 0 20px rgba(108, 99, 255, 0.4);
    }

    .hamburger {
      display: none;
      flex-direction: column;
      justify-content: center;
      gap: 5px;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      border: 1px solid var(--border-accent);
      background: var(--surface2);
      cursor: pointer;
      padding: 0;
      align-items: center;
    }

    .hamburger span {
      display: block;
      width: 16px;
      height: 1.5px;
      background: var(--text-muted);
      border-radius: 2px;
      transition: all 0.3s;
    }

    .hamburger.open span:nth-child(1) {
      transform: translateY(6.5px) rotate(45deg);
    }

    .hamburger.open span:nth-child(2) {
      opacity: 0;
    }

    .hamburger.open span:nth-child(3) {
      transform: translateY(-6.5px) rotate(-45deg);
    }

    @media (max-width: 768px) {
      .hamburger {
        display: flex;
      }

      .nav-links {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg);
        /* border-bottom: 1px solid var(--border); */
        padding: 1rem 0;
        padding-bottom: env(safe-area-inset-bottom, 3rem);
        z-index: 99;
        backdrop-filter: blur(20px);
        gap: 0;
      }

      .nav-links.open {
        display: flex;
      }

      .nav-links a {
        padding: 0.85rem 2rem;
        border-radius: 0;
        font-size: 0.95rem;
        /* border-bottom: 1px solid var(--border); */
      }

    }

    @media (max-width: 768px) {

      /* Make table container scrollable horizontally */
      .result-table-panel>div {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
      }

      .result-table {
        font-size: 0.75rem;
        min-width: 520px;
        /* forces scroll rather than squishing */
      }

      .result-table th,
      .result-table td {
        padding: 0.5rem 0.6rem;
        white-space: nowrap;
      }

      .result-table td:first-child,
      .result-table th:first-child {
        padding-left: 0.75rem;
        position: sticky;
        left: 0;
        background: var(--surface);
        z-index: 1;
        box-shadow: 2px 0 6px rgba(0, 0, 0, 0.15);
      }

      /* sticky header on ours-row too */
      .result-table .ours-row td:first-child {
        background: linear-gradient(90deg, rgba(108, 99, 255, 0.12), rgba(108, 99, 255, 0.07));
      }

      /* tabs wrap nicely */
      .tabs-bar {
        gap: 0.25rem;
      }

      .tab-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.7rem;
      }
    }

    /* ======== IPAD (768–1024px) ======== */
    @media (min-width: 768px) and (max-width: 1024px) {
      .container {
        padding: 0 2.5rem;
      }

      .contrib-grid-4 {
        grid-template-columns: repeat(2, 1fr);
      }

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

      .nav-links {
        display: flex;
      }

      /* show links on iPad landscape */
      .hamburger {
        display: none;
      }
    }

    /* ======== 4K / ULTRAWIDE (2560px+) ======== */
    @media (min-width: 2560px) {
      .container {
        max-width: 1600px;
      }

      .contrib-grid-4 {
        grid-template-columns: repeat(4, 1fr);
      }

      .bibtex-box {
        max-width: 900px;
      }
    }

    /* ======== 720p / 1080p LCD fix ======== */
    @media (min-width: 1280px) and (max-width: 1920px) {
      .container {
        max-width: clamp(960px, 80vw, 1200px);
      }
    }

    .qual-img-panel {
      animation: qual-in 0.35s ease both;
    }

    @keyframes qual-in {
      from {
        opacity: 0;
        transform: translateY(10px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .qual-frame {
      border-radius: var(--radius-lg);
      border: 1px solid var(--border-accent);
      overflow: hidden;
      background: var(--surface);
      box-shadow: var(--shadow), var(--glow);
      position: relative;
      width: 70%;
      margin: 0 auto;
    }

    /* top gradient accent bar */
    .qual-frame::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: linear-gradient(90deg, var(--primary), var(--accent2), var(--accent));
      z-index: 1;
    }

    .qual-frame img {
      width: 100%;
      height: auto;
      display: block;
      margin: 0 auto;
      padding: 1.5rem;
    }

    html.light .qual-frame {
      box-shadow: 0 8px 40px rgba(108, 99, 255, 0.1);
      border-color: rgba(108, 99, 255, 0.2);
    }

    /* ======== CONTACT FORM ======== */
    .cf-field {
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
      margin-bottom: 1.25rem;
    }

    .cf-label {
      font-size: 0.82rem;
      font-weight: 600;
      font-family: var(--font-mono);
      color: var(--text-muted);
      letter-spacing: 0.04em;
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }

    .cf-required {
      color: var(--accent);
      font-size: 0.85rem;
    }

    .cf-optional {
      font-size: 0.68rem;
      font-weight: 400;
      color: var(--text-dim);
      font-family: var(--font-mono);
      letter-spacing: 0.06em;
      text-transform: uppercase;
      border: 1px solid var(--border);
      border-radius: 4px;
      padding: 1px 5px;
    }

    .cf-input {
      width: 100%;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 0.7rem 1rem;
      font-family: var(--font-body);
      font-size: 0.9rem;
      color: var(--text);
      transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
      outline: none;
      resize: none;
    }

    .cf-input::placeholder {
      color: var(--text-dim);
    }

    .cf-input:focus {
      border-color: var(--primary);
      background: var(--surface);
      box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.12);
    }

    .cf-textarea {
      min-height: 130px;
      line-height: 1.6;
    }

    .cf-submit {
      min-width: 160px;
      justify-content: center;
      font-size: 0.9rem;
      padding: 0.7rem 1.75rem;
    }

    .cf-submit:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none;
    }

    .cf-status {
      font-size: 0.82rem;
      font-family: var(--font-mono);
      transition: opacity 0.3s;
    }

    .cf-status.success {
      color: var(--accent2);
    }

    .cf-status.error {
      color: var(--accent);
    }

    /* Light mode */
    html.light .cf-input {
      background: #f4f4fb;
      border-color: rgba(0, 0, 0, 0.1);
      color: #0f0f1a;
    }

    html.light .cf-input:focus {
      background: #fff;
      border-color: var(--primary);
    }



    /* ======== IMAGE ZOOM OVERLAY ======== */
#imgZoomOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1.5rem;
}

#imgZoomOverlay.open {
  opacity: 1;
  pointer-events: all;
}

#imgZoomBox {
  position: relative;
  max-width: min(90vw, 1200px);
  max-height: 90vh;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-accent);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), var(--glow);
  overflow: hidden;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: var(--surface);
}

#imgZoomOverlay.open #imgZoomBox {
  transform: scale(1);
}

#imgZoomBox img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

#imgZoomClose {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-accent);
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

#imgZoomClose:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: scale(1.1);
}

/* Magnifier cursor on all zoomable images */
.zoomable {
  cursor: zoom-in;
}