/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 25% 75%, rgba(60, 0, 120, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 20%, rgba(0, 30, 100, 0.45) 0%, transparent 55%),
        #03020d;
    color: #fff;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* =========================================================
   CANVAS LAYERS
   ========================================================= */
#starfield,
#hex-canvas,
#noise-canvas,
#beam-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

#starfield    { z-index: 0; }
#hex-canvas   { z-index: 1; }
#noise-canvas { z-index: 2; }
#beam-canvas  { z-index: 3; }

/* =========================================================
   SCENE
   ========================================================= */
#scene {
position: fixed;
inset: 0;
z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}

/* =========================================================
   LOGO CONTAINER
   ========================================================= */
#logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    will-change: transform;
}

/* =========================================================
   LOGO IMAGE  – slides in from top, then glows
   ========================================================= */
#ff-logo {
    width: clamp(120px, 18vw, 200px);
    height: clamp(120px, 18vw, 200px);
    object-fit: contain;
    opacity: 0;
    transform: translateY(-100px);
    filter: drop-shadow(0 0 0px transparent);
    animation:
        logoSlideIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards,
        logoGlow    2.4s ease-in-out 1.8s infinite alternate;
}

@keyframes logoSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
        filter:
            drop-shadow(0 0 18px #00c8ff)
            drop-shadow(0 0 50px rgba(0, 110, 255, 0.6));
    }
}

@keyframes logoGlow {
    from {
        filter:
            drop-shadow(0 0 14px #00c8ff)
            drop-shadow(0 0 36px rgba(0, 110, 255, 0.5));
    }
    to {
        filter:
            drop-shadow(0 0 28px #00eeff)
            drop-shadow(0 0 72px rgba(0, 180, 255, 0.7))
            drop-shadow(0 0 110px rgba(100, 0, 255, 0.3));
    }
}

/* =========================================================
   "ffredyk" LETTER REVEAL
   ========================================================= */
#ff-name {
    display: flex;
    gap: 1px;
    font-family: 'Orbitron', 'Courier New', monospace;
    font-size: clamp(1.5rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: 0.18em;
    user-select: none;
}

.letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(12px);
    color: #fff;
    text-shadow:
        0 0 10px rgba(0, 200, 255, 0.9),
        0 0 28px rgba(0, 140, 255, 0.5);
    animation: letterReveal 0.45s ease forwards;
    animation-delay: calc(1.7s + var(--i) * 0.13s);
}

@keyframes letterReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   SPACE NAV
   ========================================================= */
#space-nav {
    display: flex;
    gap: clamp(20px, 4.5vw, 56px);
    margin-top: clamp(48px, 8vh, 80px);
    opacity: 0;
    will-change: transform;
    animation: navFadeIn 1s ease forwards;
    animation-delay: 3.3s;
}

/* When returning from navigation, show nav immediately */
body.nav-returning #space-nav {
    animation-delay: 0s;
}

@keyframes navFadeIn {
    to { opacity: 1; }
}

.nav-node {
    position: relative;
    text-decoration: none;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: clamp(0.68rem, 1.3vw, 0.85rem);
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    padding: 10px 18px;
    transition: color 0.35s ease, text-shadow 0.35s ease;
    white-space: nowrap;
}

.nav-node::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.nav-node:hover {
    color: #fff;
    text-shadow:
        0 0 10px rgba(0, 200, 255, 0.9),
        0 0 22px rgba(0, 160, 255, 0.5);
}

.nav-node:hover::before {
    border-color: rgba(0, 200, 255, 0.3);
    box-shadow:
        0 0 14px rgba(0, 200, 255, 0.12) inset,
        0 0 14px rgba(0, 200, 255, 0.08);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 480px) {
    #space-nav {
        gap: 12px;
    }
    .nav-node {
        padding: 8px 10px;
        letter-spacing: 0.2em;
    }
}

/* =========================================================
   PAGE TRANSITION OVERLAY  (shared across all pages)
   ========================================================= */
#transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: #03020d;
    opacity: 0;
    pointer-events: none;
}

#warp-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

