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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(9, 14, 36, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#navbar.scrolled .nav-line {
    background: white;
}

/* Navigation lines animation */
.nav-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

#menu-toggle.active .nav-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile links */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Menu tabs */
.menu-tab {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-tab:hover {
    border-color: rgba(45, 212, 160, 0.3);
    color: rgba(45, 212, 160, 0.8);
}

.menu-tab.active {
    background: #2dd4a0;
    border-color: #2dd4a0;
    color: #0f1638;
    font-weight: 600;
}

/* Scroll reveal animations */
.reveal-up, .reveal-left, .reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-up {
    transform: translateY(0);
}

.reveal-left {
    transform: translateX(0);
}

.reveal-right {
    transform: translateX(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal-up, .reveal-left, .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .animate-float, .animate-float-delayed {
        animation: none;
    }
    
    .animate-bounce {
        animation: none;
    }
    
    .animate-pulse {
        animation: none;
    }
}

/* Floating animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(12deg); }
    50% { transform: translateY(-20px) rotate(12deg); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1s;
}

/* Scroll-triggered reveals (progressive enhancement via JS) */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-left.revealed {
        opacity: 1;
        transform: translateX(0);
    }
    .reveal-right.revealed {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f1638;
}

::-webkit-scrollbar-thumb {
    background: rgba(45, 212, 160, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(45, 212, 160, 0.5);
}

/* Focus styles */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #2dd4a0;
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: rgba(45, 212, 160, 0.3);
    color: #f0f4ff;
}
