/* --- Global Reset & Dark Theme Variables --- */
:root {
    --brand-orange: #ff781e;
    --brand-dark: #0a0a0a;
    --card-bg: #161616;
    --card-border: #262626;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --section-bg: #050505;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--brand-dark);
    color: var(--text-main);
    line-height: 1.6;
    position: relative;
    /* Deep Cosmos / Tech Void Background */
    background-color: #050505;
    background-image:
        /* Subtle Dot Grid */
        radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        /* Ambient Glow - Blue/Purple */
        radial-gradient(circle at 10% 20%, rgba(20, 100, 200, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(100, 20, 200, 0.05) 0%, transparent 40%);
    background-size: 40px 40px, 100% 100%, 100% 100%;
    background-attachment: fixed;
}

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

/* --- HERO SECTION --- */
.hero-section {
    position: relative;
    padding: 160px 0 60px 0;
    border-bottom: 1px solid var(--card-border);
    text-align: center;
    overflow: hidden;
}

.cursive-subtitle {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: #fff;
    opacity: 0.9;
    margin-bottom: -10px;
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: -2px;
    margin: 10px 0 20px;
    color: var(--text-main);
    line-height: 1;
}

.hero-title .highlight {
    color: var(--brand-orange);
}

.hero-desc {
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* --- SECTIONS --- */
.section {
    padding: 40px 0;
}

.section-heading {
    text-align: left;
    font-size: 2rem;
    margin-bottom: 20px;
    color: #fff;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 15px;
}

.highlight-text {
    color: var(--brand-orange);
}

/* --- CARDS GRID --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 30px;
    transition: transform 0.2s, border-color 0.2s;
    text-decoration: none;
    display: block;
    color: inherit;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #404040;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--brand-orange);
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #fff;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.card-link {
    color: var(--brand-orange);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 40px 0;
    color: #525252;
    font-size: 0.9rem;
    border-top: 1px solid #1a1a1a;
    background-color: #000;
}

/* --- MATH FORMULAS ILLUSTRATION --- */
.math-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.formula {
    position: absolute;
    font-family: 'Times New Roman', serif;
    font-style: italic;
    color: rgba(255, 255, 255, 0.08);
    font-size: 1.5rem;
    user-select: none;
    white-space: nowrap;
}

.f1 {
    top: 20%;
    left: 10%;
    transform: rotate(-15deg);
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
}

.f2 {
    bottom: 25%;
    right: 15%;
    transform: rotate(10deg);
    font-size: 1.8rem;
    animation: float 8s ease-in-out infinite reverse;
}

.f3 {
    top: 15%;
    right: 20%;
    transform: rotate(5deg);
    font-size: 1.2rem;
    animation: float 7s ease-in-out infinite 1s;
}

.f4 {
    bottom: 15%;
    left: 15%;
    transform: rotate(-5deg);
    font-size: 1.4rem;
    animation: float 9s ease-in-out infinite 0.5s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(var(--rot));
    }

    50% {
        transform: translateY(-15px) rotate(var(--rot));
    }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

/* --- NAVBAR --- */
.scroll-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, var(--brand-dark) 40%, transparent);
    z-index: 900;
    pointer-events: none;
}

.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    background: rgba(22, 22, 22, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #fff;
}

.nav-cta {
    background: var(--brand-orange);
    color: #fff;
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 120, 30, 0.4);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}