/* ============================
   UNIVERSE BACKGROUND LAYER
   ============================ */

#universe {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

#stars-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#nebula-layer {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(120,0,255,0.25), transparent 70%);
    opacity: 0.35;
    animation: nebulaPulse 12s ease-in-out infinite;
    z-index: -1;
}


/* ============================
   HERO SECTION
   ============================ */

.hero {
    position: relative;
    z-index: 10;
    min-height: 80vh;
    padding-top: 120px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#nexus-title {
    font-size: 3.8rem;
    letter-spacing: 4px;
    margin: 0;
    animation: titleEnter 1.5s ease forwards;
}

#hero-slogan {
    opacity: 0;
    margin-top: 10px;
    font-size: 1.3rem;
    animation: sloganFade 2s ease forwards 1.5s;
}

#portal-line {
    width: 180px;
    height: 3px;
    background: linear-gradient(90deg, #a020f0, #00aaff);
    margin: 20px auto;
    opacity: 0;
    animation: portalShow 1.2s ease forwards 2.4s;
}

/* ============================================
   ULTRA SPLASH TEXT — Galaxy Gradient + Glow + Warp + Pulse
   ============================================ */

#splash-text {
    font-size: 1.45rem;
    font-weight: 500;
    letter-spacing: 0.6px;

    background: linear-gradient(90deg, #a020f0, #00aaff, #ff66ff);
    background-clip: text;
    -webkit-text-fill-color: transparent;

    text-shadow:
        0 0 10px rgba(160, 80, 255, 0.7),
        0 0 20px rgba(0, 170, 255, 0.6),
        0 0 35px rgba(255, 100, 255, 0.5);

    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.4s ease, transform 0.4s ease;
    position: relative;
    z-index: 9999;
}

.splash-show {
    opacity: 1 !important;
    animation:
        splashWarp 0.45s ease forwards,
        splashPulse 2.4s ease-in-out infinite;
}

@keyframes splashWarp {
    0% { transform: scale(0.6) rotate(-4deg); opacity: 0; }
    60% { transform: scale(1.18) rotate(1deg); opacity: 1; }
    100% { transform: scale(1.08) rotate(0deg); }
}

@keyframes splashPulse {
    0% {
        text-shadow:
            0 0 10px rgba(160, 80, 255, 0.7),
            0 0 20px rgba(0, 170, 255, 0.6),
            0 0 35px rgba(255, 100, 255, 0.5);
    }
    50% {
        text-shadow:
            0 0 18px rgba(160, 80, 255, 1),
            0 0 30px rgba(0, 170, 255, 0.9),
            0 0 45px rgba(255, 100, 255, 0.8);
    }
    100% {
        text-shadow:
            0 0 10px rgba(160, 80, 255, 0.7),
            0 0 20px rgba(0, 170, 255, 0.6),
            0 0 35px rgba(255, 100, 255, 0.5);
    }
}

#splash-text {
    --px: 0px;
    --py: 0px;

    transform:
        translate(var(--px), var(--py))
        scale(0.85);
}

.splash-show {
    transform:
        translate(var(--px), var(--py))
        scale(1.08) !important;
}

/* ============================================
   CINEMATIC SPLASH TRANSITION
   ============================================ */

.splash-hide {
    animation: splashWarpOut 0.35s ease forwards;
}

@keyframes splashWarpOut {
    0% {
        opacity: 1;
        transform: translate(var(--px), var(--py)) scale(1.08);
        filter: blur(0px);
    }
    100% {
        opacity: 0;
        transform: translate(var(--px), var(--py)) scale(0.4) rotate(-10deg);
        filter: blur(12px);
    }
}

.splash-show {
    animation:
        splashBeam 0.25s ease forwards,
        splashWarpIn 0.45s ease forwards 0.1s,
        splashPulse 2.4s ease-in-out infinite 0.55s;
}

@keyframes splashBeam {
    0% {
        text-shadow:
            0 0 40px rgba(255,255,255,0.9),
            0 0 80px rgba(0,170,255,1),
            0 0 120px rgba(160,80,255,1);
        opacity: 0.2;
    }
    100% {
        text-shadow:
            0 0 10px rgba(160,80,255,0.7),
            0 0 20px rgba(0,170,255,0.6),
            0 0 35px rgba(255,100,255,0.5);
        opacity: 1;
    }
}

@keyframes splashWarpIn {
    0% {
        opacity: 0;
        transform: translate(var(--px), var(--py)) scale(0.4) rotate(6deg);
        filter: blur(10px);
    }
    60% {
        opacity: 1;
        transform: translate(var(--px), var(--py)) scale(1.18) rotate(-2deg);
        filter: blur(0px);
    }
    100% {
        transform: translate(var(--px), var(--py)) scale(1.08) rotate(0deg);
    }
}


/* ============================
   CONSTELLATIONS SECTION
   ============================ */

.constellations {
    position: relative;
    z-index: 10;
    padding: 60px 0 120px;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
}

.stars-grid {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.star-item {
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s ease;
}

.star-item:hover {
    transform: scale(1.15);
}

.star-glow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 auto 10px;
    filter: blur(6px);
}

.star-glow.blue { background: #00aaff; }
.star-glow.purple { background: #a020f0; }
.star-glow.white { background: #ffffff; }
.star-glow.gold { background: #ffcc33; }
.star-glow.cyan { background: #00ffff; }


/* ============================
   LORE SECTION
   ============================ */

.lore {
    position: relative;
    z-index: 10;
    padding: 120px 0;
    text-align: center;
}

#lore-pulse {
    font-size: 1.3rem;
    opacity: 1;
    transition: opacity 0.4s ease;
}


/* ============================
   FOOTER
   ============================ */

footer {
    position: relative;
    z-index: 10;
    padding: 40px;
    text-align: center;
    opacity: 0.8;
}

.projects-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.project-card {
    width: 260px;
    padding: 26px;
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 0 25px rgba(160,80,255,0.4);
}

.project-title {
    margin-top: 12px;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.project-subtitle {
    margin-top: 6px;
    font-size: 0.95rem;
    opacity: 0.8;
}

.section-title {
    font-size: 2.4rem;
    margin-bottom: 30px;
    background: linear-gradient(90deg, #a020f0, #00aaff);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}