/* Base & Animations */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #040B1A;
}
::-webkit-scrollbar-thumb {
    background: #1B3A70;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #1ABF7E;
}

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

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

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(45deg); }
    50% { transform: translateY(-20px) rotate(45deg); }
}

@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

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

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

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

.animate-marquee {
    animation: marquee 20s linear infinite;
}

/* Nav */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #3FD49A;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(4, 11, 26, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

/* Mobile menu */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Card hover glow */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* Selection */
::selection {
    background: rgba(26, 191, 126, 0.3);
    color: #fff;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid #3FD49A;
    outline-offset: 2px;
}

/* Smooth image loading */
img {
    loading: lazy;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .animate-marquee {
        animation: none;
    }
}

/* Large screens */
@media (min-width: 1024px) {
    .lg\\:hover\\:scale-105:hover {
        transform: scale(1.05);
    }
}
