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

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

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

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

::-webkit-scrollbar-thumb {
    background: #c9a227;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d4af37;
}

/* Scroll Indicator Animation */
@keyframes scrollIndicator {
    0% {
        transform: translateY(-100%);
        opacity: 1;
    }
    100% {
        transform: translateY(200%);
        opacity: 0;
    }
}

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

/* Hero Content Animation */
.hero-content {
    animation: heroFadeUp 1s ease-out forwards;
    opacity: 0;
}

@keyframes heroFadeUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Nav Transition States */
nav.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

nav.scrolled .nav-logo-text {
    color: #ffffff;
}

nav.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

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

.mobile-menu-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.mobile-menu.active .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active .mobile-menu-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-menu-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-menu-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.active .mobile-menu-link:nth-child(4) { transition-delay: 0.4s; }

/* Mobile Menu Button Active State */
.mobile-menu-btn.active .mobile-menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

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

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

/* Menu Card Hover */
.menu-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.menu-card:nth-child(1) { transition-delay: 0s; }
.menu-card:nth-child(2) { transition-delay: 0.1s; }
.menu-card:nth-child(3) { transition-delay: 0.2s; }
.menu-card:nth-child(4) { transition-delay: 0.3s; }

/* Experience Card Hover */
.experience-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.experience-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.experience-card:nth-child(1) { transition-delay: 0s; }
.experience-card:nth-child(2) { transition-delay: 0.15s; }
.experience-card:nth-child(3) { transition-delay: 0.3s; }

/* Parallax Hero Image */
#hero-img {
    transition: transform 0.1s linear;
}

/* Selection Color */
::selection {
    background: rgba(201, 162, 39, 0.3);
    color: #0a1628;
}

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

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .menu-card,
    .experience-card {
        opacity: 1;
        transform: none;
    }
}

/* Utility */
.text-shadow {
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Select dropdown arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9L12 15L18 9' stroke='rgba(255,255,255,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Image lazy load fade-in */
img[loading="lazy"] {
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

img[loading="lazy"] {
    opacity: 0;
}
