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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(245, 158, 11, 0.3);
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1A0F30;
}
::-webkit-scrollbar-thumb {
    background: #4A2E58;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #623D74;
}

/* Hero Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollIndicator {
    0% {
        top: 0;
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

.hero-content {
    animation: fadeInUp 1s ease-out forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; animation-fill-mode: both; opacity: 0; animation-name: fadeInUp; }
.hero-content > *:nth-child(2) { animation-delay: 0.3s; animation-fill-mode: both; opacity: 0; animation-name: fadeInUp; }
.hero-content > *:nth-child(3) { animation-delay: 0.5s; animation-fill-mode: both; opacity: 0; animation-name: fadeInUp; }
.hero-content > *:nth-child(4) { animation-delay: 0.7s; animation-fill-mode: both; opacity: 0; animation-name: fadeInUp; }

/* Scroll Indicator */
.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Navbar */
#navbar {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(13, 8, 24, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #FBBF24 !important;
}

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

#mobile-menu.open .mobile-link {
    animation: fadeInUp 0.5s ease-out forwards;
}

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

/* Menu Toggle Animation */
.menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg);
    top: 4px;
}

.menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .menu-line:nth-child(3) {
    width: 100%;
    transform: rotate(-45deg);
    top: auto;
    bottom: 4px;
}

/* Menu Tabs */
.menu-tab {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.menu-tab.active {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
    border-radius: 0.75rem;
}

/* Menu Panel */
.menu-panel {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Parallax-like subtle hero movement */
#hero-img {
    transition: transform 0.1s linear;
}

/* Button hover lift effect */
button, a {
    will-change: transform;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #FBBF24;
    outline-offset: 2px;
}

/* Smooth image loading */
img {
    image-rendering: auto;
}

/* Mobile responsiveness adjustments */
@media (max-width: 768px) {
    .font-display {
        line-height: 1.1;
    }
}

/* Print styles */
@media print {
    #navbar,
    #hero,
    #gallery {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
