
@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Play:wght@400;700&family=JetBrains+Mono:wght@400;500&display=swap");

/* ─── Design Tokens — Cyberpunk Dual-Tone ─────────────────────────── */
:root {
    --dark-bg: #050510;
    --mid-bg: #0a0e1a;
    --card-bg: rgba(5, 8, 20, 0.92);
    --neon-green: #00cc66;
    --neon-cyan: #00aaff;
    --neon-purple: #7b2fff;
    --bright-green: #00ff88;
    --text-primary: #e0e0e0;
    --text-dim: rgba(255, 255, 255, 0.6);
    --text-glow: rgba(0, 204, 102, 0.4);
    --cyan-glow: rgba(0, 170, 255, 0.4);
    --border-glow: rgba(0, 204, 102, 0.15);
    --gradient-accent: linear-gradient(135deg, #00cc66, #00aaff);
    --radius: 8px;
    --transition: 0.3s ease;
}

/* ─── Custom Scrollbar ────────────────────────────────────────────── */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--neon-green) rgba(0, 10, 0, 0.5);
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0, 5, 0, 0.6); }
::-webkit-scrollbar-thumb {
    background: var(--gradient-accent);
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}
::-webkit-scrollbar-thumb:hover {
    box-shadow: 0 0 14px rgba(0, 255, 65, 0.5);
}

/* ─── Scroll Progress Bar (hidden — integrated into nav) ──────────── */
#scroll-progress-bar { display: none; }

@keyframes progressShimmer {
    0%   { background-position: 0% 0%; }
    50%  { background-position: 100% 0%; }
    100% { background-position: 0% 0%; }
}

/* ─── Section Navigation — Top Header Bar ─────────────────────────── */
#section-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
#section-nav.visible {
    opacity: 1;
    pointer-events: auto;
}

.nav-progress-track {
    height: 3px;
    background: rgba(0, 255, 65, 0.08);
    width: 100%;
}
.nav-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-accent);
    box-shadow: 0 0 10px var(--neon-green), 0 0 20px rgba(0, 170, 255, 0.2);
    transition: width 0.15s ease-out;
    border-radius: 0 2px 2px 0;
}

.nav-dots-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 8px 16px;
    background: rgba(0, 5, 0, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 255, 65, 0.1);
}

.nav-dot {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.nav-dot:hover { background: rgba(0, 255, 65, 0.06); }
.nav-dot.active { background: rgba(0, 255, 65, 0.08); }

.nav-pip {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 255, 65, 0.3);
    background: transparent;
    transition: all 0.35s ease;
    flex-shrink: 0;
    position: relative;
}
.nav-pip::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.35s ease;
}
.nav-dot:hover .nav-pip {
    border-color: var(--neon-green);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}
.nav-dot.active .nav-pip {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
}
.nav-dot.active .nav-pip::after {
    background: var(--neon-cyan);
    box-shadow: 0 0 4px var(--neon-cyan);
}

.nav-label {
    font-family: 'Press Start 2P', sans-serif;
    font-size: 0.4rem;
    color: rgba(0, 255, 65, 0.4);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: all 0.3s ease;
}
.nav-dot:hover .nav-label { color: var(--neon-green); text-shadow: 0 0 6px var(--text-glow); }
.nav-dot.active .nav-label { color: var(--neon-cyan); text-shadow: 0 0 6px var(--cyan-glow); }

/* ─── Reset & Base ────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
body {
    font-family: 'Play', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    text-align: center;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Subtle viewport scanline overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 65, 0.008) 2px,
        rgba(0, 255, 65, 0.008) 4px
    );
    pointer-events: none;
    z-index: 9998;
}

h1, h2 {
    font-family: 'Press Start 2P', sans-serif;
    color: var(--neon-green);
    text-shadow: 0 0 8px var(--text-glow), 0 0 25px rgba(0, 255, 65, 0.2);
    line-height: 1.4;
}
h3 {
    font-family: 'Press Start 2P', sans-serif;
    font-size: 0.75rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 6px var(--cyan-glow);
    line-height: 1.5;
}
p, ul, li { color: var(--text-primary); }
a { color: var(--neon-cyan); }

/* ─── Loading Screen — Matrix Cyberpunk ───────────────────────────── */
#loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#loading-screen.fade-out {
    animation: loadingFadeOut 0.8s ease forwards;
}
@keyframes loadingFadeOut {
    0% { opacity: 1; }
    40% { opacity: 0.8; filter: brightness(1.3); }
    100% { opacity: 0; }
}
#matrix-rain {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.7;
}

/* Scanline overlay */
#loading-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 65, 0.015) 2px,
        rgba(0, 255, 65, 0.015) 4px
    );
    pointer-events: none;
    z-index: 2;
}
/* Vignette */
#loading-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
    z-index: 2;
}

.loading-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 3;
}

/* Loading Logo */
.loading-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.logo-bracket {
    font-family: 'Press Start 2P', sans-serif;
    font-size: 1.2rem;
    color: var(--neon-green);
    text-shadow: 0 0 20px var(--neon-green), 0 0 40px rgba(0, 255, 65, 0.3);
    animation: bracketPulse 2s ease-in-out infinite;
}
.logo-text {
    font-family: 'Press Start 2P', sans-serif;
    font-size: 0.8rem;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green), 0 0 30px rgba(0, 255, 65, 0.2);
    letter-spacing: 6px;
    animation: logoGlitch 4s ease-in-out infinite;
}
@keyframes bracketPulse {
    0%, 100% { opacity: 0.6; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.1); }
}
@keyframes logoGlitch {
    0%, 90%, 100% { transform: none; opacity: 1; }
    91% { transform: translateX(-2px) skewX(-1deg); opacity: 0.8; }
    92% { transform: translateX(3px) skewX(2deg); opacity: 1; }
    93% { transform: translateX(-1px); opacity: 0.9; }
    94% { transform: none; opacity: 1; }
}

/* Terminal */
.loading-terminal {
    width: 500px;
    max-width: 92vw;
    background: rgba(0, 5, 0, 0.85);
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.06), inset 0 0 30px rgba(0, 255, 65, 0.02);
}
.terminal-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(0, 255, 65, 0.04);
    border-bottom: 1px solid rgba(0, 255, 65, 0.12);
}
.terminal-dot { width: 8px; height: 8px; border-radius: 50%; }
.terminal-dot.red { background: #ff5f57; box-shadow: 0 0 4px #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; box-shadow: 0 0 4px #ffbd2e; }
.terminal-dot.green { background: #28c840; box-shadow: 0 0 4px #28c840; }
.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: rgba(0, 255, 65, 0.5);
    margin-left: 8px;
    letter-spacing: 0.5px;
}

.terminal-body {
    padding: 12px 14px;
    min-height: 120px;
    max-height: 200px;
    overflow-y: auto;
    text-align: left;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    line-height: 1.6;
    color: rgba(0, 255, 65, 0.7);
    scrollbar-width: none;
}
.terminal-body::-webkit-scrollbar { display: none; }

.terminal-body .term-line {
    opacity: 0;
    transform: translateY(3px);
    animation: termLineIn 0.2s ease forwards;
}
.terminal-body .term-line .term-prompt { color: var(--neon-green); margin-right: 6px; font-size: 0.6rem; text-shadow: 0 0 6px var(--neon-green); }
.terminal-body .term-line .term-cmd { color: #fff; text-shadow: 0 0 2px rgba(255, 255, 255, 0.3); }
.terminal-body .term-line .term-result { color: rgba(0, 204, 102, 0.7); }
.terminal-body .term-line .term-success { color: var(--neon-green); text-shadow: 0 0 6px rgba(0, 255, 65, 0.3); }
.terminal-body .term-line .term-warn { color: #ffbd2e; text-shadow: 0 0 6px rgba(255, 189, 46, 0.2); }
.terminal-body .term-line .term-system { color: rgba(0, 204, 102, 0.5); font-size: 0.65rem; }
.terminal-body .term-line .term-crypto { color: rgba(123, 47, 255, 0.8); text-shadow: 0 0 4px rgba(123, 47, 255, 0.3); }
.terminal-body .term-line .term-matrix {
    color: var(--neon-green);
    font-family: 'Press Start 2P', sans-serif;
    font-size: 0.5rem;
    text-shadow: 0 0 10px var(--neon-green), 0 0 20px rgba(0, 255, 65, 0.3);
    letter-spacing: 2px;
}
.terminal-body .term-line .term-divider { color: rgba(0, 255, 65, 0.15); letter-spacing: -1px; }
.terminal-body .term-cursor {
    display: inline-block;
    width: 7px;
    height: 13px;
    background: var(--neon-green);
    animation: cursorBlink 0.5s step-end infinite;
    vertical-align: text-bottom;
    margin-left: 2px;
    box-shadow: 0 0 8px var(--neon-green);
}

@keyframes termLineIn { to { opacity: 1; transform: translateY(0); } }
@keyframes cursorBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Loading Bar */
.loading-bar-container {
    width: 340px;
    max-width: 85vw;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.loading-bar-label {
    display: flex;
    justify-content: space-between;
    font-family: 'Press Start 2P', sans-serif;
    font-size: 0.3rem;
    color: rgba(0, 255, 65, 0.4);
    letter-spacing: 2px;
}
.loading-bar-track {
    height: 3px;
    background: rgba(0, 255, 65, 0.06);
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 65, 0.1);
}
#loading-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient-accent);
    background-size: 200% 100%;
    animation: progressShimmer 2s ease infinite;
    border-radius: 2px;
    transition: width 0.15s ease;
    box-shadow: 0 0 10px var(--neon-green), 0 0 20px rgba(0, 170, 255, 0.2);
}
#loading-text {
    font-family: 'Press Start 2P', sans-serif;
    font-size: 0.4rem;
    color: rgba(0, 255, 65, 0.35);
    letter-spacing: 3px;
    animation: loadingPulse 2s ease-in-out infinite;
    transition: all 0.5s ease;
}
#loading-text.ready {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
    animation: none;
}
@keyframes loadingPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.75; } }

/* ─── Scroll Hint ──────────────────────────────────────────────────── */
#scroll-hint {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}
#scroll-hint.visible { opacity: 1; }
.scroll-hint-text {
    font-family: 'Press Start 2P', sans-serif;
    font-size: 0.4rem;
    color: rgba(0, 170, 255, 0.45);
    letter-spacing: 3px;
    animation: loadingPulse 2.5s ease-in-out infinite;
}
.scroll-hint-mouse {
    width: 20px;
    height: 32px;
    border: 2px solid rgba(0, 170, 255, 0.35);
    border-radius: 10px;
    position: relative;
}
.scroll-hint-wheel {
    width: 3px;
    height: 7px;
    background: var(--neon-cyan);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s ease-in-out infinite;
    box-shadow: 0 0 6px var(--neon-cyan);
}
@keyframes scrollWheel {
    0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}
.scroll-hint-arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.scroll-hint-arrows span {
    display: block;
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(0, 170, 255, 0.35);
    border-bottom: 2px solid rgba(0, 170, 255, 0.35);
    transform: rotate(45deg);
    animation: scrollArrow 1.5s ease-in-out infinite;
}
.scroll-hint-arrows span:nth-child(2) { animation-delay: 0.15s; }
.scroll-hint-arrows span:nth-child(3) { animation-delay: 0.3s; }
@keyframes scrollArrow {
    0%   { opacity: 0; transform: rotate(45deg) translate(-4px, -4px); }
    50%  { opacity: 1; }
    100% { opacity: 0; transform: rotate(45deg) translate(4px, 4px); }
}

/* ─── Three.js Canvas ──────────────────────────────────────────────── */
#starfield {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ─── Scroll Spacer ────────────────────────────────────────────────── */
#scroll-spacer {
    height: 500vh;
    pointer-events: none;
    position: relative;
    z-index: -1;
}

/* ─── Section Overlays (float over 3D scene) ──────────────────────── */
.section-overlay {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    visibility: hidden;
}
.section-overlay > * {
    pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════ */
#hero-overlay {
    flex-direction: column;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 60px;
    max-width: 650px;
    background: radial-gradient(ellipse at center, rgba(5, 5, 16, 0.95) 0%, rgba(5, 5, 16, 0.88) 50%, rgba(5, 5, 16, 0.4) 80%, transparent 100%);
    border-radius: 20px;
}

/* Portrait with animated ring */
.hero-portrait {
    position: relative;
    width: 130px;
    height: 130px;
    margin-bottom: 8px;
}
.portrait-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.ring-track {
    fill: none;
    stroke: rgba(0, 204, 102, 0.1);
    stroke-width: 1.5;
}
.ring-spin {
    fill: none;
    stroke: var(--neon-green);
    stroke-width: 2;
    stroke-dasharray: 40 310;
    stroke-linecap: round;
    animation: ringRotate 4s linear infinite;
    filter: drop-shadow(0 0 4px var(--neon-green));
}
.ring-spin-reverse {
    fill: none;
    stroke: var(--neon-cyan);
    stroke-width: 1.5;
    stroke-dasharray: 20 330;
    stroke-linecap: round;
    animation: ringRotate 6s linear infinite reverse;
    filter: drop-shadow(0 0 4px var(--neon-cyan));
}
@keyframes ringRotate {
    to { stroke-dashoffset: -350; }
}

.portrait-img {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: url('../assets/gameportraitsqr.png') center/cover no-repeat;
    border: 2px solid rgba(0, 204, 102, 0.25);
    box-shadow: 0 0 20px rgba(0, 204, 102, 0.15);
}

/* Hero text */
.hero-name {
    font-family: 'Press Start 2P', sans-serif;
    font-size: 1.1rem;
    color: var(--neon-green);
    text-shadow: 0 0 15px var(--neon-green), 0 0 40px rgba(0, 255, 65, 0.3);
    letter-spacing: 3px;
    min-height: 1.6em;
}

.hero-role {
    font-family: 'Play', sans-serif;
    font-size: 1.2rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--cyan-glow);
    opacity: 0;
    transition: opacity 0.6s ease;
    letter-spacing: 2px;
}
.hero-role.visible { opacity: 1; }

.hero-tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-dim);
    min-height: 1.3em;
    letter-spacing: 0.5px;
}

/* CTA buttons */
.hero-cta {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.6s ease;
    position: relative;
    z-index: 20;
}
.hero-cta.visible { opacity: 1; }

.btn-primary, .btn-secondary {
    font-family: 'Press Start 2P', sans-serif;
    font-size: 0.45rem;
    padding: 14px 28px;
    border-radius: 4px;
    text-decoration: none;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid;
    position: relative;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
    display: inline-block;
    line-height: 1;
}
.btn-primary {
    background: var(--gradient-accent);
    border-color: transparent;
    color: #000;
    font-weight: bold;
}
.btn-primary:hover {
    box-shadow: 0 0 25px rgba(0, 204, 102, 0.5), 0 0 50px rgba(0, 170, 255, 0.2);
    transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0) scale(0.97); }

.btn-secondary {
    background: transparent;
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}
.btn-secondary:hover {
    background: rgba(0, 170, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.3);
    transform: translateY(-2px);
}
.btn-secondary:active { transform: translateY(0) scale(0.97); }

/* Social icons */
.hero-social {
    display: flex;
    gap: 14px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.hero-social.visible { opacity: 1; }

.hero-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(0, 204, 102, 0.2);
    color: var(--neon-green);
    transition: all 0.3s ease;
    text-decoration: none;
}
.hero-social a:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.3);
    transform: scale(1.1);
}
.hero-social a:active { transform: scale(0.95); }
.hero-social svg { width: 20px; height: 20px; }

/* ═══════════════════════════════════════════════════════════════════
   ABOUT SECTION
   ═══════════════════════════════════════════════════════════════════ */
#about-overlay {
    padding: 50px 0 20px;
}

.about-container {
    width: 90%;
    max-width: 700px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    background: rgba(5, 8, 20, 0.94);
    border: 1px solid rgba(0, 204, 102, 0.2);
    border-radius: var(--radius);
    padding: 28px 32px;
    text-align: left;
    position: relative;
    box-shadow: 0 0 40px rgba(0, 204, 102, 0.06), inset 0 0 40px rgba(0, 204, 102, 0.01);
    scrollbar-width: thin;
    scrollbar-color: var(--neon-green) transparent;
}

/* Scanline overlay */
.about-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 204, 102, 0.01) 2px,
        rgba(0, 204, 102, 0.01) 4px
    );
    pointer-events: none;
    border-radius: var(--radius);
    z-index: 1;
}
/* Sweeping scanline */
.about-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    animation: scanlineSweep 4s linear infinite;
    pointer-events: none;
    z-index: 2;
}
@keyframes scanlineSweep {
    0% { top: 0; opacity: 0.6; }
    100% { top: 100%; opacity: 0; }
}

.about-header {
    margin-bottom: 20px;
    position: relative;
}
.terminal-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: rgba(0, 170, 255, 0.5);
    display: block;
    text-align: right;
    margin-bottom: 8px;
}
.about-header h2 {
    font-size: 0.85rem;
    text-align: center;
    padding: 10px;
    background: rgba(0, 204, 102, 0.05);
    border: 1px solid rgba(0, 204, 102, 0.15);
    border-radius: 4px;
}

.about-bio {
    margin-bottom: 24px;
}
.about-bio p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 10px;
}

/* Skills */
.about-skills {
    margin-bottom: 24px;
}
.about-skills h3 {
    margin-bottom: 14px;
}
.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.skill-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    padding: 6px 14px;
    border: 1px solid rgba(0, 204, 102, 0.2);
    border-radius: 4px;
    color: var(--neon-green);
    background: rgba(0, 204, 102, 0.03);
    transition: all 0.3s ease;
    cursor: default;
    letter-spacing: 0.5px;
}
.skill-pill:hover {
    background: rgba(0, 204, 102, 0.1);
    box-shadow: 0 0 12px rgba(0, 204, 102, 0.2);
    transform: translateY(-2px);
    border-color: var(--neon-green);
}

/* Timeline */
.about-timeline {
    margin-bottom: 24px;
}
.about-timeline h3 {
    margin-bottom: 16px;
}
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-left: 20px;
    border-left: 2px solid rgba(0, 204, 102, 0.15);
}
.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
    position: relative;
}
.timeline-dot {
    position: absolute;
    left: -27px;
    top: 16px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--neon-green);
    box-shadow: 0 0 8px var(--neon-green);
    transform: rotate(45deg);
    flex-shrink: 0;
}
.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.timeline-date {
    font-family: 'Press Start 2P', sans-serif;
    font-size: 0.45rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 4px var(--cyan-glow);
    letter-spacing: 1px;
}
.timeline-role {
    font-family: 'Play', sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Status bar */
.about-status {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(0, 204, 102, 0.04);
    border: 1px solid rgba(0, 204, 102, 0.1);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: rgba(0, 204, 102, 0.4);
    letter-spacing: 1px;
}

/* ═══════════════════════════════════════════════════════════════════
   CONTACT SECTION
   ═══════════════════════════════════════════════════════════════════ */
.contact-container {
    max-width: 500px;
    width: 90%;
    text-align: center;
    padding: 32px;
}
.contact-container h2 {
    font-size: 0.8rem;
    margin-bottom: 12px;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--cyan-glow);
}
.contact-subtitle {
    font-size: 1rem;
    color: var(--text-dim);
    margin-bottom: 28px;
}
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}
.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(5, 8, 20, 0.9);
    border: 1px solid rgba(0, 170, 255, 0.15);
    border-radius: var(--radius);
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}
.contact-link:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 170, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.15);
    transform: translateX(4px);
}
.contact-link:active { transform: translateX(2px) scale(0.98); }
.contact-link svg {
    width: 20px;
    height: 20px;
    color: var(--neon-cyan);
    flex-shrink: 0;
}
.contact-footer {
    margin-top: 16px;
}
.contact-footer p {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: rgba(0, 170, 255, 0.3);
    letter-spacing: 1px;
}

/* ═══════════════════════════════════════════════════════════════════
   PROJECTS SECTION (2D Fallback)
   ═══════════════════════════════════════════════════════════════════ */
.projects-section {
    display: none;
    position: relative;
    z-index: 10;
    padding: 0 20px 40px;
}
.projects-section h2 { margin: 32px 0 24px; font-size: 1rem; }
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.project-card {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(0, 204, 102, 0.15);
    box-shadow: 0 2px 15px rgba(0, 204, 102, 0.05);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 8px 35px rgba(0, 204, 102, 0.15);
    border-color: var(--neon-green);
}
.project-card:active { transform: translateY(-2px) scale(1.01); }
.project-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.project-card .card-content { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.project-card h3 { font-size: 0.72rem; margin: 0; text-align: left; }
.project-card .subtitle { font-size: 0.88rem; line-height: 1.5; color: var(--text-dim); margin: 0; text-align: left; flex: 1; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(25px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════════════════════════
   CINEMATIC MODAL
   ═══════════════════════════════════════════════════════════════════ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}
.modal.active { display: flex; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Cinematic slide-in panel */
.modal-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 700px;
    height: 100%;
    background: rgba(5, 5, 16, 0.98);
    border-left: 1px solid rgba(0, 204, 102, 0.2);
    box-shadow: -10px 0 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 204, 102, 0.05);
    z-index: 2;
    animation: modalSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
}
@keyframes modalSlideIn {
    0%   { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 204, 102, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
    color: var(--neon-green);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.modal-close:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 16px var(--neon-green);
}

.modal-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--neon-green) transparent;
}
.modal-scroll::-webkit-scrollbar { width: 4px; }
.modal-scroll::-webkit-scrollbar-track { background: transparent; }
.modal-scroll::-webkit-scrollbar-thumb { background: var(--neon-green); border-radius: 2px; }

/* Counter / Nav bar */
.modal-counter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 204, 102, 0.1);
}
.modal-counter {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    color: rgba(0, 204, 102, 0.5);
    letter-spacing: 2px;
}
.modal-nav-btn {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0, 204, 102, 0.3);
    border-radius: 50%;
    background: transparent;
    color: var(--neon-green);
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-nav-btn:hover {
    background: rgba(0, 204, 102, 0.15);
    box-shadow: 0 0 10px rgba(0, 204, 102, 0.3);
}
.modal-nav-btn:active { transform: scale(0.9); }

.modal-scroll img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 20px;
    display: block;
    border: 1px solid rgba(0, 204, 102, 0.15);
}
.modal-scroll h2 {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--neon-green);
    margin-bottom: 10px;
}

/* Genre/platform tags */
.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.modal-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    padding: 4px 10px;
    border: 1px solid rgba(0, 170, 255, 0.25);
    border-radius: 3px;
    color: var(--neon-cyan);
    background: rgba(0, 170, 255, 0.05);
}

.modal-scroll p {
    text-align: left;
    line-height: 1.7;
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 16px;
}
.modal-about-text {
    color: var(--text-primary) !important;
    line-height: 1.8 !important;
}

/* Detail rows — 3 columns on desktop */
.modal-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
    padding: 16px;
    background: rgba(0, 204, 102, 0.02);
    border: 1px solid rgba(0, 204, 102, 0.08);
    border-radius: var(--radius);
}
.modal-detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.detail-label {
    font-family: 'Press Start 2P', sans-serif;
    font-size: 0.35rem;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.detail-value {
    font-family: 'Play', sans-serif;
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* Modal footer CTA */
.modal-footer {
    padding: 20px 0 8px;
    text-align: center;
    border-top: 1px solid rgba(0, 204, 102, 0.15);
    margin-top: 16px;
}
.modal-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-accent);
    color: #000;
    padding: 14px 32px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    font-family: 'Press Start 2P', sans-serif;
    font-size: 0.5rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}
.modal-link:hover {
    box-shadow: 0 0 25px rgba(0, 204, 102, 0.5), 0 0 50px rgba(0, 170, 255, 0.2);
    transform: translateY(-2px);
}
.modal-link:active { transform: translateY(0) scale(0.97); }
.modal-link svg { width: 16px; height: 16px; }

/* Modal video 16:9 */
.modal-video .video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin-bottom: 20px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 204, 102, 0.15);
}
.modal-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ─── Project Navigator — Sticky Bottom Bar ───────────────────────── */
#project-navigator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 20;
    display: flex;
    align-items: stretch;
    gap: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    background: rgba(0, 5, 0, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 204, 102, 0.2);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 204, 102, 0.06);
}
#project-navigator.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.proj-arrow {
    width: 48px;
    border: none;
    background: transparent;
    color: var(--neon-green);
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    border-right: 1px solid rgba(0, 255, 65, 0.1);
}
.proj-arrow:last-child { border-right: none; border-left: 1px solid rgba(0, 255, 65, 0.1); }
.proj-arrow:hover { background: rgba(0, 255, 65, 0.08); }
.proj-arrow:active { background: rgba(0, 255, 65, 0.15); transform: scale(0.95); }

.proj-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    flex: 1;
    min-width: 0;
    gap: 2px;
}
.proj-name {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.4rem;
    color: var(--neon-green);
    text-shadow: 0 0 6px var(--text-glow);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.proj-counter {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    color: rgba(0, 255, 65, 0.4);
    letter-spacing: 2px;
    white-space: nowrap;
}

.proj-cta-btn {
    font-family: 'Press Start 2P', sans-serif;
    font-size: 0.38rem;
    padding: 0 18px;
    border: none;
    border-left: 1px solid rgba(0, 255, 65, 0.1);
    background: rgba(0, 255, 65, 0.06);
    color: var(--neon-green);
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 1px;
    -webkit-tap-highlight-color: transparent;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}
.proj-cta-btn:hover { background: var(--neon-green); color: #000; box-shadow: 0 0 16px var(--neon-green); }
.proj-cta-btn:active { transform: scale(0.95); }
.proj-info-btn { background: transparent; border-left: 1px solid rgba(0, 255, 65, 0.1); border-right: 1px solid rgba(0, 255, 65, 0.1); }
.proj-play-btn { background: rgba(0, 170, 255, 0.1); color: var(--neon-cyan); }
.proj-play-btn:hover { background: var(--neon-cyan); color: #000; box-shadow: 0 0 16px var(--neon-cyan); }

/* ─── Cookie Consent — Post-load bottom banner ────────────────────── */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    padding: 16px 24px;
    background: rgba(5, 5, 16, 0.95);
    border-top: 1px solid rgba(0, 204, 102, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}
#cookie-banner.visible { transform: translateY(0); }
#cookie-banner.hidden { transform: translateY(100%); }

.cookie-text {
    font-family: 'Play', sans-serif;
    font-size: 0.85rem;
    color: var(--text-dim);
    max-width: 500px;
    text-align: left;
}
.cookie-btn {
    font-family: 'Press Start 2P', sans-serif;
    font-size: 0.4rem;
    padding: 10px 20px;
    border: 1px solid;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 1px;
}
.cookie-accept {
    background: rgba(0, 204, 102, 0.15);
    border-color: var(--neon-green);
    color: var(--neon-green);
}
.cookie-accept:hover { background: var(--neon-green); color: #000; box-shadow: 0 0 12px var(--neon-green); }
.cookie-deny {
    background: transparent;
    border-color: rgba(255, 80, 80, 0.3);
    color: rgba(255, 80, 80, 0.6);
}
.cookie-deny:hover { background: rgba(255, 80, 80, 0.15); color: #ff5050; }

/* ─── Glitch Effect on Headings ───────────────────────────────────── */
@keyframes textGlitch {
    0%, 92%, 100% { transform: none; text-shadow: 0 0 8px var(--text-glow); }
    93% { transform: translateX(-3px) skewX(-2deg); text-shadow: -2px 0 #ff0040, 2px 0 var(--neon-cyan); }
    94% { transform: translateX(2px) skewX(1deg); text-shadow: 2px 0 #ff0040, -2px 0 var(--neon-cyan); }
    95% { transform: translateX(-1px); text-shadow: -1px 0 #ff0040, 1px 0 var(--neon-cyan); }
    96% { transform: none; text-shadow: 0 0 8px var(--text-glow); }
}

/* ─── Keyframes ───────────────────────────────────────────────────── */
@keyframes fadeInUp {
    0%   { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (≤ 768px)
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .nav-dots-row { gap: 8px; padding: 6px 10px; }
    .nav-dot { padding: 6px 8px; }
    .nav-label { font-size: 0.35rem; letter-spacing: 1px; }

    #scroll-hint { bottom: 40px; }
    .scroll-hint-mouse { display: none; }

    #project-navigator {
        bottom: 12px;
        width: calc(100% - 24px);
        max-width: 400px;
    }
    .proj-arrow { width: 50px; min-height: 50px; font-size: 1.8rem; }
    .proj-counter { font-size: 0.4rem; }
    .proj-cta-btn { font-size: 0.34rem; padding: 0 14px; }

    .hero-name { font-size: 0.9rem; letter-spacing: 2px; }
    .hero-role { font-size: 1rem; }
    .hero-tagline { font-size: 0.75rem; }

    .about-container { width: 94%; padding: 22px 18px; max-height: calc(100vh - 70px); }
    .about-status { flex-direction: column; gap: 4px; align-items: center; }

    /* Modal — full screen on tablet */
    .modal-panel { max-width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile (≤ 480px)
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    body::before { display: none; } /* disable scanline overlay on mobile */

    .hero-portrait { width: 100px; height: 100px; }
    .hero-name { font-size: 0.7rem; letter-spacing: 1px; }
    .hero-role { font-size: 0.9rem; }
    .hero-tagline { font-size: 0.7rem; }
    .hero-cta { flex-direction: column; gap: 10px; width: 100%; max-width: 260px; }
    .btn-primary, .btn-secondary { width: 100%; text-align: center; padding: 12px 20px; }
    .hero-social a { width: 38px; height: 38px; }

    .about-container {
        width: 96%;
        padding: 16px 14px;
        max-height: calc(100vh - 80px);
    }
    .about-header h2 { font-size: 0.7rem; }
    .about-bio p { font-size: 0.88rem; }
    .skill-pill { font-size: 0.72rem; padding: 5px 10px; }
    .timeline-date { font-size: 0.4rem; }
    .timeline-role { font-size: 0.85rem; }
    .about-status { font-size: 0.5rem; }
    .terminal-tag { font-size: 0.5rem; }

    .contact-container { padding: 20px 16px; }
    .contact-container h2 { font-size: 0.65rem; }
    .contact-link { padding: 12px 16px; font-size: 0.78rem; }

    /* Modal — slide from bottom on mobile */
    .modal-panel {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 90vh;
        border-left: none;
        border-top: 1px solid rgba(0, 204, 102, 0.2);
        border-radius: 12px 12px 0 0;
        animation: modalSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    }
    @keyframes modalSlideUp {
        0%   { transform: translateY(100%); opacity: 0; }
        100% { transform: translateY(0); opacity: 1; }
    }
    .modal-scroll { padding: 16px; }
    .modal-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }
    .modal-details { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px; }
    .detail-label { font-size: 0.3rem; }
    .detail-value { font-size: 0.78rem; }

    /* Replace backdrop-filter with solid bg on mobile for perf */
    .nav-dots-row {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(0, 5, 0, 0.95);
    }
    #project-navigator {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(0, 5, 0, 0.95);
    }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — Small phones (≤ 360px)
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {
    .hero-portrait { width: 80px; height: 80px; }
    .hero-name { font-size: 0.6rem; }
    .hero-social a { width: 34px; height: 34px; }

    .about-container { padding: 14px 12px; }

    .nav-dots-row { gap: 4px; padding: 4px 6px; }
    .nav-dot { padding: 4px 6px; }
    .nav-label { font-size: 0.3rem; }
}

/* ─── Safe area for notched devices ───────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    #project-navigator { padding-bottom: env(safe-area-inset-bottom); }
    #cookie-banner { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
    .contact-footer { padding-bottom: env(safe-area-inset-bottom); }
}

/* ─── Reduced Motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
