:root {
    /* Light Theme Variables */
    --light-bg: #f8fafc;
    --light-card: #ffffff;
    --light-border: #e2e8f0;
    --light-text-primary: #1e293b;
    --light-text-secondary: #64748b;
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent: #06b6d4;
    --success: #22c55e;
    
    /* Dark Theme Variables */
    --dark-bg: #0a0a0f;
    --dark-card: #121218;
    --dark-border: #2a2a35;
    --dark-text-primary: #f8fafc;
    --dark-text-secondary: #cbd5e1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--light-text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

body.dark-theme {
    background-color: var(--dark-bg);
    color: var(--dark-text-primary);
}

.code-font {
    font-family: 'Fira Code', monospace;
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
}

body.dark-theme header {
    background: rgba(10, 10, 15, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--light-text-primary);
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}

body.dark-theme .nav-menu a {
    color: var(--dark-text-secondary);
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-menu a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background: var(--light-text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

body.dark-theme .menu-toggle .bar {
    background: var(--dark-text-primary);
}

/* Theme Toggle */
.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-card);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-left: 1rem;
}

body.dark-theme .theme-toggle {
    background-color: var(--dark-card);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theme-toggle i {
    font-size: 1.2rem;
    color: var(--light-text-primary);
}

body.dark-theme .theme-toggle i {
    color: var(--dark-text-primary);
}

/* Footer */
footer {
    background: var(--light-card);
    color: var(--light-text-secondary);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--light-border);
}

body.dark-theme footer {
    background: var(--dark-card);
    color: var(--dark-text-secondary);
    border-top: 1px solid var(--dark-border);
}

/* Responsive Mobile Menu */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px; /* Adjust based on header height */
        left: -100%;
        flex-direction: column;
        background: var(--light-card);
        width: 100%;
        height: calc(100vh - 70px);
        padding: 2rem;
        transition: left 0.3s;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--light-border);
    }
    
    body.dark-theme .nav-menu {
        background: var(--dark-card);
        border-top: 1px solid var(--dark-border);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu-toggle.active .bar:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }
}