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

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

body {
    background-color: #0a0a0a;
    color: #faf9f6;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Floating card animations */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(1) {
    animation-delay: 0s;
}
.floating-card:nth-child(2) {
    animation-delay: -1.5s;
}
.floating-card:nth-child(3) {
    animation-delay: -3s;
}
.floating-card:nth-child(4) {
    animation-delay: -4.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Navbar glass effect */
.nav-scrolled {
    background: rgba(10, 10, 10, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-scrolled #navbar {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* Menu line animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menuToggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menuToggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuToggle.active .menu-line:nth-child(3) {
    width: 20px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Gold accent line on hover for links */
a {
    text-decoration: none;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .floating-card {
        animation: none;
    }
    .scroll-reveal {
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    #hero {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .font-serif {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }

    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
