  :root {
    --bg: #050505;
    --fg: #f5f5f7;
    --fg-muted: rgba(245, 245, 247, 0.5);
    --fg-dim: rgba(245, 245, 247, 0.25);
    --fg-faint: rgba(245, 245, 247, 0.08);
    --accent-1: #7eb0ff;
    --accent-2: #c4a1ff;
    --accent-3: #80eaac;
    --accent-4: #ffb380;
    --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --max-w: 1200px;
    --section-pad: clamp(100px, 12vh, 160px);
    --video-scale: 98%;
    --video-scale-portrait: 96%;
    --why-line-height: 1.55;
    --what-line-height: 1.55;
    --gap-title-why: 6px;
    --gap-why-what: 12px;
    --gap-title-subtitle: 3px;
    --gap-subtitle-content: 20px;
  }

  [data-theme="light"] {
    --bg: #fbfbfd;
    --fg: #1d1d1f;
    --fg-muted: rgba(29, 29, 31, 0.55);
    --fg-dim: rgba(29, 29, 31, 0.3);
    --fg-faint: rgba(29, 29, 31, 0.08);
    --accent-1: #0066cc;
    --accent-2: #8040bf;
    --accent-3: #1a8a4a;
    --accent-4: #cc6a00;
  }

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

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

  body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
  }

  ::selection {
    background: rgba(126, 176, 255, 0.3);
    color: var(--fg);
  }

  [data-theme="light"] ::selection {
    background: rgba(0, 102, 204, 0.2);
  }

  /* ── Typography ── */

  h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
  }

  /* hero-name and hero-tagline defined in Hero section below */

  .section-number {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-dim);
    margin-bottom: 16px;
  }

  .section-question {
    font-size: clamp(32px, 4.5vw, 56px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    max-width: 800px;
  }

  .section-brief {
    font-size: 19px;
    color: var(--fg-muted);
    max-width: 640px;
    margin-top: 24px;
    line-height: 1.7;
  }

  .phase-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg-dim);
    margin-bottom: 12px;
  }

  .phase-heading {
    font-size: clamp(22px, 2.5vw, 28px);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
  }

  .phase-text {
    color: var(--fg-muted);
    max-width: 600px;
    line-height: 1.75;
  }

  .phase-text strong {
    color: var(--fg);
    font-weight: 500;
  }

  /* ── Layout ── */

  .container {
    max-width: calc(var(--max-w) + var(--gap-video-text, 24px) - 24px);
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 48px);
  }

  section {
    padding: var(--section-pad) 0;
  }

  /* ── Navigation ── */

  nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--fg-faint);
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  nav.visible {
    transform: translateY(0);
  }

  [data-theme="light"] nav {
    background: rgba(251, 251, 253, 0.85);
  }

  .nav-inner {
    position: relative;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 48px);
    display: flex;
    align-items: baseline;
  }

  .nav-name {
    position: absolute;
    left: clamp(24px, 5vw, 48px);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    color: var(--fg);
    text-decoration: none;
  }

  .nav-links {
    display: flex;
    flex: none;
    width: 77%;
    margin: 0 auto;
    transform: translateX(35px);
    justify-content: space-between;
    list-style: none;
    align-items: baseline;
  }

  .nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--fg-muted);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s;
  }

  .nav-links a:hover {
    color: var(--fg);
  }

  /* Rainbow hover colors matching section subtitles — 6 sections, 60° steps */
  .nav-links li:nth-child(2) a:hover { color: hsl(0, 80%, 68%); }     /* AI - Red */
  .nav-links li:nth-child(3) a:hover { color: hsl(60, 70%, 58%); }    /* Voice - Yellow */
  .nav-links li:nth-child(4) a:hover { color: hsl(120, 50%, 58%); }   /* Robotics - Green */
  .nav-links li:nth-child(5) a:hover { color: hsl(180, 60%, 52%); }   /* Spatial - Cyan */
  .nav-links li:nth-child(6) a:hover { color: hsl(240, 60%, 72%); }   /* Objects - Blue */
  .nav-links li:nth-child(7) a:hover { color: hsl(300, 55%, 68%); }   /* Furniture - Violet */

  /* ── Hero ── */

  .hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
  }

  /* ── Hamburger Button (hidden on desktop) ── */

  .hamburger {
    display: none;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .hamburger-line {
    display: block;
    position: absolute;
    left: 12px;
    width: 20px;
    height: 1.5px;
    background: var(--fg);
    border-radius: 1px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .hamburger-line:nth-child(1) { top: 15px; }
  .hamburger-line:nth-child(2) { top: 21px; }
  .hamburger-line:nth-child(3) { top: 27px; }

  .hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* ── Mobile Menu Overlay (hidden by default) ── */

  .mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(30px) saturate(1.5);
    -webkit-backdrop-filter: blur(30px) saturate(1.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
  }

  [data-theme="light"] .mobile-menu-overlay {
    background: rgba(251, 251, 253, 0.95);
  }

  .mobile-menu-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    margin: 0;
  }

  .mobile-menu-links a {
    display: block;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--fg-muted);
    text-decoration: none;
    padding: 12px 24px;
    transform: translateY(20px);
    opacity: 0;
    transition: color 0.2s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-menu-overlay.open .mobile-menu-links a {
    transform: translateY(0);
    opacity: 1;
  }

  .mobile-menu-links li:nth-child(1) a  { transition-delay: 0.04s; }
  .mobile-menu-links li:nth-child(2) a  { transition-delay: 0.07s; }
  .mobile-menu-links li:nth-child(3) a  { transition-delay: 0.10s; }
  .mobile-menu-links li:nth-child(4) a  { transition-delay: 0.13s; }
  .mobile-menu-links li:nth-child(5) a  { transition-delay: 0.16s; }
  .mobile-menu-links li:nth-child(6) a  { transition-delay: 0.19s; }
  .mobile-menu-links li:nth-child(7) a  { transition-delay: 0.22s; }
  .mobile-menu-links li:nth-child(8) a  { transition-delay: 0.25s; }
  .mobile-menu-links li:nth-child(9) a  { transition-delay: 0.28s; }
  .mobile-menu-links li:nth-child(10) a { transition-delay: 0.31s; }

  .mobile-menu-overlay:not(.open) .mobile-menu-links a {
    transition-delay: 0s;
  }

  .mobile-menu-links li:nth-child(2) a:hover { color: hsl(0, 80%, 68%); }
  .mobile-menu-links li:nth-child(3) a:hover { color: hsl(60, 70%, 58%); }
  .mobile-menu-links li:nth-child(4) a:hover { color: hsl(120, 50%, 58%); }
  .mobile-menu-links li:nth-child(5) a:hover { color: hsl(180, 60%, 52%); }
  .mobile-menu-links li:nth-child(6) a:hover { color: hsl(240, 60%, 72%); }
  .mobile-menu-links li:nth-child(7) a:hover { color: hsl(300, 55%, 68%); }

  .mobile-menu-links a:hover {
    color: var(--fg);
  }

  body.menu-open {
    overflow: hidden;
  }

  .hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
  }

  .hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
  }

  .hero-role {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-dim);
    margin-bottom: 20px;
  }

  .hero-name {
    font-size: clamp(56px, 9vw, 120px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
    padding-bottom: 0.05em;
    padding-right: 0.05em;
    background: linear-gradient(
      135deg,
      var(--fg) 0%,
      var(--fg) 40%,
      var(--accent-1) 60%,
      var(--accent-2) 80%,
      var(--fg) 100%
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 8s ease-in-out infinite;
  }

  @keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
  }

  .hero-tagline {
    font-size: clamp(18px, 2.2vw, 26px);
    font-weight: 400;
    color: var(--fg-muted);
    line-height: 1.5;
    max-width: 740px;
    margin: 28px auto 0;
  }

  .hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.4s ease;
  }

  .hero-scroll.hidden {
    opacity: 0;
    pointer-events: none;
  }

  .hero-scroll-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-dim);
  }

  .hero-scroll-line {
    width: 1px;
    height: 40px;
    position: relative;
    overflow: hidden;
    background: var(--fg-faint);
  }

  .hero-scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--fg-muted);
    animation: scrollLine 2s ease-in-out infinite;
  }

  @keyframes scrollLine {
    0% { top: -100%; }
    50% { top: 100%; }
    100% { top: 100%; }
  }

  /* ── Project Sections ── */

  .sections-intro {
    text-align: center;
    padding: var(--section-pad) 0 clamp(40px, 4vh, 60px);
  }

  .sections-intro h2 {
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 400;
    color: var(--fg-muted);
    letter-spacing: -0.02em;
  }

  .project-section {
    border-top: 1px solid var(--fg-faint);
  }

  .section-header {
    padding: clamp(40px, 5vh, 64px) 0 clamp(24px, 3vh, 40px);
  }

  .section-header .section-question {
    color: #c8d0dc;
    font-size: clamp(34px, 4.5vw, 56px);
  }

  [data-theme="light"] .section-header .section-question {
    color: #3a4a5c;
  }

  .section-header .section-number {
    color: var(--fg-dim);
  }

  .section-motivation {
    font-size: 19px;
    color: var(--fg-muted);
    max-width: 720px;
    margin-top: var(--gap-title-subtitle, 12px);
    margin-bottom: var(--gap-subtitle-content, 0px);
    line-height: 1.65;
    background: transparent;
  }

  /* Rainbow spectrum — 6 sections, 0° (red) to 300° (violet), 60° steps */
  /* nth-of-type counts ALL <section> elements: hero=1, about=2, AI=3, Voice=4, etc. */
  .project-section:nth-of-type(3) .section-motivation  { color: hsl(0, 80%, 68%); }    /* AI - Red */
  .project-section:nth-of-type(4) .section-motivation  { color: hsl(60, 70%, 58%); }   /* Voice - Yellow */
  .project-section:nth-of-type(5) .section-motivation  { color: hsl(120, 50%, 58%); }  /* Robotics - Green */
  .project-section:nth-of-type(6) .section-motivation  { color: hsl(180, 60%, 52%); }  /* Spatial - Cyan */
  .project-section:nth-of-type(7) .section-motivation  { color: hsl(240, 60%, 72%); }  /* Objects - Blue */
  .project-section:nth-of-type(8) .section-motivation  { color: hsl(300, 55%, 68%); }  /* Furniture - Violet */
  .honorable-mentions .section-motivation { color: var(--fg-muted); }
  .archive .section-motivation { color: var(--fg-muted); }

  [data-theme="light"] .project-section:nth-of-type(3) .section-motivation  { color: hsl(0, 70%, 45%); }
  [data-theme="light"] .project-section:nth-of-type(4) .section-motivation  { color: hsl(60, 60%, 35%); }
  [data-theme="light"] .project-section:nth-of-type(5) .section-motivation  { color: hsl(120, 45%, 34%); }
  [data-theme="light"] .project-section:nth-of-type(6) .section-motivation  { color: hsl(180, 55%, 32%); }
  [data-theme="light"] .project-section:nth-of-type(7) .section-motivation  { color: hsl(240, 50%, 45%); }
  [data-theme="light"] .project-section:nth-of-type(8) .section-motivation  { color: hsl(300, 45%, 42%); }
  [data-theme="light"] .archive .section-motivation { color: var(--fg-muted); }

  /* ── Project Pair Layouts ── */

  .project-pair {
    padding-bottom: clamp(32px, 4vh, 56px);
  }

  /* Portrait + Portrait: text | video | video | text */
  .project-pair.layout-pp {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .layout-pp .project-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-video-text, 24px);
    align-items: stretch;
  }

  .layout-pp .project-item > .project-text {
    display: flex;
    flex-direction: column;
  }

  .layout-pp .project-item > .project-text > .project-link {
    margin-top: auto;
  }

  .project-video {
    min-width: 0;
  }

  .project-item.stack {
    display: block;
  }

  .project-item.stack .project-text {
    margin-top: 20px;
  }

  /* When a pp pair has a stacked item, give the non-stacked item a wider video column */
  .layout-pp .project-item:first-child:has(~ .project-item.stack) {
    grid-template-columns: 1fr 1.6fr;
  }

  .layout-pp .project-item:first-child .project-video { order: 2; }
  .layout-pp .project-item:first-child .project-text { order: 1; }
  .layout-pp .project-item:last-child .project-video { order: 1; }
  .layout-pp .project-item:last-child .project-text { order: 2; }

  /* Wider grid only for items with 3:4 videos (not .portrait 9:16) */
  .layout-pp .project-item:first-child:has(.video-wrap:not(.portrait):not(.landscape)) {
    grid-template-columns: 1fr 2fr;
  }
  .layout-pp .project-item:last-child:has(.video-wrap:not(.portrait):not(.landscape)) {
    grid-template-columns: 2fr 1fr;
  }

  /* Landscape + Landscape: two columns, video above text */
  .project-pair.layout-ll {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  /* Landscape + Portrait: landscape left (text below), portrait right (text beside) */
  .project-pair.layout-lp {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
  }

  .layout-lp .project-item:last-child {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    align-items: stretch;
  }

  .layout-lp .project-item:last-child > .project-text {
    display: flex;
    flex-direction: column;
  }

  .layout-lp .project-item:last-child > .project-text > .project-link {
    margin-top: auto;
  }

  /* ── Video Container ── */

  .project-video {
    position: relative;
  }

  .video-wrap {
    width: var(--video-scale, 100%);
    max-width: 100%;
    border-radius: 12px;
    background: var(--fg-faint);
    border: 1px solid var(--fg-faint);
    overflow: hidden;
    position: relative;
    cursor: pointer;
  }

  .video-wrap.portrait {
    aspect-ratio: 9 / 16;
    width: var(--video-scale-portrait, var(--video-scale, 100%));
  }

  /* Uniform scaling: left videos anchor top-right, right videos anchor top-left (portrait only) */
  .project-item:first-child .video-wrap:not(.landscape) { margin-left: auto; }
  .project-item:last-child .video-wrap:not(.landscape) { margin-right: auto; }
  .video-wrap.landscape { aspect-ratio: 16 / 9; }

  .video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* Play overlay — shown when paused */
  .video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s;
    z-index: 2;
  }

  .video-wrap.playing .video-play-overlay {
    opacity: 0;
    pointer-events: none;
  }

  .video-wrap:hover .video-play-overlay {
    opacity: 1;
    pointer-events: all;
  }

  .play-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
  }

  [data-theme="light"] .play-btn {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
  }

  .video-wrap:hover .play-btn {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.25);
  }

  .play-btn svg {
    width: 20px;
    height: 20px;
    fill: #fff;
    margin-left: 2px;
  }

  [data-theme="light"] .play-btn svg {
    fill: rgba(0, 0, 0, 0.6);
  }

  /* Fullscreen button — matches play button styling */
  .video-fs-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    padding-left: 0;
    gap: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s, width 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1), gap 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
  }

  [data-theme="light"] .video-fs-btn {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
  }

  .video-wrap:hover .video-fs-btn {
    opacity: 1;
  }

  .video-fs-btn:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.25);
  }

  .video-fs-btn svg {
    width: 18px;
    height: 18px;
    fill: #fff;
    flex-shrink: 0;
  }

  [data-theme="light"] .video-fs-btn svg {
    fill: rgba(0, 0, 0, 0.6);
  }

  /* Mute button — matches fullscreen button styling */
  .video-mute-btn {
    position: absolute;
    top: 56px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 3;
  }

  [data-theme="light"] .video-mute-btn {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
  }

  .video-wrap:hover .video-mute-btn {
    opacity: 1;
  }

  .video-mute-btn:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.25);
  }

  .video-mute-btn svg {
    width: 18px;
    height: 18px;
    fill: #fff;
    flex-shrink: 0;
  }

  [data-theme="light"] .video-mute-btn svg {
    fill: rgba(0, 0, 0, 0.6);
  }

  .video-mute-btn .icon-unmuted { display: none; }
  .video-mute-btn .icon-muted { display: block; }
  .video-mute-btn.unmuted .icon-unmuted { display: block; }
  .video-mute-btn.unmuted .icon-muted { display: none; }

  /* Fullscreen label (hidden by default) */
  .fs-label {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    flex-shrink: 0;
    position: relative;
    top: 0px;
    left: -4px;
  }

  [data-theme="light"] .fs-label {
    color: rgba(0, 0, 0, 0.7);
  }

  /* Fullscreen hint pill — expanded state */
  .video-fs-btn.fs-hint {
    width: 116px;
    padding-left: 10px;
    gap: 5px;
  }

  .video-fs-btn.fs-hint .fs-label {
    opacity: 1;
    max-width: 80px;
  }

  /* Keep button visible during hint animation (even without hover) */
  .video-fs-btn.fs-hint,
  .video-fs-btn.fs-hint-collapsing {
    opacity: 1;
  }

  .video-fs-btn.fs-hint:hover,
  .video-fs-btn.fs-hint-collapsing:hover {
    transform: none;
  }

  /* Playback scrubber */
  .video-scrubber {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0 14px 6px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.4));
    opacity: 0;
    transition: opacity 0.25s;
    z-index: 4;
  }

  .video-wrap.playing:hover .video-scrubber {
    opacity: 1;
  }

  .video-scrubber-track {
    width: 100%;
    height: 3px;
    cursor: pointer;
    position: relative;
    padding: 10px 0 12px;
  }

  .video-scrubber-track::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
  }

  .video-scrubber-track:hover::before {
    height: 5px;
    top: 9px;
  }

  .video-scrubber-fill {
    height: 3px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 2px;
    pointer-events: none;
    transition: width 0.1s linear;
    position: relative;
    z-index: 1;
  }

  .video-scrubber-track:hover .video-scrubber-fill {
    height: 5px;
  }

  .video-scrubber-time {
    font-size: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.02em;
    text-align: right;
    user-select: none;
    font-variant-numeric: tabular-nums;
    margin-bottom: 0px;
    order: -1;
  }

  [data-theme="light"] .video-scrubber-track {
    background: rgba(0, 0, 0, 0.15);
  }

  [data-theme="light"] .video-scrubber-fill {
    background: rgba(0, 0, 0, 0.5);
  }

  [data-theme="light"] .video-scrubber-time {
    color: rgba(0, 0, 0, 0.6);
  }

  /* Fullscreen mode */
  .video-wrap:fullscreen,
  .video-wrap:-webkit-full-screen {
    aspect-ratio: auto;
    border-radius: 0;
    background: #000;
  }

  .video-wrap:fullscreen video,
  .video-wrap:-webkit-full-screen video {
    object-fit: contain;
  }

  .video-wrap:fullscreen.playing .video-play-overlay,
  .video-wrap:-webkit-full-screen.playing .video-play-overlay {
    opacity: 0;
    pointer-events: none;
  }

  /* Placeholder (no video yet) */
  .video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ── Image Gallery ── */

  .image-gallery {
    width: 100%;
    border-radius: 12px;
    background: var(--fg-faint);
    border: 1px solid var(--fg-faint);
    overflow: hidden;
    position: relative;
    cursor: pointer;
  }

  .image-gallery.landscape { aspect-ratio: 16 / 9; }

  .gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    position: absolute;
    inset: 0;
  }

  .gallery-img.active {
    display: block;
  }

  .gallery-prev,
  .gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 3;
  }

  .gallery-prev { left: 12px; }
  .gallery-next { right: 12px; }

  .image-gallery:hover .gallery-prev,
  .image-gallery:hover .gallery-next {
    opacity: 1;
  }

  .gallery-prev:hover,
  .gallery-next:hover {
    transform: translateY(-50%) scale(1.08);
    background: rgba(255, 255, 255, 0.25);
  }

  .gallery-prev svg,
  .gallery-next svg {
    width: 20px;
    height: 20px;
  }

  [data-theme="light"] .gallery-prev,
  [data-theme="light"] .gallery-next {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.6);
  }

  /* ── Project Text ── */

  .project-text {
    padding-top: 0;
  }

  .project-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: var(--gap-title-why, 8px);
    letter-spacing: -0.01em;
  }

  .project-why {
    font-size: var(--why-font-size, 15px);
    color: rgba(245, 245, 247, 0.68);
    line-height: var(--why-line-height, 1.53);
    margin-bottom: var(--gap-why-what, 10px);
  }

  [data-theme="light"] .project-why {
    color: rgba(29, 29, 31, 0.72);
  }

  .project-what {
    font-size: var(--what-font-size, 15px);
    color: var(--fg-muted);
    line-height: var(--what-line-height, 1.53);
    margin-bottom: 10px;
  }

  .project-result {
    display: none;
  }

  .project-role {
    font-size: 13px;
    color: rgba(245, 245, 247, 0.38);
    line-height: 1.53;
    margin-bottom: 10px;
  }

  [data-theme="light"] .project-role {
    color: rgba(29, 29, 31, 0.42);
  }

  .project-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--fg-dim);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }

  .project-link.no-url {
    color: hsl(0, 70%, 55%);
  }

  .project-link.no-url:hover {
    color: hsl(0, 80%, 65%);
  }

  .project-link:hover {
    color: var(--fg);
    font-weight: 600;
  }

  .project-link .link-arrow {
    font-size: 14px;
    transition: transform 0.2s;
  }

  .project-link:hover .link-arrow {
    transform: translateX(3px);
  }

  /* Layout-specific text placement */
  .layout-ll .project-text {
    padding-top: 16px;
  }

  .layout-lp .project-item:first-child .project-text {
    padding-top: 16px;
  }

  /* ── Project Archive Marquee ── */

  .archive {
    border-top: 1px solid var(--fg-faint);
  }

  .archive .section-header {
    padding-bottom: clamp(32px, 4vh, 48px);
  }

  .archive-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
  }

  .archive-link:hover {
    color: var(--fg);
    font-weight: 600;
  }

  .marquee-container {
    overflow: hidden;
    width: 100%;
    padding: 8px 0;
  }

  .marquee-row {
    display: flex;
    width: max-content;
    margin-bottom: 16px;
  }

  .marquee-content {
    display: flex;
    gap: 16px;
    padding-right: 16px;
  }

  .marquee-row[data-direction="left"] {
    animation: marquee-left 120s linear infinite;
  }

  .marquee-row[data-direction="right"] {
    animation: marquee-right 120s linear infinite;
  }

  @keyframes marquee-left {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
  }

  @keyframes marquee-right {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
  }

  .marquee-row:hover {
    animation-play-state: paused;
  }

  .marquee-card {
    flex-shrink: 0;
    width: 220px;
    height: 220px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: var(--fg-faint);
    cursor: pointer;
    transition: transform 0.3s ease;
    text-decoration: none;
    display: block;
  }

  .marquee-card:hover {
    transform: scale(1.06);
    z-index: 2;
  }

  .marquee-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .marquee-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  .marquee-card:hover .marquee-card-overlay {
    opacity: 1;
  }

  .marquee-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
  }

  .marquee-card-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .marquee-speed {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 0 var(--section-pad);
  }

  .marquee-speed label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fg-dim);
  }

  .marquee-speed input[type="range"] {
    width: 120px;
    accent-color: var(--fg-muted);
  }

  /* ── Poster Frame Scrubber (edit mode only) ── */

  .poster-scrubber {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 14px 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    z-index: 5;
    border-radius: 0 0 12px 12px;
  }

  .poster-scrubber input[type="range"] {
    flex: 1;
    min-width: 0;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
  }

  .poster-scrubber input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: grab;
  }

  .poster-scrubber input[type="range"]::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.2);
  }

  .poster-time-label {
    font-size: 11px;
    font-family: 'SF Mono', monospace;
    color: rgba(255, 255, 255, 0.7);
    min-width: 40px;
    text-align: right;
    white-space: nowrap;
  }

  .poster-save-btn {
    flex-basis: 100%;
    font-size: 10px;
    font-family: 'SF Mono', monospace;
    padding: 4px 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    text-align: center;
    letter-spacing: 0.04em;
    transition: background 0.15s, border-color 0.15s;
  }

  .poster-save-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
  }

  .poster-save-btn:disabled {
    opacity: 0.5;
    cursor: default;
  }

  /* ── Debug Panel (toggle with D key) ── */

  .debug-panel {
    position: fixed;
    right: 12px;
    top: 12px;
    bottom: 12px;
    width: 260px;
    background: rgba(18, 18, 18, 0.60);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 8px;
    z-index: 1002;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    display: none;
    flex-direction: column;
    overflow: hidden;
  }

  .debug-panel.active { display: flex; }

  .debug-panel-title {
    font-size: 10px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: rgba(255, 255, 255, 0.85);
    padding: 14px 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .debug-panel-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
  }

  .debug-slider {
    margin-bottom: 10px;
  }

  .debug-slider-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 2px;
  }

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

  .debug-slider-row input[type="range"] {
    flex: 1;
    height: 1.5px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.13);
    border-radius: 1px;
    outline: none;
  }

  .debug-slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.15);
    cursor: grab;
  }

  .debug-slider-value {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.78);
    min-width: 36px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
  }

  .debug-slider-minmax {
    display: flex;
    justify-content: space-between;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.22);
    margin-top: 1px;
  }

  .debug-btn-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .debug-btn {
    background: rgba(255, 255, 255, 0.07);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'SF Mono', monospace;
    font-size: 8px;
    padding: 5px 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.12s;
  }

  .debug-btn:hover {
    background: rgba(255, 255, 255, 0.14);
  }

  .debug-btn.primary {
    background: rgba(100, 160, 255, 0.15);
    color: rgba(100, 160, 255, 0.8);
  }

  .debug-btn.primary:hover {
    background: rgba(100, 160, 255, 0.25);
  }

  /* Double-click popover for min/max editing */
  .debug-popover {
    position: fixed;
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 6px;
    z-index: 9000;
    backdrop-filter: blur(12px);
  }

  .debug-popover label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.35);
  }

  .debug-popover input {
    width: 52px;
    padding: 3px 5px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-family: 'SF Mono', monospace;
    font-size: 10px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    outline: none;
  }

  .debug-popover input:focus {
    border-color: rgba(100, 160, 255, 0.5);
  }

  /* ── Edit Mode ── */

  [data-edit-id] {
    outline: none !important;
  }

  .edit-mode [data-edit-id] {
    outline: 1px dashed var(--fg-dim) !important;
    outline-offset: 4px;
    cursor: text;
    border-radius: 4px;
  }

  .edit-mode [data-edit-id]:focus {
    outline-color: var(--accent-1);
    outline-width: 2px;
  }

  .edit-mode [data-edit-id] a {
    text-decoration: underline;
    text-decoration-color: var(--accent-1);
    text-underline-offset: 3px;
    cursor: text;
  }

  .edit-toolbar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(18, 18, 18, 0.94);
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-family: var(--font);
  }

  .edit-toolbar.active {
    opacity: 1;
    pointer-events: all;
  }

  .edit-toolbar label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
  }

  .edit-toolbar .edit-group {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .edit-toolbar input[type="color"] {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: none;
    padding: 0;
  }

  .edit-toolbar input[type="number"] {
    width: 48px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-family: var(--font);
    padding: 4px 6px;
    text-align: center;
  }

  .edit-toolbar input[type="range"] {
    width: 60px;
    accent-color: #fff;
  }

  .edit-toolbar .edit-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 4px;
  }

  .edit-justify-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    transition: all 0.15s;
  }

  .edit-justify-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
  .edit-justify-btn.active { background: rgba(255, 255, 255, 0.15); color: #fff; border-color: rgba(255,255,255,0.25); }

  .edit-action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 500;
    font-family: var(--font);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
  }

  .edit-action-btn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

  /* ── Responsive ── */

  @media (max-width: 768px) {
    .project-pair.layout-pp,
    .project-pair.layout-ll,
    .project-pair.layout-lp {
      grid-template-columns: 1fr;
      gap: 48px;
    }
    .layout-pp .project-item {
      grid-template-columns: 1fr;
    }
    .layout-pp .project-item .project-video { order: 1; }
    .layout-pp .project-item .project-text { order: 2; }
    .layout-lp .project-item:last-child {
      grid-template-columns: 1fr;
    }
    .about-grid {
      grid-template-columns: 1fr;
      gap: 48px;
    }
    .marquee-card {
      width: 160px;
      height: 160px;
    }

    /* Mobile nav */
    nav {
      transform: translateY(0) !important;
    }

    .nav-inner {
      display: flex;
      align-items: center;
      width: 100%;
    }

    .nav-name {
      position: static;
    }

    .nav-links {
      display: none;
    }

    .theme-toggle-nav {
      position: static;
      transform: none;
      flex-shrink: 0;
      margin-left: auto;
    }

    .hamburger {
      display: flex;
      margin-left: 8px;
      flex-shrink: 0;
    }

    .planet-menu-btn,
    .theme-toggle {
      display: none !important;
    }
  }

  /* ── About Section ── */

  .about {
    padding: clamp(48px, 6vh, 80px) 0;
  }

  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: end;
    margin-top: 32px;
  }

  .about-text {
    color: var(--fg-muted);
    line-height: 1.8;
    font-size: 18px;
  }

  .about-text p + p {
    margin-top: 20px;
  }

  .about-cv {
    text-align: right;
    margin-top: 0;
    width: 100%;
  }

  .about-cv a {
    color: var(--fg-muted);
    text-decoration: none;
    font-size: 16px;
    letter-spacing: 0.02em;
    transition: color 0.2s;
    display: inline;
  }

  .about-cv a:hover {
    color: var(--fg);
    font-weight: 600;
  }

  .about-links {
    list-style: none;
    padding-top: 8px;
  }

  .about-links li {
    padding: 12px 0;
    border-bottom: 1px solid var(--fg-faint);
  }

  .about-links a {
    color: var(--fg);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
  }

  .about-links a:hover {
    color: var(--accent-1);
  }

  .about-links .link-arrow {
    font-size: 18px;
    opacity: 0.4;
    transition: opacity 0.2s, transform 0.2s;
  }

  .about-links a:hover .link-arrow {
    opacity: 1;
    transform: translateX(4px);
  }

  /* ── Footer ── */

  .contact {
    border-top: 1px solid var(--fg-faint);
    padding: clamp(48px, 6vh, 80px) 0;
  }

  .about-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid var(--fg-faint);
  }

  .footer-text {
    font-size: 13px;
    color: var(--fg-dim);
  }

  .footer-text a {
    color: var(--fg-dim);
    text-decoration: none;
    transition: font-weight 0.2s;
  }

  .footer-text a:hover {
    font-weight: 600;
  }

  /* ── Scroll Animations ── */

  .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }

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

  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }

  /* ── Tags ── */

  .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
  }

  .tag {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid var(--fg-dim);
    color: var(--fg-muted);
  }

  /* ── Planet Menu ── */

  .planet-menu-btn {
    position: fixed;
    top: 26px;
    left: 41px;
    z-index: 210;
    background: none;
    border: none;
    width: 66px;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--fg-muted);
    transition: color 0.2s, opacity 0.4s;
    padding: 0;
  }

  .planet-menu-btn:hover { color: var(--fg); }
  .planet-menu-btn .planet-body { fill: transparent; transition: fill 0.25s ease; }
  .planet-menu-btn:hover .planet-body { fill: var(--fg); }
  .planet-menu-btn.hidden { opacity: 0; pointer-events: none; }

  .planet-icon-wrap {
    position: relative;
    width: 60px;
    height: 60px;
  }

  .planet-icon-wrap svg {
    width: 100%;
    height: 100%;
  }

  .planet-ring {
    animation: ringTilt 24s ease-in-out infinite;
    transform-origin: 24px 24px;
  }

  @keyframes ringTilt {
    0%, 100% { transform: rotate(-25deg); }
    50%      { transform: rotate(25deg); }
  }

  .planet-moon-orbit {
    position: absolute;
    inset: 0;
    animation: ringTilt 24s ease-in-out infinite;
    pointer-events: none;
  }

  .planet-moon {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--fg);
    top: calc(50% + 1px);
    left: calc(50% - 2px);
    animation: moonEllipse 5s linear infinite;
  }

  @keyframes moonEllipse {
    0%      { transform: translate(25px, 0px); }
    8.33%   { transform: translate(21.7px, 4.4px); }
    16.67%  { transform: translate(12.5px, 7.6px); }
    25%     { transform: translate(0px, 8.8px); }
    33.33%  { transform: translate(-12.5px, 7.6px); }
    41.67%  { transform: translate(-21.7px, 4.4px); }
    50%     { transform: translate(-25px, 0px); }
    58.33%  { transform: translate(-21.7px, -4.4px); }
    66.67%  { transform: translate(-12.5px, -7.6px); }
    75%     { transform: translate(0px, -8.8px); }
    83.33%  { transform: translate(12.5px, -7.6px); }
    91.67%  { transform: translate(21.7px, -4.4px); }
    100%    { transform: translate(25px, 0px); }
  }

  .planet-panel {
    position: fixed;
    top: 113px;
    left: 41px;
    width: 240px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    background: rgba(18, 18, 18, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 8px;
    padding: 14px;
    z-index: 200;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    display: none;
    flex-direction: column;
    gap: 10px;
  }

  .planet-panel::-webkit-scrollbar { width: 4px; }
  .planet-panel::-webkit-scrollbar-track { background: transparent; }
  .planet-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

  [data-theme="light"] .planet-panel {
    background: rgba(245, 245, 245, 0.93);
  }
  [data-theme="light"] .planet-panel::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); }

  .planet-panel.open { display: flex; }


  .planet-panel-section {
    font-size: 9px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.15s;
  }

  .planet-panel-section:hover { color: rgba(255,255,255,0.55); }

  .planet-panel-section::after {
    content: '−';
    font-size: 11px;
    opacity: 0.5;
  }

  .planet-panel-section.collapsed::after {
    content: '+';
  }

  [data-theme="light"] .planet-panel-section {
    color: rgba(0,0,0,0.35);
    border-bottom-color: rgba(0,0,0,0.06);
  }

  [data-theme="light"] .planet-panel-section:hover { color: rgba(0,0,0,0.55); }

  .planet-panel-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .planet-panel-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
  }

  .planet-panel-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.4);
  }

  [data-theme="light"] .planet-panel-label { color: rgba(0,0,0,0.5); }

  .planet-panel-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .planet-panel input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 1.5px;
    background: rgba(255,255,255,0.13);
    border-radius: 1px;
    outline: none;
  }

  [data-theme="light"] .planet-panel input[type="range"] {
    background: rgba(0,0,0,0.15);
  }

  .planet-panel input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.65);
    box-shadow: 0 0 4px rgba(255,255,255,0.15);
    cursor: pointer;
  }

  [data-theme="light"] .planet-panel input[type="range"]::-webkit-slider-thumb {
    background: rgba(0,0,0,0.55);
    box-shadow: 0 0 4px rgba(0,0,0,0.1);
  }

  .planet-panel-value {
    font-size: 8px;
    color: rgba(255,255,255,0.78);
    min-width: 30px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px dotted transparent;
    transition: border-color 0.15s;
  }

  .planet-panel-value:hover {
    border-bottom-color: rgba(255,255,255,0.25);
  }

  [data-theme="light"] .planet-panel-value { color: rgba(0,0,0,0.72); }
  [data-theme="light"] .planet-panel-value:hover { border-bottom-color: rgba(0,0,0,0.2); }

  /* ── Value Editor Popover ── */

  .planet-value-editor {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: rgba(24, 24, 24, 0.96);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 310;
    min-width: 130px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  }

  [data-theme="light"] .planet-value-editor {
    background: rgba(240, 240, 240, 0.96);
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  }

  .planet-value-editor-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .planet-value-editor-label {
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.35);
    min-width: 22px;
  }

  [data-theme="light"] .planet-value-editor-label { color: rgba(0,0,0,0.35); }

  .planet-value-editor input {
    width: 56px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 3px;
    color: rgba(255,255,255,0.8);
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 9px;
    padding: 3px 5px;
    text-align: right;
    outline: none;
  }

  .planet-value-editor input:focus {
    border-color: rgba(255,255,255,0.25);
  }

  [data-theme="light"] .planet-value-editor input {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
    color: rgba(0,0,0,0.8);
  }

  [data-theme="light"] .planet-value-editor input:focus {
    border-color: rgba(0,0,0,0.25);
  }

  /* Theme toggle row inside planet panel */
  .planet-theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .planet-theme-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.4);
  }

  [data-theme="light"] .planet-theme-label { color: rgba(0,0,0,0.5); }

  .planet-theme-toggle {
    width: 28px;
    height: 14px;
    border-radius: 7px;
    background: rgba(255,255,255,0.10);
    position: relative;
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background 0.15s ease;
  }

  .planet-theme-toggle.on { background: rgba(255,255,255,0.38); }

  [data-theme="light"] .planet-theme-toggle { background: rgba(0,0,0,0.10); }
  [data-theme="light"] .planet-theme-toggle.on { background: rgba(0,0,0,0.32); }

  .planet-theme-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.65);
    transition: left 0.15s ease;
  }

  .planet-theme-toggle.on::after { left: 16px; }

  [data-theme="light"] .planet-theme-toggle::after { background: rgba(0,0,0,0.55); }

  /* ── Save Defaults Button ── */

  .planet-save-btn {
    margin-top: 4px;
    padding: 6px 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    color: rgba(255,255,255,0.4);
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.15s;
  }

  .planet-save-btn:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
  }

  .planet-save-btn.saved {
    color: rgba(128, 234, 172, 0.8);
    border-color: rgba(128, 234, 172, 0.15);
  }

  [data-theme="light"] .planet-save-btn {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
    color: rgba(0,0,0,0.4);
  }

  [data-theme="light"] .planet-save-btn:hover {
    background: rgba(0,0,0,0.06);
    color: rgba(0,0,0,0.6);
  }

  [data-theme="light"] .planet-save-btn.saved {
    color: rgba(26, 138, 74, 0.8);
    border-color: rgba(26, 138, 74, 0.15);
  }

  /* ── Particle Debug Panel ── */

  .particle-debug {
    position: fixed;
    top: 12px;
    left: 12px;
    width: 220px;
    background: rgba(18, 18, 18, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 8px;
    padding: 14px;
    z-index: 200;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    display: none;
    flex-direction: column;
    gap: 10px;
  }

  .particle-debug.open { display: flex; }

  .particle-debug-title {
    font-size: 10px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: rgba(255,255,255,0.85);
  }

  .particle-debug-section {
    font-size: 9px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    margin-top: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .particle-debug-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .particle-debug-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.4);
  }

  .particle-debug-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .particle-debug input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 1.5px;
    background: rgba(255,255,255,0.13);
    border-radius: 1px;
    outline: none;
  }

  .particle-debug input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.65);
    box-shadow: 0 0 4px rgba(255,255,255,0.15);
    cursor: pointer;
  }

  .particle-debug input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 14px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 7px;
    padding: 0;
    cursor: pointer;
    background: none;
  }

  .particle-debug input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
  .particle-debug input[type="color"]::-webkit-color-swatch { border: none; border-radius: 6px; }

  .particle-debug-value {
    font-size: 8px;
    color: rgba(255,255,255,0.78);
    min-width: 30px;
    text-align: right;
    font-variant-numeric: tabular-nums;
  }

  /* ── Theme Toggle ── */

  .theme-toggle {
    position: fixed;
    top: 41px;
    right: 41px;
    z-index: 150;
    background: none;
    border: none;
    border-radius: 100px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--fg-muted);
    transition: color 0.2s, opacity 0.3s;
    flex-shrink: 0;
  }

  .theme-toggle:hover {
    color: var(--fg);
  }

  /* Nav theme toggle — absolutely positioned right */
  .theme-toggle-nav {
    position: absolute;
    right: clamp(24px, 5vw, 48px);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    border-radius: 100px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--fg-muted);
    transition: color 0.2s;
    flex-shrink: 0;
  }

  .theme-toggle-nav:hover {
    color: var(--fg);
  }

  .theme-toggle-nav svg {
    width: 16px;
    height: 16px;
  }

  .theme-toggle svg {
    width: 16px;
    height: 16px;
  }

  .theme-toggle .icon-sun,
  .theme-toggle-nav .icon-sun { display: none; }
  .theme-toggle .icon-moon,
  .theme-toggle-nav .icon-moon { display: block; }

  [data-theme="light"] .theme-toggle .icon-sun,
  [data-theme="light"] .theme-toggle-nav .icon-sun { display: block; }
  [data-theme="light"] .theme-toggle .icon-moon,
  [data-theme="light"] .theme-toggle-nav .icon-moon { display: none; }

  [data-theme="light"] .media-slot {
    background: rgba(0, 0, 0, 0.02);
  }

  /* ── Responsive ── */

  @media (max-width: 768px) {
    .phase {
      grid-template-columns: 1fr;
      gap: 16px;
    }

    .phase-label {
      position: static;
    }

    .about-grid {
      grid-template-columns: 1fr;
      gap: 48px;
    }

    .media-row {
      grid-template-columns: 1fr;
    }

    .nav-links {
      display: none;
    }

    .theme-toggle-nav {
      position: static;
      transform: none;
      right: auto;
      top: auto;
      margin-left: auto;
      flex-shrink: 0;
      order: 3;
    }

    .hamburger {
      order: 4;
      margin-left: 8px;
    }
  }
