/* Design System & Base Styles for CodeWonders Clone */

:root {
    /* Colors */
    --bg-color: #050505;
    /* Deep dark background */
    --surface-color: #111111;
    /* Slightly lighter for cards */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-pink: #ff00ff;
    /* Neon pink for highlights */
    --accent-blue: #00ffff;
    /* Periodic accents if needed */
    --border-color: #333333;

    /* Navbar specifics */
    --navbar-bg: rgba(5, 5, 5, 0.8);
    --navbar-border: rgba(255, 255, 255, 0.05);

    /* Typography */
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Fallback for Inter */
    --font-mono: 'Courier New', monospace;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;

    /* Spacing System (Vertical Rhythm) */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-xxl: 80px;

    /* Fluid Typography Variables */
    --fs-h1: clamp(28px, 5vw, 48px);
    --fs-h2: clamp(24px, 4vw, 36px);
    --fs-body: clamp(14px, 4vw, 16px);
}

[data-theme="light"] {
    --bg-color: #f9f9f9;
    --surface-color: #ffffff;
    --text-primary: #111111;
    --text-secondary: #555555;
    --border-color: #e0e0e0;

    /* Navbar specifics light mode */
    --navbar-bg: rgba(249, 249, 249, 0.85);
    --navbar-border: rgba(0, 0, 0, 0.1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: var(--fs-body);
    line-height: 1.6;
    letter-spacing: 0.5px;
    /* Improved readability */
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-pink);
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: var(--fs-h1);
    line-height: 1.2;
}

h2 {
    font-size: var(--fs-h2);
}

.text-accent {
    color: var(--accent-pink);
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: var(--space-xxl) 0;
}

@media (max-width: 768px) {
    .section {
        padding-top: calc(var(--header-height) + 40px);
        padding-bottom: var(--space-xl);
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--navbar-border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    font-family: var(--font-main);
    letter-spacing: -0.05em;
}

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

.nav-link {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 10px;
    /* larger touch target */
}

.nav-link .fa-whatsapp {
    font-size: 1.5rem;
    /* Larger icon size */
    vertical-align: middle;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

/* Theme Toggle */
.theme-switch {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 20px;
}

/* Grid Background Effect (Subtle) */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--navbar-bg);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
        z-index: 1000;
        border-left: 1px solid var(--navbar-border);
    }

    .nav-links.nav-active {
        right: 0;
    }

    .nav-links li {
        opacity: 0;
        /* Animation handled in JS usually, or simple CSS transition */
        animation: navLinkFade 0.5s ease forwards 0.3s;
    }
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}