/* =========================================
   ISAC PAGE - INSTINCTS THEME
   Matching main website design language
   ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark Theme (Default) - Matching main site */
    --color-bg: #000000;
    --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.04);
    --color-glass-border: rgba(255, 255, 255, 0.1);
    --color-glass-hover: rgba(255, 255, 255, 0.08);

    --color-primary: #8b5cf6;
    --color-primary-light: #a78bfa;
    --color-primary-dark: #7c3aed;
    --color-secondary: #ec4899;
    --color-accent: #06b6d4;

    /* Legacy variable support for consistency */
    --primary: var(--color-primary);
    --secondary: var(--color-secondary);
    --accent: var(--color-accent);
    --bg-dark: var(--color-bg);

    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-accent) 100%);
    --gradient-glow: transparent;

    /* 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);

    /* Cosmic variables for consistency */
    --cosmic-gradient: var(--color-bg);
    --nebula-glow: transparent;
    --text-main: var(--color-text);
    --text-muted: var(--color-text-muted);
}

/* 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(0, 0, 0, 0.03);
    --color-glass-border: rgba(0, 0, 0, 0.08);
    --color-glass-hover: 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);

    /* Update dependent variables */
    --bg-dark: var(--color-bg);
    --cosmic-gradient: #f0f2f5;
    --nebula-glow: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.1), transparent 70%);
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --bg-card: #ffffff;
    --bg-card-hover: #fafafa;
}

/* Theme Transition - Smooth switching */
body,
body *:not(.glow-blob):not(.logo-img) {
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logo fade transition */
.logo-img {
    transition: opacity 0.3s ease;
}

html,
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;
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
}

/* 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);
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Typography */
.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: #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;
}

[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));
}

@keyframes textShine {
    to {
        background-position: 0 0, 200% center;
    }
}

/* Particle Canvas */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Stars Container */
.stars-container {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 50%;
    opacity: 0;
    animation: twinkle 3s infinite ease-in-out;
    box-shadow: 0 0 4px currentColor;
}

.star:nth-child(odd) {
    animation-duration: 4s;
    background: var(--color-secondary);
}

.star:nth-child(3n) {
    animation-duration: 2.5s;
    background: var(--color-text-muted);
    width: 1.5px;
    height: 1.5px;
    opacity: 0.5;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* =========================================
   Light Theme - Navbar Overrides
   ========================================= */
[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(79, 70, 229, 0.1);
    box-shadow: 0 4px 30px rgba(79, 70, 229, 0.08);
}

[data-theme="light"] .logo {
    color: var(--text-main);
}

[data-theme="light"] .bar {
    background-color: var(--text-main);
}

/* =========================================
   Light Theme - Hero Section
   ========================================= */
[data-theme="light"] .hero {
    background: transparent;
    /* Allow body gradient/stars to show */
}

/* Apply gradient to body in light mode */
[data-theme="light"] body {
    background: var(--cosmic-gradient);
    background-attachment: fixed;
    /* Parallax-like feel */
}

[data-theme="light"] .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--nebula-glow);
    pointer-events: none;
    z-index: 0;
}

[data-theme="light"] .blob-1 {
    background: rgba(124, 58, 237, 0.4);
    filter: blur(100px);
}

[data-theme="light"] .blob-2 {
    background: rgba(79, 70, 229, 0.35);
    filter: blur(100px);
}

[data-theme="light"] .blob-3 {
    background: rgba(245, 158, 11, 0.3);
    filter: blur(100px);
}

[data-theme="light"] .hero-title {
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

[data-theme="light"] .mouse {
    border-color: rgba(30, 27, 75, 0.3);
}

[data-theme="light"] .wheel {
    background: var(--text-main);
}

/* =========================================
   Light Theme - Section Headers
   ========================================= */
[data-theme="light"] .section-header h2 {
    background: linear-gradient(90deg, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =========================================
   Light Theme - Cards & Components
   ========================================= */
[data-theme="light"] .member-card {
    background: var(--bg-card);
    border: 1px solid rgba(79, 70, 229, 0.1);
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.08);
}

[data-theme="light"] .member-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: 0 16px 48px rgba(79, 70, 229, 0.15);
}

[data-theme="light"] .member-img {
    border-color: var(--bg-dark);
    background: var(--bg-dark);
}

[data-theme="light"] .member-name {
    color: var(--text-main);
}

[data-theme="light"] .filter-btn {
    background: var(--bg-card);
    border: 1px solid rgba(79, 70, 229, 0.15);
    color: var(--text-muted);
}

[data-theme="light"] .filter-btn:hover,
[data-theme="light"] .filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
    box-shadow: var(--glow-primary);
}

[data-theme="light"] .search-bar input {
    background: var(--bg-card);
    border: 1px solid rgba(79, 70, 229, 0.15);
    color: var(--text-main);
}

[data-theme="light"] .search-bar input::placeholder {
    color: var(--text-muted);
}

[data-theme="light"] .search-bar input:focus {
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
}

/* =========================================
   Light Theme - Events Section
   ========================================= */
[data-theme="light"] .event-card {
    background: var(--bg-card);
    border-left: 4px solid var(--secondary);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.08);
}

[data-theme="light"] .event-card:hover {
    background: var(--bg-card-hover);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.15);
}

[data-theme="light"] .event-info h3 {
    color: var(--text-main);
}

[data-theme="light"] .read-more-btn {
    border-color: rgba(79, 70, 229, 0.3);
    color: var(--text-main);
}

[data-theme="light"] .read-more-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
}

[data-theme="light"] .tag {
    background: rgba(124, 58, 237, 0.15);
    color: var(--secondary);
}

/* =========================================
   Light Theme - Achievements Section
   ========================================= */
[data-theme="light"] .counter-card {
    background: var(--bg-card);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.06);
}

[data-theme="light"] .counter-card i {
    color: var(--secondary);
}

[data-theme="light"] .counter-card .count {
    background: linear-gradient(to top, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .medal-card {
    background: var(--bg-card);
    border: 1px solid rgba(79, 70, 229, 0.1);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.06);
}

[data-theme="light"] .medal-card:hover {
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
}

[data-theme="light"] .medal-card h4 {
    color: var(--text-main);
}

[data-theme="light"] .medal-card i {
    color: var(--accent);
    text-shadow: var(--glow-star);
}

/* =========================================
   Light Theme - Contact Section
   ========================================= */
[data-theme="light"] .contact-wrapper {
    background: var(--bg-card);
    border: 1px solid rgba(79, 70, 229, 0.1);
    box-shadow: 0 8px 40px rgba(79, 70, 229, 0.08);
}

[data-theme="light"] .contact-info h3 {
    color: var(--text-main);
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(79, 70, 229, 0.2);
    color: var(--text-main);
}

[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group textarea:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: var(--glow-primary);
}

[data-theme="light"] .social-links-large a {
    color: var(--text-muted);
}

[data-theme="light"] .social-links-large a:hover {
    color: var(--secondary);
}

/* =========================================
   Light Theme - Footer
   ========================================= */
[data-theme="light"] footer {
    background: var(--bg-darker);
    border-top: 1px solid rgba(79, 70, 229, 0.1);
}

/* =========================================
   Light Theme - Modal & Toast
   ========================================= */
[data-theme="light"] .modal {
    background: rgba(248, 250, 255, 0.9);
}

[data-theme="light"] .modal-content {
    background: white;
    border: 1px solid rgba(79, 70, 229, 0.15);
    box-shadow: 0 20px 60px rgba(79, 70, 229, 0.2);
}

[data-theme="light"] .modal-content h2 {
    color: var(--text-main);
}

[data-theme="light"] .close-modal {
    color: var(--text-muted);
}

[data-theme="light"] .close-modal:hover {
    color: var(--text-main);
}

[data-theme="light"] .modal-image-placeholder {
    background: var(--bg-darker);
}

[data-theme="light"] .toast {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 10px 40px rgba(79, 70, 229, 0.3);
}

/* =========================================
   Light Theme - Buttons
   ========================================= */
[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
}

[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.5);
}

[data-theme="light"] .btn-secondary {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.15);
}

[data-theme="light"] .btn-secondary:hover {
    background: var(--primary);
    color: white;
    box-shadow: var(--glow-primary);
}

/* =========================================
   Light Theme - Mobile Nav
   ========================================= */
@media (max-width: 768px) {
    [data-theme="light"] .nav-links {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: var(--glass);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='%2300f2ea' fill-opacity='0.6'/%3E%3Ccircle cx='12' cy='12' r='4' fill='%23ffffff'/%3E%3C/svg%3E") 12 12, auto;
}

/* Custom cursor for clickable elements */
a,
button,
.btn,
.filter-btn,
.menu-toggle,
.theme-btn,
.member-card {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12' fill='%23ff0055' fill-opacity='0.5'/%3E%3Ccircle cx='14' cy='14' r='6' fill='%23ffffff'/%3E%3C/svg%3E") 14 14, pointer;
}

/* Light theme cursor */
[data-theme="light"] body {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='%234f46e5' fill-opacity='0.5'/%3E%3Ccircle cx='12' cy='12' r='4' fill='%231e1b4b'/%3E%3C/svg%3E") 12 12, auto;
}

[data-theme="light"] a,
[data-theme="light"] button,
[data-theme="light"] .btn,
[data-theme="light"] .filter-btn,
[data-theme="light"] .menu-toggle,
[data-theme="light"] .theme-btn,
[data-theme="light"] .member-card {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12' fill='%237c3aed' fill-opacity='0.5'/%3E%3Ccircle cx='14' cy='14' r='6' fill='%231e1b4b'/%3E%3C/svg%3E") 14 14, pointer;
}

/* =========================================
   Utilities & Common
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
    position: relative;
}

.bg-darker {
    background-color: var(--bg-darker);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}


.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-line {
    width: 60px;
    height: 4px;
    background: var(--secondary);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* =========================================
   Navbar
   ========================================= */
/* Update your Navbar styles in style.css */
.navbar {
    z-index: 1000;
    /* Ensure it stays above particles */
    position: fixed;
    top: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1900px;
    padding: var(--space-sm) 0;
    transition: all var(--transition-base);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-glass-border);
}

@media (max-width: 768px) {
    .navbar {
        width: 100%;
        /* Full width on mobile */
        top: 0;
        left: 0;
        transform: none;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--color-glass-border);
    }

    .nav-links {
        position: fixed;
        right: -100%;
        /* Start off-screen */
        top: 0;
        /* Add top offset for navbar height if needed, but 0 is standard for side drawer */
        height: 100vh;
        width: 70%;
        background: rgba(0, 0, 0, 0.95);
        /* Dark theme default */
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-lg);
        transition: 0.4s ease-in-out;
        z-index: 999;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }

    [data-theme="light"] .nav-links {
        background: rgba(255, 255, 255, 0.95);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
        /* Slide in */
    }
}

.navbar.glass {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

[data-theme="light"] .navbar.glass {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.nav-content {
    max-width: 1900px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.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);
    flex-shrink: 0;
}

.logo-img {
    height: 20px;
    width: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    .logo {
        margin-right: auto;
    }
}

.nav-links {
    list-style: none;
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
    padding: var(--space-sm) 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    width: 44px;
    height: 33px;
    position: relative;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bar {
    position: absolute;
    left: 0;
    width: 44px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.bar:nth-child(1) {
    top: 0;
}

.bar:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.bar:nth-child(3) {
    bottom: 0;
}

/* Active State - Bars collapse to center, then rotate */
.menu-toggle.active {
    transform: rotate(135deg);
}

.menu-toggle.active .bar:nth-child(1) {
    top: 50%;
    transform: translateY(-50%);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 1;
}

.menu-toggle.active .bar:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(90deg);
}

/* Mobile Controls Wrapper */
.mobile-controls {
    display: none;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}



.back-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.6rem var(--space-md);
    background: var(--gradient-primary);
    color: #ffffff;
    text-decoration: none;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-base);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    white-space: nowrap;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.back-btn i {
    font-size: 0.9rem;
}

.back-btn span {
    display: inline;
}

.theme-btn {
    background: var(--color-glass);
    border: 1px solid var(--color-glass-border);
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--color-text);
    padding: 0.6rem;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .mobile-controls {
        display: flex;
    }
}

.theme-btn:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    transform: rotate(20deg) scale(1.1);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.mobile-menu-btn span {
    width: 30px;
    height: 3px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* Mobile: Show both hamburger and theme toggle */
@media (max-width: 768px) {
    .mobile-controls {
        order: 2;
    }

    .menu-toggle {
        display: block !important;
    }
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* 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-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.glow-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--color-primary);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--color-secondary);
    bottom: 10%;
    right: 10%;
    animation-delay: 5s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: var(--color-accent);
    top: 50%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(50px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-50px, 50px) scale(0.9);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: var(--space-xl) var(--space-lg);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 0.9;
    margin-bottom: var(--space-lg);
    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;
}

[data-theme="light"] .hero-title {
    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));
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* 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;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-glass-border);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    background: rgba(139, 92, 246, 0.1);
}

/* 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;
    z-index: 1;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    position: relative;
}

[data-theme="light"] .mouse {
    border-color: rgba(0, 0, 0, 0.2);
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollBounce 1.5s ease-in-out infinite;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateX(-50%) translateY(10px);
        opacity: 0.5;
    }
}

.arrow {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.arrow span {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--color-text-muted);
    border-bottom: 2px solid var(--color-text-muted);
    transform: rotate(45deg);
    animation: arrowBounce 1.5s ease-in-out infinite;
}

.arrow span:nth-child(2) {
    animation-delay: 0.2s;
}

.arrow span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes arrowBounce {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

/* Section Styles */
.section {
    padding: var(--space-2xl) 0;
    position: relative;
    z-index: 1;
}

.bg-darker {
    background-color: var(--color-bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-md);
}

.header-line {
    width: 60px;
    height: 4px;
    background: var(--color-secondary);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Panel Section */
.panel-category {
    margin-bottom: var(--space-2xl);
}

.category-header {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--color-glass-border);
}

.category-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.category-count {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* Panel Controls */
.panel-controls {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    align-items: center;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    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-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-btn:hover {
    border-color: var(--color-primary);
    background: rgba(139, 92, 246, 0.1);
    color: var(--color-text);
}

.filter-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.search-bar {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.search-bar i {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
}

.search-bar input {
    width: 100%;
    padding: var(--space-md) var(--space-md) var(--space-md) 3rem;
    background: var(--color-glass);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-full);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}

.search-bar input::placeholder {
    color: var(--color-text-muted);
}

/* Panel Grid */
.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.member-card {
    background: var(--color-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    transition: 0.5s;
}

.member-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: var(--color-glass-hover);
    border-color: var(--color-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), var(--shadow-glow);
}

.member-card:hover::before {
    left: 100%;
}

.card-top-section {
    position: relative;
    margin-bottom: var(--space-md);
}

.card-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: var(--space-md);
    margin-top: var(--space-sm);
}

.card-domain-badge {
    padding: var(--space-xs) var(--space-sm);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-primary-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-md);
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-glass-border);
    background: transparent;
}

.member-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-bottom-section {
    text-align: center;
}

.member-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.member-role {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.card-info-row {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-glass-border);
}

.card-info-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.info-label {
    font-size: 0.75rem;
    color: var(--color-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 0.85rem;
    color: var(--color-text);
    font-weight: 500;
}

/* Events Section */
/* Photo Section */
.card-photo-section {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.card-photo-section .member-img {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.member-card:hover .card-photo-section .member-img {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* Card Content */
.card-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Name Row with Verified Badge */
.member-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.member-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    letter-spacing: -0.3px;
}

.verified-badge {
    color: #22c55e;
    font-size: 1rem;
}

/* Description */
.member-description {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 16px 0;
    max-width: 220px;
}

/* Stats Row */
.card-stats-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 18px;
    padding: 12px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    width: 100%;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #475569;
}

.stat-item i {
    font-size: 0.9rem;
    color: #94a3b8;
}

/* Role Badge */
.member-role-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 242, 234, 0.3);
}

/* =========================================
   Dark Theme Card Overrides
   ========================================= */
[data-theme="dark"] .member-card,
body:not([data-theme="light"]) .member-card {
    background: var(--color-glass);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

body:not([data-theme="light"]) .member-name {
    color: #f1f5f9;
}

body:not([data-theme="light"]) .member-description {
    color: #94a3b8;
}

body:not([data-theme="light"]) .card-stats-row {
    border-top-color: rgba(255, 255, 255, 0.08);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body:not([data-theme="light"]) .stat-item {
    color: #cbd5e1;
}

body:not([data-theme="light"]) .stat-item i {
    color: var(--primary);
}

body:not([data-theme="light"]) .follow-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

body:not([data-theme="light"]) .follow-btn:hover {
    box-shadow: 0 8px 20px rgba(0, 242, 234, 0.3);
}

/* =========================================
   Light Theme Card Overrides
   ========================================= */
[data-theme="light"] .member-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

[data-theme="light"] .member-card:hover {
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .member-name {
    color: #1e1b4b;
}

[data-theme="light"] .verified-badge {
    color: #22c55e;
}

[data-theme="light"] .member-description {
    color: #4c4f69;
}

[data-theme="light"] .card-stats-row {
    border-top-color: rgba(79, 70, 229, 0.1);
    border-bottom-color: rgba(79, 70, 229, 0.1);
}

[data-theme="light"] .stat-item {
    color: #4c4f69;
}

[data-theme="light"] .stat-item i {
    color: var(--primary);
}

[data-theme="light"] .follow-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

[data-theme="light"] .follow-btn:hover {
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

/* =========================================
   Events Section
   ========================================= */
.events-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.event-card {
    background: var(--color-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--color-glass-border);
    border-left: 4px solid var(--color-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
    transition: all var(--transition-base);
}

.event-card:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-glow);
    border-left-color: var(--color-primary);
}

.event-info {
    flex: 1;
}

.event-info h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.event-meta {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.event-meta i {
    margin-right: var(--space-xs);
}

.tag {
    padding: var(--space-xs) var(--space-sm);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-primary-light);
}

.event-info p {
    color: var(--color-text-muted);
    line-height: 1.6;
}

.read-more-btn {
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: 2px solid var(--color-glass-border);
    border-radius: var(--radius-full);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.read-more-btn:hover {
    background: var(--gradient-primary);
    color: #ffffff;
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

/* Achievements Section */
.counter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.counter-card {
    background: var(--color-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.counter-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: var(--color-glass-hover);
    border-color: var(--color-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), var(--shadow-glow);
}

.counter-card i {
    font-size: 2.5rem;
    color: var(--color-secondary);
    margin-bottom: var(--space-md);
}

.count {
    display: block;
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-sm);
}

.counter-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.medals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.medal-card {
    background: var(--color-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.medal-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: var(--color-glass-hover);
    border-color: var(--color-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), var(--shadow-glow);
}

.medal-card i {
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: var(--space-md);
}

.medal-card h4 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.medal-card p {
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Footer */
footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-glass-border);
    padding: var(--space-xl) 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
}

.footer-content p {
    color: var(--color-text-muted);
}

.footer-socials {
    display: flex;
    gap: var(--space-md);
}

.footer-socials a {
    color: var(--color-text-muted);
    font-size: 1.5rem;
    transition: color var(--transition-fast);
}

.footer-socials a:hover {
    color: var(--color-primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--color-glass);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-glass);
}

[data-theme="light"] .modal-content {
    background: var(--color-bg-secondary);
}

.close-modal {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    font-size: 2rem;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.close-modal:hover {
    color: var(--color-text);
}

.modal-body h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.modal-meta {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    margin-bottom: var(--space-lg);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.modal-image-placeholder {
    width: 100%;
    height: 200px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.modal-body p {
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* Toast */
.toast {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    background: var(--gradient-primary);
    color: #ffffff;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow);
    transform: translateY(200%);
    transition: transform var(--transition-base);
    z-index: 3000;
}

.toast.show {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .back-btn span {
        display: none;
    }

    .back-btn {
        padding: 0.6rem;
        width: 44px;
        height: 44px;
        justify-content: center;
    }

    /* Old conflicting nav-links block removed */


    /* Old conflicting active state removed */

    /* Hide duplicates in nav-actions */
    .nav-actions .theme-toggle,
    .nav-actions .mobile-menu-btn {
        display: none !important;
    }

    .mobile-menu-btn {
        display: none;
    }

    .hero {
        min-height: 80vh;
        padding: var(--space-xl) var(--space-md);
    }

    .panel-grid {
        grid-template-columns: 1fr;
    }

    .event-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .counter-grid {
        grid-template-columns: 1fr;
    }

    .medals-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none;
    }


}

/* =========================================
   Extra Small Mobile Devices (< 400px)
   ========================================= */
@media (max-width: 400px) {

    /* Hero Section */
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 10px;
    }

    .hero-cta {
        flex-direction: column;
        gap: 12px;
    }

    .hero-cta .btn {
        width: 100%;
        text-align: center;
    }

    /* Section Headers */
    .section-header h2 {
        font-size: 1.8rem;
    }

    /* Panel Controls */
    .filter-buttons {
        justify-content: center;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .search-bar {
        width: 100%;
    }

    .search-bar input {
        width: 100%;
        max-width: 100%;
    }

    .search-bar input:focus {
        width: 100%;
    }

    /* Panel Grid - Single column on very small screens */
    .panel-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        padding: 0 5px;
    }

    .member-card {
        padding: 20px 15px;
    }

    /* Domain Headings */
    .domain-heading h3 {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }

    .domain-heading h3::before,
    .domain-heading h3::after {
        width: 30px;
    }

    /* Counter Cards */
    .counter-grid {
        grid-template-columns: 1fr;
    }

    .counter-card h3 {
        font-size: 2.5rem;
    }

    /* Medals Grid */
    .medals-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        padding: 20px;
    }

    /* Container padding */
    .container {
        padding: 0 15px;
    }

    .section {
        padding: 60px 0;
    }
}

/* =========================================
   Fix for horizontal overflow globally
   ========================================= */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

.container {
    max-width: 100%;

}