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

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

body {
    overflow-x: hidden;
}

/* Navbar */
.nav-scrolled {
    background: rgba(250, 250, 249, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-default {
    background: transparent;
    border-bottom: none;
    box-shadow: none;
}

.nav-default .nav-link {
    color: rgba(26, 26, 32, 0.7);
}

.nav-default .nav-logo {
    color: #1a1a20;
}

/* Card Float Animation */
.card-float {
    animation: cardFloat 6s ease-in-out infinite;
}

.card-float:nth-child(2) {
    animation-delay: -1.5s;
}

.card-float:nth-child(3) {
    animation-delay: -3s;
}

.card-float:nth-child(4) {
    animation-delay: -4.5s;
}

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

/* Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .card-float {
        animation: none;
    }
    
    .reveal {
        transition: none;
        opacity: 1;
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

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

::-webkit-scrollbar-track {
    background: #fafaf9;
}

::-webkit-scrollbar-thumb {
    background: #c4c4cc;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9e9ea9;
}

/* Selection */
::selection {
    background: rgba(232, 99, 90, 0.15);
    color: #1a1a20;
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
