/* ============================================================================
   universe-core.css — Projects Universe · CORE SHELL
   Continues the "Dark Gravitational" system (Portfolio/css/grav.css).

   Every colour / type / spacing / motion value lives in :root below.
   World packages (css/world-*.css) may READ these tokens; they must not
   redefine them.
   ========================================================================== */

:root {
    /* ---- Ground -------------------------------------------------------- */
    --u-void:        #030407;
    --u-deep:        #060a10;
    --u-mid:         #0d1520;

    /* ---- Hairlines ----------------------------------------------------- */
    --u-line-1:      rgba(255, 255, 255, 0.06);
    --u-line-2:      rgba(255, 255, 255, 0.12);
    --u-line-3:      rgba(255, 255, 255, 0.22);

    /* ---- Neutrals ------------------------------------------------------ */
    --u-silver:      #64748b;   /* decorative / large text only */
    --u-muted:       #94a3b8;   /* mono metadata */
    --u-light:       #cbd5e1;   /* body prose */
    --u-white:       #f1f5f9;   /* display */
    --u-pure:        #ffffff;

    /* ---- World accents (worlds consume these) -------------------------- */
    --u-accent-live:            #f5f3ef;   /* warm white */
    --u-accent-live-2:          #a78bfa;   /* violet cast */
    --u-accent-agents:          #22d3ee;   /* cyan */
    --u-accent-agents-2:        #3b82f6;   /* electric blue */
    --u-accent-generators:      #8b5cf6;   /* violet */
    --u-accent-generators-2:    #d946ef;   /* magenta */
    --u-accent-generators-3:    #3b82f6;   /* cool blue ground */
    --u-accent-experiments:     #ffffff;
    --u-accent-experiments-2:   #b8ff3c;   /* acid green */

    /* status colours — always paired with the status WORD, never alone */
    --u-status-live:         #7dd3a0;
    --u-status-private:      #94a3b8;
    --u-status-open:         #a78bfa;
    --u-status-experimental: #b8ff3c;

    /* ---- Type ---------------------------------------------------------- */
    --u-font-display: 'Space Grotesk', system-ui, sans-serif;
    --u-font-mono:    'JetBrains Mono', ui-monospace, monospace;

    --u-t-hero:    clamp(44px, 7vw, 104px);
    --u-t-world:   clamp(25.6px, 3.2vw, 46.4px);
    --u-t-title:   clamp(32px, 4.5vw, 57.6px);
    --u-t-lead:    clamp(18px, 1.6vw, 22px);
    --u-t-body:    16px;          /* 16px floor */
    --u-t-meta:    13px;
    --u-t-micro:   11px;
    --u-t-numeral: clamp(112px, 15vw, 240px);

    --u-track-display: -0.04em;   /* tracking tightens at display sizes */
    --u-track-title:   -0.025em;
    --u-track-mono:    0.16em;
    --u-lh-body:       1.65;
    --u-lh-display:    1.02;

    /* ---- Spacing (8px rhythm, relaxed tier) ---------------------------- */
    --u-s1: 8px;
    --u-s2: 16px;
    --u-s3: 24px;
    --u-s4: 32px;
    --u-s5: 48px;
    --u-s6: 64px;
    --u-s7: 96px;

    /* ---- Motion -------------------------------------------------------- */
    --u-ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
    --u-ease-exit:  cubic-bezier(0.4, 0, 0.2, 1);
    --u-d-micro:    180ms;
    --u-d-micro-lg: 300ms;
    --u-d-scene:    400ms;
    --u-d-warp:     1050ms;   /* fluid 60fps cinematic traversal */
    --u-d-warp-out: 850ms;

    /* ---- Layers -------------------------------------------------------- */
    --u-z-grain:    1009000;
    --u-z-universe: 1000800;
    --u-z-chrome:   1000860;
    --u-z-detail:   1000900;
    --u-z-warp:     1009500;

    /* ---- Misc ---------------------------------------------------------- */
    --u-tap: 44px;                /* minimum touch target */
    --u-glow-soft: 0 0 80px rgba(167, 139, 250, 0.10);
}

/* ============================================================================
   RESET / BASE
   ========================================================================== */
/* PORTED: every rule below is scoped to the universe roots so nothing in this
   file reaches the rest of the portfolio. The standalone build set these
   globally on html/body/a/:focus-visible; here the host page owns those. */

.u-portal, .u-portal *, .u-portal *::before, .u-portal *::after,
#universe, #universe *, #universe *::before, #universe *::after,
#u-chrome, #u-chrome *, #u-chrome *::before, #u-chrome *::after,
#u-detail, #u-detail *, #u-detail *::before, #u-detail *::after,
#u-warp, #u-warp * { box-sizing: border-box; }

.u-portal, #universe, #u-chrome, #u-detail {
    color: var(--u-light);
    font-family: var(--u-font-display);
    font-size: var(--u-t-body);
    line-height: var(--u-lh-body);
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}

#universe { background: var(--u-void); }

/* stable scrollbar gutter prevents horizontal reflow when locking/unlocking body */
html {
    scrollbar-gutter: stable;
}

/* body scroll lock while the universe overlay is open */
html.u-locked,
body.u-locked {
    overflow: hidden !important;
    height: 100% !important;
}

.u-portal a, #universe a, #u-chrome a, #u-detail a {
    color: inherit;
    text-decoration: none;
}

/* Focus affordance. The portfolio's reset sets `* { outline: none }`, so this
   scoped rule has to out-specify it or keyboard users lose every focus ring. */
.u-portal :focus-visible,
#universe :focus-visible,
#u-chrome :focus-visible,
#u-detail :focus-visible {
    outline: 1px solid var(--u-pure);
    outline-offset: 4px;
    border-radius: 2px;
}

.u-sr {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Shared thin-stroke icon rule — single line set, uniform 1.5px. */
.u-icon {
    width: 16px; height: 16px;
    flex: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* ---- Grain (very low opacity static noise) ----------------------------- */
.u-grain {
    position: fixed;
    inset: 0;
    z-index: var(--u-z-grain);
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.55'/></svg>");
}

/* ============================================================================
   PAGE FRAME — minimal context only. Not the real portfolio.
   ========================================================================== */
.u-frame-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--u-s3);
    padding: var(--u-s3) 6%;
    border-bottom: 1px solid var(--u-line-1);
    font-family: var(--u-font-mono);
    font-size: var(--u-t-meta);
    font-weight: 500;
    letter-spacing: var(--u-track-mono);
    text-transform: uppercase;
    color: var(--u-muted);
}

.u-frame-header__mark { color: var(--u-white); }

/* ============================================================================
   LEVEL 1 — THE BLACK HOLE PORTAL  (#projects)
   Authored as one liftable block.
   ========================================================================== */
/* ============================================================================
   LEVEL 1 — THE NEBULA OF CREATION (#projects)
   Sangramjeet wielding the cosmic vortex in his cybernetic gauntlet.
   ========================================================================== */
.u-portal.nebula-portal-stage {
    position: relative;
    background: transparent;
    min-height: auto;
    height: auto;
    padding: 1rem 0 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    width: 100%;
    margin: 0;
}

.projects-header-sub {
    font-family: var(--u-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.95rem;
    color: rgba(148, 163, 184, 0.85);
    margin-top: 0.5rem;
    letter-spacing: 0.04em;
}

.nebula-stage-backdrop {
    display: none;
}

.nebula-figure-wrap {
    --nebula-tx: -70px;
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: flex-end;
    max-width: 580px;
    margin: 0 auto;
    z-index: 2;
    transform-origin: 87.5% 13.3%;
    transform: translate3d(var(--nebula-tx), 0, 0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.nebula-hero-figure {
    display: block;
    max-width: 100%;
    height: min(780px, 82vh);
    width: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.95));
    transition: filter 0.4s ease;
    position: relative;
    z-index: 2;
}

.nebula-floor-shadow {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 380px;
    height: 52px;
    background: radial-gradient(ellipse at center,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        transparent 80%);
    filter: blur(14px);
    z-index: 1;
}

/* ============================================================================
   COSMIC BACKDROP AURA (BEHIND CHARACTER & NEBULA)
   Anchored directly behind his hand: 87.5% X, 13.3% Y, z-index: 1
   Rays outwards without obscuring the foreground artwork.
   ========================================================================== */
.nebula-hand-backdrop-aura {
    position: absolute;
    left: 87.5%;
    top: 13.3%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255, 30, 85, 0.32) 0%,
        rgba(217, 70, 239, 0.20) 35%,
        rgba(147, 51, 234, 0.08) 60%,
        transparent 75%);
    filter: blur(28px);
    z-index: 1;
    pointer-events: none;
    animation: nebulaBackdropBreathe 4.5s ease-in-out infinite alternate;
}

/* ============================================================================
   NEBULA ORB & PERIMETER PARTICLES ZONE
   Anchored to hand: 87.5% X, 13.3% Y (Center is 100% transparent to show photo)
   ========================================================================== */
.nebula-hand-orb-zone {
    position: absolute;
    left: 87.5%;
    top: 13.3%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    z-index: 10;
    pointer-events: none;
}

/* Hollow Outer Atmospheric Corona (Center 0%-45% transparent - art remains 100% visible) */
.nebula-outer-corona {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle,
        transparent 0%,
        transparent 45%,
        rgba(255, 45, 100, 0.22) 65%,
        rgba(217, 70, 239, 0.12) 80%,
        transparent 94%);
    filter: blur(8px);
    pointer-events: none;
    animation: nebulaCoronaBreathe 4s ease-in-out infinite alternate;
}

/* Expanding Delicate Ethereal Pulse Rings */
.nebula-faint-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 1px solid rgba(255, 60, 130, 0.45);
    background: transparent;
    pointer-events: none;
}

.nebula-faint-pulse.pulse-1 {
    animation: nebulaPulseExpand 4s cubic-bezier(0.1, 0.7, 0.3, 1) infinite;
}

.nebula-faint-pulse.pulse-2 {
    animation: nebulaPulseExpand 4s cubic-bezier(0.1, 0.7, 0.3, 1) 2s infinite;
}

/* Floating Cosmic Particles & Embers Drifting Around Nebula */
.nebula-particles-wrap {
    position: absolute;
    inset: -60px;
    pointer-events: none;
}

.neb-spark {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}
.neb-spark.p-1 { top: 22px; left: 65px; width: 3px; height: 3px; background: #ff4d8d; box-shadow: 0 0 8px #ff4d8d, 0 0 14px #ff2a6d; animation: particleDrift1 3.6s ease-in-out infinite; }
.neb-spark.p-2 { top: 45px; left: 30px; width: 2.5px; height: 2.5px; background: #ffffff; box-shadow: 0 0 6px #ffffff, 0 0 10px #e066ff; animation: particleDrift2 4.2s ease-in-out infinite 0.4s; }
.neb-spark.p-3 { top: 12px; left: 120px; width: 3.5px; height: 3.5px; background: #d946ef; box-shadow: 0 0 8px #d946ef, 0 0 16px #ff007f; animation: particleDrift3 3.8s ease-in-out infinite 0.8s; }
.neb-spark.p-4 { top: 95px; left: 25px; width: 2px; height: 2px; background: #ff6699; box-shadow: 0 0 6px #ff6699; animation: particleDrift4 4.5s ease-in-out infinite 1.2s; }
.neb-spark.p-5 { top: 180px; left: 55px; width: 3px; height: 3px; background: #ffffff; box-shadow: 0 0 8px #ffffff, 0 0 12px #ff4d8d; animation: particleDrift1 3.9s ease-in-out infinite 1.6s; }
.neb-spark.p-6 { top: 15px; left: 180px; width: 2.5px; height: 2.5px; background: #f43f5e; box-shadow: 0 0 6px #f43f5e, 0 0 12px #d946ef; animation: particleDrift2 4.4s ease-in-out infinite 0.6s; }
.neb-spark.p-7 { top: 160px; left: 185px; width: 3px; height: 3px; background: #e879f9; box-shadow: 0 0 8px #e879f9; animation: particleDrift3 4.1s ease-in-out infinite 2.0s; }
.neb-spark.p-8 { top: 60px; left: 215px; width: 2px; height: 2px; background: #ffffff; box-shadow: 0 0 6px #ffffff; animation: particleDrift4 3.7s ease-in-out infinite 1.0s; }
.neb-spark.p-9 { top: 205px; left: 120px; width: 3px; height: 3px; background: #ff2a6d; box-shadow: 0 0 8px #ff2a6d; animation: particleDrift2 4.7s ease-in-out infinite 2.4s; }
.neb-spark.p-10 { top: 110px; left: 225px; width: 2.5px; height: 2.5px; background: #c084fc; box-shadow: 0 0 6px #c084fc; animation: particleDrift1 4.3s ease-in-out infinite 1.8s; }

/* Interactive Hotspot Trigger Button */
.nebula-interactive-hotspot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    cursor: pointer;
    pointer-events: auto;
    z-index: 25;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nebula-interactive-hotspot:hover ~ .nebula-outer-corona,
.nebula-hand-orb-zone:hover .nebula-outer-corona {
    transform: translate(-50%, -50%) scale(1.15);
    filter: blur(6px) brightness(1.3);
}

/* Floating Holographic Beacon */
.nebula-floating-beacon {
    position: absolute;
    left: 115px;
    top: -30px;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    z-index: 30;
    animation: floatCallout 4.2s ease-in-out infinite;
    white-space: nowrap;
}

.beacon-tether-line {
    position: relative;
    width: 44px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 60, 140, 0.9), rgba(217, 70, 239, 0.3));
    box-shadow: 0 0 8px rgba(255, 60, 140, 0.8);
}

.beacon-tether-line .tether-joint {
    position: absolute;
    left: -4px;
    top: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff2a6d;
    box-shadow: 0 0 10px #ff2a6d;
}

.beacon-glass-card {
    background: rgba(8, 11, 18, 0.84);
    border: 1px solid rgba(255, 60, 130, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 16px 22px;
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.8),
        0 0 25px rgba(255, 30, 85, 0.22);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-align: left;
}

.beacon-glass-card:hover {
    transform: translateY(-3px) scale(1.03);
    border-color: rgba(255, 60, 140, 0.75);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.9),
        0 0 35px rgba(255, 45, 120, 0.45);
}

.beacon-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.beacon-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff0055;
    box-shadow: 0 0 10px #ff0055;
    animation: beaconDotBlink 1.6s infinite ease-in-out;
}

.beacon-tag {
    font-family: var(--u-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: rgba(255, 100, 150, 0.9);
    text-transform: uppercase;
}

.beacon-title {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #ff80bf 60%, #e066ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 60, 130, 0.4);
}

.beacon-sub {
    margin: 0 0 10px;
    font-family: var(--u-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.76rem;
    color: rgba(203, 213, 225, 0.75);
    letter-spacing: 0.04em;
}

.beacon-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ff2a6d;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: gap 0.25s ease, color 0.25s ease;
}

.beacon-glass-card:hover .beacon-action {
    gap: 10px;
    color: #ff6699;
}

.beacon-action i {
    font-size: 1.1rem;
    transition: transform 0.25s ease;
}

.beacon-glass-card:hover .beacon-action i {
    transform: translateX(3px);
}

/* Animations */
@keyframes nebulaBackdropBreathe {
    0% { transform: translate(-50%, -50%) scale(0.88); opacity: 0.65; }
    100% { transform: translate(-50%, -50%) scale(1.14); opacity: 0.95; }
}

@keyframes nebulaCoronaBreathe {
    0% { transform: translate(-50%, -50%) scale(0.94); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

@keyframes nebulaPulseExpand {
    0% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1.9); opacity: 0; }
}

@keyframes particleDrift1 {
    0% { transform: translate(0, 0) scale(0.8); opacity: 0; }
    25% { opacity: 0.95; }
    50% { transform: translate(14px, -18px) scale(1.1); opacity: 0.95; }
    75% { opacity: 0.7; }
    100% { transform: translate(24px, -36px) scale(0.5); opacity: 0; }
}

@keyframes particleDrift2 {
    0% { transform: translate(0, 0) scale(0.7); opacity: 0; }
    30% { opacity: 0.9; }
    60% { transform: translate(-14px, -22px) scale(1.2); opacity: 0.9; }
    80% { opacity: 0.6; }
    100% { transform: translate(-24px, -42px) scale(0.4); opacity: 0; }
}

@keyframes particleDrift3 {
    0% { transform: translate(0, 0) scale(0.9); opacity: 0; }
    20% { opacity: 0.95; }
    50% { transform: translate(16px, -24px) scale(1.2); opacity: 1; }
    80% { opacity: 0.5; }
    100% { transform: translate(28px, -48px) scale(0.4); opacity: 0; }
}

@keyframes particleDrift4 {
    0% { transform: translate(0, 0) scale(0.8); opacity: 0; }
    35% { opacity: 0.85; }
    70% { transform: translate(-12px, -28px) scale(1.05); opacity: 0.85; }
    100% { transform: translate(-20px, -50px) scale(0.4); opacity: 0; }
}

@keyframes floatCallout {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes beaconDotBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.75); }
}

/* Responsive Media Queries */
@media (max-width: 1200px) {
    .nebula-figure-wrap {
        --nebula-tx: -40px;
    }
}

@media (max-width: 1024px) {
    .nebula-figure-wrap {
        --nebula-tx: 0px;
    }
    .nebula-floating-beacon {
        left: 50%;
        top: -65px;
        transform: translateX(-50%);
        white-space: normal;
    }
    .beacon-tether-line { display: none; }
}

@media (max-width: 768px) {
    .nebula-figure-wrap {
        --nebula-tx: 0px;
    }
    .nebula-hero-figure {
        height: min(560px, 70vh);
    }
    .nebula-hand-backdrop-aura {
        width: 220px;
        height: 220px;
    }
    .nebula-floating-beacon {
        position: relative;
        left: auto;
        top: auto;
        margin-top: 1.5rem;
        transform: none;
    }
    .beacon-glass-card {
        padding: 12px 16px;
    }
}

/* ============================================================================
   PULL-THROUGH WARP OVERLAY (CINEMATIC NEBULA TRAVERSAL — 60 FPS)
   ========================================================================== */
.u-warp {
    position: fixed;
    inset: 0;
    z-index: var(--u-z-warp);
    pointer-events: none;
    opacity: 0;
    background: #000;
    visibility: hidden;
    will-change: opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.u-warp__rgb {
    position: absolute;
    inset: 0;
    mix-blend-mode: screen;
    opacity: 0;
    background:
        repeating-conic-gradient(from 0deg at 50% 50%,
            rgba(255, 255, 255, 0.16) 0deg 0.6deg, transparent 0.6deg 3deg);
    mask-image: radial-gradient(circle at 50% 50%, #000 10%, rgba(0,0,0,0.85) 38%, transparent 75%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 10%, rgba(0,0,0,0.85) 38%, transparent 75%);
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.u-warp__rgb--r { background-color: rgba(255, 30, 90, 0.35); }
.u-warp__rgb--g { background-color: rgba(217, 70, 239, 0.25); }
.u-warp__rgb--b { background-color: rgba(56, 189, 248, 0.30); }

.u-warp__core {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%,
        #ffffff 0%,
        rgba(255, 42, 109, 0.95) 8%,
        rgba(217, 70, 239, 0.65) 20%,
        rgba(139, 92, 246, 0.35) 38%,
        transparent 65%);
    opacity: 0;
    transform: scale3d(0.15, 0.15, 1);
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* forward warp into the nebula */
.u-warp.is-in {
    visibility: visible;
    animation: u-warp-veil var(--u-d-warp) linear forwards;
}
.u-warp.is-in .u-warp__core  { animation: u-warp-core var(--u-d-warp) var(--u-ease-exit) forwards; }
.u-warp.is-in .u-warp__rgb--r { animation: u-warp-rgb var(--u-d-warp) var(--u-ease-exit) forwards; --u-dx: -28px; }
.u-warp.is-in .u-warp__rgb--g { animation: u-warp-rgb var(--u-d-warp) var(--u-ease-exit) forwards; --u-dx: 4px; }
.u-warp.is-in .u-warp__rgb--b { animation: u-warp-rgb var(--u-d-warp) var(--u-ease-exit) forwards; --u-dx: 32px; }

/* reverse warp coming back out of the nebula */
.u-warp.is-out {
    visibility: visible;
    animation: u-warp-veil-out var(--u-d-warp-out) cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.u-warp.is-out .u-warp__core  { animation: u-warp-core-out var(--u-d-warp-out) cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.u-warp.is-out .u-warp__rgb--r { animation: u-warp-rgb-out var(--u-d-warp-out) cubic-bezier(0.16, 1, 0.3, 1) forwards; --u-dx: 24px; }
.u-warp.is-out .u-warp__rgb--g { animation: u-warp-rgb-out var(--u-d-warp-out) cubic-bezier(0.16, 1, 0.3, 1) forwards; --u-dx: -4px; }
.u-warp.is-out .u-warp__rgb--b { animation: u-warp-rgb-out var(--u-d-warp-out) cubic-bezier(0.16, 1, 0.3, 1) forwards; --u-dx: -24px; }

@keyframes u-warp-veil {
    0%   { opacity: 0; }
    26%  { opacity: 0.55; }
    62%  { opacity: 0.85; }
    /* controlled glitch using 3D transform */
    72%  { opacity: 0.55; transform: translate3d(4px, -2px, 0); }
    75%  { opacity: 0.95; transform: translate3d(-5px, 2px, 0); }
    78%  { opacity: 0.7;  transform: translate3d(2px, 2px, 0); }
    /* pure black frame */
    86%  { opacity: 1; transform: translate3d(0, 0, 0); }
    93%  { opacity: 1; transform: translate3d(0, 0, 0); }
    100% { opacity: 0; transform: translate3d(0, 0, 0); }
}

@keyframes u-warp-veil-out {
    0%   { opacity: 1; transform: translate3d(0, 0, 0); }
    12%  { opacity: 0.95; transform: translate3d(-3px, 2px, 0); }
    25%  { opacity: 0.75; transform: translate3d(2px, -1px, 0); }
    50%  { opacity: 0.45; transform: translate3d(0, 0, 0); }
    75%  { opacity: 0.15; }
    100% { opacity: 0; visibility: hidden; }
}

@keyframes u-warp-core {
    0%   { opacity: 0; transform: scale3d(0.12, 0.12, 1); }
    45%  { opacity: 0.95; transform: scale3d(1.6, 1.6, 1); }
    70%  { opacity: 0.6; transform: scale3d(3.5, 3.5, 1); }
    86%  { opacity: 0; transform: scale3d(5.5, 5.5, 1); }
    100% { opacity: 0; transform: scale3d(5.5, 5.5, 1); }
}

@keyframes u-warp-core-out {
    0%   { opacity: 0.95; transform: scale3d(4.5, 4.5, 1); }
    30%  { opacity: 0.8;  transform: scale3d(2.2, 2.2, 1); }
    65%  { opacity: 0.3;  transform: scale3d(0.8, 0.8, 1); }
    100% { opacity: 0;    transform: scale3d(0.12, 0.12, 1); }
}

/* particle streaks stretching toward the viewer + chromatic aberration */
@keyframes u-warp-rgb {
    0%   { opacity: 0; transform: translate3d(0, 0, 0) scale3d(0.6, 0.6, 1); }
    35%  { opacity: 0.85; transform: translate3d(var(--u-dx, 0), 0, 0) scale3d(1.9, 1.9, 1); }
    70%  { opacity: 0.6; transform: translate3d(calc(var(--u-dx, 0px) * 2), 0, 0) scale3d(4.4, 4.4, 1); }
    86%  { opacity: 0; transform: translate3d(0, 0, 0) scale3d(6, 6, 1); }
    100% { opacity: 0; }
}

@keyframes u-warp-rgb-out {
    0%   { opacity: 0.85; transform: translate3d(calc(var(--u-dx, 0px) * 2), 0, 0) scale3d(4.5, 4.5, 1); }
    35%  { opacity: 0.65; transform: translate3d(var(--u-dx, 0), 0, 0) scale3d(2.0, 2.0, 1); }
    70%  { opacity: 0.2;  transform: translate3d(0, 0, 0) scale3d(0.8, 0.8, 1); }
    100% { opacity: 0;    transform: translate3d(0, 0, 0) scale3d(0.4, 0.4, 1); }
}

/* ============================================================================
   NEBULA STAGE DIVE & EXIT ANIMATIONS (60 FPS HARDWARE ACCELERATED)
   Pure composite 3D transforms — zero layout reflow, zero dynamic filter jank.
   ========================================================================== */
.u-portal__stage,
.nebula-figure-wrap.u-portal__stage {
    transform-origin: 87.5% 13.3%;
}

.u-warping .u-portal__stage,
.u-warping .nebula-figure-wrap {
    transform-origin: 87.5% 13.3% !important;
    animation: u-nebula-dive var(--u-d-warp) cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
    pointer-events: none;
    transition: none !important;
    will-change: transform, opacity;
}

.u-warping-out .u-portal__stage,
.u-warping-out .nebula-figure-wrap {
    transform-origin: 87.5% 13.3% !important;
    animation: u-nebula-dive-out var(--u-d-warp-out) cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    pointer-events: none;
    transition: none !important;
    will-change: transform, opacity;
}

@keyframes u-nebula-dive {
    0% {
        transform: translate3d(var(--nebula-tx, -70px), 0, 0) scale3d(1, 1, 1) rotateZ(0deg);
        opacity: 1;
    }
    30% {
        transform: translate3d(calc(var(--nebula-tx, -70px) * 0.65), 0, 0) scale3d(2.6, 2.6, 1) rotateZ(2.5deg);
        opacity: 1;
    }
    65% {
        transform: translate3d(calc(var(--nebula-tx, -70px) * 0.25), 0, 0) scale3d(9.5, 9.5, 1) rotateZ(7deg);
        opacity: 0.85;
    }
    100% {
        transform: translate3d(0, 0, 0) scale3d(26, 26, 1) rotateZ(14deg);
        opacity: 0;
    }
}

@keyframes u-nebula-dive-out {
    0% {
        transform: translate3d(0, 0, 0) scale3d(26, 26, 1) rotateZ(14deg);
        opacity: 0;
    }
    20% {
        opacity: 0.85;
    }
    45% {
        transform: translate3d(calc(var(--nebula-tx, -70px) * 0.35), 0, 0) scale3d(8, 8, 1) rotateZ(6deg);
        opacity: 1;
    }
    75% {
        transform: translate3d(calc(var(--nebula-tx, -70px) * 0.75), 0, 0) scale3d(2.2, 2.2, 1) rotateZ(2deg);
        opacity: 1;
    }
    100% {
        transform: translate3d(var(--nebula-tx, -70px), 0, 0) scale3d(1, 1, 1) rotateZ(0deg);
        opacity: 1;
    }
}

/* Eliminate software rasterization blurs and drop-shadows during 26x scaling */
.u-warping .nebula-figure-wrap *,
.u-warping-out .nebula-figure-wrap * {
    filter: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.u-warping .nebula-particles-wrap,
.u-warping-out .nebula-particles-wrap,
.u-warping .nebula-faint-pulse,
.u-warping-out .nebula-faint-pulse,
.u-warping .nebula-outer-corona,
.u-warping-out .nebula-outer-corona,
.u-warping .nebula-hand-backdrop-aura,
.u-warping-out .nebula-hand-backdrop-aura,
.u-warping .nebula-floor-shadow,
.u-warping-out .nebula-floor-shadow {
    opacity: 0 !important;
    transition: opacity 0.15s ease;
}

.u-warping .nebula-floating-beacon,
.u-warping-out .nebula-floating-beacon {
    opacity: 0 !important;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.u-warping .beacon-glass-card,
.u-warping-out .beacon-glass-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.u-warping .projects-header,
.u-warping-out .projects-header {
    opacity: 0 !important;
    transition: opacity 0.2s ease;
}

/* universe reveal at the tail of the forward sequence (pure GPU transform, zero blur) */
.u-universe.is-revealing {
    animation: u-universe-reveal 420ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: opacity, transform;
}

@keyframes u-universe-reveal {
    from { opacity: 0; transform: scale3d(1.03, 1.03, 1); }
    to   { opacity: 1; transform: translate3d(0, 0, 0) scale3d(1, 1, 1); }
}

/* ============================================================================
   LEVEL 2 — THE UNIVERSE
   ========================================================================== */
.u-universe {
    position: fixed;
    inset: 0;
    z-index: var(--u-z-universe);
    background: var(--u-void);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    opacity: 1;
}

/* sleek dark universe scrollbar */
.u-universe::-webkit-scrollbar {
    width: 6px;
}
.u-universe::-webkit-scrollbar-track {
    background: rgba(3, 4, 7, 0.5);
}
.u-universe::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 3px;
}
.u-universe::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.32);
}

.u-universe[hidden] { display: none; }

/* soft volumetric light pools pinned to viewport */
.u-universe__light {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 45% 50% at 18% 26%, rgba(167, 139, 250, 0.09), transparent 70%),
        radial-gradient(ellipse 40% 45% at 82% 30%, rgba(34, 211, 238, 0.07), transparent 70%),
        radial-gradient(ellipse 42% 48% at 26% 78%, rgba(139, 92, 246, 0.07), transparent 72%),
        radial-gradient(ellipse 38% 42% at 78% 80%, rgba(184, 255, 60, 0.045), transparent 72%);
}

.u-universe__ambient {
    position: fixed;
    inset: 0;
    display: block;
    pointer-events: none;
}

/* u-universe__rule permanently disabled per user request */
.u-universe__rule,
.u-universe__rule--a,
.u-universe__rule--b,
.u-universe__rule--v {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.u-universe__field {
    position: relative;
    width: 100%;
    min-height: max(100vh, 920px);
    padding-bottom: 160px;
    box-sizing: border-box;
}

/* ---- World slots — asymmetric spatial composition ----------------------- */
.u-slot {
    position: absolute;
    display: block;
    width: clamp(260px, 30vw, 400px);
    padding: var(--u-s3);
    text-align: left;
    background: none;          /* NO CARDS */
    border: 0;
    border-left: 1px solid var(--u-line-1);
    color: var(--u-light);
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--u-d-scene) var(--u-ease-enter),
                border-color var(--u-d-micro-lg) var(--u-ease-enter),
                opacity var(--u-d-scene) var(--u-ease-enter);
}

.u-slot:hover,
.u-slot:focus-visible { border-left-color: var(--u-line-3); transform: translateY(-4px); }

.u-slot:focus-visible { outline: 1px solid var(--u-pure); outline-offset: 10px; }

.u-slot--live        { top: 10%; left: 8%;  --u-a1: var(--u-accent-live);        --u-a2: var(--u-accent-live-2); }
.u-slot--agents      { top: 16%; left: 58%; --u-a1: var(--u-accent-agents);      --u-a2: var(--u-accent-agents-2); }
.u-slot--generators  { top: 53%; left: 14%; --u-a1: var(--u-accent-generators);  --u-a2: var(--u-accent-generators-2); }
.u-slot--experiments { top: 56%; left: 60%; --u-a1: var(--u-accent-experiments); --u-a2: var(--u-accent-experiments-2); }

/* oversized numeral landmark */
.u-slot__num {
    position: absolute;
    top: -0.34em;
    left: -0.16em;
    z-index: 0;
    font-size: var(--u-t-numeral);
    font-weight: 100;
    line-height: 1;
    letter-spacing: var(--u-track-display);
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.04);
    pointer-events: none;
    user-select: none;
    transition: color var(--u-d-scene) var(--u-ease-enter);
}

.u-slot:hover .u-slot__num,
.u-slot:focus-visible .u-slot__num { color: rgba(255, 255, 255, 0.07); }

/* the world module renders its entity in here */
.u-slot__entity {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: clamp(120px, 15vh, 190px);
    margin-bottom: var(--u-s3);
}

.u-slot__fallback {
    position: absolute;
    inset: auto 0 0 0;
    height: 1px;
    background: linear-gradient(90deg, var(--u-a1, var(--u-white)), transparent);
    opacity: 0.4;
}

.u-slot--mounted .u-slot__fallback { display: none; }

.u-slot__title {
    display: block;
    position: relative;
    z-index: 1;
    margin: 0 0 var(--u-s1);
    font-size: var(--u-t-world);
    font-weight: 400;
    letter-spacing: var(--u-track-title);
    line-height: 1.08;
    color: var(--u-white);
}

.u-slot__sub {
    display: block;
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: var(--u-t-body);
    line-height: var(--u-lh-body);
    color: var(--u-light);
}

.u-slot__meta {
    display: block;
    position: relative;
    z-index: 1;
    margin-top: var(--u-s2);
    font-family: var(--u-font-mono);
    font-size: var(--u-t-micro);
    font-weight: 500;
    letter-spacing: var(--u-track-mono);
    text-transform: uppercase;
    color: var(--u-silver);
}

/* world route active — slots and background spatial hairlines recede completely */
.u-universe.is-world .u-universe__field,
.u-universe.is-world .u-universe__rule {
    opacity: 0 !important;
    pointer-events: none !important;
    display: none !important;
}
.u-universe__field { transition: opacity var(--u-d-scene) var(--u-ease-enter); }

/* ---- per-world full-screen project environments ------------------------- */
.u-worldstage {
    position: absolute;
    inset: 0;
    padding: calc(var(--u-s7) + var(--u-s4)) 6% var(--u-s6);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity var(--u-d-scene) var(--u-ease-enter),
                transform var(--u-d-scene) var(--u-ease-enter);
}

.u-worldstage::-webkit-scrollbar {
    width: 6px;
}
.u-worldstage::-webkit-scrollbar-track {
    background: rgba(3, 4, 7, 0.5);
}
.u-worldstage::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 3px;
}
.u-worldstage::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.32);
}

.u-worldstage.is-active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

/* Core fallback list, shown when a world module never registered. */
.u-worldstage__fallback { max-width: 820px; }

.u-worldstage__heading {
    margin: 0 0 var(--u-s2);
    font-size: var(--u-t-title);
    font-weight: 400;
    letter-spacing: var(--u-track-title);
    color: var(--u-white);
}

.u-worldstage__lead {
    margin: 0 0 var(--u-s5);
    font-size: var(--u-t-lead);
    line-height: var(--u-lh-body);
    color: var(--u-light);
    max-width: 52ch;
}

.u-plainlist { margin: 0; padding: 0; list-style: none; }

.u-plainlist__item { border-top: 1px solid var(--u-line-1); }

.u-plainlist__btn {
    display: flex;
    align-items: baseline;
    gap: var(--u-s3);
    width: 100%;
    min-height: var(--u-tap);
    padding: var(--u-s3) var(--u-s2) var(--u-s3) 0;
    background: none;
    border: 0;
    color: var(--u-light);
    font-family: inherit;
    font-size: var(--u-t-lead);
    font-weight: 300;
    letter-spacing: var(--u-track-title);
    text-align: left;
    cursor: pointer;
    transition: color var(--u-d-micro) var(--u-ease-enter),
                transform var(--u-d-micro) var(--u-ease-enter);
}

.u-plainlist__btn:hover { color: var(--u-white); transform: translateX(6px); }

.u-plainlist__idx {
    font-family: var(--u-font-mono);
    font-size: var(--u-t-micro);
    letter-spacing: var(--u-track-mono);
    color: var(--u-silver);
}

/* ============================================================================
   NAVIGATION CHROME
   ========================================================================== */
.u-chrome {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: var(--u-z-chrome);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--u-s3);
    padding: var(--u-s2) 6%;
    background: rgba(3, 4, 7, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--u-line-1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

.u-chrome[hidden] { display: none; }

.u-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--u-s1);
    pointer-events: auto;
    font-family: var(--u-font-mono);
    font-size: var(--u-t-micro);
    font-weight: 500;
    letter-spacing: var(--u-track-mono);
    text-transform: uppercase;
}

.u-crumbs a,
.u-crumbs span {
    display: inline-flex;
    align-items: center;
    min-height: var(--u-tap);
    padding: 0 var(--u-s1);
    color: var(--u-muted);
    text-decoration: none;
    transition: color var(--u-d-micro) var(--u-ease-enter);
}

.u-crumbs a:hover { color: var(--u-white); }
.u-crumbs [aria-current='page'] { color: var(--u-white); }
.u-crumbs__sep { color: var(--u-silver); opacity: 0.6; padding: 0; min-height: 0; }

.u-exit {
    display: inline-flex;
    align-items: center;
    gap: var(--u-s1);
    min-height: var(--u-tap);
    min-width: var(--u-tap);
    padding: 0 var(--u-s2);
    pointer-events: auto;
    background: none;
    border: 1px solid var(--u-line-2);
    color: var(--u-light);
    font-family: var(--u-font-mono);
    font-size: var(--u-t-micro);
    font-weight: 500;
    letter-spacing: var(--u-track-mono);
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: border-color var(--u-d-micro) var(--u-ease-enter),
                color var(--u-d-micro) var(--u-ease-enter);
}

.u-exit:hover { border-color: var(--u-line-3); color: var(--u-white); }

/* ============================================================================
   PROJECT DETAIL VIEW (shared by all four worlds — worlds must not build one)
   ========================================================================== */
.u-detail {
    position: fixed;
    inset: 0;
    z-index: var(--u-z-detail);
    display: flex;
    justify-content: flex-end;
    background: linear-gradient(90deg, rgba(3, 4, 7, 0.55), rgba(3, 4, 7, 0.94) 42%);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity var(--u-d-scene) var(--u-ease-enter);
}

.u-detail[hidden] { display: none; }
.u-detail.is-open { opacity: 1; }

.u-detail__panel {
    position: relative;
    width: min(760px, 100%);
    height: 100%;
    padding: calc(var(--u-s7) + var(--u-s3)) clamp(var(--u-s3), 5vw, var(--u-s7)) var(--u-s6);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-left: 1px solid var(--u-line-2);
    transform: translateX(28px);
    opacity: 0;
    transition: transform var(--u-d-scene) var(--u-ease-enter),
                opacity var(--u-d-scene) var(--u-ease-enter);
}

.u-detail.is-open .u-detail__panel { transform: none; opacity: 1; }

.u-detail__eyebrow {
    display: flex;
    align-items: center;
    gap: var(--u-s2);
    margin-bottom: var(--u-s3);
    font-family: var(--u-font-mono);
    font-size: var(--u-t-micro);
    font-weight: 500;
    letter-spacing: var(--u-track-mono);
    text-transform: uppercase;
    color: var(--u-silver);
}

.u-detail__name {
    margin: 0 0 var(--u-s2);
    font-size: var(--u-t-title);
    font-weight: 400;
    letter-spacing: var(--u-track-display);
    line-height: 1.05;
    color: var(--u-white);
    text-wrap: balance;
}

.u-detail__blurb {
    margin: 0 0 var(--u-s5);
    padding-bottom: var(--u-s4);
    border-bottom: 1px solid var(--u-line-1);
    font-size: var(--u-t-lead);
    line-height: var(--u-lh-body);
    color: var(--u-light);
    max-width: 46ch;
}

.u-detail__sectitle {
    margin: 0 0 var(--u-s2);
    font-family: var(--u-font-mono);
    font-size: var(--u-t-micro);
    font-weight: 500;
    letter-spacing: var(--u-track-mono);
    text-transform: uppercase;
    color: var(--u-silver);
}

.u-detail__what {
    margin: 0 0 var(--u-s6);
    font-size: var(--u-t-body);
    line-height: 1.75;
    color: var(--u-light);
    max-width: 58ch;
}

/* mono chips on hairlines — no filled surfaces */
.u-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--u-s1);
    margin: 0 0 var(--u-s6);
    padding: 0;
    list-style: none;
}

.u-chip {
    padding: 6px 12px;
    border: 1px solid var(--u-line-2);
    font-family: var(--u-font-mono);
    font-size: var(--u-t-meta);
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--u-light);
}

/* status chip — WORD + colour, never colour alone */
.u-status {
    display: inline-flex;
    align-items: center;
    gap: var(--u-s1);
    padding: 6px 12px;
    border: 1px solid currentColor;
    font-family: var(--u-font-mono);
    font-size: var(--u-t-micro);
    font-weight: 600;
    letter-spacing: var(--u-track-mono);
    text-transform: uppercase;
}

.u-status::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.u-status--live         { color: var(--u-status-live); }
.u-status--private      { color: var(--u-status-private); }
.u-status--open         { color: var(--u-status-open); }
.u-status--experimental { color: var(--u-status-experimental); }

.u-detail__links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--u-s2);
    margin-top: var(--u-s5);
    padding-top: var(--u-s4);
    border-top: 1px solid var(--u-line-1);
}

.u-link-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--u-s1);
    min-height: var(--u-tap);
    padding: 0 var(--u-s3);
    border: 1px solid var(--u-line-2);
    color: var(--u-white);
    font-family: var(--u-font-mono);
    font-size: var(--u-t-meta);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: border-color var(--u-d-micro) var(--u-ease-enter),
                transform var(--u-d-micro) var(--u-ease-enter);
}

.u-link-btn:hover { border-color: var(--u-line-3); transform: translateY(-2px); }

.u-detail__note {
    margin: var(--u-s3) 0 0;
    font-family: var(--u-font-mono);
    font-size: var(--u-t-meta);
    color: var(--u-muted);
}

.u-detail__close {
    position: absolute;
    top: var(--u-s5);
    right: clamp(var(--u-s3), 5vw, var(--u-s6));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--u-s1);
    min-width: var(--u-tap);
    min-height: var(--u-tap);
    padding: 0 var(--u-s2);
    background: none;
    border: 1px solid var(--u-line-2);
    color: var(--u-light);
    font-family: var(--u-font-mono);
    font-size: var(--u-t-micro);
    letter-spacing: var(--u-track-mono);
    text-transform: uppercase;
    cursor: pointer;
}

.u-detail__close:hover { border-color: var(--u-line-3); color: var(--u-white); }

/* ============================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    /* reduce spatial complexity, keep all four worlds */
    .u-universe__rule--v { display: none; }

    .u-slot { width: clamp(240px, 42vw, 340px); }
    .u-slot--live        { top: 12%; left: 5%; }
    .u-slot--agents      { top: 14%; left: 52%; }
    .u-slot--generators  { top: 56%; left: 5%; }
    .u-slot--experiments { top: 58%; left: 52%; }
    .u-slot__entity { height: clamp(90px, 12vh, 140px); }
}

@media (max-width: 768px) {
    /* universe becomes a vertical scroll of four full-height world scenes */
    .u-universe { overflow-y: auto; -webkit-overflow-scrolling: touch; }

    .u-universe__light,
    .u-universe__ambient { position: fixed; }

    .u-universe__rule { display: none; }

    .u-universe__field {
        position: relative;
        inset: auto;
        display: block;
        padding-top: var(--u-s7);
    }

    .u-slot {
        position: relative;
        top: auto; left: auto;
        width: 100%;
        min-height: 88vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: var(--u-s6) 6%;
        border-left: 0;
        border-top: 1px solid var(--u-line-1);
    }

    .u-slot__num { top: var(--u-s3); left: 4%; font-size: clamp(80px, 28vw, 144px); }
    .u-slot__entity { height: 34vh; }

    .u-detail__panel { width: 100%; border-left: 0; }
    .u-chrome { padding: var(--u-s1) 4%; }
    .u-crumbs { font-size: 10px; }
    .u-worldstage { padding-left: 5%; padding-right: 5%; }
}

@media (max-width: 420px) {
    :root { --u-t-hero: clamp(32px, 11vw, 44px); }
    .u-frame-header { padding: var(--u-s2) 5%; font-size: var(--u-t-micro); }
}

/* ============================================================================
   REDUCED MOTION — kills particles, blur, aberration, glitch and grain.
   All content stays reachable; all routes keep working.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .u-grain,
    .u-portal__canvas,
    .u-universe__ambient,
    .u-warp__rgb,
    .u-warp__core { display: none; }

    /* the whole cinematic sequence collapses to a 200ms crossfade */
    .u-warp.is-in,
    .u-warp.is-out {
        visibility: visible;
        animation: none !important;
        opacity: 1;
        transition: opacity 200ms linear !important;
    }

    .u-warp.is-fading { opacity: 0; }

    .u-warping .u-portal__stage,
    .u-warping-out .u-portal__stage { animation: none !important; }

    .u-universe.is-revealing { animation: none !important; }

    #projects.u-portal { min-height: auto; }
    .u-portal__canvas { height: 0; }

    .u-portal__button {
        position: relative;
        inset: auto;
        border: 1px solid var(--u-line-2);
        padding: var(--u-s6) var(--u-s4);
    }

    .u-detail,
    .u-detail__panel { opacity: 1; transform: none; }
    .u-detail { backdrop-filter: none; background: rgba(3, 4, 7, 0.97); }
}
