/* ===== CSS Custom Properties ===== */
:root {
    --forest-950: #061f09;
    --forest-900: #0d3b12;
    --forest-800: #1b5e20;
    --forest-700: #2e7d32;
    --forest-600: #388e3c;
    --forest-500: #4caf50;
    --cream-50: #fefdf8;
    --cream-100: #fdf9ed;
    --cream-200: #faf3d6;
    --cream-300: #f5e8b0;
}

/* ===== Base Reset & Typography ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--cream-50);
    color: var(--forest-900);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--cream-100);
}
::-webkit-scrollbar-thumb {
    background: var(--forest-600);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--forest-700);
}

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

#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(27, 94, 32, 0.08), 0 4px 24px rgba(27, 94, 32, 0.06);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--forest-600);
    transition: width 0.3s ease;
    border-radius: 1px;
}

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

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

#mobile-menu.close {
    opacity: 0 !important;
    pointer-events: none !important;
}

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

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

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

/* ===== Hamburger Animation ===== */
.hamburger-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

#menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
    margin-right: 0;
}

/* ===== Menu Cards ===== */
.menu-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.menu-card:hover {
    transform: translateY(-6px);
}

/* ===== Experience Cards ===== */
.experience-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.experience-card:hover {
    transform: translateY(-4px);
}

/* ===== Scroll Reveal Animations ===== */
.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);
}

.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }
.reveal.delay-5 { transition-delay: 0.5s; }
.reveal.delay-6 { transition-delay: 0.6s; }

@media (prefers-reduced-motion: no-preference) {
    .reveal-hidden {
        opacity: 0;
        transform: translateY(32px);
    }

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

/* ===== Hero floating shapes animation ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(12deg); }
    50% { transform: translateY(-16px) rotate(12deg); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-24px) rotate(5deg); }
}

.hero-float-1 {
    animation: float 6s ease-in-out infinite;
}

hero-float-2 {
    animation: float-slow 8s ease-in-out infinite;
}

/* ===== Button focus states ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--forest-500);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ===== Selection ===== */
::selection {
    background: var(--forest-700);
    color: var(--cream-50);
}

/* ===== Utility ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
