/* Netflix Intro Animation */
.netflix-intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.netflix-intro.intro-animating { animation: fadeOut 0.5s ease-in-out 4.5s forwards; }

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.intro-content {
    text-align: center;
    position: relative;
}

.intro-logo-image {
    width: min(70vw, 780px);
    height: auto;
    opacity: 0;
    transform: scale(0.94);
    filter: drop-shadow(0 0 24px rgba(229,9,20,0.22)) drop-shadow(0 0 48px rgba(229,9,20,0.16));
}

.netflix-intro.intro-animating .intro-logo-image {
    animation: logoFadeIn 2.2s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards,
               logoGlow 3.2s ease-in-out 0.8s;
}

@keyframes logoFadeIn {
    0% { opacity: 0; transform: translateY(8px) scale(0.92); filter: blur(6px) drop-shadow(0 0 0 rgba(0,0,0,0)); }
    45% { opacity: 1; transform: translateY(0) scale(1.02); filter: blur(0) drop-shadow(0 0 24px rgba(229,9,20,0.3)); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0) drop-shadow(0 0 18px rgba(229,9,20,0.22)); }
}

@keyframes logoGlow {
    0% { filter: drop-shadow(0 0 6px rgba(229,9,20,0.15)) drop-shadow(0 0 14px rgba(229,9,20,0.08)); }
    50% { filter: drop-shadow(0 0 32px rgba(229,9,20,0.35)) drop-shadow(0 0 64px rgba(229,9,20,0.25)); }
    100% { filter: drop-shadow(0 0 18px rgba(229,9,20,0.22)) drop-shadow(0 0 36px rgba(229,9,20,0.16)); }
}

/* Light sweep over the logo */
.intro-content { position: relative; }
.intro-sheen {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.05) 45%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0.05) 55%, transparent 100%);
    transform: translateX(-120%);
    opacity: 0;
}

.netflix-intro.intro-animating .intro-sheen { animation: sheenPass 1.8s ease-in-out 0.6s forwards; }
@keyframes sheenPass {
    0% { transform: translateX(-120%); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateX(120%); opacity: 0; }
}

.intro-logo {
    font-family: 'Bebas Neue', 'Impact', sans-serif;
    font-size: 8rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #e50914;
    text-transform: uppercase;
    opacity: 0;
    transform: scale(0.5);
    animation: netflixPop 2s cubic-bezier(0.19, 1, 0.22, 1) 0.5s forwards;
    text-shadow: 
        0 0 20px rgba(229, 9, 20, 0.8),
        0 0 40px rgba(229, 9, 20, 0.6),
        0 0 60px rgba(229, 9, 20, 0.4),
        0 0 80px rgba(229, 9, 20, 0.2);
    position: relative;
}

.intro-logo span {
    display: inline-block;
    animation: letterPop 0.8s cubic-bezier(0.19, 1, 0.22, 1) backwards;
}

/* Stagger each letter */
.intro-logo span:nth-child(1) { animation-delay: 0.5s; }
.intro-logo span:nth-child(2) { animation-delay: 0.55s; }
.intro-logo span:nth-child(3) { animation-delay: 0.6s; }
.intro-logo span:nth-child(4) { animation-delay: 0.65s; }
.intro-logo span:nth-child(5) { animation-delay: 0.7s; }
.intro-logo span:nth-child(6) { animation-delay: 0.75s; }
.intro-logo span:nth-child(7) { animation-delay: 0.8s; }
.intro-logo span:nth-child(8) { animation-delay: 0.85s; }
.intro-logo span:nth-child(9) { animation-delay: 0.9s; }
.intro-logo span:nth-child(10) { animation-delay: 0.95s; }
.intro-logo span:nth-child(11) { animation-delay: 1s; }
.intro-logo span:nth-child(12) { animation-delay: 1.05s; }
.intro-logo span:nth-child(13) { animation-delay: 1.1s; }

@keyframes netflixPop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes letterPop {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Glowing effect */
.intro-logo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.3) 0%, transparent 70%);
    animation: pulse 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

/* Sound wave effect */
.intro-logo::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 3px solid rgba(229, 9, 20, 0.6);
    border-radius: 50%;
    animation: soundWave 2s ease-out 1.5s;
    opacity: 0;
}

@keyframes soundWave {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

/* Hide body content during intro */
body.intro-playing {
    overflow: hidden;
}

body.intro-playing .navbar,
body.intro-playing .hero,
body.intro-playing .about,
body.intro-playing .projects,
body.intro-playing .skills,
body.intro-playing .contact,
body.intro-playing .footer {
    opacity: 0;
}

/* Tap to play overlay */
.tap-overlay {
    position: absolute; inset: 0; display: grid; place-items: center; z-index: 10002;
    background: rgba(0,0,0,0.55);
    color: #fff; font: 700 1.25rem/1 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    letter-spacing: 0.08em; text-transform: uppercase;
    cursor: pointer; user-select: none;
}
.tap-overlay[hidden] { display: none !important; }
.tap-overlay:focus-visible { outline: 3px solid #e50914; outline-offset: 2px; }

/* Who's Watching overlay */
.whos-watching[hidden] { display: none !important; }
.whos-watching {
    position: fixed;
    inset: 0;
    background: #141414;
    z-index: 10001;
    display: grid;
    place-items: center;
}
.ww-container { text-align: center; }
.whos-watching h2 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 600;
    margin-bottom: 2rem;
}
.profiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    width: min(900px, 90vw);
}
.profile {
    background: transparent;
    border: none;
    cursor: pointer;
    display: grid;
    gap: 0.8rem;
    justify-items: center;
    color: #b3b3b3;
}
.profile img, .profile .avatar {
    width: 140px;
    height: 140px;
    border-radius: 8px;
    object-fit: cover;
    background: #222;
    border: 2px solid transparent;
    transition: transform .2s ease, border-color .2s ease;
}
.profile .avatar.guest { background: linear-gradient(135deg, #333, #222); }
.profile span { font-weight: 600; }
.profile:hover img, .profile:hover .avatar { transform: translateY(-4px); border-color: #e50914; }
.profile:focus-visible { outline: 3px solid #e50914; outline-offset: 3px; }

/* Responsive */
@media (max-width: 768px) {
    .intro-logo {
        font-size: 4rem;
    }
}

@media (max-width: 480px) {
    .intro-logo {
        font-size: 2.5rem;
        letter-spacing: 0.05em;
    }
}
