/* ==================== VARIABLES ==================== */
:root {
    /* Colors - Cyberpunk Theme */
    --primary: #00FFF0;
    --secondary: #FF006E;
    --accent: #FFBE0B;
    --purple: #8338EC;
    --blue: #3A86FF;
    
    --bg-dark: #0A0118;
    --bg-darker: #050810;
    --bg-card: rgba(10, 1, 24, 0.9);
    
    --text: #FFFFFF;
    --text-secondary: #B0B8C4;
    --text-muted: #6B7280;
    
    --border: rgba(0, 255, 240, 0.2);
    --glow: rgba(0, 255, 240, 0.5);
    --glow-secondary: rgba(255, 0, 110, 0.5);
    
    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-display: 'Orbitron', sans-serif;
    
    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: 0.2s;
    --transition-normal: 0.4s;
    --transition-slow: 0.8s;
}

/* ==================== RESET ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ==================== SECTION TRANSITIONS ==================== */
.section {
    position: relative;
    overflow: hidden;
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity var(--transition-slow) var(--ease-out),
                transform var(--transition-slow) var(--ease-out);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-80px);
    transition: opacity var(--transition-slow) var(--ease-out),
                transform var(--transition-slow) var(--ease-out);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(80px);
    transition: opacity var(--transition-slow) var(--ease-out),
                transform var(--transition-slow) var(--ease-out);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity var(--transition-slow) var(--ease-bounce),
                transform var(--transition-slow) var(--ease-bounce);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children animation */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s var(--ease-out),
                transform 0.5s var(--ease-out);
}

.stagger-children.active > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.active > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.active > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.active > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.active > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.active > *:nth-child(6) { transition-delay: 0.6s; }
.stagger-children.active > *:nth-child(7) { transition-delay: 0.7s; }
.stagger-children.active > *:nth-child(8) { transition-delay: 0.8s; }

.stagger-children.active > * {
    opacity: 1;
    transform: translateY(0);
}

/* Section dividers with animation */
.section-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    pointer-events: none;
    z-index: 2;
}

.section-divider::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--bg-dark));
}

/* Parallax effect */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    z-index: 0;
    will-change: transform;
}

/* Glitch effect on section headers */
.section-title {
    position: relative;
}

.section-title::before,
.section-title::after {
    content: attr(data-value);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.section-title:hover::before {
    animation: glitch-1 0.3s infinite;
    color: var(--primary);
    opacity: 0.8;
}

.section-title:hover::after {
    animation: glitch-2 0.3s infinite;
    color: var(--secondary);
    opacity: 0.8;
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); }
    40% { transform: translate(-3px, -3px); }
    60% { transform: translate(3px, 3px); }
    80% { transform: translate(3px, -3px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(3px, -3px); }
    40% { transform: translate(3px, 3px); }
    60% { transform: translate(-3px, -3px); }
    80% { transform: translate(-3px, 3px); }
}

/* Fade slide animations */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeSlideLeft {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeSlideRight {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-5deg) scale(0.95);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* Typewriter effect */
.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--primary);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary); }
}

/* Glow pulse animation */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--glow), 0 0 40px rgba(0, 255, 240, 0.2);
    }
    50% {
        box-shadow: 0 0 40px var(--glow), 0 0 80px rgba(0, 255, 240, 0.4);
    }
}

.glow-pulse {
    animation: glow-pulse 2s ease-in-out infinite;
}

/* Float animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.float {
    animation: float 4s ease-in-out infinite;
}

/* Shimmer effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ==================== CUSTOM CURSOR ==================== */
.cursor {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: all 0.15s var(--ease-out);
    opacity: 0.5;
}

.cursor.hover .cursor-dot {
    width: 50px;
    height: 50px;
    background: var(--secondary);
}

.cursor.hover .cursor-outline {
    width: 70px;
    height: 70px;
    opacity: 0.2;
}

@media (hover: none) {
    .cursor { display: none; }
}

/* ==================== CRT OVERLAY ==================== */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: 
        linear-gradient(to bottom, transparent 50%, rgba(0, 255, 240, 0.02) 50%);
    background-size: 100% 4px;
    animation: scanline 10s linear infinite;
}

@keyframes scanline {
    0% { background-position: 0 0; }
    100% { background-position: 0 100vh; }
}

/* ==================== LOADING SCREEN ==================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 10001;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Loader Logo */
.loader-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-logo-img {
    width: 120px;
    height: auto;
    filter: brightness(0) invert(1) drop-shadow(0 0 20px var(--glow));
    animation: loaderLogoAnim 2s ease-in-out infinite;
}

@keyframes loaderLogoAnim {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: brightness(0) invert(1) drop-shadow(0 0 20px var(--glow));
    }
    25% {
        transform: scale(1.05) rotate(-2deg);
        filter: brightness(0) invert(1) drop-shadow(0 0 30px var(--primary));
    }
    50% {
        transform: scale(1.1) rotate(0deg);
        filter: brightness(0) invert(1) drop-shadow(0 0 40px var(--primary)) drop-shadow(0 0 60px var(--glow));
    }
    75% {
        transform: scale(1.05) rotate(2deg);
        filter: brightness(0) invert(1) drop-shadow(0 0 30px var(--primary));
    }
}

.loader-terminal {
    width: 90%;
    max-width: 700px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 0 50px rgba(0, 255, 240, 0.3),
        inset 0 0 50px rgba(0, 255, 240, 0.05);
}

.loader-terminal .terminal-header {
    background: linear-gradient(180deg, #2a2a2a, #1a1a1a);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(0, 255, 240, 0.2);
}

.loader-terminal .terminal-title {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.loader-terminal .terminal-body {
    padding: 20px;
    min-height: 300px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--primary);
    line-height: 1.8;
}

#loader-output {
    white-space: pre-wrap;
}

.loader-cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ==================== NAVIGATION ==================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(5, 8, 16, 0.9) 0%, transparent 100%);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 900;
}

/* Animated Logo Styles */
.logo-image {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: all 0.4s var(--ease-out);
}

.animated-logo {
    animation: logoFloat 4s ease-in-out infinite;
    filter: brightness(0) invert(1) drop-shadow(0 0 10px var(--glow));
}

.animated-logo:hover {
    animation: logoPulse 0.6s ease-in-out;
    filter: brightness(0) invert(1) drop-shadow(0 0 25px var(--primary)) drop-shadow(0 0 50px var(--glow));
    transform: scale(1.1) rotate(5deg);
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        filter: brightness(0) invert(1) drop-shadow(0 0 10px var(--glow));
    }
    25% {
        transform: translateY(-3px) rotate(1deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
        filter: brightness(0) invert(1) drop-shadow(0 0 20px var(--primary));
    }
    75% {
        transform: translateY(-2px) rotate(-1deg);
    }
}

@keyframes logoPulse {
    0% { transform: scale(1); }
    25% { transform: scale(1.15) rotate(-3deg); }
    50% { transform: scale(1.05) rotate(3deg); }
    75% { transform: scale(1.1) rotate(-2deg); }
    100% { transform: scale(1.1) rotate(5deg); }
}

.logo-text {
    color: var(--primary);
    text-shadow: 0 0 20px var(--glow);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s var(--ease-out);
    box-shadow: 0 0 10px var(--glow);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1002;
    padding: 10px;
    margin: -10px;
}

.nav-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Mobile menu button animation */
.nav-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation Menu */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 1, 24, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out);
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-link {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s var(--ease-out);
}

.mobile-nav.active .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav.active .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.active .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-nav.active .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-nav.active .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-nav.active .mobile-nav-link:nth-child(5) { transition-delay: 0.3s; }
.mobile-nav.active .mobile-nav-link:nth-child(6) { transition-delay: 0.35s; }
.mobile-nav.active .mobile-nav-link:nth-child(7) { transition-delay: 0.4s; }

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--primary);
    text-shadow: 0 0 30px var(--glow);
}

@media (max-width: 900px) {
    .nav-links { display: none; }
    .nav-menu-btn { display: flex; }
}

/* ==================== PROGRESS BAR ==================== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 255, 240, 0.1);
    z-index: 1001;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 20px var(--glow);
}

/* ==================== SECTIONS ==================== */
.section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 40px;
    overflow: hidden;
}

.section canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.section-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    width: 100%;
}

.section-header {
    margin-bottom: 60px;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), transparent);
    animation: expandLine 1s ease-out forwards;
    animation-play-state: paused;
}

.section-header.animate::after {
    animation-play-state: running;
}

@keyframes expandLine {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100px;
        opacity: 1;
    }
}

.section-label {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--primary);
    letter-spacing: 3px;
    margin-bottom: 15px;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.section-label::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -10px;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    transform: translateY(-50%);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-50%) scale(1.5);
    }
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -2px;
    line-height: 1;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 50%, var(--text) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
    animation-play-state: paused;
}

.section-title:hover {
    animation-play-state: running;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==================== HERO SECTION ==================== */
#hero {
    background: var(--bg-darker);
}

#matrix-canvas {
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 1000px;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 30px;
    letter-spacing: 3px;
}

.label-bracket {
    color: var(--secondary);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 30px;
    text-transform: uppercase;
    position: relative;
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(50px);
    animation: heroTitleReveal 0.8s ease forwards;
}

.title-line:nth-child(1) { animation-delay: 0.3s; }
.title-line:nth-child(2) { animation-delay: 0.5s; }
.title-line:nth-child(3) { animation-delay: 0.7s; }

@keyframes heroTitleReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease 0.9s forwards;
}

.highlight {
    color: var(--primary);
    font-weight: 600;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    animation: highlightExpand 0.6s ease 1.2s forwards;
}

@keyframes highlightExpand {
    to { width: 100%; }
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease 1.1s forwards;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    transition: all 0.4s var(--ease-bounce);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary);
    box-shadow: 0 0 30px var(--glow);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    box-shadow: 0 0 30px var(--glow-secondary);
    transform: translateY(-3px);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease 1.3s forwards;
}

.stat {
    text-align: center;
    position: relative;
}

.stat::after {
    content: '';
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 40px;
    background: var(--border);
}

.stat:last-child::after {
    display: none;
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: var(--primary);
    display: block;
    position: relative;
}

.stat:hover .stat-number {
    animation: countPulse 0.3s ease;
}

@keyframes countPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

.stat:hover .stat-label {
    color: var(--primary);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 3px;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease 1.5s forwards;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; height: 40px; }
    50% { opacity: 1; height: 60px; }
}
/* ==================== MARQUEE ==================== */
.marquee-container {
    background: var(--primary);
    padding: 12px 0;
    overflow: hidden;
    position: relative;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 20s linear infinite;
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 0 15px;
}

.marquee-item {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--bg-dark);
    text-transform: uppercase;
    white-space: nowrap;
}

.marquee-separator {
    color: var(--bg-dark);
    font-size: 12px;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .marquee-container {
        padding: 8px 0;
    }
    
    .marquee-content {
        gap: 20px;
        padding: 0 10px;
    }
    
    .marquee-item {
        font-size: 11px;
    }
    
    .marquee-separator {
        font-size: 8px;
    }
}

@media (max-width: 480px) {
    .marquee-container {
        padding: 6px 0;
    }
    
    .marquee-content {
        gap: 15px;
    }
    
    .marquee-item {
        font-size: 9px;
    }
}

/* ==================== ABOUT SECTION ==================== */
#about {
    background: var(--bg-dark);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text {
    font-size: 18px;
    color: var(--text-secondary);
}

.about-intro {
    font-size: 24px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--text);
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.tag {
    padding: 8px 16px;
    background: rgba(0, 255, 240, 0.1);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--primary);
}

/* Terminal Mini */
.terminal-mini {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    background: linear-gradient(180deg, #2a2a2a, #1a1a1a);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-btn.red { background: #ff5f57; }
.terminal-btn.yellow { background: #ffbd2e; }
.terminal-btn.green { background: #28c840; }

.terminal-content {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.8;
}

.terminal-content code {
    color: var(--text);
}

.code-keyword { color: var(--secondary); }
.code-var { color: var(--primary); }
.code-prop { color: var(--accent); }
.code-string { color: #98c379; }
.code-bool { color: var(--purple); }

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== PROJECTS SECTION ==================== */
#projects {
    background: var(--bg-darker);
}

#tetris-canvas {
    opacity: 0.3;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

/* 3D Card */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: all 0.4s var(--ease-out);
    cursor: pointer;
    will-change: transform, box-shadow;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 240, 0.08),
        transparent
    );
    transition: left 0.6s ease;
    z-index: 1;
    pointer-events: none;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(0, 255, 240, 0.2),
        inset 0 0 60px rgba(0, 255, 240, 0.05);
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 1, 24, 0.95) 100%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags .tag {
    font-size: 10px;
    padding: 4px 10px;
}

.project-info {
    padding: 25px;
}

.project-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.project-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-link {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--secondary);
}

/* ==================== SKILLS SECTION ==================== */
#skills {
    background: var(--bg-dark);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.4s var(--ease-bounce);
    transform-style: preserve-3d;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.skill-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out);
}

.skill-card:hover::after {
    transform: scaleX(1);
}

.skill-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 255, 240, 0.2);
}

.skill-icon {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
    transition: transform 0.4s var(--ease-elastic);
}

.skill-card:hover .skill-icon {
    transform: scale(1.2) rotateY(180deg);
}

.skill-name {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.skill-card:hover .skill-name {
    color: var(--primary);
}

/* ==================== VISUALIZER SECTION ==================== */
#visualizer {
    background: var(--bg-darker);
}

.visualizer-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
}

.visualizer-content {
    text-align: center;
}

.audio-visualizer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 300px;
    margin: 60px 0;
}

.visualizer-bar {
    width: 8px;
    background: linear-gradient(to top, var(--primary), var(--secondary), var(--purple));
    border-radius: 4px 4px 0 0;
    animation: visualizerPulse 0.5s ease-in-out infinite alternate;
    box-shadow: 0 0 20px rgba(0, 255, 240, 0.3);
}

@keyframes visualizerPulse {
    0% { transform: scaleY(0.3); }
    100% { transform: scaleY(1); }
}

.visualizer-controls {
    margin-top: 40px;
}

.visualizer-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    transition: all 0.3s var(--ease-out);
}

.visualizer-btn:hover {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 40px var(--glow);
}

/* ==================== TERMINAL SECTION ==================== */
#terminal {
    background: var(--bg-darker);
}

#terminal-matrix-canvas {
    opacity: 0.2;
}

.terminal-section-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.terminal-container {
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 0 50px rgba(0, 255, 240, 0.2),
        inset 0 0 100px rgba(0, 255, 240, 0.02);
}

.terminal-container .terminal-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 255, 240, 0.2);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-container .terminal-title {
    flex: 1;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
}

.terminal-body {
    padding: 20px;
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    color: var(--primary);
}

.terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.terminal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 240, 0.3);
    border-radius: 4px;
}

#terminal-output {
    white-space: pre-wrap;
    word-break: break-all;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.prompt {
    color: var(--primary);
    margin-right: 10px;
    white-space: nowrap;
}

#terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 14px;
    caret-color: transparent;
}

.cursor-blink {
    color: var(--primary);
    animation: blink 1s step-end infinite;
}

.output-line { margin-bottom: 5px; }
.output-line.error { color: #ff5555; }
.output-line.success { color: #50fa7b; }
.output-line.info { color: #8be9fd; }
.output-line.warning { color: #f1fa8c; }
.output-line.system { color: #bd93f9; }

/* ==================== RACING SECTION - SIM RACING DASHBOARD ==================== */
#racing {
    background: linear-gradient(180deg, #0a0a0f 0%, #1a1a2e 50%, #0d1117 100%);
    position: relative;
    overflow: hidden;
}

#racing-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Racing Panels - Left and Right */
.racing-panel {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.left-panel {
    left: 20px;
    border: 1px solid rgba(255, 0, 110, 0.3);
}

.right-panel {
    right: 20px;
    border: 1px solid rgba(0, 255, 240, 0.3);
}

/* Gauge Styles */
.gauge {
    position: relative;
    width: 180px;
    height: 180px;
}

.gauge-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(0, 255, 240, 0.25));
}

/* Gauge track - shows the full range background */
.gauge-track {
    opacity: 0.8;
}

/* Scale marks */
.gauge-marks {
    opacity: 0.7;
}

/* Arc transition - smooth progress animation */
.tacho-arc,
.speedo-arc {
    transition: stroke-dashoffset 0.12s ease-out;
    filter: drop-shadow(0 0 8px currentColor);
}

.tacho-arc {
    filter: drop-shadow(0 0 12px rgba(255, 190, 11, 0.6));
}

.speedo-arc {
    filter: drop-shadow(0 0 12px rgba(0, 255, 240, 0.6));
}

/* Center display for value */
.gauge-center-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -30%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.gauge-main-value {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1px;
}

.tachometer .gauge-main-value {
    color: #FF006E;
    text-shadow: 0 0 25px rgba(255, 0, 110, 0.6);
}

.speedometer .gauge-main-value {
    color: #00FFF0;
    text-shadow: 0 0 25px rgba(0, 255, 240, 0.6);
}

.gauge-unit {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.gauge-multiplier {
    font-family: var(--font-mono);
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

.redline-indicator {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 10px;
    height: 10px;
    background: #FF006E;
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 20px #FF006E;
    transition: opacity 0.1s;
}

.redline-indicator.active {
    opacity: 1;
    animation: redline-pulse 0.2s ease-in-out infinite;
}

@keyframes redline-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

/* Gear Display */
.gear-display {
    text-align: center;
    background: rgba(255, 190, 11, 0.1);
    border: 1px solid rgba(255, 190, 11, 0.3);
    border-radius: 10px;
    padding: 10px 25px;
}

.gear-display .gear-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.gear-display .gear-value {
    display: block;
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 900;
    color: #FFBE0B;
    line-height: 1;
    text-shadow: 0 0 30px rgba(255, 190, 11, 0.5);
}

/* Score Display */
.score-display {
    text-align: center;
    background: rgba(0, 255, 240, 0.1);
    border: 1px solid rgba(0, 255, 240, 0.3);
    border-radius: 10px;
    padding: 10px 25px;
}

.score-display .score-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.score-display .score-value {
    display: block;
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: #00FFF0;
    text-shadow: 0 0 20px rgba(0, 255, 240, 0.5);
}

/* Pedal Telemetry */
.pedal-telemetry {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.pedal-bar {
    width: 30px;
    height: 100px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.pedal-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0%;
    transition: height 0.05s ease-out;
}

.throttle-bar .pedal-fill {
    background: linear-gradient(180deg, #00FF00, #00AA00);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.brake-bar .pedal-fill {
    background: linear-gradient(180deg, #FF0000, #AA0000);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.pedal-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
}

/* Live Status Indicator */
.racing-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
}

.status-indicator {
    width: 6px;
    height: 6px;
    background: #00FF00;
    border-radius: 50%;
    box-shadow: 0 0 10px #00FF00;
    animation: pulse-live 1.5s ease-in-out infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.status-text {
    text-transform: uppercase;
}

/* ==================== CONTACT SECTION ==================== */
#contact {
    background: var(--bg-dark);
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-intro {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    position: relative;
}

.contact-email {
    display: inline-block;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 40px;
    transition: all 0.4s var(--ease-elastic);
    text-shadow: 0 0 30px rgba(0, 255, 240, 0.3);
    position: relative;
}

.contact-email::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 100%;
    animation: borderGradient 2s linear infinite;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s var(--ease-out);
}

.contact-email:hover::after {
    transform: scaleX(1);
}

@keyframes borderGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.contact-email:hover {
    color: var(--secondary);
    text-shadow: 0 0 40px var(--glow-secondary);
    transform: scale(1.05);
}

.contact-socials {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    transition: all 0.4s var(--ease-bounce);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0;
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.social-link:hover::before {
    width: 150%;
    height: 150%;
    opacity: 0.2;
}

.social-link svg {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
    transition: transform 0.4s var(--ease-bounce);
}

.social-link:hover svg {
    transform: scale(1.2) rotate(10deg);
}

.social-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 30px var(--glow);
    transform: translateY(-8px) scale(1.1);
}

/* ==================== 3D LOGO SHOWCASE ==================== */
.logo-showcase {
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-darker) 100%);
    perspective: 1000px;
    overflow: hidden;
}

.logo-3d-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.logo-3d-wrapper {
    width: 180px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    animation: logo3DRotate 8s ease-in-out infinite;
}

.logo-3d {
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1) drop-shadow(0 0 30px var(--glow));
    animation: logoGlow 4s ease-in-out infinite;
}

@keyframes logo3DRotate {
    0% {
        transform: rotateY(0deg) rotateX(0deg);
    }
    25% {
        transform: rotateY(180deg) rotateX(10deg);
    }
    50% {
        transform: rotateY(360deg) rotateX(0deg);
    }
    75% {
        transform: rotateY(540deg) rotateX(-10deg);
    }
    100% {
        transform: rotateY(720deg) rotateX(0deg);
    }
}

@keyframes logoGlow {
    0%, 100% {
        filter: brightness(0) invert(1) drop-shadow(0 0 20px var(--glow));
    }
    25% {
        filter: brightness(0) invert(1) drop-shadow(0 0 40px var(--primary)) drop-shadow(0 0 60px var(--glow));
    }
    50% {
        filter: brightness(0) invert(1) drop-shadow(0 0 50px var(--secondary)) drop-shadow(0 0 80px rgba(255, 0, 110, 0.5));
    }
    75% {
        filter: brightness(0) invert(1) drop-shadow(0 0 40px var(--accent)) drop-shadow(0 0 60px rgba(255, 190, 11, 0.5));
    }
}

.logo-shadow {
    width: 120px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(0, 255, 240, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: shadowPulse 8s ease-in-out infinite;
}

@keyframes shadowPulse {
    0%, 50%, 100% {
        transform: scaleX(1);
        opacity: 0.5;
    }
    25%, 75% {
        transform: scaleX(0.6);
        opacity: 0.3;
    }
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--bg-darker);
    padding: 40px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-text {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        gap: 10px;
    }
}

/* ==================== TEXT EFFECTS ==================== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--secondary);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--purple);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(94px, 9999px, 64px, 0); }
    10% { clip: rect(40px, 9999px, 24px, 0); }
    20% { clip: rect(53px, 9999px, 91px, 0); }
    30% { clip: rect(72px, 9999px, 30px, 0); }
    40% { clip: rect(28px, 9999px, 80px, 0); }
    50% { clip: rect(11px, 9999px, 56px, 0); }
    60% { clip: rect(89px, 9999px, 5px, 0); }
    70% { clip: rect(67px, 9999px, 99px, 0); }
    80% { clip: rect(15px, 9999px, 47px, 0); }
    90% { clip: rect(83px, 9999px, 21px, 0); }
    100% { clip: rect(42px, 9999px, 73px, 0); }
}

/* ==================== MAGNETIC EFFECT ==================== */
.magnetic {
    transition: transform 0.3s var(--ease-out);
}

/* ==================== RESPONSIVE - TABLET ==================== */
@media (max-width: 1024px) {
    .section {
        padding: 80px 30px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    
    /* Racing panels tablet */
    .left-panel, .right-panel {
        padding: 15px;
    }
    
    .gauge {
        width: 120px;
        height: 120px;
    }
}

/* ==================== RESPONSIVE - MOBILE ==================== */
@media (max-width: 768px) {
    /* Disable heavy animations on mobile for performance */
    .parallax-bg,
    .shimmer::after,
    .project-card::before {
        display: none !important;
    }
    
    /* Simplify animations on mobile */
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    /* Reduce GSAP animation intensity */
    .section-content,
    .project-card,
    .skill-card {
        transform: none !important;
    }
    
    .section {
        padding: 60px 20px;
        min-height: auto;
    }
    
    /* Hero section mobile */
    .hero-content {
        padding: 20px 0;
    }
    
    .hero-label {
        font-size: 12px;
        letter-spacing: 2px;
    }
    
    .hero-title {
        font-size: clamp(2rem, 12vw, 4rem);
        margin-bottom: 20px;
    }
    
    .title-line {
        opacity: 1;
        transform: none;
        animation: none;
    }
    
    .hero-subtitle {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 30px;
        opacity: 1;
        animation: none;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        opacity: 1;
        animation: none;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 14px 24px;
        font-size: 12px;
        justify-content: center;
    }
    
    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        opacity: 1;
        animation: none;
    }
    
    .stat {
        min-width: 80px;
    }
    
    .stat::after {
        display: none;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    /* Section headers mobile */
    .section-header {
        margin-bottom: 40px;
        text-align: center;
    }
    
    .section-label {
        font-size: 11px;
        letter-spacing: 2px;
    }
    
    .section-label::before {
        display: none;
    }
    
    .section-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        letter-spacing: -1px;
    }
    
    /* About section mobile */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about-text {
        font-size: 14px;
    }
    
    .code-block {
        padding: 15px;
        font-size: 11px;
    }
    
    /* Projects mobile */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .project-card {
        transform: none !important;
    }
    
    .project-image {
        height: 180px;
    }
    
    .project-info {
        padding: 20px;
    }
    
    .project-title {
        font-size: 16px;
    }
    
    .project-desc {
        font-size: 13px;
    }
    
    /* Skills mobile */
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .skill-card {
        padding: 20px 15px;
        transform: none !important;
    }
    
    .skill-card::after {
        display: none;
    }
    
    .skill-icon {
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    .skill-card:hover .skill-icon {
        transform: none;
    }
    
    .skill-name {
        font-size: 9px;
        letter-spacing: 0.5px;
    }
    
    /* Visualizer mobile */
    .audio-visualizer {
        height: 100px;
    }
    
    .bar {
        width: 4px;
        margin: 0 1px;
    }
    
    /* Racing section mobile */
    #racing {
        padding: 20px 5px;
        min-height: 100vh;
    }
    
    .racing-panel {
        padding: 8px;
        backdrop-filter: blur(5px);
        gap: 10px;
        border-radius: 10px;
    }
    
    .left-panel, .right-panel {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        bottom: auto;
        width: auto;
        min-width: 60px;
    }
    
    .left-panel {
        left: 3px;
        right: auto;
    }
    
    .right-panel {
        right: 3px;
        left: auto;
    }
    
    .gauge {
        width: 55px;
        height: 55px;
    }
    
    .gauge-center-display {
        transform: translate(-50%, -25%);
    }
    
    .gauge-main-value {
        font-size: 12px !important;
    }
    
    .gauge-unit {
        font-size: 6px;
        letter-spacing: 1px;
    }
    
    .gauge-multiplier {
        display: none;
    }
    
    .gauge-marks {
        display: none;
    }
    
    .gear-display {
        padding: 5px 12px;
    }
    
    .gear-display .gear-value {
        font-size: 18px;
    }
    
    .gear-display .gear-label {
        font-size: 7px;
        display: none;
    }
    
    .pedal-telemetry {
        gap: 6px;
        margin-top: 5px;
    }
    
    .pedal-bar {
        width: 12px;
        height: 35px;
    }
    
    .pedal-label {
        font-size: 6px;
    }
    
    .score-display {
        padding: 5px 10px;
    }
    
    .score-display .score-label {
        font-size: 7px;
    }
    
    .score-display .score-value {
        font-size: 14px;
    }
    
    .racing-status {
        padding: 3px 8px;
        margin-top: 5px;
    }
    
    .status-indicator {
        width: 5px;
        height: 5px;
    }
    
    .status-text {
        font-size: 7px;
    }
    
    /* Tetris section mobile */
    #tetris-canvas {
        opacity: 0.2;
    }
    
    /* Terminal section mobile */
    .terminal-window {
        max-width: 100%;
    }
    
    .terminal-header {
        padding: 10px 15px;
    }
    
    .terminal-body {
        padding: 15px;
        font-size: 11px;
        max-height: 250px;
    }
    
    /* Contact mobile */
    .contact-content {
        padding: 0 10px;
    }
    
    .contact-intro {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .contact-email {
        font-size: clamp(1.2rem, 5vw, 1.8rem);
        margin-bottom: 30px;
        word-break: break-all;
    }
    
    .contact-email::after {
        display: none;
    }
    
    .contact-socials {
        gap: 15px;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
    }
    
    .social-link::before {
        display: none;
    }
    
    .social-link:hover {
        transform: translateY(-3px) scale(1.05);
    }
    
    /* Footer mobile */
    .footer {
        padding: 30px 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-text {
        font-size: 10px;
    }
    
    /* Navigation mobile */
    .nav {
        padding: 15px 20px;
    }
    
    .nav-logo {
        font-size: 20px;
    }
    
    /* CRT effect - reduce on mobile */
    .crt-overlay {
        opacity: 0.3;
    }
    
    /* Custom cursor - disable on mobile */
    .cursor,
    .cursor-follower {
        display: none !important;
    }
}

/* ==================== RESPONSIVE - SMALL MOBILE ==================== */
@media (max-width: 480px) {
    .section {
        padding: 50px 15px;
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 14vw, 3rem);
    }
    
    .hero-stats {
        gap: 15px;
    }
    
    .stat {
        min-width: 70px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .skill-card {
        padding: 15px 10px;
    }
    
    .skill-icon {
        font-size: 24px;
    }
    
    .skill-name {
        font-size: 8px;
    }
    
    /* Racing on very small screens */
    #racing {
        padding: 10px 3px;
    }
    
    .left-panel, .right-panel {
        min-width: 50px;
        padding: 6px;
        gap: 8px;
    }
    
    .gauge {
        width: 45px;
        height: 45px;
    }
    
    .rpm-value {
        font-size: 9px !important;
    }
    
    .speed-value {
        font-size: 10px !important;
    }
    
    .speed-unit {
        display: none;
    }
    
    .gear-display {
        padding: 4px 8px;
    }
    
    .gear-display .gear-value {
        font-size: 14px;
    }
    
    .pedal-bar {
        width: 10px;
        height: 28px;
    }
    
    .pedal-label {
        display: none;
    }
    
    .score-display {
        padding: 4px 8px;
    }
    
    .score-display .score-label {
        display: none;
    }
    
    .score-display .score-value {
        font-size: 12px;
    }
    
    .racing-status {
        display: none;
    }

    /* Contact small mobile */
    .contact-email {
        font-size: 1rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
}

/* ==================== TOUCH DEVICE OPTIMIZATIONS ==================== */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects that don't work on touch */
    .project-card:hover,
    .skill-card:hover,
    .social-link:hover,
    .btn:hover {
        transform: none;
    }
    
    .project-card:hover {
        border-color: var(--border);
        box-shadow: none;
    }
    
    .skill-card:hover .skill-icon {
        transform: none;
    }
    
    .section-title:hover::before,
    .section-title:hover::after {
        animation: none;
        opacity: 0;
    }
    
    /* Add active states for touch */
    .btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .project-card:active {
        transform: scale(0.99);
    }
    
    .skill-card:active {
        transform: scale(0.95);
        border-color: var(--primary);
    }
    
    .social-link:active {
        transform: scale(0.9);
        border-color: var(--primary);
    }
}

/* ==================== LANDSCAPE MOBILE ==================== */
@media (max-height: 500px) and (orientation: landscape) {
    .section {
        min-height: auto;
        padding: 40px 30px;
    }
    
    #hero {
        min-height: 100vh;
    }
    
    .hero-stats {
        flex-direction: row;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    /* Racing landscape */
    .left-panel, .right-panel {
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
    }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .title-line,
    .hero-subtitle,
    .hero-cta,
    .hero-stats,
    .scroll-indicator {
        opacity: 1;
        transform: none;
        animation: none;
    }
    
    .crt-overlay,
    .shimmer::after,
    .parallax-bg {
        display: none;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .crt-overlay,
    .cursor,
    .cursor-follower,
    .progress-bar,
    .nav,
    canvas,
    .scroll-indicator {
        display: none !important;
    }
    
    .section {
        min-height: auto;
        padding: 20px;
        page-break-inside: avoid;
    }
}