/* style.css - Premium Space UI Design System */

/* ═══════════════════════════════════════════════════════════════════
   TOKENS & RESET
   ═══════════════════════════════════════════════════════════════════ */

html {
    overflow-x: hidden;
    max-width: 100%;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

html::-webkit-scrollbar {
    display: none;
    /* WebKit */
}

body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    display: none;
}

/* html/body scrollbar hiding in rules above — global * rules removed as redundant */

:root {
    --bg-darker: #050505;
    --bg-dark: #090909;
    --bg-deep: #1a1a2e;
    --accent-cyan: #00d1ff;
    --accent-cyan-rgb: 0, 209, 255;
    --accent-purple: #9d00ff;
    --accent-purple-rgb: 157, 0, 255;
    --accent-pink: #ff00d1;
    --accent-pink-rgb: 255, 0, 209;
    --accent-gold: #fde68a;
    --accent-gold-rgb: 253, 230, 138;
    --text-white: #ffffff;
    --text-gray: #b0b0b0;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(var(--accent-cyan-rgb), 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.7);

    --font-hero: "Orbitron", sans-serif;
    --font-main: "Inter", sans-serif;
    --font-mono: "Share Tech Mono", monospace;

    --transition-slow: 1.2s cubic-bezier(0.7, 0, 0.3, 1);
    --transition-med: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-white);
    overflow-x: hidden;
    height: 100vh;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════
   SPLASH / ENTRANCE
   ═══════════════════════════════════════════════════════════════════ */

/* --- Star Background Canvas --- */
#stars-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at center, #1a1a2e 0%, #050505 100%);
}

/* --- Loader --- */
#loader {
    display: none;
    /* Hide for now */
}

/* --- Splash Screen --- */
#splash {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Reveal effect via radial-gradient using CSS variables */
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            transparent 50px,
            #050505 350px);
    transition:
        opacity 1.2s ease,
        transform 1.2s ease;
}

#splash.fading {
    opacity: 0;
    pointer-events: none;
    transform: scale(2);
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    position: relative;
    z-index: 20;
}

.earth-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.earth-model {
    width: 250px;
    height: 250px;
    background-image: url("./earth.png");
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    box-shadow:
        inset 0 0 50px rgba(var(--accent-cyan-rgb), 0.5),
        0 0 100px rgba(var(--accent-cyan-rgb), 0.2);
    animation: rotateEarth 40s linear infinite;
    /* transition removed here - JS now handles all smooth physics */
    cursor: grab;
    user-select: none;
}

.earth-model:active {
    cursor: grabbing;
}

.earth-model.zooming {
    transform: scale(20) !important;
    /* !important — overrides JS-set inline transform from spring physics */
    transition: transform 1.5s cubic-bezier(0.7, 0, 0.3, 1);
}

/* A more dramatic planet model via CSS gradients if image fails */
.earth-model::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
            rgba(255, 255, 255, 0.1),
            transparent 60%);
    pointer-events: none;
}

@keyframes rotateEarth {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 500px 0;
    }
}

.earth-glow {
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle,
            rgba(var(--accent-cyan-rgb), 0.1) 0%,
            transparent 70%);
    border-radius: 50%;
    animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

.splash-title {
    font-family: var(--font-hero);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.2rem;
    max-width: 600px;
    color: var(--text-white);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.cta-btn {
    background: transparent;
    border: 1px solid var(--accent-cyan);
    padding: 1rem 2rem;
    color: var(--accent-cyan);
    font-family: var(--font-hero);
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    letter-spacing: 0.1rem;
}

.cta-btn:hover {
    background: rgba(var(--accent-cyan-rgb), 0.1);
    box-shadow: 0 0 30px rgba(var(--accent-cyan-rgb), 0.4);
    transform: translateY(-5px);
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle,
            rgba(var(--accent-cyan-rgb), 0.4) 0%,
            transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.cta-btn:hover .btn-glow {
    transform: translate(-50%, -50%) scale(1);
}

#mouse-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle,
            rgba(var(--accent-cyan-rgb), 0.05) 0%,
            transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    mix-blend-mode: screen;
}

/* --- Comet Trail Custom Cursor --- */
#cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

#cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan), 0 0 20px var(--accent-cyan);
    pointer-events: none;
    z-index: 9999;
    transform: translate3d(-100px, -100px, 0);
    transition: width 0.2s ease, height 0.2s ease, margin 0.2s ease,
        background 0.2s ease;
    will-change: transform;
}

#cursor-dot.cursor-hot {
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    background: var(--accent-gold);
    box-shadow: 0 0 14px var(--accent-gold), 0 0 28px var(--accent-gold);
}

/* Hide native cursor on pointer-fine devices; restore on touch */
@media (hover: hover) and (pointer: fine) {

    html,
    body,
    * {
        cursor: none !important;
    }
}

@media (hover: none),
(pointer: coarse) {
    #cursor-trail {
        display: none;
    }

    #cursor-dot {
        display: none;
    }
}

/* --- Atmospheric Entry Transition --- */
.entry-transition {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.entry-transition.active {
    opacity: 1;
    pointer-events: all;
}

/* Underlying page is blurred + scaled up as we "enter" the portal */
body.portal-entering #main-content,
body.portal-entering #splash {
    transform: scale(1.4);
    filter: blur(8px) brightness(0.6);
    transition: transform 1.1s cubic-bezier(0.7, 0, 0.3, 1),
        filter 1.1s cubic-bezier(0.7, 0, 0.3, 1);
}

.entry-portal-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 350px;
    height: 350px;
    border: 1px solid var(--accent-cyan);
    border-radius: 50%;
    box-shadow:
        0 0 50px var(--accent-cyan),
        inset 0 0 25px var(--accent-cyan);
    /* Starts large, collapses inward to a point (suck-in) */
    transform: translate(-50%, -50%) scale(2.4);
    opacity: 0;
    transition: transform 1.3s cubic-bezier(0.7, 0, 0.3, 1),
        opacity 0.5s ease;
}

.entry-transition.active .entry-portal-ring {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
    animation: portalCollapseRotate 1.3s cubic-bezier(0.7, 0, 0.3, 1) forwards;
}

@keyframes portalCollapseRotate {
    from {
        transform: translate(-50%, -50%) scale(2.4) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) scale(0) rotate(220deg);
    }
}

.entry-portal-content {
    text-align: center;
    color: var(--accent-cyan);
    z-index: 10;
    font-family: "Orbitron", sans-serif;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease 0.4s;
}

.entry-transition.active .entry-portal-content {
    transform: translateY(0);
    opacity: 1;
}

/* Typewriter caret for decryption text */
#transition-planet {
    position: relative;
    font-size: clamp(1.4rem, 4vw, 2.6rem);
    letter-spacing: 3px;
    min-height: 1.2em;
    text-shadow: 0 0 20px rgba(var(--accent-cyan-rgb), 0.5);
}

#transition-planet.typing::after {
    content: "_";
    position: absolute;
    margin-left: 2px;
    animation: caretBlink 0.8s steps(1) infinite;
}

@keyframes caretBlink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.entry-portal-content .status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(var(--accent-cyan-rgb), 0.1);
    border: 1px solid var(--accent-cyan);
    border-radius: 20px;
    font-size: 0.7rem;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

#transition-planet {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

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

@keyframes portalPulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ═══════════════════════════════════════════════════════════════════
   MAIN LAYOUT & NAVIGATION
   ═══════════════════════════════════════════════════════════════════ */

/* --- Main Content --- */
#main-content {
    display: none;
    opacity: 0;
    transition: opacity 1.5s ease;
}

#main-content.visible {
    display: block;
    opacity: 1;
}

/* --- Sidebar --- */
#sidebar {
    position: fixed;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    padding: 1.1rem 0.55rem;
    image-rendering: pixelated;
    background:
        rgba(5, 5, 10, 0.85);
    box-shadow:
        -3px 0 0 0 rgba(var(--accent-cyan-rgb), 0.15),
        3px 0 0 0 rgba(var(--accent-cyan-rgb), 0.15),
        0 -3px 0 0 rgba(var(--accent-cyan-rgb), 0.15),
        0 3px 0 0 rgba(var(--accent-cyan-rgb), 0.15),
        0 0 0 1px rgba(var(--accent-cyan-rgb), 0.08);
}

/* CRT scanline overlay + inset border across the whole sidebar */
#sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(var(--accent-cyan-rgb), 0.03), rgba(var(--accent-cyan-rgb), 0.03));
    box-shadow: inset 0 0 0 1px rgba(var(--accent-cyan-rgb), 0.06);
    pointer-events: none;
    z-index: 2;
    inset: 3px;
}

#sidebar::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    opacity: 0.15;
    box-shadow:
        0 calc(100% - 12px) 0 0 rgba(var(--accent-cyan-rgb), 0.15),
        calc(100% - 12px) 0 0 0 rgba(var(--accent-cyan-rgb), 0.15),
        calc(100% - 12px) calc(100% - 12px) 0 0 rgba(var(--accent-cyan-rgb), 0.15);
    pointer-events: none;
}

/* Pixel connector rail */
#sidebar .nav-icons::before {
    content: "";
    position: absolute;
    top: 2rem;
    bottom: 2rem;
    left: -10px;
    width: 2px;
    background: repeating-linear-gradient(to bottom,
            rgba(var(--accent-cyan-rgb), 0.08) 0px,
            rgba(var(--accent-cyan-rgb), 0.08) 2px,
            transparent 2px,
            transparent 6px);
    pointer-events: none;
}

/* ── ARCADE "INSERT COIN" LABEL ── */
.arcade-coin {
    margin-top: 1.1rem;
    font-family: var(--font-hero);
    font-size: 0.5rem;
    line-height: 1.5;
    letter-spacing: 1px;
    text-align: center;
    color: var(--accent-gold);
    text-shadow: 1px 1px 0 #05050a;
    image-rendering: pixelated;
    user-select: none;
    animation: coinHue 3s steps(1) infinite;
}

.arcade-coin .blink {
    color: var(--accent-cyan);
}

.arcade-coin .blink {
    animation: coinBlink 0.9s steps(1) infinite;
}

@keyframes coinBlink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

@keyframes coinHue {

    0%,
    100% {
        color: var(--accent-gold);
    }

    50% {
        color: #ffe27a;
    }
}

/* Animated pixel scan bar */
#sidebar .nav-icons::after {
    content: "";
    position: absolute;
    left: -11px;
    width: 4px;
    height: 4px;
    background: var(--accent-cyan);
    opacity: 0.3;
    animation: pixelScan 3s steps(12) infinite;
    pointer-events: none;
}

@keyframes pixelScan {
    0% {
        top: 2rem;
    }

    100% {
        top: calc(100% - 2rem - 4px);
    }
}

.nav-icons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* ── ARCADE GAME-PAD BUTTONS ── */
.nav-link {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.06s steps(1), filter 0.1s steps(1);
    color: var(--text-gray);
    text-decoration: none;
    position: relative;
    z-index: 3;
    background: #1a1a26;
    /* chunky pixel bezel (3D pressable button) */
    box-shadow:
        inset -3px -3px 0 0 rgba(0, 0, 0, 0.55),
        inset 3px 3px 0 0 rgba(255, 255, 255, 0.08),
        0 0 0 2px #05050a,
        0 0 0 4px rgba(var(--accent-cyan-rgb), 0.18);
    image-rendering: pixelated;
    filter: saturate(0.7);
}

.nav-link:hover {
    color: var(--accent-cyan);
    filter: saturate(1.1) brightness(1.15);
    background: #20203a;
    box-shadow:
        inset -3px -3px 0 0 rgba(0, 0, 0, 0.55),
        inset 3px 3px 0 0 rgba(255, 255, 255, 0.08),
        0 0 0 2px #05050a,
        0 0 0 4px var(--accent-cyan),
        0 0 12px rgba(var(--accent-cyan-rgb), 0.4);
}

.nav-link.active {
    color: var(--accent-cyan);
    background: #073b47;
    filter: saturate(1.2) brightness(0.95);
    transform: translateY(3px);
    box-shadow:
        inset 3px 3px 0 0 rgba(0, 0, 0, 0.35),
        inset -3px -3px 0 0 rgba(255, 255, 255, 0.25),
        0 0 0 2px #05050a,
        0 0 0 4px var(--accent-cyan),
        0 0 16px rgba(var(--accent-cyan-rgb), 0.6);
    animation: arcadeBlink 2.4s steps(1) infinite;
}

/* Corner pixel studs when active */
.nav-link.active::before {
    content: "";
    position: absolute;
    top: -4px;
    left: -4px;
    width: 5px;
    height: 5px;
    background: var(--accent-cyan);
    box-shadow:
        0 calc(100% + 3px) 0 0 var(--accent-cyan),
        calc(100% + 3px) 0 0 0 var(--accent-cyan),
        calc(100% + 3px) calc(100% + 3px) 0 0 var(--accent-cyan);
    opacity: 0.9;
    pointer-events: none;
}

.nav-link:active {
    transform: translateY(3px);
    box-shadow:
        inset 3px 3px 0 0 rgba(0, 0, 0, 0.4),
        inset -2px -2px 0 0 rgba(255, 255, 255, 0.2),
        0 0 0 2px #05050a,
        0 0 0 4px var(--accent-cyan);
}

@keyframes arcadeBlink {

    0%,
    60% {
        filter: saturate(1.2) brightness(1.1);
    }

    61%,
    100% {
        filter: saturate(1.2) brightness(1.45);
    }
}

.nav-tooltip {
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-hero);
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    background: rgba(5, 5, 10, 0.9);
    padding: 4px 8px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s steps(2);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.3);
    box-shadow:
        0 0 0 1px rgba(var(--accent-cyan-rgb), 0.1),
        inset 0 0 0 1px rgba(var(--accent-cyan-rgb), 0.1);
    image-rendering: pixelated;
}

.nav-link:hover .nav-tooltip,
.nav-link.active .nav-tooltip {
    animation: tooltipFadeOut 3.4s forwards ease-in-out;
}

.nav-link.active .nav-tooltip {
    border-color: var(--accent-cyan);
    box-shadow:
        0 0 0 1px var(--accent-cyan),
        inset 0 0 0 1px var(--accent-cyan),
        0 0 10px rgba(var(--accent-cyan-rgb), 0.2);
}

.nav-link.active .nav-tooltip::before {
    border-right-color: var(--accent-cyan);
}

@keyframes tooltipFadeOut {
    0% {
        opacity: 0;
    }

    12% {
        /* 0.4s delay before showing */
        opacity: 0;
    }

    20% {
        /* Fade in */
        opacity: 1;
    }

    91% {
        /* Stay fully visible for 3 seconds */
        opacity: 1;
    }

    100% {
        /* Smooth fade out */
        opacity: 0;
    }
}

.nav-tooltip::before {
    content: "";
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-right-color: rgba(var(--accent-cyan-rgb), 0.3);
}

.nav-tooltip::after {
    content: "";
    position: absolute;
    right: calc(100% + 1px);
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 4px solid transparent;
    border-right-color: rgba(5, 5, 10, 0.9);
}


@keyframes gravityFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

.nav-icon-img {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    display: block;
}

.nav-icon-lg {
    width: 34px;
    height: 34px;
}

.nav-icon-skills,
.nav-icon-about {
    width: 40px;
    height: 40px;
}

.nav-icon-svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* --- Layout --- */
.scroll-container {
    padding-left: 100px;
    scroll-behavior: smooth;
}

.panel {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition:
        opacity 1s ease,
        transform 1s ease;
}

.panel.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Typography & Elements --- */
.section-title {
    font-family: var(--font-hero);
    font-size: clamp(2rem, 8vw, 4rem);
    margin: 1rem 0;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--accent-cyan);
    text-shadow: 0 0 20px rgba(var(--accent-cyan-rgb), 0.4);
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    position: relative;
    font-weight: 900;
    transition: all 0.5s ease;
    text-align: center;
}

.title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 3rem;
}

/* Title sublines and bars removed per request */

.float-text {
    display: block;
    animation: floatZeroG 6s ease-in-out infinite alternate;
    transform-origin: center;
}

@keyframes floatZeroG {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(4px, -12px) rotate(0.4deg);
    }

    66% {
        transform: translate(-3px, -20px) rotate(-0.3deg);
    }

    100% {
        transform: translate(2px, -28px) rotate(0.6deg);
    }
}

.section-badge {
    text-transform: uppercase;
    color: var(--accent-cyan);
    letter-spacing: 0.3rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.hero-tagline {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 1.5rem auto;
    text-align: center;
}

.hero-tagline-sub {
    display: block;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════════ */

/* --- Hero Section --- */
.glitch {
    font-family: var(--font-hero);
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    position: relative;
    animation: zero-gravity 8s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(var(--accent-cyan-rgb), 0.2);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
}

.glitch::before {
    left: 1px;
    text-shadow:
        -1px 0 var(--accent-cyan),
        0 0 5px var(--accent-cyan);
    clip-path: inset(100% 0 0 0);
    animation: cosmic-float-glitch 6.3s infinite linear;
}

.glitch::after {
    left: -1px;
    text-shadow:
        1px 0 var(--accent-pink),
        0 0 5px var(--accent-pink);
    clip-path: inset(100% 0 0 0);
    animation: cosmic-float-glitch 5s infinite reverse linear;
}

@keyframes zero-gravity {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-8px) rotate(0.4deg);
    }

    50% {
        transform: translateY(-12px) rotate(-0.3deg);
    }

    75% {
        transform: translateY(-6px) rotate(0.2deg);
    }
}

@keyframes cosmic-float-glitch {

    0%,
    15%,
    21%,
    44%,
    51%,
    84%,
    91%,
    100% {
        clip-path: inset(100% 0 0 0);
        transform: translate(0);
        opacity: 0;
    }

    16%,
    20% {
        clip-path: inset(20% 0 65% 0);
        transform: translate(-5px, 1px);
        opacity: 0.7;
    }

    45%,
    50% {
        clip-path: inset(65% 0 15% 0);
        transform: translate(5px, -1px);
        opacity: 0.7;
    }

    85%,
    90% {
        clip-path: inset(40% 0 45% 0);
        transform: translate(-5px, 1px);
        opacity: 0.7;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════════════════════════════ */

/* --- Cards --- */
.about-module {
    display: flex;
    align-items: center;
    gap: 4rem;
    width: 100%;
    max-width: 1250px;
    position: relative;
}

/* --- Cyber Torch & Revealer --- */
.torch-pedestal {
    flex-shrink: 0;
    width: 250px;
    height: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    z-index: 1000;
}

.cyber-torch {
    width: 50px;
    height: 200px;
    position: relative;
    cursor: grab;
    user-select: none;
    touch-action: none;
    pointer-events: all;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1001;
    /* Add slight 3D tilt */
    transform-style: preserve-3d;
    perspective: 600px;
    /* Floating animation - only runs when NOT grabbed */
    animation: zeroGravity 5s ease-in-out infinite alternate;
}

.cyber-torch.is-grabbed {
    animation: none;
}

@keyframes zeroGravity {
    0% {
        transform: translate(0, 0) rotate(0deg) rotateX(0deg);
    }

    50% {
        transform: translate(2px, -15px) rotate(1deg) rotateX(5deg);
    }

    100% {
        transform: translate(-2px, -30px) rotate(-1deg) rotateX(-5deg);
    }
}

.cyber-torch:active {
    transform: scale(1.05) rotateX(10deg);
}

.torch-handle {
    width: 16px;
    height: 90px;
    /* Cylindrical lighting: Dark -> Light -> Dark */
    background: linear-gradient(90deg,
            #111 0%,
            #444 35%,
            #555 50%,
            #444 65%,
            #111 100%);
    margin: 0 auto;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 1px solid rgba(0, 0, 0, 0.5);
    position: relative;
    top: 70px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
}

.handle-base {
    width: 100%;
    height: 6px;
    background: #0a0a0a;
    position: absolute;
    bottom: -3px;
    border-radius: 50%;
    border-bottom: 2px solid #222;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.handle-ring {
    width: 20px;
    height: 4px;
    background: var(--accent-cyan);
    position: absolute;
    top: 30%;
    left: -2px;
    border-radius: 2px;
    opacity: 0.8;
    box-shadow: 0 0 10px var(--accent-cyan);
    animation: ringPulse 1.5s infinite alternate;
}

.handle-guard {
    width: 24px;
    height: 8px;
    background: #222;
    position: absolute;
    top: -4px;
    left: -4px;
    border-radius: 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.torch-flame {
    width: 40px;
    height: 60px;
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    filter: drop-shadow(0 0 15px var(--accent-cyan));
}

.flame-core {
    width: 10px;
    height: 35px;
    background: #fff;
    border-radius: 50% 50% 20% 20%;
    margin: 0 auto;
    box-shadow:
        0 0 20px #fff,
        0 0 40px var(--accent-cyan);
    animation: flameFlicker 0.1s ease-in-out infinite alternate;
}

.flame-outer {
    width: 26px;
    height: 50px;
    background: rgba(var(--accent-cyan-rgb), 0.2);
    border-radius: 50%;
    position: absolute;
    top: -5px;
    left: 7px;
    filter: blur(12px);
    animation: flameWave 1.2s ease-in-out infinite;
}

@keyframes ringPulse {
    to {
        box-shadow: 0 0 20px var(--accent-cyan);
        opacity: 1;
    }
}

@keyframes flameFlicker {
    to {
        transform: scale(1.1) translateY(-2px);
        filter: brightness(1.2);
    }
}

@keyframes flameWave {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2) translateY(-5px);
        opacity: 0.8;
    }
}

.ion-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.ion-particles::before,
.ion-particles::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    filter: blur(1px);
    box-shadow: 0 0 10px var(--accent-cyan);
    opacity: 0;
    animation: particleFloat 1s infinite;
}

.ion-particles::before {
    left: 10px;
    animation-delay: 0.2s;
}

.ion-particles::after {
    right: 10px;
    animation-delay: 0.6s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translateY(-40px) scale(0);
        opacity: 0;
    }
}

.torch-hint {
    margin-top: 2rem;
    font-family: var(--font-hero);
    font-size: 0.6rem;
    color: var(--accent-cyan);
    letter-spacing: 0.2rem;
    opacity: 1;
    /* High visibility */
    text-shadow: 0 0 10px rgba(var(--accent-cyan-rgb), 0.5);
    animation: hintBreathe 2s ease-in-out infinite;
    text-align: center;
}

/* Flashlight Reveal System */
.module-clip {
    width: 100%;
    padding: 3rem;
    overflow: hidden;
    position: relative;
    z-index: 5;
    background: #05050a;
    min-height: 400px;
    transition:
        background 2s ease,
        box-shadow 2s ease;
}

/* Light overlay — always present, fades in on decryption */
.module-clip::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse 55% 40% at var(--glow-x, 50%) var(--glow-y, 30%),
            rgba(200, 230, 255, 0.14) 0%,
            rgba(100, 180, 255, 0.06) 50%,
            transparent 100%);
    opacity: 0;
    transition: opacity 2s cubic-bezier(0.165, 0.84, 0.44, 1);
    animation: none;
}

.module-clip.decrypted {
    background: #07070f;
    box-shadow: inset 0 0 80px rgba(var(--accent-cyan-rgb), 0.05);
}

/* When decrypted: fade in the light overlay and start its sweep */
.module-clip.decrypted::before {
    opacity: 1;
    animation: lightSweep 6s ease-in-out infinite;
}

@keyframes lightSweep {
    0% {
        --glow-x: 20%;
        --glow-y: 25%;
        opacity: 0.8;
    }

    25% {
        --glow-x: 75%;
        --glow-y: 20%;
        opacity: 1;
    }

    50% {
        --glow-x: 80%;
        --glow-y: 70%;
        opacity: 0.7;
    }

    75% {
        --glow-x: 25%;
        --glow-y: 75%;
        opacity: 1;
    }

    100% {
        --glow-x: 20%;
        --glow-y: 25%;
        opacity: 0.8;
    }
}

@property --glow-x {
    syntax: "<percentage>";
    inherits: false;
    initial-value: 50%;
}

@property --glow-y {
    syntax: "<percentage>";
    inherits: false;
    initial-value: 30%;
}

.torch-reveal-text {
    color: #fff;
    opacity: 1;
    user-select: none;
    position: relative;
    z-index: 2;

    background: radial-gradient(circle 180px at var(--light-x, -500px) var(--light-y, -500px),
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 0.15) 75%,
            rgba(255, 255, 255, 0.18) 100%);
    -webkit-background-clip: text;
    background-clip: text;

    /* Start with transparent fill and transition the color properties */
    -webkit-text-fill-color: transparent;
    transition: all 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0));
}

.torch-reveal-text p {
    margin-bottom: 1.5rem;
}

.torch-reveal-text.decrypted {
    /* Transition the fill color and shadow without switching background modes */
    -webkit-text-fill-color: rgba(230, 240, 255, 1);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

#decryption-status {
    transition: all 0.5s ease;
}

.about-visual {
    flex-shrink: 0;
    width: 250px;
    height: 250px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.about-visual:hover {
    transform: scale(1.1) rotate(5deg);
}

.core-energy {
    width: 60px;
    height: 60px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow:
        0 0 50px var(--accent-cyan),
        inset 0 0 20px rgba(255, 255, 255, 0.8);
    animation: corePulse 2s ease-in-out infinite alternate;
    z-index: 2;
}

.about-visual:hover .core-energy {
    animation-duration: 1s;
    /* Faster pulse */
    box-shadow:
        0 0 80px var(--accent-cyan),
        inset 0 0 30px #fff;
}

.orbital-ring {
    position: absolute;
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.2);
    border-radius: 50%;
    transition: all 0.6s ease;
}

.ring-1 {
    width: 120px;
    height: 120px;
    animation: orbitRotate 10s linear infinite;
    border-top-color: var(--accent-cyan);
}

.ring-2 {
    width: 180px;
    height: 180px;
    animation: orbitRotate 15s linear infinite reverse;
    border-left-color: var(--accent-purple);
}

.ring-3 {
    width: 240px;
    height: 240px;
    animation: orbitRotate 20s linear infinite;
    border-bottom-color: var(--accent-pink);
}

.about-visual:hover .ring-1 {
    animation-duration: 5s;
    border-width: 2px;
    opacity: 1;
}

.about-visual:hover .ring-2 {
    animation-duration: 7s;
    border-width: 2px;
    opacity: 1;
}

.about-visual:hover .ring-3 {
    animation-duration: 10s;
    border-width: 2px;
    opacity: 1;
}

@keyframes corePulse {
    to {
        transform: scale(1.1);
        filter: brightness(1.5);
        box-shadow: 0 0 80px var(--accent-cyan);
    }
}

@keyframes orbitRotate {
    from {
        transform: rotate(0deg) rotateX(60deg);
    }

    to {
        transform: rotate(360deg) rotateX(60deg);
    }
}

.about-glass-module {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0;
    /* Padding moved to inner clip container */
    position: relative;
    overflow: visible;
    /* Allows brackets to pop out */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: default;
}

.module-clip {
    width: 100%;
    height: 100%;
    padding: 3rem;
    overflow: hidden;
    /* Clips the scanline */
    position: relative;
    z-index: 5;
}

.module-controls {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1005;
}

.control-label {
    font-family: var(--font-hero);
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
}

.cyber-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.cyber-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.4s;
    border-radius: 20px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background: rgba(255, 255, 255, 0.3);
    transition: 0.4s;
    border-radius: 50%;
}

.cyber-switch input:checked+.switch-slider {
    background: rgba(var(--accent-cyan-rgb), 0.1);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(var(--accent-cyan-rgb), 0.2);
}

.cyber-switch input:checked+.switch-slider:before {
    transform: translateX(22px);
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
}

.about-glass-module.decrypted {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(var(--accent-cyan-rgb), 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.scanline {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom,
            transparent,
            rgba(var(--accent-cyan-rgb), 0.05),
            transparent);
    animation: scanMove 8s linear infinite;
    pointer-events: none;
    z-index: 1;
    /* Inside module-clip */
}

.about-glass-module.decrypted .scanline {
    animation-duration: 4s;
    background: linear-gradient(to bottom,
            transparent,
            rgba(var(--accent-cyan-rgb), 0.1),
            transparent);
}

@keyframes scanMove {
    to {
        top: 200%;
    }
}

.corner-bracket {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 2px solid var(--accent-cyan);
    opacity: 0.4;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy feel */
    z-index: 10;
}

.tl {
    top: 15px;
    left: 15px;
    border-right: none;
    border-bottom: none;
}

.tr {
    top: 15px;
    right: 15px;
    border-left: none;
    border-bottom: none;
}

.bl {
    bottom: 15px;
    left: 15px;
    border-right: none;
    border-top: none;
}

.br {
    bottom: 15px;
    right: 15px;
    border-left: none;
    border-top: none;
}

/* Corner brackets snap out and glow permanently when the card is lit */
.about-glass-module.decrypted .tl {
    top: -8px;
    left: -8px;
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--accent-cyan));
}

.about-glass-module.decrypted .tr {
    top: -8px;
    right: -8px;
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--accent-cyan));
}

.about-glass-module.decrypted .bl {
    bottom: -8px;
    left: -8px;
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--accent-cyan));
}

.about-glass-module.decrypted .br {
    bottom: -8px;
    right: -8px;
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--accent-cyan));
}

.about-content {
    position: relative;
    z-index: 5;
}

.about-lead {
    font-size: 1.35rem;
    color: #fff;
    font-weight: 600;
    line-height: 1.7;
    letter-spacing: 0.03rem;
    margin-bottom: 2rem;
}

.about-body {
    font-size: 1rem;
    color: var(--text-gray);
    line-height: 1.8;
    letter-spacing: 0.02rem;
}

.data-readout {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stat-label {
    font-family: var(--font-hero);
    font-size: 0.65rem;
    color: var(--accent-cyan);
    letter-spacing: 0.1rem;
    opacity: 0.7;
}

.stat-value {
    font-family: var(--font-hero);
    font-size: 0.85rem;
    color: #fff;
}

/* Response for module */
@media (max-width: 1024px) {
    .about-module {
        flex-direction: column;
        gap: 2rem;
    }

    .about-visual {
        width: 180px;
        height: 180px;
    }

    .ring-1 {
        width: 80px;
        height: 80px;
    }

    .ring-2 {
        width: 130px;
        height: 130px;
    }

    .ring-3 {
        width: 180px;
        height: 180px;
    }

    .data-readout {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   SKILLS
   ═══════════════════════════════════════════════════════════════════ */

#skills .title-container.float-text {
    position: relative;
    top: 150px;
}

/* --- Skills Section: Solar System --- */
#skills {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.solar-system-viewport {
    position: relative;
    width: 100%;
    height: 750px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 2000px;
}

.solar-system {
    position: relative;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
    transform: rotateX(65deg) rotateY(-5deg);
}

@media (min-width: 1025px) {
    .solar-system {
        transform: rotateX(65deg) rotateY(-5deg) translateX(-40px);
    }
    #skills .title-container.float-text {
        left: -40px;
    }
}

/* The Sun */
.sun-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(-65deg);
    /* Counter-tilt for label */
    text-align: center;
    z-index: 100;
}

.sun {
    width: 120px;
    height: 120px;
    background: #fff;
    border-radius: 50%;
    position: relative;
    box-shadow:
        0 0 60px #fff,
        0 0 100px var(--accent-cyan),
        0 0 200px rgba(var(--accent-cyan-rgb), 0.4);
    animation: sunPulse 4s ease-in-out infinite alternate;
}

.sun-core {
    position: absolute;
    inset: 10px;
    background: radial-gradient(circle, #fff, var(--accent-cyan));
    border-radius: 50%;
    filter: blur(5px);
}

.sun-corona {
    position: absolute;
    inset: -20px;
    border: 2px solid rgba(var(--accent-cyan-rgb), 0.3);
    border-radius: 50%;
    animation: coronaRotate 10s linear infinite;
}

.sun-label {
    display: block;
    margin-top: 1rem;
    font-family: var(--font-hero);
    font-size: 0.8rem;
    letter-spacing: 0.3rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
}

@keyframes sunPulse {
    from {
        transform: scale(1);
        box-shadow:
            0 0 60px #fff,
            0 0 100px var(--accent-cyan);
    }

    to {
        transform: scale(1.1);
        box-shadow:
            0 0 80px #fff,
            0 0 150px var(--accent-cyan),
            0 0 300px rgba(var(--accent-cyan-rgb), 0.6);
    }
}

/* Orbital Rings */
.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--diameter);
    height: var(--diameter);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transform-style: preserve-3d;
    animation: orbitRotate var(--duration) linear infinite;
    animation-direction: var(--ring-dir, normal);
}

.orbit-ring::before {
    content: "";
    position: absolute;
    inset: -2px;
    border: 1px dashed rgba(var(--accent-cyan-rgb), 0.05);
    border-radius: 50%;
}

#orbit-inner {
    --diameter: 450px;
    --duration: 25s;
    --ring-dir: normal;
    --card-dir: reverse;
}

#orbit-middle {
    --diameter: 750px;
    --duration: 40s;
    --ring-dir: reverse;
    --card-dir: normal;
}

#orbit-outer {
    --diameter: 950px;
    --duration: 60s;
    --ring-dir: normal;
    --card-dir: reverse;
}

@keyframes orbitRotate {
    from {
        transform: translate(-50%, -50%) rotateZ(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotateZ(360deg);
    }
}

/* Planets (Skills) */
.skill-planet {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
    transform: rotateZ(var(--angle)) translateX(calc(var(--diameter) / 2));
}

.planet-card {
    width: 80px;
    height: 100px;
    background: rgba(var(--accent-cyan-rgb), 0.08);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.2);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);

    /* Counter-rotate to stay upright — uses OPPOSITE direction of the ring */
    animation: counterRotate var(--duration) linear infinite;
    animation-direction: var(--card-dir, reverse);
}

@keyframes counterRotate {
    from {
        transform: translate(-50%, -50%) rotateZ(0deg) rotateX(-65deg);
    }

    to {
        transform: translate(-50%, -50%) rotateZ(-360deg) rotateX(-65deg);
    }
}

.planet-card img,
.planet-card svg {
    width: 35px;
    height: 35px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(var(--accent-cyan-rgb), 0.5));
    transition: all 0.5s ease;
}

.planet-card span {
    font-family: var(--font-hero);
    font-size: 0.6rem;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* Hover States - Only pause when SPECIFICALLY hovering a card */
.orbit-ring:focus-within,
.orbit-ring:has(.planet-card:hover) {
    animation-play-state: paused;
}

.planet-card:hover,
.planet-card.active {
    animation-play-state: paused;
    background: rgba(var(--accent-cyan-rgb), 0.15);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 30px rgba(var(--accent-cyan-rgb), 0.3);
    width: 120px;
    height: 140px;
    z-index: 500;
}

.planet-card:hover img,
.planet-card:hover svg,
.planet-card.active img,
.planet-card.active svg {
    transform: scale(1.4);
    filter: drop-shadow(0 0 15px var(--accent-cyan));
}

.planet-card:hover span,
.planet-card.active span {
    opacity: 1;
    font-size: 0.8rem;
}

/* Specific Skill Styles inside solar system */
[data-skill="signalr"] svg {
    color: #ff00d1;
}

[data-skill="assembly"] svg {
    color: var(--accent-cyan);
}

/* ================================
   Skill Detail Panel & Connector
   ================================ */
.solar-system-viewport {
    position: relative;
    /* anchor for the SVG + panel */
}

/* The floating detail card */
.skill-detail-panel {
    position: absolute;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    width: 220px;
    background: rgba(5, 15, 30, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.3);
    border-radius: 16px;
    padding: 1.4rem 1.2rem;
    box-shadow:
        0 0 30px rgba(var(--accent-cyan-rgb), 0.1),
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
    z-index: 200;
}

.skill-detail-panel.visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.sdp-tag {
    font-family: var(--font-hero);
    font-size: 0.55rem;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    color: var(--accent-cyan);
    background: rgba(var(--accent-cyan-rgb), 0.08);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.2);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.sdp-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.sdp-icon-wrap img,
.sdp-icon-wrap svg {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(var(--accent-cyan-rgb), 0.6));
}

.sdp-name {
    font-family: var(--font-hero);
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05rem;
}

.sdp-desc {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.sdp-level-wrap {
    margin-top: 0.8rem;
}

.sdp-level-label {
    font-family: var(--font-hero);
    font-size: 0.55rem;
    letter-spacing: 0.15rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.4rem;
    display: flex;
    justify-content: space-between;
}

.sdp-level-pct {
    font-family: var(--font-hero);
    font-size: 0.7rem;
    color: var(--accent-cyan);
    letter-spacing: 0.1rem;
    text-align: right;
    margin-top: 0.3rem;
}

.sdp-level-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.sdp-level-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 2px;
    box-shadow: 0 0 8px var(--accent-cyan);
    transition: width 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* SVG connector line styling (applied via JS on the <line> element) */
.skill-connector-line {
    stroke: rgba(var(--accent-cyan-rgb), 0.7);
    stroke-width: 1.5;
    stroke-dasharray: 6 4;
    stroke-linecap: round;
    filter: drop-shadow(0 0 4px rgba(var(--accent-cyan-rgb), 0.5));
    animation: dashMove 0.8s linear infinite;
}

.skill-connector-dot {
    fill: var(--accent-cyan);
    filter: drop-shadow(0 0 6px var(--accent-cyan));
}

@keyframes dashMove {
    to {
        stroke-dashoffset: -20;
    }
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0.6;
}

.scroll-indicator span {
    font-family: var(--font-hero);
    font-size: 0.7rem;
    letter-spacing: 0.2rem;
}

.mouse {
    width: 25px;
    height: 45px;
    border: 2px solid var(--accent-cyan);
    border-radius: 20px;
    position: relative;
}

.mouse::after {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 2px;
    animation: scrollMouse 2s infinite;
}

@keyframes scrollMouse {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 20px);
        opacity: 0;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

input,
textarea {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    font-family: var(--font-main);
    outline: none;
}

input:focus,
textarea:focus {
    border-color: var(--accent-cyan);
    background: transparent;
}

.submit-btn {
    width: 75%;
    margin-left: auto;
    margin-right: auto;
    display: block;
    padding: 1rem;
    background: linear-gradient(to right,
            var(--accent-cyan),
            var(--accent-purple));
    border: none;
    border-radius: 5px;
    color: white;
    font-family: var(--font-hero);
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.3s;
    transform: none !important;
    /* !important — prevents inherited transform from affecting this button */
}

.submit-btn:hover {
    filter: brightness(1.2);
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

/* --- Responsive --- */
@media (max-width: 768px) {
    #sidebar {
        bottom: 20px;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        height: auto;
        padding: 0.5rem 1.5rem !important;
        background: rgba(10, 15, 30, 0.6) !important;
        backdrop-filter: blur(20px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 30px !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(var(--accent-cyan-rgb), 0.1) !important;
    }

    #sidebar::before,
    #sidebar::after {
        display: none !important;
    }

    .nav-icons {
        flex-direction: row;
        gap: 0.8rem !important;
    }

    .nav-icons::before,
    .nav-icons::after {
        display: none !important;
    }

    .nav-link {
        width: 42px !important;
        height: 42px !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 50% !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        filter: none !important;
        border: 1px solid transparent !important;
        -webkit-tap-highlight-color: transparent !important;
        outline: none !important;
    }

    .nav-link:active {
        transform: none !important;
    }

    .nav-link.active {
        background: rgba(var(--accent-cyan-rgb), 0.15) !important;
        border: 1px solid var(--accent-cyan) !important;
        transform: translateY(-2px) scale(1.1) !important;
        box-shadow: 0 0 20px rgba(var(--accent-cyan-rgb), 0.4) !important;
        animation: none !important;
    }

    .nav-link.active:active {
        transform: translateY(-2px) scale(1.1) !important;
    }

    .nav-link.active::before {
        display: none !important;
    }

    .panel {
        padding-bottom: 110px !important;
    }

    .nav-tooltip {
        left: 50%;
        top: auto;
        bottom: calc(100% + 10px);
        transform: translateX(-50%);
    }

    .nav-tooltip::before {
        right: auto;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border-right-color: transparent;
        border-top-color: rgba(var(--accent-cyan-rgb), 0.3);
    }

    .nav-tooltip::after {
        right: auto;
        top: calc(100% + 1px);
        left: 50%;
        transform: translateX(-50%);
        border-right-color: transparent;
        border-top-color: rgba(5, 5, 10, 0.9);
    }

    .nav-link.active .nav-tooltip::before {
        border-right-color: transparent;
        border-top-color: var(--accent-cyan);
    }

    .scroll-container {
        padding-left: 0;
        padding-bottom: 100px;
    }

    .project-planet,
    .skill-planet,
    .planet-card {
        -webkit-tap-highlight-color: transparent;
        tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        user-select: none;
    }

    .section-title {
        font-size: 2rem;
    }

    .glitch {
        font-size: 3rem;
        text-align: center;
    }

    /* --- Splash Screen Mobile Adjustments --- */
    .earth-container {
        width: 200px;
        height: 200px;
    }
    .earth-model {
        width: 160px;
        height: 160px;
    }
    .earth-glow {
        width: 240px;
        height: 240px;
    }
    .splash-title {
        font-size: 1.1rem;
        letter-spacing: 0.1rem;
        padding: 0 1rem;
    }
    .cta-btn {
        padding: 0.8rem 1.6rem;
        font-size: 0.9rem;
    }

    /* --- Hero Centering --- */
    .hero-inner {
        text-align: center;
    }

    /* --- About Section Mobile Adjustments --- */
    .torch-pedestal {
        display: none;
    }
    .about-module {
        gap: 1rem;
        flex-direction: column;
    }
    .module-clip {
        padding: 1.5rem;
        min-height: auto;
    }
    .about-lead {
        font-size: 1.1rem;
        line-height: 1.6;
        margin-bottom: 0;
    }
    .about-divider,
    .about-body {
        display: none;
    }
    .about-glass-module .tl {
        top: 6px;
        left: 6px;
    }
    .about-glass-module .tr {
        top: 6px;
        right: 6px;
    }
    .about-glass-module .bl {
        bottom: 6px;
        left: 6px;
    }
    .about-glass-module .br {
        bottom: 6px;
        right: 6px;
    }

    .data-readout {
        margin-top: 1.5rem;
        gap: 1.5rem;
        flex-direction: column;
    }
    .data-readout .stat-item:nth-child(2) {
        display: none;
    }
    .pc-prefix {
        display: none;
    }
    .module-controls {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    .cyber-switch,
    .switch-slider {
        -webkit-tap-highlight-color: transparent !important;
        outline: none !important;
        user-select: none !important;
    }

    /* --- Skills Section Mobile Adjustments --- */
    .solar-system-viewport {
        height: 480px;
        right: 0;
        perspective: 1200px;
    }
    .solar-system {
        transform: scale(0.38) rotateX(65deg) rotateY(-5deg);
    }
    #skills .title-container.float-text {
        top: 30px;
    }
    .skill-detail-panel {
        position: absolute;
        top: 2rem;
        left: 50%;
        right: auto;
        transform: translate(-50%, -10px);
        width: calc(100% - 32px);
        max-width: 250px;
        padding: 0.8rem 1rem;
        margin: 0;
        display: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(var(--accent-cyan-rgb), 0.15);
    }
    .skill-detail-panel.visible {
        display: block;
        transform: translate(-50%, 0);
    }
    .skill-detail-panel .sdp-tag {
        font-size: 0.5rem;
        margin-bottom: 0.4rem;
        padding: 0.15rem 0.35rem;
    }
    .skill-detail-panel .sdp-icon-wrap {
        margin-bottom: 0.4rem;
    }
    .skill-detail-panel .sdp-icon-wrap img,
    .skill-detail-panel .sdp-icon-wrap svg {
        width: 32px;
        height: 32px;
    }
    .skill-detail-panel .sdp-name {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }
    .skill-detail-panel .sdp-desc {
        font-size: 0.65rem;
        margin-bottom: 0.6rem;
        line-height: 1.35;
    }
    .skill-detail-panel .sdp-level-wrap {
        margin-top: 0.4rem;
    }

    /* --- Projects Section Mobile Adjustments --- */
    .ps-system {
        transform: scale(0.85);
        transform-origin: center 62%;
    }
    .ps-planet-label {
        font-size: 0.9rem;
        opacity: 0.9;
    }
}

@media (max-width: 480px) {
    /* Super narrow screens projects scale */
    .ps-system {
        transform: scale(0.75);
        transform-origin: center 62%;
    }
}

.shooting-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    box-shadow:
        0 0 12px 3px #fff,
        0 0 20px 6px rgba(var(--accent-cyan-rgb), 0.3);
    pointer-events: none;
    /* Very long, linear drift for peaceful cosmic background */
    animation: shooting 8s linear forwards;
}

.shooting-star::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    /* Attach tail to the back of the star */
    transform: translateY(-50%);
    width: 180px;
    height: 1px;
    /* Reversed gradient: flows from transparent into the bright star head */
    background: linear-gradient(90deg,
            transparent,
            rgba(var(--accent-purple-rgb), 0.3),
            rgba(var(--accent-cyan-rgb), 0.6),
            #fff);
    filter: blur(1px);
    opacity: 0.8;
    box-shadow: 0 0 5px rgba(var(--accent-cyan-rgb), 0.2);
}

@keyframes shooting {
    0% {
        transform: translate(0, 0) rotate(45deg) scale(0);
        opacity: 0;
    }

    /* Early pop for transition, then long sweep */
    1% {
        transform: translate(0, 0) rotate(45deg) scale(1.5);
        opacity: 1;
        box-shadow:
            0 0 25px 10px #fff,
            0 0 50px 20px rgba(var(--accent-cyan-rgb), 0.6);
    }

    100% {
        /* Use 150vmax to guarantee crossing any display size */
        transform: translate(150vmax, 150vmax) rotate(45deg) scale(1);
        opacity: 0;
    }
}

.shooting-star.animate {
    animation: shooting 2.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

/* ═══════════════════════════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════
   CONSTELLATION FORM — Contact Section
   ═══════════════════════════════════════════════════════════════════ */

.transmitter-panel {
    overflow: hidden;
    position: relative;
    padding: 0;
    font-family: var(--font-mono);
    margin-top: 100px;
}

@media (max-width: 768px) {
    .transmitter-panel {
        margin-top: 50px;
    }
}

.transmitter-inner {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 10rem 3rem 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.transmitter-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 4rem;
    width: 100%;
    align-items: center;
}

@media (max-width: 768px) {
    .transmitter-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .transmitter-inner {
        padding: 8rem 1.5rem 6rem;
    }

    .info-desc {
        font-size: 0.85rem;
    }

    .channel-card {
        padding: 0.85rem 1.1rem;
    }

    .social-channels {
        max-width: 360px;
    }
}

/* ── Left Side: Connection Info ── */
.transmitter-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-white);
}

.info-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(var(--accent-cyan-rgb), 0.15);
    padding-bottom: 0.8rem;
}

.pulse-indicator-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 10px #22c55e;
    animation: indicatorPulse 2s infinite;
}

@keyframes indicatorPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.transmitter-info .status-text {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.8);
}

.freq-readout {
    font-size: 0.75rem;
    color: var(--accent-cyan);
    letter-spacing: 1px;
}

.info-title {
    font-family: var(--font-hero);
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gravityFloat 3s ease-in-out infinite;
}

@media (max-width: 768px) {
    .info-title {
        font-size: 1rem;
    }
}

.info-desc {
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.6;
    text-align: center;
}

.social-channels {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
    max-width: 480px;
}

.channel-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    width: 100%;
    background:
        repeating-linear-gradient(to bottom,
            rgba(0, 0, 0, 0.18) 0px,
            rgba(0, 0, 0, 0.18) 1px,
            transparent 1px,
            transparent 3px),
        #12121c;
    image-rendering: pixelated;
    padding: 1.1rem 1.4rem;
    text-decoration: none;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
    box-shadow:
        inset -3px -3px 0 0 rgba(0, 0, 0, 0.55),
        inset 3px 3px 0 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.06s steps(1), filter 0.1s steps(1);
    animation: gravityFloat var(--float-dur, 4s) ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
}

.channel-card:hover {
    animation-play-state: paused;
}

.channel-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: rgba(var(--accent-color-rgb, var(--accent-cyan-rgb)), 0.45);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    clip-path: inherit;
    z-index: 2;
    transition: background 0.1s steps(1);
}

.channel-card:hover {
    background:
        repeating-linear-gradient(to bottom,
            rgba(0, 0, 0, 0.18) 0px,
            rgba(0, 0, 0, 0.18) 1px,
            transparent 1px,
            transparent 3px),
        #1a1a26;
    transform: translateY(3px);
    box-shadow:
        inset -3px -3px 0 0 rgba(0, 0, 0, 0.55),
        inset 3px 3px 0 0 rgba(255, 255, 255, 0.06),
        0 0 0 2px #05050a,
        0 0 0 4px var(--accent-color, var(--accent-cyan));
}

.channel-card:hover::before {
    background: var(--accent-color, var(--accent-cyan));
}

.channel-github {
    --accent-color: var(--accent-purple);
    --accent-color-rgb: var(--accent-purple-rgb);
}

.channel-email {
    --accent-color: #EA4335;
    --accent-color-rgb: 234, 67, 53;
}

.channel-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(var(--accent-color-rgb, var(--accent-cyan-rgb)), 0.4);
    color: var(--accent-color, var(--accent-cyan));
    font-size: 1.1rem;
    transition: all 0.1s steps(1);
    flex-shrink: 0;
    z-index: 3;
    box-shadow:
        inset -2px -2px 0 0 rgba(0, 0, 0, 0.5),
        inset 2px 2px 0 0 rgba(255, 255, 255, 0.08);
    image-rendering: pixelated;
}

.channel-card:hover .channel-icon {
    background: rgba(var(--accent-color-rgb, var(--accent-cyan-rgb)), 0.12);
    color: #fff;
    border-color: var(--accent-color, var(--accent-cyan));
    box-shadow:
        inset -2px -2px 0 0 rgba(0, 0, 0, 0.5),
        inset 2px 2px 0 0 rgba(255, 255, 255, 0.08),
        0 0 12px rgba(var(--accent-color-rgb, var(--accent-cyan-rgb)), 0.4);
}

.channel-icon svg {
    width: 18px;
    height: 18px;
    transition: transform 0.1s steps(2);
}

.channel-card:hover .channel-icon svg {
    transform: scale(1.1);
}

.channel-details {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex-grow: 1;
    z-index: 3;
}

.channel-label {
    font-family: var(--font-hero);
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
}

.channel-details:not(:has(.channel-val)) .channel-label {
    font-size: 0.82rem;
    color: #fff;
    font-weight: 600;
}

.channel-val {
    font-family: var(--font-main);
    font-size: 0.85rem;
    color: var(--text-white);
}

.channel-arrow {
    color: var(--accent-color, var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s steps(2), opacity 0.1s steps(1);
    opacity: 0.7;
    z-index: 3;
}

.channel-card:hover .channel-arrow {
    transform: translateX(4px);
    opacity: 1;
    filter: drop-shadow(0 0 5px var(--accent-color, var(--accent-cyan)));
}

/* ── Right Side: Transmitter Form Panel ── */
.transmitter-form-container {
    position: relative;
    width: 100%;
    margin-top: 30px;
    animation: gravityFloat 6s ease-in-out infinite;
}

.transmitter-form-container:hover,
.transmitter-form-container:focus-within {
    animation-play-state: paused;
}

.transmitter-form-wrap {
    width: 100%;
    background: rgba(10, 15, 25, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.15);
    border-radius: 0;
    position: relative;
    padding: 3.5rem 2.2rem 2.2rem;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.6),
        inset 0 0 20px rgba(var(--accent-cyan-rgb), 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.transmitter-form-wrap:hover {
    border-color: rgba(var(--accent-cyan-rgb), 0.3);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.7),
        inset 0 0 30px rgba(var(--accent-cyan-rgb), 0.08);
}

/* Align corner brackets precisely on the square corners of the wrap */
.transmitter-form-wrap .corner-bracket {
    opacity: 0.4;
    filter: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.transmitter-form-wrap .tl {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.transmitter-form-wrap .tr {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.transmitter-form-wrap .bl {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.transmitter-form-wrap .br {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

/* Make brackets react to focus-within (clicking in the form) only, NOT hover */
.transmitter-form-wrap:focus-within .tl {
    top: -8px;
    left: -8px;
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--accent-cyan));
}

.transmitter-form-wrap:focus-within .tr {
    top: -8px;
    right: -8px;
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--accent-cyan));
}

.transmitter-form-wrap:focus-within .bl {
    bottom: -8px;
    left: -8px;
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--accent-cyan));
}

.transmitter-form-wrap:focus-within .br {
    bottom: -8px;
    right: -8px;
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--accent-cyan));
}

.transmitter-avatar-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    background: rgba(10, 15, 25, 0.95);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(var(--accent-cyan-rgb), 0.45);
    z-index: 10;
    transition: all 0.3s ease;
}

.transmitter-avatar-badge svg {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 0 3px var(--accent-cyan));
}

.transmitter-form-wrap.transmitting .transmitter-avatar-badge {
    animation: avatarPulse 1s ease-in-out infinite alternate;
}

@keyframes avatarPulse {
    0% {
        border-color: var(--accent-cyan);
        box-shadow: 0 0 15px rgba(var(--accent-cyan-rgb), 0.4);
    }

    100% {
        border-color: var(--accent-pink);
        box-shadow: 0 0 25px rgba(var(--accent-pink-rgb), 0.65);
        color: var(--accent-pink);
    }
}

/* ── Form Layout ── */
.transmitter-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.tf-group {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(10, 15, 25, 0.45);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.15);
    border-radius: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.tf-group:has(.tf-textarea) {
    align-items: flex-start;
}

.tf-group:has(.tf-textarea) .tf-icon-wrap {
    padding-top: 1.15rem;
}

.tf-group-full {
    grid-column: span 2;
}

/* Glow on focus - Cyan for all fields */
.tf-group:focus-within {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(var(--accent-cyan-rgb), 0.3);
    background: rgba(10, 15, 25, 0.65);
}

.tf-group:focus-within .tf-icon-wrap {
    color: var(--accent-cyan);
}

.tf-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 1.2rem;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.3s ease;
    flex-shrink: 0;
    z-index: 3;
}

.tf-icon-wrap svg {
    width: 18px;
    height: 18px;
}

.tf-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 1.1rem 1.2rem 1.1rem 0.8rem;
    color: #fff;
    font-family: var(--font-main);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    caret-color: var(--accent-cyan);
    z-index: 3;
}

.tf-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-family: var(--font-main);
    font-size: 0.9rem;
}

.tf-textarea {
    min-height: 160px;
    resize: none;
    line-height: 1.6;
    padding-top: 1.1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tf-textarea::-webkit-scrollbar {
    display: none;
}

/* ── Interactive Particle Container (spawned by JS) ── */
.typing-particle {
    position: absolute;
    pointer-events: none;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 10;
    opacity: 0.8;
    filter: blur(1px);
    animation: particleFlyUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes particleFlyUp {
    0% {
        transform: translate(0, 0) scale(0.5);
        opacity: 0.9;
    }

    100% {
        transform: translate(var(--dest-x), var(--dest-y)) scale(1.5);
        opacity: 0;
    }
}

/* ── Submit Button ── */
.tf-submit {
    position: relative;
    grid-column: span 2;
    width: 100%;
    padding: 1.1rem;
    background: rgba(10, 15, 25, 0.4);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.2);
    border-radius: 0;
    color: #fff;
    font-family: var(--font-hero);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.tf-submit:not(:disabled):hover {
    background: rgba(10, 15, 25, 0.6);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(var(--accent-cyan-rgb), 0.25);
    color: #fff;
}

.tf-submit:not(:disabled):active {
    transform: scale(0.98);
}

.tf-submit:disabled {
    cursor: not-allowed;
    opacity: 0.3;
    background: rgba(10, 15, 25, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
}

.btn-submit-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    z-index: 3;
}

.tf-submit:not(:disabled):hover .btn-submit-icon {
    transform: translate(2px, -2px) scale(1.1);
}

/* Loading Spin Indicator */
.btn-loader {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    margin-left: 0.8rem;
    display: none;
    animation: btnSpin 0.8s linear infinite;
    z-index: 3;
}

@keyframes btnSpin {
    to {
        transform: rotate(360deg);
    }
}

.tf-submit.submitting .btn-loader {
    display: inline-block;
}

.tf-submit.submitting {
    pointer-events: none;
    background: rgba(var(--accent-cyan-rgb), 0.04);
}

.tf-submit.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #4ade80;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

/* ── Digital Terminal Output ── */
.tf-terminal {
    grid-column: span 2;
    background: rgba(4, 6, 10, 0.6);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.15);
    border-radius: 0;
    padding: 1rem;
    min-height: 5.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    overflow-y: auto;
    font-size: 0.78rem;
    color: #4ade80;
    /* matrix green */
    text-shadow: 0 0 4px rgba(74, 222, 128, 0.3);
    margin-top: 0.8rem;
    box-shadow:
        inset 0 0 15px rgba(0, 0, 0, 0.9),
        0 4px 12px rgba(0, 0, 0, 0.3);
}

.term-line {
    font-family: var(--font-mono);
    line-height: 1.4;
    animation: terminalLineIn 0.3s cubic-bezier(0.215, 0.610, 0.355, 1) forwards;
}

.term-line.system {
    color: var(--accent-cyan);
    text-shadow: 0 0 4px rgba(var(--accent-cyan-rgb), 0.3);
}

.term-line.error {
    color: var(--accent-pink);
    text-shadow: 0 0 4px rgba(var(--accent-pink-rgb), 0.3);
}

/* Media Query to Stack Form Elements on Mobile */
@media (max-width: 600px) {
    .transmitter-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tf-group-full,
    .tf-submit,
    .tf-terminal {
        grid-column: span 1;
    }
}

/* ── Shockwave Effect ── */
.shockwave-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: transparent;
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
}

.shockwave-ring.animate {
    animation: shockwaveOut 1.5s cubic-bezier(0.1, 0.8, 0.2, 1) forwards;
}

@keyframes terminalLineIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

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

@keyframes shockwaveOut {
    0% {
        width: 10px;
        height: 10px;
        opacity: 1;
        border-color: var(--accent-cyan);
    }

    50% {
        border-color: var(--accent-purple);
    }

    100% {
        width: 600px;
        height: 600px;
        opacity: 0;
        border-color: transparent;
    }
}



/* ═══════════════════════════════════════════════════════════════════
   PROJECTS — PLANET SYSTEM
   ═══════════════════════════════════════════════════════════════════ */

/* ==========================================================
   PLANET SYSTEM — Projects Section
   ========================================================== */

#projects {
    padding: 0;
    overflow: visible;
    /* Allow planet landing effect to flow across sections */
    position: relative;
}

#projects.ps--active-landing {
    z-index: 1000;
}

/* ---- Floating title ---- */
.ps-title-overlay,
.contact-title-overlay {
    position: absolute;
    top: 3.5rem;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: fit-content;
    z-index: 20;
    pointer-events: none;
    text-align: center;
}

.ps-title-overlay .title-subline {
    justify-content: flex-start;
    margin: 0.4rem 0;
}

/* ---- System wrap (full-viewport layer) ---- */
.planet-system-wrap {
    position: absolute;
    inset: 0;
    overflow: visible;
    /* Extended to allow planets to bleed across sections */
}

/* ---- ps-system: zoom target, contains everything that scales ---- */
.ps-system {
    position: absolute;
    inset: 0;
    transform-origin: center center;
    transition: transform 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* SUN ELEMENT REMOVED PER REQUEST */

/* ORBIT RINGS REMOVED PER REQUEST */

/* ====== ORBIT NODE (position carrier — moved by JS) ====== */
.ps-orbit-node {
    position: absolute;
    width: 0;
    height: 0;
    z-index: 10;
}

/* ====== PROJECT PLANET ====== */
.project-planet {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--planet-size, 54px);
    height: var(--planet-size, 54px);
    border-radius: 50%;
    /* Center on the orbit node */
    transform: translate(-50%, -50%);
    cursor: pointer;
    /* Promote to own layer for smooth visual transitions */
    transform-style: flat;
    transition:
        transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.42s ease,
        filter 0.42s ease;
    background: radial-gradient(circle at 35% 30%,
            #ffffff 0%,
            var(--planet-color-a) 30%,
            var(--planet-color-b) 100%);
    box-shadow:
        0 0 12px var(--planet-glow-50),
        0 0 30px var(--planet-glow-25),
        inset 0 -5px 14px rgba(0, 0, 0, 0.48);
}

/* Specular highlight */
.project-planet::before {
    content: "";
    position: absolute;
    top: 12%;
    left: 18%;
    width: 30%;
    height: 20%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    filter: blur(4px);
    pointer-events: none;
}

/* ---- Atmosphere ring ---- */
.ps-planet-atmo {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1.5px solid var(--planet-glow-25);
    pointer-events: none;
    transition:
        border-color 0.32s ease,
        transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Planet label ---- */
.ps-planet-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 9px;
    font-family: var(--font-hero);
    font-size: 0.47rem;
    letter-spacing: 2.5px;
    color: rgba(255, 255, 255, 0.52);
    white-space: nowrap;
    pointer-events: none;
    transition:
        color 0.3s ease,
        opacity 0.3s ease;
    opacity: 0.65;
}

/* ---- Hover states ---- */
.project-planet:hover {
    transform: translate(-50%, -50%) scale(1.22);
    box-shadow:
        0 0 22px var(--planet-glow-80),
        0 0 58px var(--planet-glow-50),
        0 0 95px var(--planet-glow-25),
        inset 0 -5px 14px rgba(0, 0, 0, 0.48);
    filter: brightness(1.15);
    z-index: 20;
}

.project-planet:hover .ps-planet-atmo {
    border-color: var(--planet-glow-80);
    transform: scale(1.2);
}

.project-planet:hover .ps-planet-label {
    opacity: 0;
}

/* ---- Landing (click) animation ---- */
.project-planet.ps-planet--landing {
    transform: translate(-50%, -50%) scale(9) !important;
    /* !important — overrides JS-set inline left/top/transform + :hover scale(1.22) */
    /* Always move to center during landing to avoid clipping at edges */
    left: 50% !important;
    /* !important — overrides JS-set inline position */
    top: 50% !important;
    /* !important — overrides JS-set inline position */
    opacity: 0 !important;
    /* !important — overrides :hover opacity from project-planet:hover + JS animPaused state */
    transition:
        transform 0.68s cubic-bezier(0.4, 0, 0.2, 1),
        left 0.68s cubic-bezier(0.4, 0, 0.2, 1),
        top 0.68s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.68s cubic-bezier(0.4, 0, 0.2, 1) !important;
    /* !important — overrides :hover transition duration */
    z-index: 1000;
}

/* ====== SVG CONNECTOR OVERLAY ====== */
.ps-connector-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
    z-index: 15;
}

.ps-connector-line {
    stroke-width: 1.5;
    stroke-dasharray: 6 4;
    stroke-linecap: round;
    animation: dashMove 0.8s linear infinite;
}

/* ====== DETAIL PANEL (hover) ====== */
.ps-detail-panel {
    position: absolute;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%) translateX(28px);
    width: 300px;
    background: rgba(4, 4, 18, 0.9);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.ps-detail-panel.visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
}

.psdp-tag {
    font-family: var(--font-hero);
    font-size: 0.6rem;
    letter-spacing: 3px;
    color: var(--accent-cyan);
    margin-bottom: 0.7rem;
}

.psdp-name {
    font-family: var(--font-hero);
    font-size: 1.2rem;
    letter-spacing: 1.5px;
    color: #fff;
    margin-bottom: 0.7rem;
    font-weight: 700;
}

.psdp-desc {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.58;
    margin-bottom: 1rem;
}

.psdp-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}

.psdp-tech-badge {
    font-family: var(--font-hero);
    font-size: 0.55rem;
    letter-spacing: 1px;
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    background: rgba(var(--accent-cyan-rgb), 0.08);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.22);
    color: var(--accent-cyan);
}

.psdp-link {
    font-family: var(--font-hero);
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
}

.psdp-link:hover {
    color: var(--accent-cyan);
}

/* ====== HINT BAR ====== */
.ps-hint {
    position: absolute;
    bottom: 1.6rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-hero);
    font-size: 0.47rem;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.22);
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    animation: psHintPulse 4.5s ease-in-out infinite;
}

@keyframes psHintPulse {

    0%,
    100% {
        opacity: 0.45;
    }

    50% {
        opacity: 1;
    }
}

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
    .ps-detail-panel {
        top: auto;
        bottom: 5.5rem;
        left: 50%;
        right: auto;
        transform: translate(-50%, 20px);
        width: calc(100% - 32px);
        max-width: 360px;
        padding: 1.2rem 1rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(var(--accent-cyan-rgb), 0.15);
    }
    .ps-detail-panel.visible {
        transform: translate(-50%, 0);
        opacity: 1;
        pointer-events: auto;
    }

    .ps-hint {
        font-size: 0.4rem;
        letter-spacing: 2px;
    }

    .psdp-link {
        display: block;
        width: 100%;
        text-align: center;
        background: rgba(var(--accent-cyan-rgb), 0.1);
        border: 1px solid var(--accent-cyan);
        color: var(--accent-cyan) !important;
        font-weight: 700;
        padding: 0.8rem;
        border-radius: 8px;
        margin-top: 1.2rem;
        letter-spacing: 2px;
        transition: all 0.3s ease;
    }

    .psdp-link:hover, .psdp-link:active {
        background: var(--accent-cyan);
        color: #000 !important;
        box-shadow: 0 0 15px rgba(var(--accent-cyan-rgb), 0.4);
    }
}

/* Fix for long title bars extending into project space */
.ps-title-overlay .title-bar {
    flex: none !important;
    /* !important — overrides inherited flex shorthand from layout system */
    width: 100px !important;
    /* !important — overrides inherited width from parent/grid */
    border-bottom: 2px solid var(--accent-cyan);
    height: 0;
    margin: auto 0;
    opacity: 0.8;
}

.ps-title-overlay .title-tag {
    margin: 0 0.8rem;
}

/* ═══════════════════════════════════════════════════════════════════
   TABLET / iPAD — portrait (~768–1024px wide, e.g. 1024×1366)
   Touch-friendly layout without harming landscape tablets/laptops.
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    /* Sidebar becomes a floating bottom dock (thumb-reachable) */
    #sidebar {
        bottom: 20px;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        height: auto;
        padding: 0.5rem 1.5rem !important;
        background: rgba(10, 15, 30, 0.6) !important;
        backdrop-filter: blur(20px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 30px !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(var(--accent-cyan-rgb), 0.1) !important;
    }

    #sidebar::before,
    #sidebar::after,
    .nav-icons::before,
    .nav-icons::after {
        display: none !important;
    }

    .nav-icons {
        flex-direction: row;
        gap: 0.9rem !important;
    }

    .nav-link {
        width: 46px !important;
        height: 46px !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 50% !important;
        border: 1px solid transparent !important;
        outline: none !important;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-link.active {
        background: rgba(var(--accent-cyan-rgb), 0.15) !important;
        border: 1px solid var(--accent-cyan) !important;
        transform: translateY(-2px) scale(1.1) !important;
        box-shadow: 0 0 20px rgba(var(--accent-cyan-rgb), 0.4) !important;
        animation: none !important;
    }

    .nav-link.active::before {
        display: none !important;
    }

    .panel {
        padding-bottom: 120px !important;
    }

    .scroll-container {
        padding-left: 0;
        padding-bottom: 110px;
    }

    .nav-tooltip {
        left: 50%;
        top: auto;
        bottom: calc(100% + 10px);
        transform: translateX(-50%);
    }

    .nav-tooltip::before {
        right: auto;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border-right-color: transparent;
        border-top-color: rgba(var(--accent-cyan-rgb), 0.3);
    }

    .nav-tooltip::after {
        right: auto;
        top: calc(100% + 1px);
        left: 50%;
        transform: translateX(-50%);
        border-right-color: transparent;
        border-top-color: rgba(5, 5, 10, 0.9);
    }

    .nav-link.active .nav-tooltip::before {
        border-right-color: transparent;
        border-top-color: var(--accent-cyan);
    }

    /* Center the hero text */
    .hero-inner {
        text-align: center;
    }

    /* Touch-friendly detail panels */
    .skill-detail-panel {
        position: absolute;
        top: 2rem;
        left: 50%;
        right: auto;
        transform: translate(-50%, -10px);
        width: calc(100% - 48px);
        max-width: 340px;
        padding: 1rem 1.2rem;
    }

    .skill-detail-panel.visible {
        transform: translate(-50%, 0);
    }

    .ps-detail-panel {
        top: auto;
        bottom: 6rem;
        left: 50%;
        right: auto;
        transform: translate(-50%, 20px);
        width: calc(100% - 48px);
        max-width: 440px;
        padding: 1.4rem 1.2rem;
    }

    .ps-detail-panel.visible {
        transform: translate(-50%, 0);
    }

    /* Collapse two-column sections for portrait tablets */
    .transmitter-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .transmitter-inner {
        padding: 9rem 2.5rem 6rem;
    }

    .info-title {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 2.1rem;
    }

    .glitch {
        font-size: 3.2rem;
        text-align: center;
    }

    /* Scale the project orbit down a touch for narrower screens */
    .ps-system {
        transform: scale(0.9);
        transform-origin: center 62%;
    }

    /* Remove default square tap highlight on touchable elements */
    .project-planet,
    .skill-planet,
    .planet-card,
    .action-btn,
    .channel-card,
    .nav-link {
        -webkit-tap-highlight-color: transparent !important;
        outline: none !important;
    }
}