/* 
   Theme: Science / Space / Future
   Author: Antigravity
*/

:root {
    /* Color Palette */
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --primary-color: #06b6d4;
    /* Neon Cyan */
    --primary-glow: rgba(6, 182, 212, 0.5);
    --secondary-color: #8b5cf6;
    /* Neon Purple */
    --secondary-glow: rgba(139, 92, 246, 0.5);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 5rem 2rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Animation Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.15), transparent 25%);
    z-index: -1;
    pointer-events: none;
}

/* Ensure content sits above valid low-z-index background elements */
section,
footer {
    position: relative;
    z-index: 10;
}

/* Reusable Components */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--bg-darker);
    background: var(--primary-color);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--primary-glow);
    background: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--bg-darker);
    box-shadow: 0 0 15px var(--primary-glow);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60%;
    height: 4px;
    background: var(--text-muted);
    margin: 0.5rem auto 0;
    border-radius: 2px;
    opacity: 0.3;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(6, 182, 212, 0.3);
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: background 0.3s ease;
}

header.scrolled {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 1.1rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-glow);
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    transition: 0.3s;
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    /* Offset for fixed header */
}

.hero-content {
    max-width: 600px;
    z-index: 1;
}

.hero-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

#hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff 20%, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-graphic {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
    height: 80%;
    z-index: 0;
    /* Placeholder for a sci-fi globe or atom animation */
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 60%);
    opacity: 0.6;
    pointer-events: none;
}

/* About Section */
#about {
    padding: var(--section-padding);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-img {
    position: relative;
}

.about-img img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 20px 20px 0 var(--glass-border);
}

/* Services / Courses */
#courses {
    padding: var(--section-padding);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.course-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.course-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.icon-box {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

/* Contact Section */
#contact {
    padding: var(--section-padding);
    text-align: center;
}

.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

input,
textarea {
    padding: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
/* Responsive */
/* Responsive Overhaul */
@media (max-width: 768px) {
    :root {
        --section-padding: 3rem 1.25rem;
    }

    #hero {
        flex-direction: column;
        justify-content: center;
        min-height: 100vh;
        padding-top: 100px;
        text-align: center;
        align-items: center;
    }

    /* Clamp for responsive text sizing */
    #hero h1 {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
        line-height: 1.1;
        margin-bottom: 1rem;
    }

    #hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
        max-width: 100%;
    }

    /* Better button layout for mobile */
    .hero-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0 1rem;
        z-index: 2;
        /* Ensure above graphic */
    }

    .hero-content .btn,
    .hero-content .btn-outline {
        display: block;
        width: 100%;
        max-width: 300px;
        margin: 0.5rem 0;
        padding: 0.8rem 1.5rem;
    }

    /* Keep the graphic visible but subtle under centered text */
    .hero-graphic {
        display: block;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        height: 60%;
        opacity: 0.15;
        z-index: 0;
        pointer-events: none;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-text {
        text-align: center;
    }

    .stats {
        justify-content: center;
    }

    /* Mobile Menu - Fixed & Robust */
    .nav-links {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: rgba(15, 23, 42, 0.98);
        z-index: 1000;
        /* High Z-index */
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 0;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links li {
        margin: 1.5rem 0;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.2s;
    }

    .nav-links a {
        font-size: 2rem;
        font-weight: 700;
        display: block;
        padding: 1rem;
    }

    /* Hamburger - Ensure visibility and clickability */
    .hamburger {
        display: flex;
        z-index: 1001;
        /* Higher than menu */
        cursor: pointer;
        padding: 10px;
        /* larger touch area */
        margin-right: -10px;
        /* offset padding */
        position: relative;
        /* Ensure z-index works */
    }

    /* Toggle Animation adjustments */
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .toggle .line2 {
        opacity: 0;
    }

    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    /* Course Cards */
    .courses-grid {
        grid-template-columns: 1fr;
        padding: 0 0.5rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    /* Input fields stick out less on mobile */
    input,
    textarea {
        font-size: 16px;
    }

    .section-title {
        position: static;
        width: fit-content;
        transform: none;
        left: auto;
        display: block;
        margin: 0 auto 2rem auto;
    }

    .section-title,
    .contact-wrapper,
    .course-card {
        text-align: center;
    }

    .icon-box {
        margin: 0 auto 1rem auto;
        /* Center icons */
    }
}

/* Animation Styles for Falling Spots */
/* Animation Styles for Falling Spots */
.spot {
    position: fixed;
    top: -10px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    pointer-events: none;
    z-index: 1;
    /* Low z-index to stay behind text */
    animation: fall linear forwards, blink ease-in-out infinite;
}

@keyframes fall {
    to {
        transform: translateY(110vh);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 0.2;
    }

    50% {
        opacity: 0.8;
    }
}