/* ============================================
   DRAVID KUMAR PORTFOLIO - CSS (ENHANCED)
   Cricket Stadium Aesthetic with Smooth Performance
   ============================================ */

/* CSS Variables */
:root {
    --pitch-green: #1a4d2e;
    --stadium-dark: #0a0e1a;
    --cricket-white: #f8f9fa;
    --boundary-line: #00ff88;
    --warning-red: #ff3366;
    --score-gold: #ffd700;
    --night-blue: #0d1b2a;
    --leather-brown: #8b4513;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--stadium-dark);
    color: var(--cricket-white);
    overflow-x: hidden;
    line-height: 1.6;
    /* Better scrolling on all devices */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Cursor */
body {
    cursor: none;
}

#custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--boundary-line);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.15s ease, background-color 0.2s ease;
    mix-blend-mode: difference;
    will-change: transform;
}

#custom-cursor.active {
    transform: scale(1.8);
    background: rgba(0, 255, 136, 0.3);
    border-width: 3px;
}

/* Ambient Background - Enhanced Space Feel */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(26, 77, 46, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(13, 27, 42, 0.8) 0%, transparent 100%),
        linear-gradient(180deg, #050812 0%, #0a0e1a 50%, #0d1b2a 100%);
}

#canvas-3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.8;
    /* Prevent interaction and optimize rendering */
    pointer-events: none;
    will-change: transform;
}

/* Container */
.container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 60px 0 80px 0;
    /* Remove transform to fix scroll jank */
}

.hero-content {
    text-align: center;
    animation: fadeInUp 1.2s ease-out;
    /* Add will-change for smoother animations */
    will-change: transform, opacity;
}

.profile-container {
    width: 160px;
    height: 160px;
    margin: 0 auto 25px;
    position: relative;
    opacity: 0;
    animation: fadeInScale 1s ease-out 0.3s forwards;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--boundary-line);
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-image:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.5);
}

.boot-log {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    color: var(--boundary-line);
    margin-bottom: 20px;
    opacity: 0;
    animation: typewriter 2s steps(40) forwards;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(60px, 10vw, 140px);
    line-height: 0.9;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--cricket-white) 0%, var(--boundary-line) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 4px;
    opacity: 0;
    animation: slideInLeft 1s ease-out 0.5s forwards;
}

.hero-subtitle {
    font-size: clamp(24px, 3vw, 42px);
    font-weight: 700;
    color: var(--cricket-white);
    margin-bottom: 10px;
    opacity: 0;
    animation: slideInRight 1s ease-out 0.7s forwards;
    letter-spacing: 2px;
}

.hero-tagline {
    font-size: clamp(16px, 2vw, 22px);
    color: rgba(248, 249, 250, 0.7);
    font-weight: 300;
    margin-bottom: 35px;
    opacity: 0;
    animation: fadeIn 1s ease-out 1s forwards;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.2s forwards;
}

.btn {
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
}

.btn-primary {
    background: var(--boundary-line);
    color: var(--stadium-dark);
    border-color: var(--boundary-line);
}

.btn-primary::before {
    background: var(--cricket-white);
}

.btn-secondary {
    background: transparent;
    color: var(--cricket-white);
    border-color: var(--cricket-white);
}

.btn-secondary::before {
    background: var(--cricket-white);
}

.btn-secondary:hover {
    color: var(--stadium-dark);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border-right: 2px solid var(--boundary-line);
    border-bottom: 2px solid var(--boundary-line);
    transform: rotate(45deg);
}

/* ============================================
   SECTIONS
   ============================================ */
section {
    padding: 120px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(48px, 6vw, 80px);
    color: var(--cricket-white);
    margin-bottom: 20px;
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--boundary-line), transparent);
}

.section-subtitle {
    font-size: 20px;
    color: rgba(248, 249, 250, 0.6);
    max-width: 700px;
    margin: 20px auto 0;
    font-weight: 300;
}

/* ============================================
   ORIGIN STORY
   ============================================ */
.origin-story {
    background: linear-gradient(180deg, rgba(26, 77, 46, 0.1) 0%, transparent 100%);
}

.timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--boundary-line), transparent);
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 60px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.timeline-item:nth-child(1).visible { transition-delay: 0.1s; }
.timeline-item:nth-child(2).visible { transition-delay: 0.2s; }
.timeline-item:nth-child(3).visible { transition-delay: 0.3s; }
.timeline-item:nth-child(4).visible { transition-delay: 0.4s; }
.timeline-item:nth-child(5).visible { transition-delay: 0.5s; }
.timeline-item:nth-child(6).visible { transition-delay: 0.6s; }

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 55%;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 55%;
    text-align: left;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--boundary-line);
    border: 4px solid var(--stadium-dark);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.timeline-year {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 700;
    color: var(--score-gold);
    margin-bottom: 10px;
}

.timeline-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--cricket-white);
}

.timeline-text {
    font-size: 18px;
    color: rgba(248, 249, 250, 0.8);
    line-height: 1.8;
}

.origin-quote {
    max-width: 800px;
    margin: 80px auto 0;
    padding: 40px;
    background: rgba(0, 255, 136, 0.05);
    border-left: 4px solid var(--boundary-line);
    font-size: 24px;
    font-style: italic;
    color: var(--cricket-white);
    text-align: center;
    border-radius: 0 8px 8px 0;
}

.cricket-image-container {
    max-width: 900px;
    margin: 60px auto 0;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.cricket-image-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.cricket-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    border: 3px solid var(--boundary-line);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cricket-image:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.4);
}

.cricket-caption {
    margin-top: 20px;
    font-size: 18px;
    color: var(--score-gold);
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ============================================
   PLAYBOOK
   ============================================ */
.playbook {
    background: rgba(13, 27, 42, 0.5);
}

.playbook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.playbook-card {
    background: rgba(26, 77, 46, 0.1);
    padding: 40px;
    border: 1px solid rgba(0, 255, 136, 0.2);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
}

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

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

.playbook-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(0, 255, 136, 0.05);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.playbook-card:hover::before {
    width: 100%;
}

.playbook-card:hover {
    border-color: var(--boundary-line);
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.2);
}

.rule-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 60px;
    color: var(--boundary-line);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 10px;
}

.rule-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--cricket-white);
}

.rule-cricket {
    font-size: 16px;
    color: var(--score-gold);
    margin-bottom: 10px;
    font-weight: 600;
}

.rule-engineering {
    font-size: 16px;
    color: var(--boundary-line);
    margin-bottom: 15px;
    font-weight: 600;
}

.rule-description {
    font-size: 16px;
    color: rgba(248, 249, 250, 0.7);
    line-height: 1.8;
}

/* ============================================
   PROJECTS
   ============================================ */
.projects-grid {
    display: grid;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: linear-gradient(135deg, rgba(26, 77, 46, 0.1) 0%, rgba(13, 27, 42, 0.3) 100%);
    border: 1px solid rgba(0, 255, 136, 0.2);
    padding: 50px;
    position: relative;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card.visible {
    opacity: 1;
    transform: translateX(0);
}

.project-card:nth-child(1).visible { transition-delay: 0.1s; }
.project-card:nth-child(2).visible { transition-delay: 0.3s; }
.project-card:nth-child(3).visible { transition-delay: 0.5s; }

.project-card:hover {
    border-color: var(--boundary-line);
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.15);
    transform: translateX(0) translateY(-5px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.project-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 42px;
    color: var(--cricket-white);
    letter-spacing: 2px;
}

.project-tagline {
    font-size: 20px;
    color: var(--boundary-line);
    font-style: italic;
    font-weight: 500;
}

.project-description {
    font-size: 18px;
    color: rgba(248, 249, 250, 0.8);
    line-height: 1.8;
    margin-bottom: 30px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.metric {
    text-align: center;
    padding: 20px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric:hover {
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
}

.metric-value {
    font-family: 'Orbitron', monospace;
    font-size: 36px;
    font-weight: 700;
    color: var(--score-gold);
    margin-bottom: 5px;
}

.metric-label {
    font-size: 14px;
    color: rgba(248, 249, 250, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.tech-tag {
    padding: 8px 16px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--boundary-line);
    font-size: 14px;
    color: var(--boundary-line);
    font-family: 'Orbitron', monospace;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-tag:hover {
    background: var(--boundary-line);
    color: var(--stadium-dark);
    transform: translateY(-2px);
}

/* ============================================
   SCOREBOARD
   ============================================ */
.scoreboard {
    background: linear-gradient(135deg, rgba(26, 77, 46, 0.2) 0%, rgba(13, 27, 42, 0.5) 100%);
    padding: 80px 40px;
    text-align: center;
}

.scoreboard-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(40px, 5vw, 60px);
    color: var(--score-gold);
    margin-bottom: 60px;
    letter-spacing: 3px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-item {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item.visible {
    opacity: 1;
    transform: scale(1);
}

.stat-item:nth-child(1).visible { transition-delay: 0.1s; }
.stat-item:nth-child(2).visible { transition-delay: 0.15s; }
.stat-item:nth-child(3).visible { transition-delay: 0.2s; }
.stat-item:nth-child(4).visible { transition-delay: 0.25s; }
.stat-item:nth-child(5).visible { transition-delay: 0.3s; }
.stat-item:nth-child(6).visible { transition-delay: 0.35s; }
.stat-item:nth-child(7).visible { transition-delay: 0.4s; }
.stat-item:nth-child(8).visible { transition-delay: 0.45s; }

.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: clamp(48px, 6vw, 72px);
    font-weight: 900;
    color: var(--boundary-line);
    margin-bottom: 10px;
    line-height: 1;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.stat-label {
    font-size: 16px;
    color: rgba(248, 249, 250, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ============================================
   MANIFESTO
   ============================================ */
.manifesto {
    padding: 120px 40px;
    text-align: center;
    background: rgba(10, 14, 26, 0.8);
}

.manifesto-content {
    max-width: 900px;
    margin: 0 auto;
}

.manifesto-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(48px, 6vw, 80px);
    color: var(--cricket-white);
    margin-bottom: 40px;
    letter-spacing: 3px;
}

.manifesto-text {
    font-size: clamp(20px, 2.5vw, 28px);
    line-height: 1.8;
    color: rgba(248, 249, 250, 0.9);
    margin-bottom: 30px;
}

.manifesto-text.highlight {
    color: var(--boundary-line);
    font-weight: 700;
    font-size: clamp(24px, 3vw, 36px);
    margin: 50px 0;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.manifesto-signature {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(36px, 4vw, 54px);
    color: var(--score-gold);
    margin-top: 60px;
    letter-spacing: 2px;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
    padding: 100px 40px;
    text-align: center;
    background: linear-gradient(180deg, rgba(26, 77, 46, 0.1) 0%, transparent 100%);
}

.contact-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(42px, 5vw, 64px);
    color: var(--cricket-white);
    margin-bottom: 30px;
    letter-spacing: 3px;
}

.contact-subtitle {
    font-size: 22px;
    color: rgba(248, 249, 250, 0.7);
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 18px;
    color: var(--cricket-white);
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-3px);
}

.contact-item a {
    color: var(--boundary-line);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--score-gold);
}

.contact-icon {
    width: 24px;
    height: 24px;
    fill: var(--boundary-line);
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.scroll-to-top {
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.5);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    text-align: center;
    padding: 40px;
    border-top: 1px solid rgba(0, 255, 136, 0.2);
    color: rgba(248, 249, 250, 0.5);
    font-size: 14px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes typewriter {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    #custom-cursor {
        display: none;
    }

    .container {
        padding: 0 20px;
    }

    section {
        padding: 80px 0;
    }
    
    .profile-container {
        width: 150px;
        height: 150px;
        margin-bottom: 30px;
    }
    
    .cricket-image {
        border-radius: 5px;
    }
    
    .cricket-caption {
        font-size: 14px;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 60px;
        margin-right: 0;
        text-align: left;
    }

    .timeline-marker {
        left: 20px;
        transform: translateX(0);
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .project-card {
        padding: 30px;
    }

    .playbook-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        flex-direction: column;
        gap: 20px;
    }

    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    /* Disable parallax on mobile */
    .hero-content {
        transform: none !important;
        opacity: 1 !important;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */
/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* GPU acceleration for smooth animations */
.hero-content,
.playbook-card,
.project-card,
.timeline-item,
.stat-item {
    will-change: transform, opacity;
}

/* Remove will-change after animation completes */
.visible {
    will-change: auto;
}

/* ============================================
   CONTEXT-SWITCHING HUD NAVIGATION v2.0 (OPTIMIZED)
   ============================================ */
:root {
    --hud-bg: rgba(10, 14, 26, 0.75);
    --hud-border: rgba(0, 255, 136, 0.25);
    --hud-text: rgba(248, 249, 250, 0.6);
    --hud-text-active: #f8f9fa;
    --hud-cricket: rgba(255, 51, 102, 0.4);
    --hud-cricket-glow: rgba(255, 51, 102, 0.3);
    --hud-cricket-text: #ff3366;
    --hud-code: rgba(0, 212, 255, 0.4);
    --hud-code-glow: rgba(0, 212, 255, 0.3);
    --hud-code-text: #00d4ff;
    --hud-hybrid: rgba(138, 43, 226, 0.4);
    --hud-hybrid-glow: rgba(138, 43, 226, 0.3);
    --hud-hybrid-text: #8a2be2;
    --hud-neutral: rgba(0, 255, 136, 0.15);
    --hud-neutral-glow: rgba(0, 255, 136, 0.3);
    --hud-blur: 12px;
    --hud-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hud-nav {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    z-index: 9999;
    transition: transform 0.2s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.2s ease;
    will-change: transform;
    opacity: 0;
    visibility: hidden;
}

/* iPhone Safe Area Support */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .hud-nav {
        bottom: calc(30px + env(safe-area-inset-bottom));
    }
}

.hud-nav.loaded { opacity: 1; visibility: visible; }
.hud-nav.hidden { transform: translate3d(-50%, 150%, 0); opacity: 0; pointer-events: none; }

.hud-container {
    display: flex; align-items: center; gap: 8px; padding: 12px 20px;
    background: var(--hud-bg);
    backdrop-filter: blur(var(--hud-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--hud-blur)) saturate(180%);
    border: 1px solid var(--hud-border);
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    contain: layout style;
}

/* Context Animations */
.hud-container.context-cricket { border-color: var(--hud-cricket); animation: cricketPulse 2s ease-in-out infinite; }
.hud-container.context-code { border-color: var(--hud-code); animation: codeGlitch 3s ease-in-out infinite; }
.hud-container.context-hybrid { border-color: var(--hud-hybrid); box-shadow: 0 0 60px var(--hud-hybrid-glow); }

/* Items */
.hud-item {
    display: flex; align-items: center; gap: 8px; padding: 10px 12px;
    border-radius: 30px; color: var(--hud-text); text-decoration: none;
    transition: all var(--hud-transition); position: relative;
    max-width: 42px; min-height: 42px; min-width: 42px;
    overflow: hidden; contain: layout;
}

.hud-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--hud-text-active); }
.hud-item.active { background: var(--hud-neutral); color: var(--hud-text-active); max-width: 200px; padding-right: 18px; }

/* Active Contexts */
.hud-item.active[data-context="cricket"] { background: rgba(255, 51, 102, 0.15); color: var(--hud-cricket-text); box-shadow: 0 0 20px var(--hud-cricket-glow); }
.hud-item.active[data-context="code"] { background: rgba(0, 212, 255, 0.15); color: var(--hud-code-text); box-shadow: 0 0 20px var(--hud-code-glow); }
.hud-item.active[data-context="hybrid"] { background: rgba(138, 43, 226, 0.15); color: var(--hud-hybrid-text); box-shadow: 0 0 20px var(--hud-hybrid-glow); }

.hud-icon { font-size: 20px; flex-shrink: 0; transition: inherit; }
.hud-item.active .hud-icon { transform: scale(1.1); filter: drop-shadow(0 0 8px currentColor); }

.hud-label {
    font-family: 'Orbitron', monospace; font-size: 14px; font-weight: 600;
    opacity: 0; transform: translateX(-10px); transition: all var(--hud-transition); white-space: nowrap;
}
.hud-item.active .hud-label { opacity: 1; transform: translateX(0); }

@keyframes cricketPulse { 0%, 100% { box-shadow: 0 0 40px var(--hud-cricket-glow); } 50% { box-shadow: 0 0 80px rgba(255, 51, 102, 0.5); } }
@keyframes codeGlitch { 0%, 100% { box-shadow: 0 0 40px var(--hud-code-glow); } 33% { transform: translateX(1px); } 66% { transform: translateX(-1px); } }

@media (max-width: 768px) {
    .hud-nav { bottom: 20px; }
    .hud-container { padding: 10px 16px; gap: 6px; }
    .hud-item { padding: 8px 10px; max-width: 38px; }
    .hud-item.active { max-width: 160px; }
}