/* Base Settings - UPDATED for Accessibility */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --brand-purple: #8b5cf6;
    --brand-dark: #0f0f12;
    --brand-light: #e5e5e5;
    --glass-bg: rgba(20, 20, 25, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 24px;
}

body {
    background-color: #0f1014;
    color: var(--brand-light);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

:focus-visible {
    outline: 2px solid var(--brand-purple);
    outline-offset: 4px;
    border-radius: 4px;
}

.skip-link {
    background: #ffffff;
    color: #000000;
    font-weight: bold;
    padding: 1rem;
    position: absolute;
    top: -100px;
    left: 0;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* --- Dynamic Background --- */
.dot-bg {
    background-color: #0f1014;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 32px 32px;
    background-position: 0 0, 16px 16px;
}

/* --- Navigation & Glassmorphism --- */
.nav-hidden {
    transform: translateY(-100%);
}

.nav-visible {
    transform: translateY(0);
}

.glass {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
}

.glass-card {
    background: rgba(22, 22, 26, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(30, 30, 35, 0.9);
    transform: translateY(-4px);
}

/* --- Hamburger Menu Animation --- */
/* --- Hamburger Menu Animation --- */
html,
body {
    overflow-x: hidden;
    /* Prevent horizontal scroll globally */
    width: 100%;
    position: relative;
}

html {
    scroll-padding-top: 100px;
    scroll-behavior: smooth;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Positioning lines in default state - Increased spacing */
.hamburger-line:nth-child(1) {
    top: 4px;
    /* Move up (was 8px) */
}

.hamburger-line:nth-child(2) {
    top: 50%;
    transform: translate(-50%, -50%);
}

.hamburger-line:nth-child(3) {
    bottom: 4px;
    /* Move down (was 8px) */
}

/* Styles for the button container to support absolute lines */
#menu-toggle .w-5 {
    position: relative;
    height: 24px;
    width: 24px;
}

/* Active State - Perfect X */
.hamburger-active .hamburger-line:nth-child(1) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

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

.hamburger-active .hamburger-line:nth-child(3) {
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Mobile Menu */
#mobile-menu {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease-in-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#mobile-menu.open {
    max-height: 100vh;
    opacity: 1;
    border-bottom: 1px solid var(--glass-border);
}

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

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

/* --- Utilities --- */
.text-gradient {
    background: linear-gradient(to right, #8b5cf6, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hoverable {
    transition: all 0.3s ease;
}

.reveal {
    /* Kept for fallback, but main animation handled by AOS */
    opacity: 1;
}


.timeline-line {
    background: linear-gradient(to bottom, transparent, #8b5cf6, #3b82f6, transparent);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.6);
    z-index: 0;
}

/* Timeline Dot Animation */
.timeline-dot {
    position: relative;
    z-index: 10;
}

/* Card Improvements */
.glass-card::before {
    content: '';
    /* Arrow for timeline */
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    /* Match glass card bg */
    border-top: 1px solid var(--glass-border);
    border-right: 1px solid var(--glass-border);
    transform: translateY(-50%) rotate(45deg);
    z-index: -1;
    transition: all 0.4s ease;
}

/* Timeline Item Right (Desktop: Card is on Right, Arrow points Left) */
.timeline-right .glass-card::before {
    left: -6px;
    right: auto;
    transform: translateY(-50%) rotate(-135deg);
    border-top: 1px solid var(--glass-border);
    border-right: 1px solid var(--glass-border);
    background: linear-gradient(225deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
}

/* Timeline Item Left (Desktop: Card is on Left, Arrow points Right) */
.timeline-left .glass-card::before {
    right: -6px;
    left: auto;
    transform: translateY(-50%) rotate(45deg);
    border-top: 1px solid var(--glass-border);
    border-right: 1px solid var(--glass-border);
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
}

/* Mobile adjustments for arrows */
@media (max-width: 768px) {
    .glass-card::before {
        display: none;
        /* Hide arrows on mobile for cleaner look */
    }
}

.form-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s;
    font-family: inherit;
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #8b5cf6;
    outline: none;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.form-input:focus-visible {
    outline: none;
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

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

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-move 5s ease infinite;
}

@keyframes gradient-move {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Accessibility reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}