/* ===== Base & Typography ===== */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #722F37;
    color: #FDF8F4;
}

/* ===== Hero Gradient ===== */
.hero-gradient {
    background: linear-gradient(135deg, #3D0F15 0%, #722F37 35%, #5A1A21 65%, #3D0F15 100%);
}

/* ===== Hero Animations ===== */
.hero-image {
    animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

.hero-badge {
    animation: fadeUp 0.8s ease-out 0.2s both;
}

.hero-headline {
    animation: fadeUp 0.8s ease-out 0.4s both;
}

.hero-subtitle {
    animation: fadeUp 0.8s ease-out 0.6s both;
}

.hero-ctas {
    animation: fadeUp 0.8s ease-out 0.8s both;
}

.hero-scroll {
    animation: fadeUp 0.8s ease-out 1.2s both;
}

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

/* ===== Navbar ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(61, 15, 21, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-logo-text {
    color: white !important;
}

#navbar.scrolled .nav-logo-text {
    color: white !important;
}

.nav-link {
    position: relative;
}

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

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

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

/* ===== Hero Buttons ===== */
.hero-btn-primary {
    box-shadow: 0 4px 20px rgba(245, 199, 163, 0.3);
}

.hero-btn-primary:hover {
    box-shadow: 0 8px 30px rgba(245, 199, 163, 0.4);
    transform: translateY(-2px);
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
}

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

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

/* Default state for reveal elements — always visible */
.reveal-element {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-element {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

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

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

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

/* ===== Menu Hover Effects ===== */
#menu .group:hover .font-serif {
    color: #722F37;
}

/* ===== Image Hover ===== */
#experience .aspect-\[3\/4\] img {
    transition: transform 0.7s ease;
}

/* ===== Smooth section transitions ===== */
section {
    position: relative;
}

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

::-webkit-scrollbar-track {
    background: #FDF8F4;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #5A1A21;
}

/* ===== Mobile responsiveness ===== */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.75rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    #about .aspect-\[4\/5\] {
        margin-bottom: 2rem;
    }

    #about .absolute.-bottom-6.-right-6 {
        display: none;
    }

    #experience .aspect-\[3\/4\] {
        aspect-ratio: 4/3;
    }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .hero-image {
        animation: none;
    }

    .hero-badge,
    .hero-headline,
    .hero-subtitle,
    .hero-ctas,
    .hero-scroll {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
