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

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

body {
    margin: 0;
    overflow-x: hidden;
}

/* Floating card animations */
@keyframes float1 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating-card {
    animation-duration: 4s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.card-1 {
    animation-name: float1;
    animation-delay: 0s;
}

.card-2 {
    animation-name: float2;
    animation-delay: 1.3s;
}

.card-3 {
    animation-name: float3;
    animation-delay: 2.6s;
}

/* Scroll reveal — progressive enhancement, respects reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu transitions */
.mobile-menu {
    transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    transition: opacity 0.3s ease, color 0.3s ease;
}

/* Navbar state */
.nav-scrolled #navInner {
    background-color: rgba(10, 22, 40, 0.92);
    box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 8px 32px rgba(0,0,0,0.3);
}

/* Custom selection color */
::selection {
    background-color: rgba(167, 243, 208, 0.25);
    color: #0a1628;
}

/* Focus styles */
a:focus-visible, button:focus-visible {
    outline: 2px solid #86efac;
    outline-offset: 3px;
    border-radius: 4px;
}

/* Image loading placeholder */
img {
    background-color: rgba(10, 22, 40, 0.05);
}
