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

/* CSS Variables */
:root {
    --bg-deep: #050810;
    --bg-primary: #0a0e17;
    --bg-elevated: #0f1420;
    --bg-card: #141a28;
    --border-subtle: rgba(0, 240, 255, 0.1);
    --border-glow: rgba(0, 240, 255, 0.3);
    --text-primary: #e8edf5;
    --text-secondary: #8892a4;
    --text-muted: #5a6478;
    --accent-cyan: #00f0ff;
    --accent-violet: #7b5cff;
    --accent-warm: #ff6b4a;
    --accent-cyan-glow: rgba(0, 240, 255, 0.4);
    --accent-violet-glow: rgba(123, 92, 255, 0.4);
    --gradient-cyber: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-violet) 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, var(--bg-deep) 0%, transparent 100%);
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(5, 8, 16, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

/* For pages that always have solid nav */
nav.solid {
    background: rgba(5, 8, 16, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    background: var(--gradient-cyber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    position: relative;
}

.logo::after {
    content: '_';
    animation: blink 1s infinite;
    -webkit-text-fill-color: var(--accent-cyan);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gradient-cyber);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::before {
    width: 100%;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--accent-cyan);
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 8, 16, 0.98);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: var(--accent-cyan);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-cyber);
    color: var(--bg-deep);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-violet) 0%, var(--accent-cyan) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--accent-cyan-glow);
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-glow);
}

.btn-secondary:hover {
    background: rgba(0, 240, 255, 0.05);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 30px var(--accent-cyan-glow);
}

.btn-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Section Headers */
.section-header {
    margin-bottom: 4rem;
}

.section-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-cyan);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-tag::before {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--accent-cyan);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    transition: all 0.4s ease;
}

.card:hover {
    border-color: var(--border-glow);
    transform: translateY(-5px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 60px var(--accent-cyan-glow);
}

/* Footer */
footer {
    background: var(--bg-deep);
    border-top: 1px solid var(--border-subtle);
    padding: 3rem 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-content a {
    color: var(--accent-cyan);
    text-decoration: none;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-link:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.1);
}

.social-link svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
    stroke-width: 2;
    fill: none;
    transition: stroke 0.3s ease;
}

.social-link:hover svg {
    stroke: var(--accent-cyan);
}

/* Utility Classes */
.highlight {
    background: var(--gradient-cyber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        padding: 1rem 2rem;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    footer {
        padding: 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
