@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Orbitron:wght@400;500;700;900&family=Space+Grotesk:wght@400;600;700&display=swap');

:root {
    /* Palette */
    --space-black: #020202;
    --night-sky: #080D17;
    --neon-blue: #00E5FF;
    --neon-green: #00FF88;
    --accent-red: #FF2A2A;
    --apple-gray: #A1A1A6;
    --apple-white: #F5F5F7;
    --hud-dim: rgba(0, 229, 255, 0.4);
    --glass-bg: rgba(8, 13, 23, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-hud: 'Orbitron', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background-color: var(--space-black);
    color: var(--apple-white);
    font-family: var(--font-sans);
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

/* Typography Classes */
.font-hud { font-family: var(--font-hud); }
.text-neon-blue { color: var(--neon-blue); }
.text-neon-green { color: var(--neon-green); text-shadow: 0 0 10px rgba(0,255,136,0.6); }
.text-accent-red { color: var(--accent-red); }
.text-apple { color: var(--apple-white); font-weight: 600; }
.text-apple-light { color: var(--apple-gray); }
.text-light-gray { color: #888; }
.tracking-widest { letter-spacing: 0.2rem; }
.uppercase { text-transform: uppercase; }
.text-xl { font-size: 1.25rem; }
.text-lg { font-size: 1.125rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-3xl { font-size: 1.875rem; }
.font-bold { font-weight: 700; }

/* Grid Layouts & Helpers */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-50 { z-index: 50; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.p-0 { padding: 0 !important; }
.p-6 { padding: 1.5rem; }
.p-12 { padding: 3rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pt-4 { padding-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.w-full { width: 100%; }
.w-2 { width: 0.5rem; }
.h-6 { height: 1.5rem; }
.h-1\/5 { height: 20%; }
.h-2\/5 { height: 40%; }
.h-3\/5 { height: 60%; }
.h-4\/5 { height: 80%; }
.h-full { height: 100%; }
.max-w-2xl { max-width: 42rem; margin-left: auto; margin-right: auto; }
.max-w-7xl { max-width: 80rem; margin-left: auto; margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.overflow-hidden { overflow: hidden; }
.inline-block { display: inline-block; }
.opacity-60 { opacity: 0.6; }
.opacity-80 { opacity: 0.8; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-glass { border-color: var(--glass-border); }
.transform { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); }
.scale-x-0 { --tw-scale-x: 0; transform: scaleX(0); }
.scale-x-100 { --tw-scale-x: 1; transform: scaleX(1); }
.origin-left { transform-origin: left; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }
.group:hover .group-hover\:scale-x-100 { transform: scaleX(1); }
.bg-accent-red { background-color: var(--accent-red); }
.bg-neon-green { background-color: var(--neon-green); }
.pointer-events-none { pointer-events: none; }

/* HUD OVERLAY */
.hud-container {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 100;
    padding: 2rem;
}

.hud-corner {
    position: absolute;
    width: 30px; height: 30px;
    border: 2px solid var(--hud-dim);
    transition: all 0.3s ease;
}
.hud-corner.top-left { top: 2rem; left: 2rem; border-right: none; border-bottom: none; }
.hud-corner.top-right { top: 2rem; right: 2rem; border-left: none; border-bottom: none; }
.hud-corner.bottom-left { bottom: 2rem; left: 2rem; border-right: none; border-top: none; }
.hud-corner.bottom-right { bottom: 2rem; right: 2rem; border-left: none; border-top: none; }

.hud-telemetry {
    position: absolute;
    font-family: var(--font-hud);
}
.hud-telemetry.top-left { top: 3rem; left: 4rem; }
.hud-telemetry.top-right { top: 3rem; right: 4rem; }
.hud-telemetry.bottom-left { bottom: 3rem; left: 4rem; }
.hud-telemetry.bottom-right { bottom: 3rem; right: 4rem; }

.hud-telemetry .label { font-size: 0.65rem; color: var(--hud-dim); letter-spacing: 2px; }
.hud-telemetry .value { font-size: 1.5rem; color: var(--apple-white); font-weight: 700; margin: 2px 0; }
.hud-telemetry .sub-label { font-size: 0.55rem; color: var(--apple-gray); letter-spacing: 1px; }

.telemetry-bar {
    width: 120px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    margin-top: 5px;
    position: relative;
    overflow: hidden;
}
.telemetry-bar.right-align { margin-left: auto; }
.bar-fill {
    height: 100%;
    background: var(--neon-blue);
    width: 0%;
    transition: width 0.1s linear;
}

.hud-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
}
.crosshair {
    width: 50px; height: 50px;
    border: 1px solid var(--hud-dim);
    border-radius: 50%;
    position: relative;
}
.crosshair::before, .crosshair::after {
    content: ''; position: absolute;
    background: var(--hud-dim);
}
.crosshair::before { top: 50%; left: -10px; right: -10px; height: 1px; transform: translateY(-50%); }
.crosshair::after { left: 50%; top: -10px; bottom: -10px; width: 1px; transform: translateX(-50%); }

.blink { animation: blink 1.5s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* NAVIGATION */
.orbit-nav {
    position: fixed;
    top: 0; left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: 1.5rem 3rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
    z-index: 90;
    width: 100%;
    justify-content: center;
}
.brand {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 2px;
}
.nav-links {
    display: flex; gap: 2rem; list-style: none;
    font-family: var(--font-hud); font-size: 0.75rem;
}
.nav-links a {
    color: var(--apple-gray);
    text-decoration: none;
    letter-spacing: 1.5px;
    transition: color 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--apple-white); text-shadow: 0 0 8px rgba(255,255,255,0.5); }
.comms-btn {
    background: transparent;
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 0.5rem 1.5rem;
    font-family: var(--font-hud);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s;
}
.comms-btn:hover { background: var(--neon-blue); color: #000; box-shadow: 0 0 15px var(--neon-blue); }

/* SECTIONS BASE */
.panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 10%;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.content-wrapper {
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}
.section-header { margin-bottom: 4rem; text-align: center; }
.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: inline-block;
}
.title-decorator {
    width: 60px; height: 3px;
    background: var(--neon-blue);
    margin: 1rem auto;
    box-shadow: 0 0 10px var(--neon-blue);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    transition: transform 0.3s, border-color 0.3s;
}
.hover-glow:hover {
    transform: translateY(-5px);
    border-color: var(--neon-blue);
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 20px rgba(0,229,255,0.2);
}

/* SECTION 1: LAUNCHPAD */
.section-launchpad {
    align-items: flex-start;
    padding-top: 20vh;
    background: radial-gradient(circle at center, #0a1122 0%, var(--space-black) 100%);
}
.hero-title-group { max-width: 800px; }
.pre-title {
    font-family: var(--font-hud);
    color: var(--accent-red);
    font-size: 1rem;
    letter-spacing: 4px;
    margin-bottom: 1rem;
}
.main-title {
    font-family: var(--font-heading);
    font-size: 6vw;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-transform: uppercase;
    position: relative;
}
.role-title {
    font-family: var(--font-sans);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--apple-gray);
}
.mission-brief {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
}
.scroll-indicator {
    display: flex; align-items: center; gap: 1rem;
    font-family: var(--font-hud); font-size: 0.7rem; color: var(--hud-dim);
}
.mouse {
    width: 20px; height: 30px;
    border: 1px solid var(--hud-dim);
    border-radius: 10px;
    position: relative;
}
.wheel {
    width: 4px; height: 4px;
    background: var(--neon-blue);
    border-radius: 50%;
    position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}
@keyframes scroll { 0% { top: 4px; opacity: 1; } 100% { top: 20px; opacity: 0; } }

/* F1 Lights */
.launch-sequence {
    position: absolute; right: 2%; top: 30%;
}
.starting-lights {
    display: flex; gap: 10px;
    background: rgba(17,17,17,0.8); padding: 15px; border-radius: 10px;
    border: 1px solid #333;
    backdrop-filter: blur(10px);
}
.light-group { display: flex; flex-direction: column; gap: 8px; }
.light {
    width: 30px; height: 30px; border-radius: 50%;
    background: #222; box-shadow: inset 0 0 10px #000;
    transition: background-color 0.1s, box-shadow 0.1s;
}
.light.red-on { background: #FF0000; box-shadow: 0 0 20px #FF0000; }
.light.green-on { background: #00FF00; box-shadow: 0 0 30px #00FF00; }

/* Background Tracks */
.track-lines-bg {
    position: absolute; inset: 0;
    background: repeating-linear-gradient(90deg, transparent 0, transparent 49px, rgba(255,255,255,0.02) 50px);
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    transform-origin: bottom center;
    opacity: 0.5;
}
.starfield-bg {
    position: absolute; inset: 0;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 3px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 2px),
        radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 3px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
    opacity: 0.3;
}

/* SECTION 2: EXPERIENCE */
.timeline-track { position: relative; padding-left: 80px; margin-left: 40px; }
.track-line-vertical {
    position: absolute; top: 0; bottom: 0; left: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--neon-blue), transparent);
}
.f1-car-marker {
    position: absolute;
    left: 1px;
    top: 0;
    width: 0;
    height: 0;
    z-index: 20;
}
.car-image {
    width: 140px;
    height: 140px;
    object-fit: contain;
    position: absolute;
    left: -70px;
    top: -70px;
    transform: rotate(-90deg);
    mix-blend-mode: screen;
    display: block;
}
#smoke-container {
    position: absolute;
    top: -45px; left: 0px;
    width: 1px; height: 1px;
    z-index: 0;
}
.smoke-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(200, 200, 255, 0.6);
    filter: blur(4px);
    pointer-events: none;
    z-index: -1;
}

.timeline-node { position: relative; margin-bottom: 4rem; }
.node-marker {
    position: absolute; left: -86px; top: 1.5rem;
    width: 14px; height: 14px;
    background: var(--space-black);
    border: 2px solid var(--neon-blue);
    border-radius: 50%;
    z-index: 2;
}
.glow-apple { border-color: var(--apple-white); box-shadow: 0 0 15px var(--apple-white); }
.border-apple { border-color: rgba(255,255,255,0.3); }
.node-time { font-family: var(--font-hud); font-size: 0.8rem; letter-spacing: 2px; }
.timeline-node h3 { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 0.5rem; }
.timeline-node h4 { font-family: var(--font-sans); font-size: 1rem; color: var(--apple-gray); font-weight: 500; }
.tech-specs { list-style: none; margin-top: 1rem; color: #ccc; }
.tech-specs li { margin-bottom: 0.5rem; }
.tech-specs .bullet { color: var(--neon-blue); margin-right: 0.5rem; font-family: var(--font-hud); }

/* SECTION 3: SKILLS */
.tech-panels-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 800px) {
    .tech-panels-grid {
        grid-template-columns: 1fr;
    }
}

.tech-panel {
    background: rgba(10, 12, 16, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    padding: 1.5rem;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.tech-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--neon-blue);
    opacity: 0.5;
}

.tech-panel.panel-sys::before { background: var(--accent-red); }
.tech-panel.panel-cmd::before { background: var(--neon-blue); }
.tech-panel.panel-pld::before { background: var(--apple-white); }
.tech-panel.panel-ai::before { background: #ff00ff; }

.tech-panel:hover {
    background: rgba(15, 20, 25, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.panel-id {
    font-family: var(--font-hud);
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: 2px;
}

.panel-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    margin: 0 10px;
    flex-grow: 1;
}

.panel-status {
    font-family: var(--font-hud);
    font-size: 0.6rem;
    padding: 2px 6px;
    border: 1px solid;
    border-radius: 2px;
    letter-spacing: 1px;
}
.status-nominal { color: var(--neon-blue); border-color: var(--neon-blue); }
.status-warn { color: var(--accent-red); border-color: var(--accent-red); }
.status-active { color: var(--neon-green); border-color: var(--neon-green); }
.status-ai { color: #ff00ff; border-color: #ff00ff; }

.telemetry-row {
    display: flex;
    align-items: center;
    margin-bottom: 1.2rem;
    gap: 15px;
}

.telemetry-label {
    font-family: var(--font-hud);
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
    width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.telemetry-track {
    flex-grow: 1;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    position: relative;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.8);
}

.telemetry-fill {
    height: 100%;
}

.fill-blue { background: var(--neon-blue); box-shadow: 0 0 8px var(--neon-blue); }
.fill-red { background: var(--accent-red); box-shadow: 0 0 8px var(--accent-red); }
.fill-green { background: var(--neon-green); box-shadow: 0 0 8px var(--neon-green); }
.fill-magenta { background: #ff00ff; box-shadow: 0 0 8px #ff00ff; }

.telemetry-val {
    font-family: var(--font-hud);
    font-size: 0.7rem;
    width: 75px;
    text-align: right;
}
.text-blue { color: var(--neon-blue); }
.text-red { color: var(--accent-red); }
.text-green { color: var(--neon-green); }
.text-magenta { color: #ff00ff; }
.text-white { color: #fff; }

/* SECTION 4: PROJECTS */
.project-carousel {
    display: flex; gap: 2rem; overflow-x: auto; padding-bottom: 2rem;
    scrollbar-width: none;
}
.project-carousel::-webkit-scrollbar { display: none; }
.project-card {
    min-width: 350px; flex: 0 0 auto;
}
.proj-image { height: 200px; background-size: cover; background-position: center; transition: transform 0.5s ease;}
.project-card:hover .proj-image {
    transform: scale(1.05);
}
.btn-tech {
    display: inline-block; font-family: var(--font-hud); font-size: 0.7rem; color: var(--neon-blue);
    text-decoration: none; border-bottom: 1px solid transparent; transition: all 0.3s;
}
.btn-tech:hover { border-bottom-color: var(--neon-blue); letter-spacing: 1px; }

/* SECTION 5: CONTACT */
.custom-border-glow { border: 1px solid rgba(0,255,136,0.3); box-shadow: inset 0 0 50px rgba(0,255,136,0.05); }
.btn-primary-neon {
    color: var(--apple-white);
    border: 1px solid rgba(255,255,255,0.2);
    text-decoration: none;
    transition: all 0.3s;
}
.btn-primary-neon:hover { border-color: var(--accent-red); color: white;}

/* Glitch Effect */
.glitch-effect {
    position: relative;
    display: inline-block;
}
.glitch-effect::before, .glitch-effect::after {
    content: attr(data-text);
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.glitch-effect::before {
    left: 2px; text-shadow: -2px 0 var(--accent-red); clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}
.glitch-effect::after {
    left: -2px; text-shadow: -2px 0 var(--neon-blue); clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}
@keyframes glitch-anim {
    0% { clip: rect(15px, 9999px, 71px, 0); }
    20% { clip: rect(81px, 9999px, 86px, 0); }
    40% { clip: rect(10px, 9999px, 20px, 0); }
    60% { clip: rect(89px, 9999px, 90px, 0); }
    80% { clip: rect(32px, 9999px, 78px, 0); }
    100% { clip: rect(98px, 9999px, 15px, 0); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    20% { clip: rect(1px, 9999px, 26px, 0); }
    40% { clip: rect(40px, 9999px, 60px, 0); }
    60% { clip: rect(59px, 9999px, 20px, 0); }
    80% { clip: rect(82px, 9999px, 48px, 0); }
    100% { clip: rect(18px, 9999px, 35px, 0); }
}

@media (max-width: 768px) {
    .main-title { font-size: 3rem; }
    .orbit-nav { display: none; }
    .hud-telemetry { display: none; }
    .hud-corner { display: none; }
    .panel { padding: 4rem 1.5rem; }
    .timeline-track { padding-left: 1.5rem; }
    .launch-sequence { display: none; } 
}