/* Neon blue animated title */
.neon-title {
    position: relative;
    color: #3b82f6;
    text-shadow: 0 0 8px #3b82f6, 0 0 24px #3b82f6, 0 0 40px #3b82f6;
    animation: neonGlow 1.5s ease-in-out infinite alternate;
    background: linear-gradient(90deg, #3b82f6 40%, #00f0ff 60%, #3b82f6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- HEADER NAV NEON BORDER --- */
nav {
    position: relative;
}

nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, #00f0ff, #3b82f6, transparent);
    background-size: 200% auto;
    animation: neonBreathe 4s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.neon-title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #fff, #00f0ff, transparent);
    z-index: -1;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    will-change: transform, opacity;
    animation: lightningStrike 5s infinite linear;
}

@keyframes neonGlow {
    0% {
        text-shadow: 0 0 8px #3b82f6, 0 0 24px #3b82f6, 0 0 40px #3b82f6;
        filter: brightness(1.1);
    }
    100% {
        text-shadow: 0 0 24px #00f0ff, 0 0 40px #00f0ff, 0 0 80px #3b82f6;
        filter: brightness(1.4);
    }
}

@keyframes lightningStrike {
    0%, 92% {
        opacity: 0;
        transform: scaleX(0);
    }
    93% {
        opacity: 1;
        transform: scaleX(1);
        filter: brightness(2);
    }
    95% {
        opacity: 0;
        transform: scaleX(1);
    }
    100% {
        opacity: 0;
        transform: scaleX(0);
    }
}

@keyframes slideNeon {
    0% {
        left: -100%;
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 1;
    }
}

/* --- LIGHTBOX VIDEO FIX --- */
#lightbox-video-container {
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9);
    margin: 0 auto;
    width: 100%; 
    height: 100%;
}

#lightbox-video-container.hidden {
    display: none !important;
}

#lightbox-video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #000;
}

/* --- LIGHTBOX CONTENT CENTERING --- */
#lightbox-content {
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    height: 100%;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

#lightbox-img {
    display: block;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9);
    max-width: 85vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    cursor: zoom-in;
}

#lightbox-img.hidden {
    display: none !important;
}

/* --- LIGHTBOX CONTAINER --- */
#lightbox {
    z-index: 3200 !important; /* Forces it above the Nav Bar & project modal */
}

/* --- INFO BANNER --- */
#lightbox-info {
    position: relative;
    width: 100%;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    transform: none;
    transition: none;
    z-index: 2005; /* Above the lightbox background */
}

#lightbox.active #lightbox-info { transform: none; }


/* --- GLOBAL SETTINGS --- */
html, body {
    max-width: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevents side scroll */
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #27272a; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

/* --- CAROUSEL --- */
.carousel-container {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
}

.carousel-wrapper {
    width: 100%;
    position: relative;
    user-select: none;
    touch-action: pan-y;
    overflow: hidden; 
}

.carousel-track {
    display: flex;
    width: max-content;
    gap: 2.5rem;
    will-change: transform;
}

.carousel-item {
    flex: 0 0 auto;
    width: 80vw;
}

@media (min-width: 768px) {
    .carousel-item {
        width: 650px;
    }
}

/* --- DROPDOWN --- */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    padding: 1rem 0;
    z-index: 100;
}

.group:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.85rem 1.5rem;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: #a1a1aa;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
}

.dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: white;
    border-left-color: #3b82f6;
    padding-left: 1.75rem;
}

/* --- WORK CARDS --- */
.work-card {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: #0a0a0a;
}

.work-card::before,
.work-card::after {
    content: '';
    position: absolute;
    background: linear-gradient(90deg, transparent, #3b82f6, #00f0ff, #3b82f6, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.work-card::before {
    top: 0;
    left: -100%;
    right: 0;
    height: 2px;
    animation: none;
}

.work-card::after {
    bottom: 0;
    left: -100%;
    right: 0;
    height: 2px;
    animation: none;
}

.work-card:hover::before,
.work-card:hover::after {
    opacity: 1;
    animation: slideNeon 0.8s ease forwards;
}

/* Neon blue animated section titles for Selected Works, About, Inquiry */
.selected-works-title,
.about-title,
.inquiry-title {
    color: #3b82f6;
    text-shadow: 0 0 8px #3b82f6, 0 0 24px #3b82f6, 0 0 40px #3b82f6;
    animation: neonGlow 1.5s ease-in-out infinite alternate;
    background: linear-gradient(90deg, #3b82f6 40%, #00f0ff 60%, #3b82f6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.work-card:hover {
    transform: scale(1.02);
    border-color: #3b82f6;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.work-card img,
.work-card video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1), filter 0.8s ease;
}

.work-card:hover img,
.work-card:hover video {
    transform: scale(1.1);
}

.work-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: all 0.5s ease;
}

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

.work-card-overlay h4, 
.work-card-overlay p {
    transform: translateY(10px);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.work-card:hover .work-card-overlay h4,
.work-card:hover .work-card-overlay p {
    transform: translateY(0);
}

/* --- NAV & ICONS --- */
.nav-btn, .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 50%;
    cursor: pointer;
}

.nav-btn { opacity: 0; }
.carousel-container:hover .nav-btn { opacity: 1; }
.nav-btn:hover, .lightbox-nav:hover { background: #3b82f6; border-color: #3b82f6; }
.nav-btn.left, .lightbox-prev { left: 2rem; }
.nav-btn.right, .lightbox-next { right: 2rem; }

.lightbox-nav { z-index: 2100; opacity: 1; } /* Ensure arrows are above lightbox */

.slate-label {
    font-size: 11px;
    letter-spacing: 0.4em;
    color: #3b82f6;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 12px;
    display: block;
}

.slate-value {
    color: white;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.contact-input {
    width: 100%;
    background: #070707;
    border: 1px solid #1a1a1a;
    padding: 1.25rem;
    color: white;
    transition: all 0.4s ease;
}

.contact-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.skill-tag {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    padding: 0.4rem 0.2rem;
    font-size: 9px;
    letter-spacing: 0.1em;
    text-align: center;
    color: #ffffff;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: default;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
}

.skill-tag:hover {
    border-color: #3b82f6;
    color: #fff;
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

section { scroll-margin-top: 100px; }

#video-container {
    position: relative;
    overflow: hidden;
}

#bg-video {
    min-width: 100%; 
    min-height: 100%;
    width: 177.77vh; 
    height: 56.25vw; 
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* --- PROFILE IMAGE TWILIGHT HALO --- */
#profile-img {
    /* Ensure it stays circular */
    border-radius: 50%;
    /* The Twilight Halo Effect */
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.1), /* Inner rim */
        0 0 20px rgba(59, 130, 246, 0.4),   /* Blue glow */
        0 0 40px rgba(147, 51, 234, 0.3),   /* Purple/Twilight glow */
        0 0 80px rgba(59, 130, 246, 0.2);   /* Outer atmosphere */
    animation: twilightPulse 4s ease-in-out infinite alternate;
}

@keyframes twilightPulse {
    0% {
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 20px rgba(59, 130, 246, 0.4), 0 0 40px rgba(147, 51, 234, 0.3), 0 0 80px rgba(59, 130, 246, 0.2);
    }
    100% {
        /* Brighter, more cyan/purple mix for the "Twilight" feel */
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3), 0 0 35px rgba(0, 240, 255, 0.6), 0 0 70px rgba(168, 85, 247, 0.5), 0 0 110px rgba(59, 130, 246, 0.4);
    }
}

/* --- NEON SEPARATOR LINES --- */
.neon-separator {
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, #00f0ff, #3b82f6, transparent);
    background-size: 200% auto;
    opacity: 0.5;
    animation: neonBreathe 4s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

@keyframes neonBreathe {
    0% { opacity: 0.3; background-position: 0% 50%; filter: brightness(1); }
    50% { opacity: 1; background-position: 100% 50%; filter: brightness(1.5) drop-shadow(0 0 5px #00f0ff); }
    100% { opacity: 0.3; background-position: 0% 50%; filter: brightness(1); }
}

/* --- PORTFOLIO FILTER BUTTONS --- */
.portfolio-filter-btn {
    padding: 0.6rem 1.2rem;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #a1a1aa;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 600;
    position: relative;
}

.portfolio-filter-btn::before,
.portfolio-filter-btn::after {
    content: '';
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, #00f0ff, #3b82f6, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-filter-btn::before {
    top: -2px;
    left: 0;
    right: 0;
    animation: neonBreathe 4s ease-in-out infinite;
}

.portfolio-filter-btn::after {
    bottom: -2px;
    left: 0;
    right: 0;
    animation: neonBreathe 4s ease-in-out infinite;
}

.portfolio-filter-btn:hover::before,
.portfolio-filter-btn:hover::after,
.portfolio-filter-btn.active::before,
.portfolio-filter-btn.active::after {
    opacity: 1;
}

.portfolio-filter-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.6);
    color: #fff;
}

.portfolio-filter-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.portfolio-work-card {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.portfolio-work-card.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

/* Movie Banner Carousel Styles */
#movies-carousel .carousel-item {
    width: 280px;
    flex-shrink: 0;
}

#movies-carousel .carousel-item img,
#movies-carousel .carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.5s ease, transform 0.5s ease, box-shadow 0.5s ease;
}

#movies-carousel .carousel-item:hover img,
#movies-carousel .carousel-item:hover video {
    filter: brightness(1.2) saturate(1.3);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
}

/* Interactive Projects Carousel - Applied Selected Works Style */
#project-carousel-track .carousel-item {
    width: 320px;
    aspect-ratio: 2 / 3;
    flex-shrink: 0;
    position: relative;
}

/* --- LOGO SLIDER ANIMATION --- */
.logo-slider {
    width: 100%;
    overflow: hidden;
    background: transparent;
    padding: 1.5rem 0;
    margin-top: 4rem; /* Adds space above the banner. Change 4rem to 2rem or 6rem to tweak it! */
}

.logo-track {
    display: flex;
    width: max-content;
    animation: slideInfinite 30s linear infinite;
    will-change: transform;
}

.logo-image {
    height: 140px;
    object-fit: contain;
    opacity: 50%;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
    margin-right: 1.5rem; /* Drop this number from 4rem to bring them closer! */
}

.logo-image:hover {
    opacity: 100%;
}

@keyframes slideInfinite {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-25%);
    }
}