/* ========================================
   INSTINCTS FEST - Festival Landing Page
   ======================================== */

/* CSS Custom Properties (Design System) */
:root {
    /* Dark Theme (Default) */
    --color-bg: #000000;
    /* Pitch Black */
    --color-bg-secondary: #0a0a0a;
    --color-bg-tertiary: #111111;
    --color-text: #ffffff;
    --color-text-muted: #a0a0b0;
    --color-text-subtle: #6b6b7b;
    --color-glass: rgba(255, 255, 255, 0.03);
    --color-glass-border: rgba(255, 255, 255, 0.08);

    --color-primary: #8b5cf6;
    --color-primary-light: #a78bfa;
    --color-primary-dark: #7c3aed;
    --color-secondary: #ec4899;
    --color-accent: #06b6d4;

    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-accent) 100%);
    --gradient-glow: transparent;
    /* No purple haze */

    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-2xl: 8rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.3);
    --shadow-glow-lg: 0 0 80px rgba(139, 92, 246, 0.4);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Light Theme Overrides */
[data-theme="light"] {
    --color-bg: #f0f2f5;
    --color-bg-secondary: #ffffff;
    --color-bg-tertiary: #e4e6eb;
    --color-text: #1f2937;
    --color-text-muted: #4b5563;
    --color-text-subtle: #6b7280;
    --color-glass: rgba(255, 255, 255, 0.7);
    --color-glass-border: rgba(0, 0, 0, 0.05);

    --gradient-glow: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    --shadow-glow: 0 10px 30px rgba(139, 92, 246, 0.15);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

/* Reset & Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glassmorphism Utilities */
.glass {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-glass-border);
}

[data-theme="light"] .glass {
    background: rgba(255, 255, 255, 0.85);
}

.glass-panel {
    background: var(--color-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
}

.glass-mini {
    background: var(--color-glass);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(8px);
}

/* Particle Canvas */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Typography */
.gradient-text {
    /* Dynamic Gradient Text with Grainy Texture */
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.3'/%3E%3C/svg%3E"),
        linear-gradient(to right,
            #8b5cf6 20%,
            #ec4899 40%,
            #06b6d4 60%,
            #8b5cf6 80%);
    background-size: 200px 200px, 200% auto;
    background-position: 0 0, 0 center;
    color: #ffffff;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.6));
    animation: textShine 8s linear infinite;
    display: inline-block;
    /* Ensure transform/filters work correctly */
}

[data-theme="light"] .gradient-text {
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.3'/%3E%3C/svg%3E"),
        linear-gradient(to right,
            #8b5cf6 20%,
            #ec4899 40%,
            #06b6d4 60%,
            #8b5cf6 80%);
    background-size: 200px 200px, 200% auto;
    background-position: 0 0, 0 center;
    color: #1f2937;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
}

.section-tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-primary-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-md);
}

.section-desc {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 600px;
}

.section-header {
    margin-bottom: var(--space-xl);
}

.section-header.center {
    text-align: center;
}

.section-header.center .section-desc {
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    /* Always white text on primary btn */
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-lg);
    color: var(--color-primary-light);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-glass-border);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    background: rgba(139, 92, 246, 0.1);
}

/* Navigation */
.navbar {
    position: fixed;
    top: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1900px;
    z-index: 1000;
    padding: var(--space-sm) 0;
    transition: all var(--transition-base);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-glass-border);
}

.navbar.scrolled {
    padding: var(--space-sm) 0;
}

.nav-container {
    max-width: 1900px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Align remaining items (actions) to right */
    position: relative;
    /* Establish context for absolute centering */
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--color-text);
}

.navbar .logo {
    /* Absolute Centering only in Navbar */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-partner-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10;
    margin-right: auto;
}

.nav-partner-logo a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-partner-logo img {
    object-fit: contain;
    transition: transform 0.3s ease;
}

.nav-partner-logo a:hover img {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 1.25rem;
    animation: pulse 2s ease-in-out infinite;
}

.logo-accent {
    display: flex;
    align-items: center;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: none;
    /* Hidden on desktop, we use the action button */
    align-items: center;
    gap: var(--space-lg);
    list-style: none;
}

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.nav-links a:hover {
    color: var(--color-text);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    padding: var(--space-sm) var(--space-md) !important;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    color: #ffffff !important;
}

.nav-cta::after {
    display: none !important;
}

/* Nav Actions (Theme + Mobile) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.theme-btn {
    background: none;
    border: 1px solid var(--color-glass-border);
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--color-text);
    padding: 0.5rem;
    border-radius: 50%;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    background: var(--color-glass);
    border-color: var(--color-primary);
}

[data-theme="dark"] .sun-icon {
    display: inline;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: inline;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition-base);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: var(--gradient-glow);
    animation: pulse 8s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: var(--space-xl) var(--space-lg);
}

.hero-badge {
    display: inline-block;
    padding: var(--space-sm) var(--space-md);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary-light);
    letter-spacing: 0.2em;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-family: var(--font-display);
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.title-line {
    display: block;
}

.title-line:first-child {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 0.9;

    /* Basic Typography */
    /* Restore animated gradient and glow */
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.3'/%3E%3C/svg%3E"),
        linear-gradient(to right,
            #8b5cf6 20%,
            #ec4899 40%,
            #06b6d4 60%,
            #8b5cf6 80%);
    background-size: 200px 200px, 200% auto;
    background-position: 0 0, 0 center;
    color: #ffffff;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.6)) drop-shadow(0 0 30px rgba(139, 92, 246, 0.3));
    animation: textShine 8s linear infinite;
    /* Slowly shifting */
}

/* Light Mode Override for Title */
[data-theme="light"] .title-line:first-child {
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.3'/%3E%3C/svg%3E"),
        linear-gradient(to right,
            #1f2937 20%,
            #8b5cf6 40%,
            #ec4899 60%,
            #1f2937 80%);
    background-size: 200px 200px, 200% auto;
    background-position: 0 0, 0 center;
    color: #1f2937;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.4));
}

.festival-highlight {
    /* Dynamic Gradient Text with Grainy Texture */
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.3'/%3E%3C/svg%3E"),
        linear-gradient(to right,
            #8b5cf6 20%,
            #ec4899 40%,
            #06b6d4 60%,
            #8b5cf6 80%);
    background-size: 200px 200px, 200% auto;
    background-position: 0 0, 0 center;
    /* Start: Noise static, Gradient at start */
    color: #ffffff;
    /* Fallback */
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.6)) drop-shadow(0 0 30px rgba(139, 92, 246, 0.3));
    animation: textShine 3s linear infinite;
    /* Faster for visibility */
    animation-play-state: paused;
    /* Static by default */
    cursor: default;
    /* Indicate it's interactive */
    display: inline-block;
    /* Ensure transform/filters work correctly */
}

.festival-highlight:hover {
    animation-play-state: running;
    /* Move on hover */
}



[data-theme="light"] .festival-highlight {
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.3'/%3E%3C/svg%3E"),
        linear-gradient(to right,
            #1f2937 20%,
            #8b5cf6 40%,
            #ec4899 60%,
            #1f2937 80%);
    background-size: 200px 200px, 200% auto;
    background-position: 0 0, 0 center;
    color: #1f2937;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.4));
}

@keyframes textShine {
    to {
        background-position: 0 0, 200% center;
        /* Keep noise static, move gradient */
    }
}

.title-line.small {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: 0.5em;
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
    text-indent: 0.5em;
    /* Compensate for letter-spacing to center text */
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Countdown Timer */
.countdown {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    padding: var(--space-md);
}

.countdown-value {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.countdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

.countdown-separator {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    opacity: 0.5;
    align-self: center;
    margin-bottom: 20px;
}

/* Hero CTA */
.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: fadeIn 1s ease-out 1.5s both;
}

.scroll-arrow {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    position: relative;
}

[data-theme="light"] .scroll-arrow {
    border-color: rgba(0, 0, 0, 0.2);
}

.scroll-arrow::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 2px;
    animation: scrollBounce 1.5s ease-in-out infinite;
}

/* About Section */
.about {
    padding: var(--space-2xl) 0;
    position: relative;
    z-index: 1;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
    padding: var(--space-xl);
}

.about-lead {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: var(--space-lg);
}

.about-content p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-glass-border);
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.about-image {
    position: relative;
}

/* Image Frame Styles */
.image-frame {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-secondary);
    padding: 8px;
    box-shadow: var(--shadow-glass);
    transition: all var(--transition-base);
}

.image-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 2px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.6;
    transition: opacity var(--transition-base);
}

.image-frame:hover::before {
    opacity: 1;
    animation: borderGlow 2s ease-in-out infinite;
}

.image-frame img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: calc(var(--radius-lg) - 8px);
    object-fit: cover;
    aspect-ratio: 4/3;
    transition: transform var(--transition-slow);
}

.image-frame:hover img {
    transform: scale(1.02);
}

@keyframes borderGlow {

    0%,
    100% {
        opacity: 0.6;
        filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
    }

    50% {
        opacity: 1;
        filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.8));
    }
}

/* Gallery Styles */
.gallery-container {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-glass-border);
    box-shadow: var(--shadow-glass);
    aspect-ratio: 4/3;
    /* Maintain size */
}

.gallery-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    /* Increased gap for isolation */
    padding: 20px 0;
    height: 100%;
    scrollbar-width: none;
    align-items: center;
    perspective: 1000px;
    /* 3D Context */
}

/* Chrome/Safari */
.gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery-slide {
    flex: 0 0 50%;
    /* Narrower cards */
    height: 90%;
    scroll-snap-align: center;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.5s ease;
    filter: brightness(0.6) grayscale(0.4);
    /* Dimmed by default */
    opacity: 0.7;
    transform: scale(0.85) rotateY(10deg);
}

/* Active/Center Logic (handled via ScrollSnap or IntersectionObserver in JS, 
   but we can fake a 'hover' effect or use :focus-within if we make them focusable) 
   For now, we will add a class .active-slide via JS in the next step to light up the center one.
*/
.gallery-slide.active-slide {
    transform: scale(1) rotateY(0deg) !important;
    filter: brightness(1) grayscale(0) !important;
    opacity: 1 !important;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
    /* Purple glow */
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-slide:hover img {
    transform: scale(1.05);
}

.gallery-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 5;
}

.scroll-hint {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 6px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 0.85rem;
    opacity: 0.8;
    border: 1px solid rgba(255, 255, 255, 0.2);
}



/* ISAC Section */
.isac {
    padding: var(--space-xl) 0;
    position: relative;
}

.isac-container {
    padding: var(--space-xl);
    text-align: center;
}

.isac-content {
    max-width: 800px;
    margin: 0 auto;
}

.isac-content p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
}

/* Zones Section (AETHOS, SPARX, Collympics) */
.zones {
    padding: var(--space-2xl) 0;
    position: relative;
    z-index: 1;
}

/* Zone Tabs */
.zone-tabs {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.zone-tab {
    padding: var(--space-md) var(--space-xl);
    background: var(--color-glass);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    backdrop-filter: blur(5px);
}

.zone-tab:hover,
.zone-tab.active {
    background: var(--gradient-primary);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.tab-icon {
    font-size: 1.2rem;
}

/* Zone Content */
.zone-content-wrapper {
    padding: var(--space-xl);
    min-height: 400px;
}

.zone-category {
    display: none;
    animation: fadeIn 0.5s ease;
}

.zone-category.active {
    display: block;
}

.category-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.category-header h3 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.category-header p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.event-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.event-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glass);
}

.event-icon {
    font-size: 2rem;
    margin-bottom: var(--space-md);
    background: rgba(139, 92, 246, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.event-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    font-family: var(--font-display);
}

.event-card p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    flex-grow: 1;
}

.event-link {
    font-size: 0.875rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.event-link:hover {
    color: var(--color-secondary);
}

/* Timeline Section (Placeholder) */
.timeline {
    padding: var(--space-2xl) 0;
    position: relative;
    z-index: 1;
}

.timeline-placeholder {
    text-align: center;
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    animation: pulse 2s infinite;
}

.timeline-placeholder h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.witty-line {
    margin-top: var(--space-lg);
    font-style: italic;
    color: var(--color-primary);
    font-weight: 500;
    background: rgba(139, 92, 246, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
}

/* Gallery Section */
.gallery {
    padding: var(--space-2xl) 0;
    position: relative;
    z-index: 1;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: var(--space-md);
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background: var(--color-bg-tertiary);
}

/* Skeleton Loading Animation */
.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.03) 0%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.03) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.gallery-item.loaded::before {
    opacity: 0;
}

[data-theme="light"] .gallery-item::before {
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0.05) 0%,
            rgba(0, 0, 0, 0.1) 50%,
            rgba(0, 0, 0, 0.05) 100%);
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow), opacity 0.3s ease;
    opacity: 0;
}

.gallery-item.loaded img {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item.tall {
    grid-row: span 2;
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    transition: transform var(--transition-slow);
}

.gallery-item:hover .gallery-placeholder {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    align-items: flex-end;
    padding: var(--space-lg);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Registration Section (QR Code) */
.register {
    padding: var(--space-2xl) 0;
    position: relative;
    z-index: 1;
}

.register-wrapper {
    padding: var(--space-xl);
}

.register-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.register-content>p {
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto var(--space-lg);
}

.qr-container {
    margin-top: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-frame {
    padding: var(--space-md);
    background: #ffffff;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-base);
}

.qr-frame:hover {
    transform: scale(1.02);
}

.qr-image {
    width: 250px;
    height: 250px;
    display: block;
}

.qr-instruction {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Sponsors Section */
.sponsors {
    padding: var(--space-2xl) 0;
    position: relative;
    z-index: 1;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-lg);
    padding: var(--space-lg);
}

.sponsor-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.sponsor-item:hover {
    background: var(--color-glass);
    transform: translateY(-2px);
}

.sponsor-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    opacity: 0.6;
    transition: opacity var(--transition-base);
}

.sponsor-item:hover .sponsor-logo {
    opacity: 1;
    color: var(--color-text);
}

/* =================================================================
   FOOTER STYLES (Complete & Fixed)
   ================================================================= */
.footer {
    padding: var(--space-2xl) 0 var(--space-lg);
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--color-glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-glass-border);
}

.footer-brand p {
    color: var(--color-text-muted);
    margin: var(--space-md) 0;
    max-width: 300px;
    line-height: 1.6;
}

/* --- Social Links --- */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-glass-border);
    border-radius: 50%;
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    transform: translateY(-5px);
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

/* --- Footer Links --- */
.footer-links h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-primary);
}

/* --- Address Box (Replaced Map) --- */
.address-box {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--color-glass-border);
    transition: border-color var(--transition-fast);
}

.address-box:hover {
    border-color: var(--color-primary);
}

.address-box i {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-top: 2px;
}

.address-text strong {
    font-family: var(--font-display);
    color: var(--color-text);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 5px;
}

.address-text p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* --- Footer Bottom & Legal --- */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-lg);
    color: var(--color-text-subtle);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: var(--space-lg);
}

.footer-legal a {
    color: var(--color-text-subtle);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--color-text);
}

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: #12121a;
    /* Dark background */
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-5px);
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .address-box {
        text-align: left;
        /* Keeps address readable on mobile */
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* New CSS for mobile-only list item and partner logo */
@media (max-width: 768px) {

    /* Assuming this is the portrait media query */
    .mobile-nav-item {
        /* Placeholder class for the mobile-only list item */
        display: flex;
        flex-direction: column;
        gap: 10px;
        /* Adjust as needed */
    }

    .mobile-nav-item .label-row {
        font-weight: bold;
        color: #ccc;
        /* Or appropriate text color */
    }

    .mobile-nav-item .action-row {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .nav-partner-logo {
        display: flex;
        gap: 8px;
    }

    .nav-partner-logo img {
        height: 22px;
    }
}

/* End of new CSS */

.dropdown-item {
    padding: 10px;
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.dropdown-item:hover {
    background: rgba(139, 92, 246, 0.2);
    color: white;
}

/* Dashboard Section */
.dashboard-section {
    padding: 40px 0;
}

.dash-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dash-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    color: white;
}

.event-count {
    background: #8b5cf6;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.game-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.game-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid #8b5cf6;
    transition: 0.3s;
}

.game-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.05);
}

.game-name {
    font-weight: 600;
    color: #e2e8f0;
}

.action-btn {
    cursor: pointer;
    border: none;
    border-radius: 6px;
    transition: 0.2s;
}

.btn-remove {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.btn-remove:hover {
    background: #ef4444;
    color: rgb(0, 0, 0);
}

.add-game-box {
    border: 2px dashed rgba(220, 93, 249, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b5cf6;
    cursor: pointer;
    min-height: 60px;
    transition: 0.3s;
}

.add-game-box:hover {
    border-color: #8b5df7;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.05);
}

/* Add Game Modal */
.mini-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #18181b;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2000;
    width: 300px;
    display: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.mini-modal.active {
    display: block;
}

.modal-select {
    width: 100%;
    padding: 10px;
    background: #27272a;
    border: 1px solid #3f3f46;
    color: rgb(255, 255, 255);
    border-radius: 8px;
    margin: 10px 0;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    font-weight: bold;
}

.btn-cancel {
    background: #3f3f46;
    color: white;
}

.btn-confirm {
    background: #8b5cf6;
    color: white;
}

/* Light Mode Dashboard Overrides */
[data-theme="light"] .dash-card {
    background: rgb(255, 255, 255);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .dash-header h3 {
    color: #1f2937;
}

[data-theme="light"] .game-item {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .game-item:hover {
    background: #ffffff;
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.15);
}

[data-theme="light"] .game-name {
    color: #1f2937;
}

[data-theme="light"] .add-game-box {
    border-color: rgba(0, 0, 0, 0.2);
    color: #4b5563;
}

[data-theme="light"] .add-game-box:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.mobile-only-item {
    display: none;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        padding: var(--space-lg);
    }



    .sponsors-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }

    .gallery-item.large,
    .gallery-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Mobile adjustments for Grid */
@media (max-width: 768px) {
    .nav-container {
        justify-content: space-between;
    }

    .nav-container .nav-partner-logo {
        display: flex;
        gap: 8px;
    }

    .nav-container .nav-partner-logo img {
        height: 22px;
        width: auto;
    }

    .nav-actions .theme-btn,
    .nav-actions .profile-wrapper {
        display: none !important;
    }

    .mobile-only-item {
        display: block;
    }

    .navbar .logo {
        display: none;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        left: var(--space-md);
        right: var(--space-md);
        width: auto;
        /* Floating card style */
        flex-direction: column;
        background: var(--color-bg);
        border: 1px solid var(--color-glass-border);
        border-radius: var(--radius-lg);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        padding: var(--space-lg);
        gap: var(--space-md);
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Hide the desktop action button on mobile */
    .nav-actions .nav-cta {
        display: none !important;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        text-align: center;
        padding: var(--space-md);
    }

    .gallery-slide {
        flex: 0 0 80%;
        /* Wider cards on mobile */
    }

    .gallery-track {
        padding: 20px 0;
        gap: 15px;
    }

    .about-stats {
        justify-content: center;
        gap: var(--space-md);
    }

    .section-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        /* Keep 3 stats in one row if possible, or 1fr if too squeezed */
    }

    .countdown {
        gap: var(--space-sm);
        flex-wrap: wrap;
    }

    .countdown-item {
        min-width: 70px;
        padding: var(--space-sm);
    }

    .countdown-separator {
        display: none;
    }

    .sponsors-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .hero-title .title-line:not(.small) {
        font-size: 3rem;
    }

    .hero-title .title-line.small {
        font-size: 1.5rem;
    }

    .game-list {
        grid-template-columns: 1fr;
    }

    .mini-modal {
        width: 90%;
    }

    .zone-content-wrapper {
        padding: var(--space-md);
    }

    .events-grid {
        grid-template-columns: 1fr;
    }

    .timeline-placeholder {
        width: 300px;
        min-height: 300px;
        border-radius: 50px;
        margin: 0 auto;
        padding: var(--space-lg);
    }

    .image-placeholder a {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .image-placeholder img {
        width: 90% !important;
        height: auto;
    }
}

@media (max-width: 480px) {
    :root {
        --space-lg: 1.5rem;
        --space-xl: 3rem;
        --space-2xl: 5rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .zone-tabs {
        flex-direction: column;
        width: 100%;
    }

    .zone-tab {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   Scroll Animation Classes
   ======================================== */
/* ========================================
   Scroll Animation Classes
   ======================================== */
.reveal-on-scroll {
    opacity: 0;
    transform: translate3d(0, 50px, 0);
    /* Use 3D transform for hardware acceleration */
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Smoother, longer ease-out */
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) !important;
}

/* Stagger delays for children if needed */
.stagger-1 {
    transition-delay: 100ms;
}

.stagger-2 {
    transition-delay: 200ms;
}

.stagger-3 {
    transition-delay: 300ms;
}

/* ========================================
   DEVELOPERS SECTION
   ======================================== */

.developers {
    padding: var(--space-2xl) 0;
    position: relative;
}

.developers .section-subtitle {
    max-width: 600px;
    margin: var(--space-md) auto 0;
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.developers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1024px) {
    .developers-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.developer-card {
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.developer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.developer-card:hover::before {
    opacity: 1;
}

.developer-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 20px 60px rgba(139, 92, 246, 0.15),
        0 0 40px rgba(139, 92, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Featured card (center) */
.developer-card.featured {
    border: 2px solid rgba(139, 92, 246, 0.3);
}

.developer-card.featured::before {
    opacity: 0.5;
}

.developer-card.featured:hover::before {
    opacity: 1;
}

.developer-card.featured .avatar-circle {
    width: 140px;
    height: 140px;
    border: 3px solid var(--color-primary);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
}

.developer-avatar {
    margin-bottom: var(--space-lg);
}

.avatar-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.developer-card:hover .avatar-circle {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
}

.avatar-initial {
    font-size: 3rem;
    font-weight: 800;
    font-family: var(--font-display);
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.developer-info {
    position: relative;
    z-index: 1;
}

.developer-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    letter-spacing: 1px;
}

.developer-role {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--space-md);
}

.developer-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    font-style: italic;
}

.developer-socials {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    align-items: center;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

/* Light Theme Adjustments */
[data-theme="light"] .developer-card {
    background: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .developer-card:hover {
    box-shadow:
        0 20px 60px rgba(139, 92, 246, 0.2),
        0 0 40px rgba(139, 92, 246, 0.15);
}

[data-theme="light"] .avatar-circle {
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

[data-theme="light"] .social-link {
    background: rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .developers {
        padding: var(--space-xl) 0;
    }

    .developers-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .developer-card {
        padding: var(--space-lg) var(--space-md);
    }

    .avatar-circle {
        width: 100px;
        height: 100px;
    }

    .developer-card.featured .avatar-circle {
        width: 120px;
        height: 120px;
    }

    .avatar-initial {
        font-size: 2.5rem;
    }
}