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

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

body {
    overflow-x: hidden;
}

::selection {
    background: #7ED4C1;
    color: #0A2540;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAFAF7;
}
::-webkit-scrollbar-thumb {
    background: #7ED4C1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5fbfaa;
}

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

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

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

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

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

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

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

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.revealed,
.reveal-right.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

/* Stagger delays */
.reveal-up:nth-child(1) { transition-delay: 0ms; }
.reveal-up:nth-child(2) { transition-delay: 100ms; }
.reveal-up:nth-child(3) { transition-delay: 200ms; }
.reveal-up:nth-child(4) { transition-delay: 300ms; }
.reveal-up:nth-child(5) { transition-delay: 400ms; }
.reveal-up:nth-child(6) { transition-delay: 500ms; }

/* Navbar */
#navbar {
    background: rgba(250, 250, 247, 0);
    backdrop-filter: blur(0px);
}

#navbar.scrolled {
    background: rgba(250, 250, 247, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(10, 37, 64, 0.06);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #7ED4C1;
    transition: width 0.3s ease;
}

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

/* Mobile menu */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#mobile-menu .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu .mobile-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menu toggle animation */
.menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
.menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.25rem;
}

/* Button hover effects */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* Image loading */
img {
    max-width: 100%;
    height: auto;
}

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

/* Responsive */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
}
