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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, padding 0.3s ease;
    background-color: transparent;
}

#navbar.nav-scrolled {
    background-color: rgba(6, 14, 26, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

#navbar nav {
    transition: padding 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
    z-index: 50;
}

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

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

/* Scroll Reveal */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

/* Form focus styles */
input:focus, textarea:focus {
    outline: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: #1d3560;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c9a84c;
}

/* Selection */
::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #f0d78c;
}
