/* ═══════════════════════════════════════════════════════════
   BKAAI - Enhanced Futuristic Styles
   Mobile Optimizations • Advanced Animations • Scroll Effects
   ═══════════════════════════════════════════════════════════ */

/* ===============================================
   Mobile Navigation Enhancements
   =============================================== */
nav.nav-hidden {
    transform: translateY(-150px);
    opacity: 0;
    pointer-events: none;
}

/* ===============================================
   Scroll Progress Indicator
   =============================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 10001;
    background: rgba(255, 255, 255, 0.05);
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-cyan), var(--primary-purple), var(--primary-pink));
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.8);
}

/* ===============================================
   Enhanced Section Animations
   =============================================== */
.section-hidden {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    position: relative;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-title.title-animated {
    opacity: 1;
    transform: translateX(0);
}

.section-title::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 0;
    width: 5px;
    height: 0%;
    background: var(--gradient-primary);
    transition: height 0.6s ease 0.3s;
}

.section-title.title-animated::before {
    height: 100%;
}

/* ===============================================
   Enhanced Card Fade Animations
   =============================================== */
.card.fade-in {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.card.fade-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ===============================================
   Text Reveal Animations
   =============================================== */
.text-hidden {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.text-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===============================================
   Advanced Card Glow Effects
   =============================================== */
.card {
    position: relative;
    overflow: hidden;
}

.card::before {
    transition: all 0.5s ease;
}

.card:hover::before {
    background: linear-gradient(135deg,
            rgba(0, 242, 255, 0.15) 0%,
            rgba(188, 19, 254, 0.15) 50%,
            rgba(255, 0, 110, 0.15) 100%);
}

/* Scanline effect on hover */
.card::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(0, 242, 255, 0.1) 50%,
            transparent 100%);
    transition: top 0.8s ease;
    pointer-events: none;
}

.card:hover::after {
    top: 100%;
}

/* ===============================================
   Mobile-Specific Improvements
   =============================================== */
@media (max-width: 768px) {

    /* Larger touch targets */
    .nav-item {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Better card spacing */
    .card {
        margin-bottom: 25px;
    }

    /* Smoother transitions on mobile */
    .card {
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Mobile navigation bar styling */
    nav {
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }

    /* Better section spacing */
    .section {
        padding: 50px 20px;
    }

    /* Optimize hero for mobile */
    .hero-logo {
        animation: gradientShift 8s ease infinite, float 4s ease-in-out infinite;
    }

    /* Better footer on mobile */
    footer {
        padding: 40px 20px;
    }

    .social-icons {
        gap: 25px;
    }

    /* Mobile-optimized fade animations */
    .card.fade-in {
        transform: translateY(40px) scale(0.97);
    }
}

@media (max-width: 480px) {

    /* Extra small screens */
    .section {
        padding: 40px 15px;
    }

    .card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .project-tag {
        font-size: 0.75rem;
        padding: 5px 12px;
    }

    /* Compact navigation */
    nav {
        padding: 6px;
        gap: 6px;
    }

    .nav-item {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
}

/* ===============================================
   Parallax Smooth Scrolling
   =============================================== */
.hero-logo,
.hero-subtitle {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* ===============================================
   Loading Optimizations
   =============================================== */
.card,
.section-title {
    will-change: opacity, transform;
}

/* Remove will-change after animation */
.card.visible,
.section-title.title-animated {
    will-change: auto;
}

/* ===============================================
   Accessibility - Reduced Motion Support
   =============================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===============================================
   High Performance Transforms
   =============================================== */
.card,
.nav-item,
.section {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ===============================================
   Futuristic Shimmer Effect
   =============================================== */
@keyframes shimmerSweep {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(200%) rotate(45deg);
    }
}

.card-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%);
    animation: shimmerSweep 3s ease-in-out infinite;
    pointer-events: none;
}

/* ===============================================
   Glitch Effect for Titles (Subtle)
   =============================================== */
.section-title:hover {
    animation: glitchSubtle 0.3s ease;
}

@keyframes glitchSubtle {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-2px);
    }

    40% {
        transform: translateX(2px);
    }

    60% {
        transform: translateX(-2px);
    }

    80% {
        transform: translateX(2px);
    }
}