/* ===== Reset & Variables ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --accent: #0ea5e9;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --text: #334155;
    --text-light: #64748b;
    --bg: #f8fafc;
    --white: #ffffff;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.08), 0 16px 40px rgba(0,0,0,0.08);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    background: var(--dark);
    overflow: hidden;
    padding: 80px 0 100px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(14, 165, 233, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
}

/* ===== Floating Formulas ===== */
.formulas-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.formula {
    position: absolute;
    font-family: 'Fira Code', monospace;
    color: rgba(148, 163, 184, 0.3);
    font-size: 1.1rem;
    white-space: nowrap;
    animation: floatFormula 20s ease-in-out infinite;
    will-change: transform;
}

.f1  { top: 8%;  left: 5%;  font-size: 1.8rem; animation-delay: 0s; animation-duration: 22s; }
.f2  { top: 15%; left: 75%; font-size: 1.4rem; animation-delay: -3s; animation-duration: 18s; }
.f3  { top: 30%; left: 60%; font-size: 1.2rem; animation-delay: -6s; animation-duration: 25s; }
.f4  { top: 55%; left: 8%;  font-size: 1rem;   animation-delay: -9s; animation-duration: 20s; }
.f5  { top: 70%; left: 70%; font-size: 1.5rem; animation-delay: -2s; animation-duration: 23s; }
.f6  { top: 85%; left: 25%; font-size: 1rem;   animation-delay: -12s; animation-duration: 19s; }
.f7  { top: 40%; left: 85%; font-size: 1.1rem; animation-delay: -5s; animation-duration: 21s; }
.f8  { top: 20%; left: 40%; font-size: 1.3rem; animation-delay: -8s; animation-duration: 24s; }
.f9  { top: 65%; left: 45%; font-size: 1rem;   animation-delay: -14s; animation-duration: 17s; }
.f10 { top: 10%; left: 90%; font-size: 1.2rem; animation-delay: -7s; animation-duration: 26s; }
.f11 { top: 50%; left: 20%; font-size: 1.4rem; animation-delay: -4s; animation-duration: 22s; }
.f12 { top: 78%; left: 85%; font-size: 0.9rem; animation-delay: -10s; animation-duration: 20s; }
.f13 { top: 35%; left: 2%;  font-size: 0.9rem; animation-delay: -13s; animation-duration: 24s; }
.f14 { top: 90%; left: 55%; font-size: 1.3rem; animation-delay: -1s; animation-duration: 18s; }
.f15 { top: 5%;  left: 55%; font-size: 1rem;   animation-delay: -11s; animation-duration: 21s; }
.f16 { top: 60%; left: 92%; font-size: 1rem;   animation-delay: -6s; animation-duration: 23s; }
.f17 { top: 45%; left: 35%; font-size: 0.9rem; animation-delay: -15s; animation-duration: 19s; }
.f18 { top: 75%; left: 10%; font-size: 1.1rem; animation-delay: -8s; animation-duration: 25s; }
.f19 { top: 25%; left: 15%; font-size: 1.5rem; animation-delay: -3s; animation-duration: 20s; }
.f20 { top: 42%; left: 50%; font-size: 1.3rem; animation-delay: -7s; animation-duration: 22s; }
.f21 { top: 82%; left: 42%; font-size: 1rem;   animation-delay: -11s; animation-duration: 18s; }
.f22 { top: 12%; left: 28%; font-size: 1.1rem; animation-delay: -5s; animation-duration: 24s; }
.f23 { top: 68%; left: 58%; font-size: 1.4rem; animation-delay: -9s; animation-duration: 21s; }
.f24 { top: 38%; left: 72%; font-size: 0.95rem; animation-delay: -14s; animation-duration: 19s; }
.f25 { top: 92%; left: 80%; font-size: 1.2rem; animation-delay: -2s; animation-duration: 23s; }
.f26 { top: 3%;  left: 42%; font-size: 1rem;   animation-delay: -10s; animation-duration: 26s; }
.f27 { top: 58%; left: 30%; font-size: 1.3rem; animation-delay: -6s; animation-duration: 17s; }
.f28 { top: 48%; left: 65%; font-size: 1.1rem; animation-delay: -13s; animation-duration: 20s; }

@keyframes floatFormula {
    0%, 100% { transform: translate(0px, 0px) rotate(0deg); opacity: 0.5; }
    25%      { transform: translate(12px, -30px) rotate(2deg); opacity: 1; }
    50%      { transform: translate(-8px, 10px) rotate(-1.5deg); opacity: 0.6; }
    75%      { transform: translate(6px, -20px) rotate(1deg); opacity: 0.9; }
}

/* ===== Floating STEM Icons ===== */
.stem-icons-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.stem-icon {
    position: absolute;
    color: rgba(96, 165, 250, 0.12);
    animation: floatIcon 24s ease-in-out infinite;
    will-change: transform;
}

.si1  { top: 5%;  left: 80%; animation-delay: 0s;    animation-duration: 28s; }
.si2  { top: 60%; left: 3%;  animation-delay: -4s;   animation-duration: 22s; }
.si3  { top: 80%; left: 65%; animation-delay: -8s;   animation-duration: 26s; }
.si4  { top: 20%; left: 50%; animation-delay: -12s;  animation-duration: 20s; }
.si5  { top: 45%; left: 88%; animation-delay: -6s;   animation-duration: 24s; }
.si6  { top: 70%; left: 35%; animation-delay: -10s;  animation-duration: 30s; }
.si7  { top: 10%; left: 18%; animation-delay: -3s;   animation-duration: 22s; }
.si8  { top: 88%; left: 90%; animation-delay: -15s;  animation-duration: 26s; }
.si9  { top: 35%; left: 70%; animation-delay: -7s;   animation-duration: 21s; }
.si10 { top: 55%; left: 12%; animation-delay: -13s;  animation-duration: 25s; }

@keyframes floatIcon {
    0%, 100% { transform: translate(0px, 0px) rotate(0deg) scale(1); opacity: 0.7; }
    20%      { transform: translate(15px, -25px) rotate(5deg) scale(1.05); opacity: 1; }
    40%      { transform: translate(-10px, -40px) rotate(-3deg) scale(0.95); opacity: 0.8; }
    60%      { transform: translate(20px, -15px) rotate(4deg) scale(1.02); opacity: 0.6; }
    80%      { transform: translate(-5px, -35px) rotate(-2deg) scale(1); opacity: 0.9; }
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 60px;
}

.hero-text {
    color: var(--white);
    position: relative;
}

/* Invisible blocker - clears formulas/icons behind text without a visible box */
.hero-text::before {
    content: '';
    position: absolute;
    inset: -50px -60px;
    background: radial-gradient(ellipse, var(--dark) 40%, rgba(15, 23, 42, 0.9) 60%, transparent 75%);
    z-index: -1;
    pointer-events: none;
}

.hero-image {
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    inset: -40px;
    background: radial-gradient(circle, var(--dark) 35%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.badge {
    display: inline-block;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: #93c5fd;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.tagline {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    color: #94a3b8;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 1.05rem;
    color: #94a3b8;
    max-width: 500px;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.free-lesson {
    font-size: 0.9rem;
    color: #fbbf24;
    font-weight: 600;
}

/* Profile Photo */
.profile-photo {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(37, 99, 235, 0.4);
    box-shadow: 0 0 60px rgba(37, 99, 235, 0.15);
    background: var(--dark-soft);
    flex-shrink: 0;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.btn-large {
    padding: 18px 36px;
    font-size: 1.15rem;
}

/* ===== Stats Bar ===== */
.stats {
    background: var(--white);
    border-bottom: 1px solid #e2e8f0;
    padding: 0;
    margin-top: -40px;
    position: relative;
    z-index: 10;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.stat-item {
    padding: 28px 20px;
    text-align: center;
    border-right: 1px solid #f1f5f9;
}

.stat-item:last-child {
    border-right: none;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ===== Section Styles ===== */
.section-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.05rem;
    margin-bottom: 40px;
}

/* ===== Services ===== */
.services {
    padding: 100px 0 80px;
    text-align: center;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    text-align: left;
}

.card {
    background: var(--white);
    padding: 32px 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #f1f5f9;
    transition: all var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #dbeafe;
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
}

.card ul {
    list-style: none;
}

.card ul li {
    padding: 6px 0;
    color: var(--text-light);
    font-size: 0.95rem;
    position: relative;
    padding-left: 20px;
}

.card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.5;
}

/* ===== Why Section ===== */
.why {
    padding: 80px 0;
    background: var(--dark);
}

.why .section-title {
    color: var(--white);
    text-align: center;
    margin-bottom: 48px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.why-item {
    text-align: center;
    padding: 32px 24px;
}

.why-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.why-item h4 {
    color: var(--white);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.why-item p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== Hero Links ===== */
.hero-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition);
}

.hero-link:hover {
    color: #60a5fa;
}

/* ===== Contact / QR ===== */
.contact {
    padding: 80px 0;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #f1f5f9;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #dbeafe;
}

.contact-card svg {
    color: var(--primary);
}

.contact-card-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

.contact-card-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark);
}

.qr-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.qr-card {
    background: var(--white);
    padding: 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 1px solid #f1f5f9;
}

.qr-card canvas {
    display: block;
    margin: 0 auto;
}

.qr-label {
    margin-top: 14px;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ===== Footer ===== */
footer {
    background: var(--dark-soft);
    color: #64748b;
    padding: 32px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0 80px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
        display: flex;
        justify-content: center;
    }

    .profile-photo {
        width: 180px;
        height: 180px;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-item:nth-child(2) {
        border-right: none;
    }

    .stat-item:nth-child(1),
    .stat-item:nth-child(2) {
        border-bottom: 1px solid #f1f5f9;
    }

    .services {
        padding: 80px 0 60px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .contact-methods {
        grid-template-columns: 1fr;
    }

    .qr-row {
        flex-direction: column;
        align-items: center;
    }

    .hero-links {
        justify-content: center;
    }

    .btn-large {
        padding: 16px 28px;
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .btn {
        padding: 12px 22px;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .section-title {
        font-size: 1.6rem;
    }
}
