/* --- DESIGN TOKENS --- */
:root {
    --bg: #030508;
    --neon: #00ff88;
    --neon-rgb: 0, 255, 136;
    --neon-dim: rgba(0, 255, 136, 0.15);
    --neon-glow: 0 0 10px rgba(0,255,136,0.4), 0 0 20px rgba(0,255,136,0.2);
    --text: #f0f4f8;
    --text-muted: #8b9eb0;
    --surface: #0f0f0f;
    --border: #1a1a1a;
    --white-hi: rgba(255, 255, 255, 0.08);

    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --font-display: 'Orbitron', sans-serif;

    --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition: 0.3s var(--ease);
}

/* --- RESET --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
    scrollbar-width: thin;
    scrollbar-color: var(--neon-dim) #000;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: var(--neon); border-radius: 3px; }
::selection { background: var(--neon); color: #000; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: default;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }

/* --- UTILITIES --- */
.typewriter-font { font-family: var(--font-mono); }
.text-muted { color: var(--text-muted); }
.neon-text { color: var(--neon); }

/* --- BACKGROUND LAYERS --- */
#bg-canvas {
    position: fixed; inset: 0; z-index: 0;
    pointer-events: none;
}

.bg-grid {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(var(--neon-rgb),0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--neon-rgb),0.06) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-shift 25s linear infinite;
    will-change: background-position;
}
@keyframes grid-shift { to { background-position: 50px 50px; } }

.bg-aurora {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.07;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, var(--neon), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(var(--neon-rgb),0.3), transparent),
        radial-gradient(ellipse 40% 30% at 20% 50%, rgba(var(--neon-rgb),0.15), transparent);
    animation: aurora 10s ease-in-out infinite alternate;
    will-change: opacity, transform;
}
@keyframes aurora {
    from { opacity: 0.05; transform: scale(1); }
    to   { opacity: 0.10; transform: scale(1.08); }
}

/* --- CRT SCANLINE OVERLAY --- */
.scanline-overlay {
    position: fixed; inset: 0; z-index: 2; pointer-events: none;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 2px,
        rgba(0, 0, 0, 0.03) 2px, rgba(0, 0, 0, 0.03) 4px
    );
}

/* --- PRELOADER --- */
#preloader {
    position: fixed; inset: 0; background: #000; z-index: 10000;
    display: flex; padding: 2rem;
    font-family: var(--font-mono); color: var(--neon);
    font-size: 0.95rem; overflow: hidden;
    transition: opacity 0.6s ease;
}
.terminal-boot { line-height: 1.5; white-space: pre-wrap; }

/* --- NAVIGATION — Centered Links --- */
#navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 0 2rem; height: 60px;
    display: flex; align-items: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
#navbar.scrolled {
    background: rgba(0, 0, 0, 0.92);
    box-shadow: 0 2px 30px rgba(var(--neon-rgb), 0.05);
}
.nav-logo {
    font-family: var(--font-mono); font-weight: 700; font-size: 1.1rem;
    color: var(--neon); text-shadow: var(--neon-glow); text-decoration: none;
    flex-shrink: 0;
}
.nav-logo .cursor-blink { animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.nav-links {
    display: flex; gap: 1.8rem; list-style: none;
    position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-links a {
    color: var(--text-muted); text-decoration: none;
    font-size: .85rem; font-weight: 500; letter-spacing: .5px;
    text-transform: uppercase; transition: var(--transition); position: relative;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 1.5px;
    background: var(--neon); box-shadow: var(--neon-glow);
    transition: width .3s ease;
}
.nav-links a:hover { color: var(--neon); text-shadow: 0 0 8px rgba(var(--neon-rgb),0.3); }
.nav-links a:hover::after { width: 100%; }

.nav-controls {
    display: flex; gap: 0.5rem; align-items: center; margin-left: auto;
}
.nav-ctrl-btn {
    width: 34px; height: 34px; border-radius: 8px;
    background: transparent; border: 1px solid var(--border);
    color: var(--text-muted); font-size: 1.1rem;
    cursor: pointer; transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.nav-ctrl-btn:hover {
    color: var(--neon); border-color: var(--neon);
    box-shadow: 0 0 10px var(--neon-dim);
}
.nav-ctrl-btn.active {
    color: var(--neon); border-color: rgba(var(--neon-rgb),0.3);
}
.theme-tooltip {
    position: absolute; top: calc(100% + 8px); left: 50%;
    transform: translateX(-50%) scale(0.9); opacity: 0;
    background: var(--surface); border: 1px solid var(--border);
    padding: 4px 10px; border-radius: 6px;
    font-family: var(--font-mono); font-size: 0.65rem;
    color: var(--neon); white-space: nowrap;
    pointer-events: none; transition: opacity 0.3s, transform 0.3s;
    z-index: 9999;
}
.theme-tooltip.show { opacity: 1; transform: translateX(-50%) scale(1); }

.hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
    width: 22px; height: 2px; background: var(--neon);
    transition: var(--transition); border-radius: 2px;
}

/* --- LAYOUT --- */
.container {
    max-width: 1100px; margin: 0 auto;
    position: relative; z-index: 1; padding: 0 1.5rem;
}
.section { padding: 8rem 0 4rem; }

.section.reveal {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s var(--ease);
}
.section.reveal.visible { opacity: 1; transform: translateY(0); }

.section-title { font-size: 2rem; font-weight: 700; letter-spacing: -1px; color: #fff; }
.section-tag {
    font-family: var(--font-mono); font-size: 0.75rem; color: var(--neon);
    letter-spacing: 3px; text-transform: uppercase; margin-bottom: 0.6rem;
    text-shadow: 0 0 10px rgba(var(--neon-rgb),0.2);
}
.section-header { text-align: center; margin-bottom: 3rem; }
.section-line {
    width: 50px; height: 2px; background: var(--neon);
    margin: 1rem auto 0; box-shadow: var(--neon-glow); border-radius: 2px;
    animation: section-line-pulse 3s ease-in-out infinite;
}
@keyframes section-line-pulse {
    0%, 100% { width: 50px; opacity: 0.8; }
    50%      { width: 70px; opacity: 1; }
}

/* --- HERO --- */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    justify-content: center; padding-top: 5rem;
    position: relative; overflow: visible;
}
.hero-content {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; max-width: 800px; z-index: 4; position: relative;
}

/* ============================================================
   DUAL CCTV ASSEMBLIES — No laser, theme-aware blinking glow
   ============================================================ */
.cctv-assembly {
    position: absolute; top: 60px; z-index: 5;
    display: flex; flex-direction: column; align-items: center;
    --cctv-scale: 0.45;
    transform: scale(var(--cctv-scale));
    filter: drop-shadow(0 8px 25px rgba(0,0,0,0.8));
}
.cctv-left {
    left: 1%; transform-origin: top left;
    transform: scale(var(--cctv-scale));
}
.cctv-right {
    left: auto; right: 1%; transform-origin: top right;
    transform: scale(var(--cctv-scale)) scaleX(-1);
}

.cctv-mount {
    width: 60px; height: 14px;
    background: linear-gradient(to bottom, #555, #222);
    border-radius: 6px;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.15),
        inset 0 -2px 5px rgba(0,0,0,0.8), 0 5px 15px rgba(0,0,0,0.8);
    position: relative;
}
.cctv-mount::before, .cctv-mount::after {
    content: ''; position: absolute; top: 50%; transform: translateY(-50%);
    width: 4px; height: 4px; border-radius: 50%;
    background: radial-gradient(circle, #666, #222);
    box-shadow: inset 0 0 1px rgba(255,255,255,0.3);
}
.cctv-mount::before { left: 8px; }
.cctv-mount::after { right: 8px; }

.cctv-arm {
    width: 8px; height: 40px;
    background: linear-gradient(to right, #111, #3a3a3a, #111);
    position: relative;
}
.cctv-arm::after {
    content: ''; position: absolute; bottom: -4px; left: 50%;
    transform: translateX(-50%);
    width: 14px; height: 8px;
    background: radial-gradient(circle, #444, #111);
    border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.cctv-body {
    width: 90px; height: 45px;
    background: linear-gradient(to bottom, #3a3a3a 0%, #1a1a1a 30%, #0a0a0a 100%);
    border-radius: 22px;
    box-shadow: inset 0 2px 5px rgba(255,255,255,0.12),
        inset 0 -4px 10px rgba(0,0,0,0.9),
        0 10px 30px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.6);
    position: relative; transform-origin: top center;
    will-change: transform;
}
.cctv-body::before {
    content: ''; position: absolute; top: 6px; left: 12px; right: 30px; height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.08), transparent);
}
.cctv-body::after {
    content: ''; position: absolute; bottom: 6px; left: 15px;
    width: 30px; height: 6px;
    background: repeating-linear-gradient(90deg,
        rgba(0,0,0,0.5) 0px, rgba(0,0,0,0.5) 2px,
        rgba(40,40,40,0.5) 2px, rgba(40,40,40,0.5) 4px);
    border-radius: 1px;
}

.cctv-left .cctv-body  { animation: cctv-pan 8s ease-in-out infinite alternate; }
.cctv-right .cctv-body { animation: cctv-pan 11s ease-in-out infinite alternate; }

@keyframes cctv-pan {
    0%, 10%  { transform: rotate(-35deg); }
    90%, 100% { transform: rotate(35deg); }
}

.cctv-lens {
    width: 28px; height: 28px;
    background: radial-gradient(circle at 35% 35%, #555, #111 50%, #000 80%);
    border-radius: 50%; position: absolute; right: 4px; top: 8px;
    border: 3px solid #2a2a2a;
    box-shadow: inset 0 0 12px #000, inset 0 0 4px rgba(255,255,255,0.05),
        0 0 8px rgba(0,0,0,0.6);
    overflow: hidden;
}
.cctv-lens::before {
    content: ''; position: absolute; top: 3px; left: 4px;
    width: 6px; height: 6px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.25), transparent);
}
.cctv-lens::after {
    content: ''; position: absolute; inset: 2px; border-radius: 50%;
    border: 1px solid rgba(80,80,80,0.5);
}

/* Blinking lens glow — theme aware */
.cctv-lens-glow {
    position: absolute; inset: 3px; border-radius: 50%;
    background: radial-gradient(circle, var(--neon), transparent 70%);
    opacity: 0; z-index: 2;
    animation: lens-blink 2.5s ease-in-out infinite;
    will-change: opacity;
}
@keyframes lens-blink {
    0%, 100% { opacity: 0.05; }
    30%      { opacity: 0.5; }
    50%      { opacity: 0.7; }
    70%      { opacity: 0.4; }
    85%      { opacity: 0.1; }
}

/* IR Sensor — theme aware */
.cctv-ir-sensor {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 5px; height: 5px; background: var(--neon); border-radius: 50%;
    box-shadow: 0 0 4px var(--neon), 0 0 8px rgba(var(--neon-rgb),0.3);
    animation: ir-pulse 2s ease-in-out infinite;
}
@keyframes ir-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--neon), 0 0 8px rgba(var(--neon-rgb),0.3); }
    50%      { opacity: 0.5; box-shadow: 0 0 2px var(--neon); }
}

/* Status LED on mount — already theme aware */
.cctv-status-led {
    position: absolute; top: -2px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px; background: var(--neon); border-radius: 50%;
    box-shadow: 0 0 6px var(--neon), 0 0 12px rgba(var(--neon-rgb),0.3);
    animation: led-blink 3s ease-in-out infinite;
}
@keyframes led-blink {
    0%, 40%, 100% { opacity: 1; }
    45%, 55%      { opacity: 0.2; }
    60%           { opacity: 1; }
}

/* --- HERO BADGE — Interactive Enhanced --- */
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; border-radius: 50px;
    font-family: var(--font-mono); font-size: 0.75rem;
    color: var(--neon); margin-bottom: 1.5rem;
    background: rgba(10,14,18,0.6); backdrop-filter: blur(8px);
    border: 1px solid rgba(var(--neon-rgb),0.25);
    position: relative; overflow: hidden;
    animation: badge-border-glow 3s ease-in-out infinite;
    cursor: default;
}
@keyframes badge-border-glow {
    0%, 100% { border-color: rgba(var(--neon-rgb),0.2); box-shadow: 0 0 8px rgba(var(--neon-rgb),0.05); }
    50%      { border-color: rgba(var(--neon-rgb),0.5); box-shadow: 0 0 20px rgba(var(--neon-rgb),0.15); }
}
.hero-badge .dot {
    width: 6px; height: 6px; background: var(--neon); border-radius: 50%;
    box-shadow: 0 0 6px var(--neon); animation: pulse-dot 2s infinite;
    flex-shrink: 0;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.badge-text { letter-spacing: 1px; }
.badge-glitch {
    animation: badge-glitch-fx 0.15s steps(1) forwards;
}
@keyframes badge-glitch-fx {
    0%   { opacity: 1; transform: translateX(0); }
    25%  { opacity: 0.7; transform: translateX(-3px) skewX(5deg); }
    50%  { opacity: 0.5; transform: translateX(2px) skewX(-3deg); }
    75%  { opacity: 0.9; transform: translateX(-1px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* Scan line across badge */
.badge-scan-line {
    position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--neon-rgb),0.15), transparent);
    animation: badge-scan 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes badge-scan {
    0%, 70%  { left: -100%; }
    100%     { left: 200%; }
}

/* --- HERO NAME --- */
.hero-name-wrap {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 900; line-height: 1.1; color: #fff;
    margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: 2px;
    justify-content: center; min-height: 1.2em;
}
.letter {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), color 0.3s, text-shadow 0.3s;
    will-change: transform; cursor: default;
}
.letter.space { width: 25px; }

/* Bruteforce lock flash */
.letter-locked {
    color: var(--neon) !important;
    text-shadow: 0 0 15px var(--neon), 0 0 30px rgba(var(--neon-rgb),0.4) !important;
}

/* Wave animation — very subtle float */
.letter-wave {
    animation: letterWave 4s ease-in-out infinite;
}
@keyframes letterWave {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}

/* Glitch on hover */
.letter-glitch {
    text-shadow: -2px 0 rgba(255,0,64,0.7), 2px 0 rgba(0,255,255,0.7) !important;
    animation: letterGlitchShake 0.08s steps(1) infinite;
}
@keyframes letterGlitchShake {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-1px, 1px); }
    50%  { transform: translate(1px, -1px); }
    75%  { transform: translate(-1px, -1px); }
    100% { transform: translate(1px, 1px); }
}

/* Tiny particle trail */
.name-particle {
    position: fixed; width: 3px; height: 3px;
    border-radius: 50%; background: var(--neon);
    pointer-events: none; z-index: 1000;
    animation: particleFade 0.6s ease-out forwards;
    will-change: transform, opacity;
}
@keyframes particleFade {
    0%   { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(0) translateY(-8px); opacity: 0; }
}

/* Neon underline */
.hero-name-underline{height:3px;background:linear-gradient(90deg,transparent,var(--neon),transparent);border-radius:2px;box-shadow:var(--neon-glow);margin:0 auto;width:0;animation:line-expand 1s 1.5s forwards cubic-bezier(0.4,0,0.2,1)}
@keyframes line-expand{to{width:80%}}

/* Subtitle */
.hero-subtitle{font-family:var(--font-mono);font-size:0.8rem;color:var(--text-muted);letter-spacing:6px;text-transform:uppercase;margin-top:0.6rem;opacity:0;animation:fade-up 0.6s 1.8s forwards; transform:translateY(10px);}
@keyframes fade-up{to{opacity:1;transform:translateY(0)}}

.hero-tagline{font-family:var(--font-mono);font-size:clamp(0.85rem,2vw,1.05rem);color:var(--text-muted);margin-bottom:3rem;margin-top:1.5rem;line-height:1.7}
.hero-tagline .typed-text{color:var(--neon);border-right:2px solid var(--neon);padding-right:4px;animation:blink 0.8s step-end infinite}

/* Name Seq Glow */
.name-glow-seq {
    color: var(--seq-color, var(--neon)) !important;
    text-shadow: 0 0 10px var(--seq-color, var(--neon)), 0 0 30px var(--seq-color, var(--neon)) !important;
    transform: scale(1.1) translateY(-2px);
    z-index: 10;
    transition: color 0.5s ease, text-shadow 0.5s ease, transform 0.5s ease;
}

/* --- ACTION BUTTONS --- */
.action-buttons {
    display: flex; gap: 1.5rem; flex-wrap: wrap;
    margin-bottom: 3rem; justify-content: center;
}
.cyber-btn {
    font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600;
    padding: 14px 28px; border-radius: 4px; text-decoration: none;
    display: inline-flex; align-items: center; gap: 10px;
    transition: var(--transition); letter-spacing: 1px;
    position: relative; overflow: hidden; z-index: 1;
}
.cyber-btn::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1), transparent);
    opacity: 0; transition: opacity 0.3s;
}
.cyber-btn:hover::before { opacity: 1; }
.cyber-btn.primary {
    background: transparent; color: var(--neon);
    border: 1px solid var(--neon); box-shadow: inset 0 0 10px var(--neon-dim);
}
.cyber-btn.primary:hover {
    background: var(--neon); color: #000;
    box-shadow: var(--neon-glow); transform: translateY(-2px);
}
.cyber-btn.secondary {
    background: transparent; color: var(--text);
    border: 1px solid var(--white-hi);
}
.cyber-btn.secondary:hover {
    border-color: #fff; box-shadow: 0 0 15px rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* --- HERO STATS --- */
.hero-stats {
    display: flex; gap: 3rem;
    border-top: 1px solid var(--white-hi); padding-top: 2rem;
}
.stat-num {
    font-family: var(--font-mono); font-size: 2rem; font-weight: 700;
    color: var(--neon);
}
.stat-num.glow-text { text-shadow: var(--neon-glow); }
.stat-label {
    font-size: 0.75rem; text-transform: uppercase;
    color: var(--text-muted); letter-spacing: 1px;
}
/* Gentle pulse after counting */
.stat-num.counted {
    animation: statPulse 3s ease-in-out infinite;
}
@keyframes statPulse {
    0%, 100% { text-shadow: var(--neon-glow); }
    50%      { text-shadow: 0 0 15px var(--neon), 0 0 30px rgba(var(--neon-rgb),0.3); }
}

/* --- CARDS (Base system) — theme-aware --- */
.base-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px; padding: 2rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative; overflow: hidden;
}
.base-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--neon-rgb), 0.6);
    box-shadow:
        0 10px 30px rgba(var(--neon-rgb), 0.15),
        0 0 20px rgba(var(--neon-rgb), 0.2) inset;
}
.base-card::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle 250px at var(--mx, 50%) var(--my, 50%), rgba(var(--neon-rgb),0.12), transparent);
    opacity: 0; transition: opacity 0.3s; pointer-events: none;
    z-index: 0; mix-blend-mode: screen;
}
.base-card:hover::after { opacity: 1; }
.base-card > * { position: relative; z-index: 1; }

/* Idle border shimmer */
.base-card::before {
    content: ''; position: absolute; top: -1px; left: -100%;
    width: 50%; height: calc(100% + 2px);
    background: linear-gradient(90deg, transparent, rgba(var(--neon-rgb),0.08), transparent);
    animation: card-shimmer 6s ease-in-out infinite;
    pointer-events: none; z-index: 0;
}
@keyframes card-shimmer {
    0%, 60%  { left: -100%; }
    100%     { left: 200%; }
}

/* --- SKILLS --- */
.skills-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 1rem;
}
.skill-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 1.4rem 1rem; text-align: center;
    transition: var(--transition); cursor: default;
    position: relative; overflow: hidden;
}
.skill-card::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(var(--neon-rgb), 0.08), transparent 70%);
    opacity: 0; transition: opacity 0.4s ease;
}
.skill-card:hover {
    border-color: rgba(var(--neon-rgb), 0.3); transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(var(--neon-rgb), 0.12);
}
.skill-card:hover::before { opacity: 1; }

.tooltip { position: relative; }
.tooltip::after {
    content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%;
    transform: translateX(-50%) scale(0.9); background: var(--surface); color: var(--neon);
    font-family: var(--font-mono); font-size: 0.68rem; padding: 4px 10px; border-radius: 5px;
    border: 1px solid var(--border); white-space: nowrap; opacity: 0;
    pointer-events: none; transition: var(--transition); z-index: 10;
}
.tooltip:hover::after { opacity: 1; transform: translateX(-50%) scale(1); }

/* Real Icon Colors System */
.ph-globe-hemisphere-west.skill-icon { color: #00aaff; } /* Network */
.ph-shield-warning.skill-icon { color: #ffaa00; } /* Pentest */
.ph-file-code.skill-icon { color: #FFD43B; } /* Python */
.ph-linux-logo.skill-icon { color: #FCC624; } /* Linux */
.ph-shield-check.skill-icon { color: #00ff88; } /* SIEM */
.ph-bug.skill-icon { color: #ff3355; } /* OWASP */
.ph-cube.skill-icon { color: #a453ff; } /* Malware */
.ph-cloud-warning.skill-icon { color: #00d4ff; } /* Cloud */

.skill-icon {
    font-size: 1.8rem; margin-bottom: 0.6rem; display: block;
    filter: drop-shadow(0 0 4px rgba(var(--neon-rgb), 0.3)); transition: var(--transition);
}
.skill-card:hover .skill-icon { transform: scale(1.1); filter: drop-shadow(0 0 12px currentColor); }
.skill-name { font-size: 0.8rem; font-weight: 600; color: #fff; margin-bottom: 0.2rem; }
.skill-level { font-family: var(--font-mono); font-size: 0.65rem; color: var(--neon); }

/* --- PROJECTS --- */
.projects-grid { display: grid; gap: 1.5rem; }
.project-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    padding: 2rem; transition: transform 0.1s ease-out, box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative; overflow: hidden;
    display: flex; flex-direction: column;
    will-change: transform;
}
.project-card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon), transparent);
    opacity: 0; transition: opacity 0.4s ease;
}
.project-card:hover {
    border-color: rgba(var(--neon-rgb), 0.3); transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(var(--neon-rgb), 0.06);
}
.project-card:hover::after { opacity: 1; }
.project-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.project-icon {
    width: 44px; height: 44px; border-radius: 10px;
    background: rgba(var(--neon-rgb), 0.08); border: 1px solid rgba(var(--neon-rgb), 0.15);
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
    color: var(--neon); transition: var(--transition);
}
.project-card:hover .project-icon { box-shadow: 0 0 15px rgba(var(--neon-rgb), 0.3); transform: scale(1.05); }
.project-links { display: flex; gap: 0.6rem; }
.project-links a {
    color: var(--text-muted); font-size: 0.8rem; text-decoration: none;
    padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px;
    transition: var(--transition); font-family: var(--font-mono);
}
.project-links a:hover { color: var(--neon); border-color: var(--neon); }
.project-title { font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.project-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1.2rem; flex-grow: 1; }

/* --- TECH TAGS — theme-aware --- */
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
    font-family: var(--font-mono); font-size: 0.7rem; padding: 4px 10px; border-radius: 5px;
    background: rgba(var(--neon-rgb), 0.08); border: 1px solid rgba(var(--neon-rgb), 0.15);
    color: var(--neon); transition: var(--transition);
}
.tag:hover {
    background: rgba(var(--neon-rgb), 0.15); border-color: rgba(var(--neon-rgb), 0.4);
    box-shadow: 0 0 8px rgba(var(--neon-rgb), 0.15);
}

/* --- EDUCATION TIMELINE — with flow effect --- */
.edu-timeline { position: relative; padding-left: 2rem; }
.edu-timeline::before {
    content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px;
    background: linear-gradient(180deg, var(--neon), rgba(var(--neon-rgb), 0.3), transparent);
}
.edu-timeline::after {
    content: ''; position: absolute; left: 5px; top: 0; width: 4px; height: 40px;
    background: linear-gradient(to bottom, transparent, var(--neon), transparent);
    border-radius: 2px; filter: blur(2px); animation: timeline-flow 3.5s ease-in-out infinite;
}
@keyframes timeline-flow {
    0%   { transform: translateY(-40px); opacity: 0; }
    10%  { opacity: 0.8; }
    90%  { opacity: 0.8; }
    100% { transform: translateY(calc(100vh + 40px)); opacity: 0; }
}
.edu-item {
    position: relative; margin-bottom: 2rem; padding: 1.5rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    transition: transform 0.1s ease-out, box-shadow 0.4s ease, border-color 0.4s ease;
    will-change: transform;
}
.edu-item:hover {
    border-color: rgba(var(--neon-rgb), 0.3); box-shadow: 0 4px 20px rgba(var(--neon-rgb), 0.05);
}
.edu-item::before {
    content: ''; position: absolute; left: -2rem; top: 1.8rem; width: 14px; height: 14px;
    border-radius: 50%; background: var(--bg); border: 2px solid var(--neon);
    box-shadow: 0 0 8px rgba(var(--neon-rgb), 0.4); transform: translateX(calc(-50% + 7px));
    z-index: 2; animation: checkpoint-glow 3s ease-in-out infinite;
}
@keyframes checkpoint-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(var(--neon-rgb),0.4); transform: translateX(calc(-50% + 7px)) scale(1); }
    50%      { box-shadow: 0 0 16px var(--neon), 0 0 25px rgba(var(--neon-rgb),0.6); transform: translateX(calc(-50% + 7px)) scale(1.1); }
}

.edu-year {
    font-family: var(--font-mono); font-size: 0.72rem; color: var(--neon);
    letter-spacing: 1px; margin-bottom: 0.3rem; display: inline-block;
    padding: 0; background: transparent; border: none;
}
.edu-degree { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 0.2rem; }
.edu-school { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.edu-details { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; margin-top: 0.5rem;}

/* --- CONTACT --- */
.contact-wrapper {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 2rem; align-items: start;
}
.contact-info h3 {
    font-size: 1.5rem; font-weight: 700; color: #fff;
    margin-bottom: 1rem; line-height: 1.4;
}
.contact-info p {
    font-size: 0.95rem; color: var(--text-muted);
    line-height: 1.7; margin-bottom: 2rem;
}
.contact-links { display: flex; flex-direction: column; gap: 1rem; }
.contact-link {
    display: flex; align-items: center; gap: 12px;
    color: var(--text-muted); text-decoration: none;
    font-size: 0.95rem; transition: var(--transition);
    animation: contactFloat 4s ease-in-out infinite;
}
.contact-link:nth-child(2) { animation-delay: 0.5s; }
.contact-link:nth-child(3) { animation-delay: 1s; }
@keyframes contactFloat {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(4px); }
}
.contact-link:hover { color: var(--neon); }
.contact-link-icon {
    width: 40px; height: 40px; border-radius: 8px;
    background: var(--surface); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; transition: var(--transition);
}
.contact-link:hover .contact-link-icon {
    border-color: rgba(var(--neon-rgb), 0.4);
    box-shadow: 0 0 15px rgba(var(--neon-rgb), 0.15);
    color: var(--neon);
}

.contact-form { padding: 2rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block; font-size: 0.8rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 0.5rem;
}
.form-group input, .form-group textarea {
    width: 100%; padding: 14px; background: #080808;
    border: 1px solid #222; border-radius: 8px;
    color: #fff; font-family: var(--font-sans);
    font-size: 0.95rem; transition: var(--transition); outline: none;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--neon);
    box-shadow: 0 0 0 2px rgba(var(--neon-rgb), 0.15), 0 0 15px rgba(var(--neon-rgb), 0.08);
}
.form-group textarea { min-height: 120px; resize: vertical; }

.btn-submit {
    width: 100%; padding: 16px; background: var(--neon);
    color: #000; border: none; border-radius: 8px;
    font-size: 1rem; font-weight: 700; font-family: var(--font-sans);
    cursor: pointer; transition: var(--transition);
}
.btn-submit:hover {
    box-shadow: var(--neon-glow); transform: translateY(-2px);
}

.form-success { text-align: center; padding: 2rem; }
.form-success .check { font-size: 3rem; margin-bottom: 1rem; color: var(--neon); }
.form-success h4 { color: var(--neon); font-size: 1.2rem; margin-bottom: 0.5rem; }
.form-success p { color: var(--text-muted); font-size: 0.95rem; }

/* --- FOOTER --- */
footer.cyber-footer {
    text-align: center; padding: 2.5rem 1.5rem;
    border-top: 1px solid var(--border); background: transparent;
}
.social-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1.5rem; }
.social-link {
    width: 42px; height: 42px; border-radius: 10px;
    background: var(--surface); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); text-decoration: none;
    font-size: 1.4rem; transition: var(--transition);
    animation: socialBreathe 4s ease-in-out infinite;
}
.social-link:nth-child(2) { animation-delay: 0.4s; }
.social-link:nth-child(3) { animation-delay: 0.8s; }
.social-link:nth-child(4) { animation-delay: 1.2s; }
@keyframes socialBreathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}
.social-link:hover {
    color: var(--neon); border-color: var(--neon);
    box-shadow: 0 0 15px rgba(var(--neon-rgb), 0.2);
    transform: translateY(-3px) scale(1);
    animation: none;
}
.footer-text { font-family: var(--font-mono); font-size: .85rem; color: var(--text-muted); }
.footer-text .neon { color: var(--neon); }

/* --- HERO STAGGER ENTRANCE --- */
.hero-content > * {
    opacity: 0; transform: translateY(25px);
    transition: opacity 0.7s ease, transform 0.7s var(--ease);
}
.hero-content.hero-active > * { opacity: 1; transform: translateY(0); }
.hero-content.hero-active > :nth-child(1) { transition-delay: 0s; }
.hero-content.hero-active > :nth-child(2) { transition-delay: 0.15s; }
.hero-content.hero-active > :nth-child(3) { transition-delay: 0.3s; }
.hero-content.hero-active > :nth-child(4) { transition-delay: 0.45s; }
.hero-content.hero-active > :nth-child(5) { transition-delay: 0.6s; }

/* --- SKILL PROGRESS BARS --- */
.skill-progress {
    width: 100%; height: 3px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px; margin-top: 0.8rem; overflow: hidden;
}
.skill-progress-bar {
    height: 100%; width: 0;
    background: var(--neon); border-radius: 2px;
    box-shadow: 0 0 6px var(--neon-dim);
    transition: width 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.skill-progress-bar.filled { width: var(--target); }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .cctv-assembly { --cctv-scale: 0.35; top: 65px; }
    .cctv-left { transform: scale(0.35); }
    .cctv-right { transform: scale(0.35) scaleX(-1); }
}

@media (max-width: 900px) {
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-name-wrap { font-size: 3rem; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .cctv-assembly { --cctv-scale: 0.3; top: 62px; }
    .cctv-left { transform: scale(0.3); }
    .cctv-right { transform: scale(0.3) scaleX(-1); }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; position: absolute; left: 0; right: 0;
        top: 60px; transform: none;
        background: rgba(0, 0, 0, 0.95); backdrop-filter: blur(20px);
        padding: 1.5rem 2rem; gap: 1.2rem;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.open { display: flex; flex-direction: column; }
    .hamburger { display: flex; }
    .skills-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
    .hero-stats { flex-direction: column; gap: 1.5rem; }
    .hero-name-wrap { font-size: 2.5rem; }
    .action-buttons { flex-direction: column; align-items: center; }
    .cctv-assembly { --cctv-scale: 0.25; top: 60px; }
    .cctv-left { transform: scale(0.25); }
    .cctv-right { transform: scale(0.25) scaleX(-1); }
    section { padding: 4rem 0 2rem; }
}

@media (max-width: 480px) {
    .cctv-assembly { --cctv-scale: 0.2; top: 58px; }
    .cctv-left { transform: scale(0.2); }
    .cctv-right { transform: scale(0.2) scaleX(-1); }
    .hero-name-wrap { font-size: 2rem !important; }
    .hero-stats { flex-direction: column; gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .bg-grid, .bg-aurora, .scanline-overlay { animation: none; }
}
