/* =====================================
   RESET & VARIABLES
   ===================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0ea5e9;
    --secondary-color: #f5f5f1;
    --dark-bg: #0a0a0a;
    --darker-bg: #000000;
    --light-text: #ffffff;
    --gray-text: #999999;
    --accent-gold: #d4af37;
    --transition-speed: 0.4s;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--darker-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(14, 165, 233, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
    animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}

/* =====================================
   CINEMATIC OVERLAYS
   ===================================== */
.cinematic-vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    background: radial-gradient(circle, rgba(0,0,0,0) 50%, rgba(0,0,0,0.6) 100%);
}

.cinematic-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99;
    opacity: 0.03;
    /* Lightweight noise pattern instead of heavy SVG filter */
    background-image: url("https://cdnjs.cloudflare.com/ajax/libs/media-element/4.2.16/noise.png");
    /* Animation removed for performance */
    /* animation: grainPulse 0.2s steps(4) infinite; */
    will-change: transform;
}

@keyframes grainPulse {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-10px, -10px); }
}

/* Ensure content is above background */
nav, section, footer {
    position: relative;
    z-index: 1;
}

/* =====================================
   LOADING SCREEN
   ===================================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--darker-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.circuit-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.circuit-board {
    width: 100%;
    max-width: 800px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(14, 165, 233, 0.3));
}

/* Camera Lens Styling */
.lens-outer {
    stroke: var(--primary-color);
    animation: lensGlow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 8px var(--primary-color));
}

@keyframes lensGlow {
    0%, 100% { 
        opacity: 0.8;
        filter: drop-shadow(0 0 5px var(--primary-color));
    }
    50% { 
        opacity: 1;
        filter: drop-shadow(0 0 15px var(--primary-color));
    }
}

.lens-ring {
    stroke: var(--primary-color);
    animation: ringPulse 2s ease-in-out infinite 0.3s;
}

@keyframes ringPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* Aperture Blades */
.aperture-blades {
    transform-origin: 400px 300px;
}

.aperture-blade {
    fill: var(--dark-bg);
    stroke: var(--primary-color);
    stroke-width: 1.5;
    opacity: 0;
    animation: bladeOpen 1.5s ease-out forwards;
    transform-origin: 400px 300px;
}

.blade-1 { animation-delay: 0.5s; }
.blade-2 { animation-delay: 0.6s; }
.blade-3 { animation-delay: 0.7s; }
.blade-4 { animation-delay: 0.8s; }
.blade-5 { animation-delay: 0.9s; }
.blade-6 { animation-delay: 1s; }

@keyframes bladeOpen {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.9;
        transform: scale(1);
    }
}

.lens-center {
    fill: rgba(0, 255, 255, 0.1);
    animation: centerPulse 2s ease-in-out infinite 1.2s;
}

@keyframes centerPulse {
    0%, 100% { 
        fill: rgba(0, 255, 255, 0.1);
        r: 28;
    }
    50% { 
        fill: rgba(0, 255, 255, 0.3);
        r: 30;
    }
}

/* Light Rays */
.light-rays {
    transform-origin: 400px 300px;
}

.light-ray {
    stroke: #00ffff;
    stroke-width: 2;
    filter: drop-shadow(0 0 3px #00ffff);
}

.ray-1 { animation: rayBurst 0.8s ease-out forwards 1.8s; }
.ray-2 { animation: rayBurst 0.8s ease-out forwards 1.85s; }
.ray-3 { animation: rayBurst 0.8s ease-out forwards 1.9s; }
.ray-4 { animation: rayBurst 0.8s ease-out forwards 1.95s; }
.ray-5 { animation: rayBurst 0.8s ease-out forwards 2s; }
.ray-6 { animation: rayBurst 0.8s ease-out forwards 2.05s; }

@keyframes rayBurst {
    0% {
        opacity: 0;
        stroke-width: 0;
    }
    30% {
        opacity: 1;
        stroke-width: 3;
    }
    100% {
        opacity: 0;
        stroke-width: 1;
    }
}

.lens-text {
    fill: var(--primary-color);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 24px;
    text-anchor: middle;
    dominant-baseline: middle;
    letter-spacing: 3px;
    opacity: 0;
    animation: textFadeIn 0.5s ease-out forwards 1.5s;
}

@keyframes textFadeIn {
    to { 
        opacity: 1;
    }
}

/* Film Strip & Motion Path Styling */
.film-strip {
    fill: var(--dark-bg);
    stroke: var(--primary-color);
    stroke-width: 2;
    opacity: 0;
    animation: filmAppear 0.5s ease-out forwards;
    filter: drop-shadow(0 0 3px rgba(14, 165, 233, 0.4));
}

.film-frame {
    opacity: 0;
    animation: frameFill 0.3s ease-out forwards;
}

.film-hole {
    fill: var(--primary-color);
    opacity: 0;
    animation: holeGlow 0.2s ease-out forwards;
}

/* Staggered animations for each path */
.path-1 .film-strip { animation-delay: 1.7s; }
.path-1 .film-frame.frame-1 { animation-delay: 1.95s; }
.path-1 .film-frame.frame-2 { animation-delay: 2.0s; }
.path-1 .film-frame.frame-3 { animation-delay: 2.05s; }
.path-1 .film-frame.frame-4 { animation-delay: 2.1s; }
.path-1 .film-frame.frame-5 { animation-delay: 2.15s; }
.path-1 .film-hole { animation-delay: 2.2s; }

.path-2 .film-strip { animation-delay: 1.8s; }
.path-2 .film-frame.frame-1 { animation-delay: 2.05s; }
.path-2 .film-frame.frame-2 { animation-delay: 2.1s; }
.path-2 .film-frame.frame-3 { animation-delay: 2.15s; }
.path-2 .film-frame.frame-4 { animation-delay: 2.2s; }
.path-2 .film-frame.frame-5 { animation-delay: 2.25s; }
.path-2 .film-hole { animation-delay: 2.3s; }

.path-3 .film-strip { animation-delay: 1.9s; }
.path-3 .film-frame.frame-1 { animation-delay: 2.15s; }
.path-3 .film-frame.frame-2 { animation-delay: 2.2s; }
.path-3 .film-frame.frame-3 { animation-delay: 2.25s; }
.path-3 .film-frame.frame-4 { animation-delay: 2.3s; }
.path-3 .film-frame.frame-5 { animation-delay: 2.35s; }
.path-3 .film-hole { animation-delay: 2.4s; }

.path-4 .film-strip { animation-delay: 2.0s; }
.path-4 .film-frame.frame-1 { animation-delay: 2.25s; }
.path-4 .film-frame.frame-2 { animation-delay: 2.3s; }
.path-4 .film-frame.frame-3 { animation-delay: 2.35s; }
.path-4 .film-frame.frame-4 { animation-delay: 2.4s; }
.path-4 .film-frame.frame-5 { animation-delay: 2.45s; }
.path-4 .film-hole { animation-delay: 2.5s; }

.path-5 .film-strip { animation-delay: 2.1s; }
.path-5 .film-frame.frame-1 { animation-delay: 2.35s; }
.path-5 .film-frame.frame-2 { animation-delay: 2.4s; }
.path-5 .film-frame.frame-3 { animation-delay: 2.45s; }
.path-5 .film-frame.frame-4 { animation-delay: 2.5s; }
.path-5 .film-frame.frame-5 { animation-delay: 2.55s; }
.path-5 .film-hole { animation-delay: 2.6s; }

.path-6 .film-strip { animation-delay: 2.2s; }
.path-6 .film-frame.frame-1 { animation-delay: 2.45s; }
.path-6 .film-frame.frame-2 { animation-delay: 2.5s; }
.path-6 .film-frame.frame-3 { animation-delay: 2.55s; }
.path-6 .film-frame.frame-4 { animation-delay: 2.6s; }
.path-6 .film-frame.frame-5 { animation-delay: 2.65s; }
.path-6 .film-hole { animation-delay: 2.7s; }

.path-7 .film-strip { animation-delay: 2.3s; }
.path-7 .film-frame.frame-1 { animation-delay: 2.55s; }
.path-7 .film-frame.frame-2 { animation-delay: 2.6s; }
.path-7 .film-frame.frame-3 { animation-delay: 2.65s; }
.path-7 .film-frame.frame-4 { animation-delay: 2.7s; }
.path-7 .film-frame.frame-5 { animation-delay: 2.75s; }
.path-7 .film-hole { animation-delay: 2.8s; }

.path-8 .film-strip { animation-delay: 2.4s; }
.path-8 .film-frame.frame-1 { animation-delay: 2.65s; }
.path-8 .film-frame.frame-2 { animation-delay: 2.7s; }
.path-8 .film-frame.frame-3 { animation-delay: 2.75s; }
.path-8 .film-frame.frame-4 { animation-delay: 2.8s; }
.path-8 .film-frame.frame-5 { animation-delay: 2.85s; }
.path-8 .film-hole { animation-delay: 2.9s; }

@keyframes filmAppear {
    to {
        opacity: 1;
    }
}

@keyframes frameFill {
    0% {
        opacity: 0;
        fill: rgba(14, 165, 233, 0.1);
    }
    100% {
        opacity: 1;
        fill: rgba(14, 165, 233, 0.4);
    }
}

@keyframes holeGlow {
    to {
        opacity: 0.8;
        filter: drop-shadow(0 0 2px var(--primary-color));
    }
}

/* Motion Paths */
.motion-path {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 2;
    opacity: 0.5;
}

.path-1 .motion-path { animation: drawPath 1.2s ease-out forwards 0.3s; }
.path-2 .motion-path { animation: drawPath 1.3s ease-out forwards 0.4s; }
.path-3 .motion-path { animation: drawPath 1.0s ease-out forwards 0.5s; }
.path-4 .motion-path { animation: drawPath 1.2s ease-out forwards 0.6s; }
.path-5 .motion-path { animation: drawPath 1.0s ease-out forwards 0.7s; }
.path-6 .motion-path { animation: drawPath 1.3s ease-out forwards 0.8s; }
.path-7 .motion-path { animation: drawPath 1.0s ease-out forwards 0.9s; }
.path-8 .motion-path { animation: drawPath 1.2s ease-out forwards 1.0s; }

@keyframes drawPath {
    to {
        stroke-dashoffset: 0;
        opacity: 0.8;
    }
}

/* Keyframe Dots */
.keyframe-dot {
    fill: #00ffff;
    opacity: 0;
    filter: drop-shadow(0 0 4px #00ffff);
}

.path-1 .keyframe-dot { animation: keyframePulse 0.5s ease-out forwards 0.5s; }
.path-2 .keyframe-dot { animation: keyframePulse 0.5s ease-out forwards 0.6s; }
.path-3 .keyframe-dot { animation: keyframePulse 0.5s ease-out forwards 0.7s; }
.path-4 .keyframe-dot { animation: keyframePulse 0.5s ease-out forwards 0.8s; }
.path-5 .keyframe-dot { animation: keyframePulse 0.5s ease-out forwards 0.9s; }
.path-6 .keyframe-dot { animation: keyframePulse 0.5s ease-out forwards 1.0s; }
.path-7 .keyframe-dot { animation: keyframePulse 0.5s ease-out forwards 1.1s; }
.path-8 .keyframe-dot { animation: keyframePulse 0.5s ease-out forwards 1.2s; }

@keyframes keyframePulse {
    to {
        opacity: 1;
    }
}

/* Energy Pulses */
.energy-pulse {
    fill: #00ffff;
    opacity: 0;
    filter: drop-shadow(0 0 8px #00ffff);
}

.pulse-1 {
    animation: travelPath1 2s ease-in-out infinite 2.5s;
}

.pulse-2 {
    animation: travelPath2 2s ease-in-out infinite 2.6s;
}

.pulse-3 {
    animation: travelPath3 2s ease-in-out infinite 2.7s;
}

.pulse-4 {
    animation: travelPath4 2s ease-in-out infinite 2.8s;
}

.pulse-5 {
    animation: travelPath5 2s ease-in-out infinite 2.9s;
}

.pulse-6 {
    animation: travelPath6 2s ease-in-out infinite 3.0s;
}

.pulse-7 {
    animation: travelPath7 2s ease-in-out infinite 3.1s;
}

.pulse-8 {
    animation: travelPath8 2s ease-in-out infinite 3.2s;
}

@keyframes travelPath1 {
    0%, 10% { opacity: 0; }
    20%, 80% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes travelPath2 {
    0%, 10% { opacity: 0; }
    20%, 80% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes travelPath3 {
    0%, 10% { opacity: 0; }
    20%, 80% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes travelPath4 {
    0%, 10% { opacity: 0; }
    20%, 80% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes travelPath5 {
    0%, 10% { opacity: 0; }
    20%, 80% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes travelPath6 {
    0%, 10% { opacity: 0; }
    20%, 80% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes travelPath7 {
    0%, 10% { opacity: 0; }
    20%, 80% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes travelPath8 {
    0%, 10% { opacity: 0; }
    20%, 80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Loading Info */
.loading-info {
    text-align: center;
    width: 400px;
    max-width: 90%;
}

.loading-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 3px;
    color: var(--light-text);
    margin-bottom: 1.5rem;
}

.loading-bar {
    width: 100%;
    height: 3px;
    background: rgba(14, 165, 233, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #00ffff);
    border-radius: 10px;
    animation: progressBar 3s ease-out forwards;
    box-shadow: 0 0 10px var(--primary-color);
}

@keyframes progressBar {
    0% { width: 0%; }
    100% { width: 100%; }
}

.loading-status {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--gray-text);
    opacity: 0;
    animation: statusFade 0.5s ease-in forwards 2.8s;
}

@keyframes statusFade {
    to { 
        opacity: 1;
        color: var(--primary-color);
    }
}

.dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* =====================================
   NAVIGATION
   ===================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(0, 0, 0, 0.95);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 2px;
    color: var(--light-text);
    cursor: pointer;
}

.logo .fx {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-link {
    color: var(--light-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
    transition: color 0.3s ease;
    padding-bottom: 5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: var(--primary-color);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--light-text);
    transition: all var(--transition-speed);
}

/* =====================================
   HERO SECTION
   ===================================== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 2;
}

.hero-video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    z-index: 1;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 1;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 1200px;
    padding: 0 2rem;
}

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 10vw, 8rem);
    line-height: 0.9;
    letter-spacing: 10px; /* Cinematic wide tracking */
    margin-bottom: 1rem;
    overflow: hidden;
    text-shadow: 0 0 10px rgba(14, 165, 233, 0.5); /* Reduced glow for performance */
}

.hero-title .line {
    display: block;
    opacity: 0;
    transform: translateY(100px);
    animation: slideUp 1s forwards;
}

.hero-title .line:nth-child(1) { animation-delay: 0.3s; }
.hero-title .line:nth-child(2) { 
    animation-delay: 0.5s; 
    color: var(--primary-color);
}
.hero-title .line:nth-child(3) { animation-delay: 0.7s; }

/* Diagonal Wave Animation */
.wave-overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    contain: layout style paint;
}

.diagonal-wave {
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: linear-gradient(
        135deg,
        transparent 0%,
        transparent 48%,
        rgba(14, 165, 233, 0.3) 49.5%,
        rgba(0, 255, 255, 0.5) 50%,
        rgba(14, 165, 233, 0.3) 50.5%,
        transparent 52%,
        transparent 100%
    );
    animation: diagonalWaveFlow 7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    opacity: 0;
    will-change: transform;
    transform: translate3d(-100%, -100%, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    contain: layout style paint;
}

.diagonal-wave.wave-2 {
    animation-delay: 2.33s;
}

.diagonal-wave.wave-3 {
    animation-delay: 4.66s;
}

@keyframes diagonalWaveFlow {
    0% {
        transform: translate3d(-100%, -100%, 0);
        opacity: 0;
    }
    5% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
    95% {
        opacity: 0.8;
    }
    100% {
        transform: translate3d(100%, 100%, 0);
        opacity: 0;
    }
}

.glitch-text {
    position: relative;
    animation: slideUp 1s forwards, glitch 3s infinite 2s;
}

@keyframes glitch {
    0%, 90%, 100% { transform: translateY(0); }
    92% { transform: translate(-2px, 2px); filter: hue-rotate(90deg); }
    94% { transform: translate(2px, -2px); filter: hue-rotate(180deg); }
    96% { transform: translate(-2px, -2px); filter: hue-rotate(270deg); }
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: 1.2rem;
    letter-spacing: 3px;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeIn 1s forwards 1.2s;
    color: var(--gray-text);
}

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

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 1s forwards 1.5s;
}

.btn {
    padding: 1rem 2.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--light-text);
}

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    background: #0284c7;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.6), 0 0 20px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--light-text);
    border: 2px solid var(--light-text);
}

.btn-secondary:hover {
    background: var(--light-text);
    color: var(--darker-bg);
    transform: translateY(-3px);
}



/* =====================================
   SECTIONS
   ===================================== */
section {
    padding: 8rem 0;
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-fluid {
    max-width: 100%;
    padding: 0 4rem;
}

.section-header {
    margin-bottom: 5rem;
    text-align: center;
    position: relative;
}

.data-stream {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.6;
}

.data-stream::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 1px;
    background: #00ffff;
    box-shadow: 0 0 10px #00ffff;
    animation: dataFlow 2s linear infinite;
}

@keyframes dataFlow {
    0% { left: 0; opacity: 0; }
    50% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

.scan-line {
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent,
        var(--primary-color) 30%,
        var(--primary-color) 70%,
        transparent
    );
    opacity: 0;
    animation: scanLineAppear 1s ease-out forwards;
    box-shadow: 0 0 10px var(--primary-color);
}

@keyframes scanLineAppear {
    to { opacity: 0.8; }
}

.section-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 3px;
    color: var(--primary-color);
    display: block;
    margin-bottom: 1rem;
}

.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 8vw, 5rem);
    letter-spacing: 5px;
    position: relative;
    display: inline-block;
}

.section-title {
    position: relative;
}

.section-title::before {
    content: '< ';
    color: var(--primary-color);
    opacity: 0.6;
    font-size: 0.8em;
}

.section-title::after {
    content: ' />';
    color: var(--primary-color);
    opacity: 0.6;
    font-size: 0.8em;
    position: relative;
    bottom: 0;
    left: 0;
    transform: none;
    width: auto;
    height: auto;
    background: none;
}

/* =====================================
   ABOUT SECTION
   ===================================== */
.about {
    background: var(--dark-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-text .lead {
    font-size: 1.5rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--accent-gold);
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--gray-text);
    margin-bottom: 1.5rem;
}

.skills {
    margin-top: 4rem;
}

.skills h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 3px;
    margin-bottom: 2rem;
    color: var(--light-text);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.skill-item {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.1), transparent);
    transition: left 0.5s;
}

.skill-item:hover::before {
    left: 100%;
}

.holo-corner {
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.skill-item:hover .holo-corner {
    opacity: 1;
    box-shadow: 0 0 10px var(--primary-color);
}

.holo-corner.tl {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.holo-corner.tr {
    top: -1px;
    right: -1px;
    border-left: none;
    border-bottom: none;
}

.holo-corner.bl {
    bottom: -1px;
    left: -1px;
    border-right: none;
    border-top: none;
}

.holo-corner.br {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

.skill-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.skill-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.skill-item p {
    font-size: 0.9rem;
    color: var(--gray-text);
    margin: 0;
}

.about-image {
    position: relative;
}

/* Cinematic Color Grade for Images */
.image-frame img,
.portfolio-thumbnail img {
    filter: contrast(1.1) saturate(1.1) sepia(0.1);
    transition: transform 0.6s, filter 0.6s;
}

.image-frame:hover img,
.portfolio-thumbnail:hover img {
    filter: contrast(1) saturate(1) sepia(0);
}

.image-frame {
    position: relative;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.2);
}

.image-frame img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s;
}

.image-frame:hover img {
    transform: scale(1.1);
}

.frame-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 0%, rgba(229, 9, 20, 0.3) 100%);
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.image-frame:hover .frame-overlay {
    opacity: 1;
}

/* =====================================
   PORTFOLIO SECTION
   ===================================== */
.portfolio {
    background: var(--darker-bg);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    cursor: pointer;
    background: var(--dark-bg);
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.electric-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.electric-border::before,
.electric-border::after {
    content: '';
    position: absolute;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.electric-border::before {
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
}

.electric-border::after {
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    transform: scaleY(0);
    transform-origin: top;
}

.portfolio-item:hover .electric-border {
    opacity: 1;
}

.portfolio-item:hover .electric-border::before {
    animation: electricBorderH 0.6s ease-out forwards;
}

.portfolio-item:hover .electric-border::after {
    animation: electricBorderV 0.6s ease-out forwards 0.2s;
}

@keyframes electricBorderH {
    to { transform: scaleX(1); }
}

@keyframes electricBorderV {
    to { transform: scaleY(1); }
}

.portfolio-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
}

.portfolio-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(14, 165, 233, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.play-button svg {
    width: 30px;
    height: 30px;
    stroke-width: 2;
    fill: var(--light-text);
    margin-left: 3px;
}

.portfolio-item:hover .play-button {
    transform: translate(-50%, -50%) scale(1.2);
}

.portfolio-item:hover .portfolio-thumbnail img {
    transform: scale(1.1);
}

.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
    transform: translateY(100%);
    transition: transform var(--transition-speed);
    z-index: 3;
}

.portfolio-item:hover .portfolio-info {
    transform: translateY(0);
}

.category {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.portfolio-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.portfolio-info p {
    font-size: 0.9rem;
    color: var(--gray-text);
    margin: 0;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed);
    z-index: 10;
}

.portfolio-overlay video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =====================================
   SHOWREEL SECTION
   ===================================== */
.showreel {
    background: var(--dark-bg);
}

.showreel-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.video-player {
    position: relative;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    background: var(--darker-bg);
    border: 3px solid var(--primary-color);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.showreel-info h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.showreel-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--gray-text);
    margin-bottom: 3rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat .number {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat .label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--gray-text);
}

/* =====================================
   CONTACT SECTION
   ===================================== */
.contact {
    background: var(--darker-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
}

.contact-text h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.contact-text > p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--gray-text);
    margin-bottom: 3rem;
}

.contact-info {
    margin-bottom: 3rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-item .icon {
    font-size: 2rem;
}

.info-item h4 {
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--gray-text);
    margin-bottom: 0.3rem;
}

.info-item a {
    color: var(--light-text);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color var(--transition-speed);
}

.info-item a:hover {
    color: var(--primary-color);
}

.info-item p {
    font-size: 1.1rem;
    margin: 0;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light-text);
    transition: all var(--transition-speed);
}

.social-links a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.social-links svg {
    width: 20px;
    height: 20px;
}

/* Contact Form */
.contact-form {
    background: rgba(255, 255, 255, 0.03);
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    position: relative;
    margin-bottom: 2.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--light-text);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color var(--transition-speed);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--primary-color);
}

.form-group label {
    position: absolute;
    left: 0;
    top: 1rem;
    color: var(--gray-text);
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all var(--transition-speed);
    pointer-events: none;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:valid + label,
.form-group textarea:valid + label {
    top: -20px;
    font-size: 0.75rem;
    color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form .btn {
    width: 100%;
}

/* =====================================
   FOOTER
   ===================================== */
.footer {
    background: var(--darker-bg);
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    color: var(--gray-text);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

/* =====================================
   RESPONSIVE
   ===================================== */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-content,
    .showreel-container,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.98);
        width: 100%;
        text-align: center;
        transition: left 0.3s;
        padding: 3rem 0;
        gap: 2rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .container-fluid {
        padding: 0 2rem;
    }
    
    section {
        padding: 5rem 0;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
}

@media (max-width: 768px) {
    .circuit-board {
        max-width: 600px;
    }
    
    .loading-info {
        width: 300px;
    }
    
    .loading-text {
        font-size: 1.5rem;
    }
    
    .electric-lines {
        gap: 2rem;
    }
    
    .e-line {
        width: 80px;
    }
    
    #particle-canvas {
        opacity: 0.2;
    }
    
    .grid-overlay {
        opacity: 0.2;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .circuit-board {
        max-width: 400px;
    }
    
    .loading-text {
        font-size: 1.2rem;
    }
    
    .chip-text {
        font-size: 18px;
    }
}

/* Ripple effect animation */
@keyframes ripple {
    to {
        width: 400px;
        height: 400px;
        opacity: 0;
    }
}

/* =====================================
   ANIMATIONS & EFFECTS
   ===================================== */
.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s, transform 0.8s;
}

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

/* =====================================
   CUSTOM CURSOR
   ===================================== */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease-out, height 0.2s ease-out, background-color 0.2s;
    mix-blend-mode: normal;
    opacity: 0.8;
    will-change: transform, width, height; /* Optimize performance */
}

.custom-cursor::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.custom-cursor.hovered {
    width: 60px;
    height: 60px;
    background-color: rgba(14, 165, 233, 0.1);
    border-color: var(--light-text);
}

/* Hide default cursor when custom cursor is active (handled via body class in JS ideally, but simple reset here) */
body {
    cursor: none; 
}

/* Restore cursor for iframes/embeds if needed */
iframe {
    pointer-events: auto;
}
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Selection color */
::selection {
    background: var(--primary-color);
    color: var(--light-text);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--darker-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
}

::-webkit-scrollbar-thumb:hover {
    background: #0284c7;
}
