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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
    background: #0a1628;
}

::-webkit-scrollbar-thumb {
    background: #c9983f;
    border-radius: 3px;
}

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

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(10, 22, 40, 0.08);
}

.nav-link {
    position: relative;
}

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

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

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

#mobile-menu.active .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 1;
}

#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; }

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

/* Mobile menu button animation */
#mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

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

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

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

/* Menu hover effects */
#menu .border-b {
    transition: border-color 0.3s ease;
}

#menu .border-b:hover {
    border-color: rgba(201, 152, 63, 0.3);
}

#menu .border-b div:first-child p:first-child {
    transition: color 0.3s ease;
}

#menu .border-b:hover div:first-child p:first-child {
    color: #d4a853;
}

/* Image hover */
.reveal img {
    transition: transform 0.6s ease;
}

.reveal:hover img {
    transform: scale(1.02);
}

/* Button focus states */
a:focus-visible, button:focus-visible {
    outline: 2px solid #c9983f;
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: rgba(201, 152, 63, 0.2);
    color: #0a1628;
}
