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

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

body {
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f0f4f8;
}
::-webkit-scrollbar-thumb {
    background: #9fb3c8;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #627d98;
}

/* Navbar */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(240, 244, 248, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(16, 42, 67, 0.06);
}

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: #243b53;
}

#navbar.scrolled .nav-link:hover {
    color: #102a43;
}

/* Mobile Menu */
.menu-line {
    display: block;
}

#menu-toggle.active .menu-line:first-child {
    transform: rotate(45deg) translate(2px, 2px);
}

#menu-toggle.active .menu-line:last-child {
    transform: rotate(-45deg) translate(2px, -2px);
}

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

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #a8dbbb;
    transition: width 0.3s ease;
}

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

/* Scroll Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.hidden-animate {
    opacity: 0;
    transform: translateY(30px);
}

.reveal-left.hidden-animate {
    opacity: 0;
    transform: translateX(-30px);
}

.reveal-right.hidden-animate {
    opacity: 0;
    transform: translateX(30px);
}

/* Scroll Line Animation */
@keyframes scrollLine {
    0% {
        height: 0;
        opacity: 0;
    }
    50% {
        height: 24px;
        opacity: 1;
    }
    100% {
        height: 24px;
        opacity: 0;
    }
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-left, .reveal-right {
        opacity: 1;
        transform: none;
    }
    
    .animate-scroll-line {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    * {
        transition-duration: 0.01ms !important;
    }
}

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

/* Selection */
::selection {
    background: #a8dbbb;
    color: #102a43;
}
