:root {
    --primary-color: #6366f1;
    /* Indigo */
    --secondary-color: #ec4899;
    /* Pink */
    --bg-color: #0f172a;
    /* Slate 900 */
    --text-color: #f8fafc;
    /* Slate 50 */
    --card-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(15, 23, 42, 0.8);
    --hover-effect: rgba(99, 102, 241, 0.2);
}

[data-theme="light"] {
    --primary-color: #4f46e5;
    --secondary-color: #db2777;
    --bg-color: #f1f5f9;
    /* Slate 100 */
    --text-color: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.05);
    --nav-bg: rgba(255, 255, 255, 0.8);
    --hover-effect: rgba(79, 70, 229, 0.1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Gradients */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, var(--hover-effect) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem;
    gap: 2rem;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero h1 span {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    opacity: 0.8;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px var(--hover-effect);
}

.btn-secondary {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--hover-effect);
}

/* Cards / Grid */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s, border-color 0.3s;
}

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

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.theme-toggle:hover {
    background-color: var(--hover-effect);
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 4rem 2rem;
    border-top: 1px solid var(--glass-border);
    opacity: 0.7;
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    nav {
        flex-wrap: wrap;
    }

    .nav-controls {
        display: flex;
        gap: 0.5rem;
        align-items: center;
        /* Controls are naturally last, so they'll be on the right if flex-wrap wraps the links */
    }

    .menu-toggle {
        display: block;
        /* Show hamburger on mobile */
    }

    .nav-links {
        display: none;
        /* Hide default menu */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        gap: 0;
        /* Remove gap, use padding on items */
        background-color: var(--nav-bg);
        /* Match nav background */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        text-align: center;
        padding: 1rem 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        width: 100%;
    }

    .nav-links.active {
        display: flex;
        /* Show when active */
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        /* Better fitting for mobile */
    }
}