:root {
    /* Midnight Future Palette (Green Edition) */
    --primary: hsl(150, 100%, 50%);
    /* Neon Emerald */
    --primary-glow: hsl(150, 100%, 50%, 0.5);
    --primary-dark: hsl(150, 100%, 30%);

    --accent: hsl(280, 100%, 70%);
    /* Electric Purple (Kept for contrast) */
    --accent-glow: hsl(280, 100%, 70%, 0.5);

    /* Deep Space Backgrounds */
    --bg-dark: hsl(222, 47%, 5%);
    /* Almost Black Navy (Kept for depth) */
    --bg-gradient: radial-gradient(circle at 50% 0%, hsla(150, 100%, 20%, 0.3), transparent 70%),
        radial-gradient(circle at 80% 80%, hsla(280, 100%, 10%, 0.2), transparent 70%);

    --bg-card: hsla(222, 47%, 10%, 0.6);
    /* Dark Glass */
    --bg-card-hover: hsla(150, 50%, 10%, 0.8);

    /* Text */
    --text-main: hsl(150, 20%, 98%);
    /* Crisp White/Greenish */
    --text-muted: hsl(215, 20%, 70%);
    /* Muted Blue-Grey */

    /* Glassmorphism */
    --glass-border: hsla(150, 50%, 50%, 0.15);
    --glass-highlight: hsla(150, 50%, 100%, 0.1);
    --backdrop-blur: blur(20px);

    --transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    --radius-lg: 24px;
    --radius-md: 16px;
}

[data-theme="light"] {
    /* Clean Fintech Light Palette (Green Edition) */
    --bg-dark: hsl(150, 10%, 98%);
    /* Mint White */
    --bg-gradient: radial-gradient(circle at 50% 0%, hsla(150, 100%, 90%, 0.5), transparent 70%),
        radial-gradient(circle at 80% 80%, hsla(160, 100%, 95%, 0.5), transparent 70%);

    --bg-card: hsla(0, 0%, 100%, 0.7);
    /* White Glass */
    --bg-card-hover: hsla(0, 0%, 100%, 0.9);

    --text-main: hsl(150, 47%, 10%);
    /* Dark Green/Black */
    --text-muted: hsl(150, 20%, 40%);
    /* Sage Grey */

    --primary: hsl(150, 100%, 40%);
    /* Solid Emerald */
    --primary-glow: hsla(150, 100%, 50%, 0.3);
    --primary-dark: hsl(150, 100%, 25%);

    --accent: hsl(260, 80%, 60%);
    /* Royal Purple */

    --glass-border: hsla(150, 20%, 80%, 0.4);
    --glass-highlight: hsla(0, 0%, 100%, 0.8);
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: var(--bg-card);
    border-color: var(--primary);
    transform: rotate(15deg);
    box-shadow: 0 0 15px var(--primary-glow);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--primary-glow) 0%, transparent 50%),
        var(--bg-gradient);
    background-attachment: fixed;
    /* Parallax effect */
    background-size: cover;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    /* Double safety */
    min-height: 100vh;
    width: 100%;
}

/* Global Responsive Reset */
img,
video,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Navbar */
header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 1000;
    padding: 1rem 2rem;
    transition: var(--transition);
    background: rgba(10, 15, 30, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    /* Pill shape */
}

header.scrolled {
    background: rgba(5, 10, 20, 0.85);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-dark);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

/* Mobile-Specific Items hidden on Desktop */
.mobile-menu-btn,
.mobile-only-cta {
    display: none;
}

.desktop-cta {
    display: block;
    margin-left: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px var(--primary-glow);
}

.logo span {
    color: var(--primary);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
    box-shadow: 0 0 10px var(--primary);
}

nav ul li a:hover {
    color: var(--text-main);
    text-shadow: 0 0 10px var(--primary-glow);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-dark) 0%, transparent 70%);
    opacity: 0.4;
    filter: blur(80px);
    z-index: 0;
    animation: pulseGlow 8s infinite alternate;
}

.hero-overlay {
    display: none;
    /* Removed old overlay */
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero h1 {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, white 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.3));
}

.hero h1 span {
    color: var(--primary);
    /* Fallback */
    -webkit-text-fill-color: var(--primary);
}

.hero p {
    font-size: 1.35rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 650px;
    border-left: 3px solid var(--primary);
    padding-left: 1.5rem;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: black;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    transition: var(--transition);
    border: none;
    box-shadow: 0 0 20px var(--primary-glow);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    background: white;
    box-shadow: 0 0 40px var(--primary-glow);
    transform: translateY(-3px) scale(1.02);
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-main);
    transform: translateY(-3px);
}

/* Activities - Glass Cards */
.activities {
    padding: 10rem 0;
    position: relative;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 5rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    box-shadow: 0 0 20px var(--primary);
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.activity-card {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    text-align: left;
    position: relative;
    backdrop-filter: var(--backdrop-blur);
    overflow: hidden;
}

.activity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--glass-highlight) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
}

.activity-card:hover {
    transform: translateY(-15px);
    border-color: var(--primary);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(59, 130, 246, 0.1);
    background: var(--bg-card-hover);
}

.activity-card:hover::before {
    opacity: 1;
}

.activity-card .icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.4));
}

.activity-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--text-main);
}

.activity-card p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* About Section */
.about {
    padding: 10rem 0;
    position: relative;
}

.about-flex {
    display: flex;
    align-items: center;
    gap: 6rem;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.stats {
    list-style: none;
    display: flex;
    gap: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.stats li {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats li strong {
    display: block;
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px var(--primary-glow);
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.about-img-main {
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: -20px 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    filter: grayscale(20%) contrast(110%);
    transition: var(--transition);
}

.about-image:hover .about-img-main {
    filter: grayscale(0%) contrast(100%);
}

.glass-card {
    background: rgba(10, 15, 30, 0.8);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--primary);
    max-width: 300px;
    position: absolute;
    bottom: -40px;
    right: -30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.glass-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Team Section */
.team {
    padding: 10rem 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    text-align: center;
}

.team-card {
    background: transparent;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    transition: var(--transition);
}

.team-card:hover {
    background: var(--bg-card);
    border-color: var(--glass-border);
    transform: translateY(-10px);
}

.profile-frame {
    width: 240px;
    height: 300px;
    margin: 0 auto 2rem;
    position: relative;
    padding: 10px;
    /* Space for the border effect */
    background: linear-gradient(135deg, var(--glass-highlight), transparent);
    clip-path: polygon(20px 0, 100% 0,
            100% calc(100% - 20px), calc(100% - 20px) 100%,
            0 100%, 0 20px);
    /* Cyber Cut Corners */
}

/* The glowing border effect wrapper */
.profile-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    clip-path: polygon(20px 0, 100% 0,
            100% calc(100% - 20px), calc(100% - 20px) 100%,
            0 100%, 0 20px);
    z-index: 0;
    opacity: 0.5;
    transition: var(--transition);
}

.profile-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    clip-path: polygon(18px 0, 100% 0,
            100% calc(100% - 18px), calc(100% - 18px) 100%,
            0 100%, 0 18px);
    /* Slightly smaller cut for inner image */
    background-color: var(--bg-card);
    filter: grayscale(100%) sepia(20%) hue-rotate(90deg);
    /* Tech Green Tint */
    transition: var(--transition);
}

.team-card:hover .profile-frame img {
    filter: grayscale(0%);
}

.team-card:hover .profile-frame::before {
    opacity: 1;
    box-shadow: 0 0 30px var(--primary-glow);
}

.team-card p {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
}

/* Contact Section */
.contact {
    padding: 10rem 0;
}

.contact-card {
    background: linear-gradient(145deg, var(--bg-card), rgba(0, 0, 0, 0.8));
    padding: 5rem;
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    max-width: 900px;
    margin: 0 auto;
    backdrop-filter: blur(30px);
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.6);
}

.contact-card h2 {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 3rem;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

input,
textarea {
    width: 100%;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

footer {
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes pulseGlow {
    0% {
        opacity: 0.3;
        transform: scale(1);
    }

    100% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Navigation */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: var(--transition);
}

/* Mobile Responsive Styles */
/* Mobile Re-Flow & Overflow Protection */
@media (max-width: 900px) {
    header {
        width: 100%;
        max-width: 100%;
        top: 0;
        left: 0;
        transform: none;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--glass-border);
        background: rgba(10, 15, 30, 0.95);
        padding: 0;
    }

    header .container {
        padding: 0.5rem 1rem;
        flex-direction: row;
        /* Keep row layout for logo + burger */
    }

    /* Hide Desktop CTA on Mobile */
    .desktop-cta {
        display: none;
    }

    /* Show Mobile CTA in Menu */
    .mobile-only-cta {
        display: block;
        margin-top: 1rem;
    }

    .mobile-menu-btn {
        display: flex;
        margin-left: 1rem;
    }

    /* Mobile Menu Overlay - Ensure it's not off-screen initally in a way that causes scroll */
    nav.nav-menu {
        position: fixed;
        top: 60px;
        /* Header height adjustment */
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background: var(--bg-dark);
        backdrop-filter: blur(20px);
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        justify-content: center;
        align-items: center;
        border-top: 1px solid var(--glass-border);
        visibility: hidden;
        /* Hide completely when closed */
    }

    nav.nav-menu.active {
        transform: translateX(0);
        visibility: visible;
    }

    nav.nav-menu ul {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
        padding: 0;
        list-style: none;
        /* Ensure no bullets */
    }

    nav.nav-menu ul li a {
        font-size: 1.5rem;
    }

    /* Hero Text Sizing - Clamp */
    .hero h1 {
        font-size: 2.5rem;
        word-wrap: break-word;
        /* Prevent long word overflow */
    }

    .hero p {
        font-size: 1rem;
    }

    /* Section Spacing */
    .hero,
    .activities,
    .about,
    .team,
    .contact {
        padding: 4rem 0;
    }

    /* FIX: Section Title Overflow */
    .section-title {
        font-size: 2rem;
        margin-bottom: 2.5rem;
        width: 100%;
        max-width: 100%;
        left: auto;
        /* Reset absolute centering */
        transform: none;
        /* Reset translation */
        text-align: center;
        position: relative;
        /* Keep relative for pseudo-element */
    }

    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    /* Grid Stacking */
    .about-flex {
        flex-direction: column-reverse;
        gap: 3rem;
    }

    .stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }

    .stats li strong {
        font-size: 2rem;
    }

    .contact-card {
        padding: 2rem 1.5rem;
        border-radius: var(--radius-md);
    }

    .contact-card h2 {
        font-size: 1.8rem;
    }

    .contact-info-grid {
        grid-template-columns: 1fr;
        /* Stack visually */
    }
}