/* 
 * GLOBAL STYLES & VARIABLES
 * Theme: Modern EdTech (Blue/Purple Gradients, Dark Mode compatible)
 */

/* --- 1. FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Primary Colors */
    --primary: #3b82f6;
    /* Bright Blue */
    --primary-dark: #1d4ed8;
    /* Deep Blue */
    --secondary: #8b5cf6;
    /* Violet */
    --accent: #10b981;
    /* Emerald */
    --gold: #f59e0b;
    /* Amber/Gold */
    --danger: #ef4444;
    /* Red */

    /* Gradients */
    --gradient-main: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-hover: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --gradient-text: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    --gradient-hero: radial-gradient(circle at center, rgba(59, 130, 246, 0.15), transparent 70%);

    /* Backgrounds */
    --bg-body: #020617;
    /* Deep Space */
    --bg-card: rgba(30, 41, 59, 0.6);
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --border-light: rgba(255, 255, 255, 0.1);

    /* Text */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;

    /* Layout & Spacing */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2.5rem;
    --container-width: 1200px;
    --header-height: 80px;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s ease;

    /* Refined Shadows (Apple Style) */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.15);
    --shadow-neon: 0 0 20px rgba(59, 130, 246, 0.2);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Light Mode Overrides */
body.light-mode {
    --bg-body: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 1);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border-light: rgba(0, 0, 0, 0.1);
    --bg-glass: rgba(0, 0, 0, 0.05);
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3 {
    color: #0f172a;
}


/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--header-height);
    /* Prevent Navbar Overlap */
}

/* HERO SECTION (Restored & Fixed) */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 85vh;
    /* Vertically centered */
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.main-heading {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.sub-text {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 700px;
    margin: 1.5rem auto 2.5rem;
}

/* Button Group Alignment */
.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Animations & Effects */
.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
}

.glass-effect {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
}

.hero-text-gradient {
    background: var(--gradient-hero-text, linear-gradient(90deg, #00c6ff, #0072ff, #a445b2, #fa4299));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ripple {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-anim 0.6s linear;
    pointer-events: none;
}

/* Mobile Optimizations (Phase 10) */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    body {
        font-size: 15px;
        /* Slightly larger text for readability */
        padding-top: 70px;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }

    /* Touch Targets */
    a,
    button,
    .btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links a {
        padding: 1rem;
        /* Larger tap area */
    }

    /* Stack Grids */
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Improve Form Elements */
    input,
    select,
    textarea {
        font-size: 16px;
        /* Prevent zoom on focus */
        padding: 0.8rem;
    }
}

@keyframes ripple-anim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-lg);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Page Transitions */
body {
    opacity: 0;
    animation: page-fade-in 0.5s ease-out forwards;
}

@keyframes page-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-spacing {
    padding: 4rem 1.5rem;
}