/* Global HSL customized color token properties */
:root {
    color-scheme: dark;
    --bg: 240 18% 4%;
    --surface: 240 18% 7%;
    --text: 240 10% 96%;
    --muted: 240 5% 53%;
    --stroke: 240 10% 12%;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* Force hardware-accelerated momentum scroll on iOS/Chrome mobile */
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    background: hsl(var(--bg));
}

body {
    background: radial-gradient(circle at 50% 0%, #0e0a16 0%, #050409 60%, #020204 100%) no-repeat;
    background-attachment: fixed;
    font-size: 18px;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Fixed Background Glow Blobs */
.glow-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.12;
    pointer-events: none;
    z-index: -1;
    animation: float-blob 20s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes float-blob {
    0% { transform: translate3d(0px, 0px, 0) scale(1); }
    50% { transform: translate3d(120px, -80px, 0) scale(1.15); }
    100% { transform: translate3d(-60px, 100px, 0) scale(0.9); }
}

/* Glassmorphism panel configurations */
.glass-card {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background-color: rgba(9, 9, 11, 0.45);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

/* Custom interactive web scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: hsl(var(--bg));
}
::-webkit-scrollbar-thumb {
    background: hsl(var(--stroke));
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

/* Custom Scrollbar for sub-consoles */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
}

/* Viewport reveal fades */
.reveal {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}
.reveal.reveal-active {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Keyframes animations definitions */
@keyframes scroll-down {
    0% { transform: translateY(-100%); }
    50% { transform: translateY(200%); }
    100% { transform: translateY(-100%); }
}
.scroll-down-line {
    animation: scroll-down 2s ease-in-out infinite;
}

@keyframes role-fade-in {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}
.animate-role-fade-in {
    animation: role-fade-in 0.4s ease-out forwards;
}

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

/* Purple spectrum accent gradient class */
.accent-gradient {
    background: linear-gradient(90deg, #a855f7 0%, #6366f1 100%);
    background-size: 200% 200%;
    animation: gradient-shift 6s ease infinite;
}

/* Revolving logo border styling */
@keyframes rot {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.logo-ring {
    background: linear-gradient(90deg, #a855f7 0%, #6366f1 100%);
}

/* Vintage radial halftone dot mask texture overlay */
.halftone-pattern {
    background-image: radial-gradient(circle, #000 1.2px, transparent 1.2px);
    background-size: 5px 5px;
}

/* CCTV Anomaly radar line sweep */
@keyframes cctv-scan {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}
.cctv-scanline {
    animation: cctv-scan 6s linear infinite;
}

/* Circular vector DB sweep */
@keyframes rot-radar {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.rotating-radar {
    animation: rot-radar 8s linear infinite;
}

/* Float visual playground block */
@keyframes floatY {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
.floating-element {
    animation: floatY 6s ease-in-out infinite;
}

/* Fade In animations helper */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fadeIn {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Simulated live browser window tab classes */
.browser-tab {
    transition: background-color 0.25s, color 0.25s;
}
.browser-tab.active {
    background-color: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border-bottom: 2px solid #a855f7;
}

/* Banner marquee animations */
@keyframes marquee-scroll {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}
#marquee-track {
    animation: marquee-scroll 25s linear infinite;
}

/* Uniform project card sizing & hover */
.project-card {
    min-height: 420px;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Reduce section vertical spacing */
section {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}
.project-card:hover {
    transform: scale(1.025);
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.12), 0 8px 32px rgba(0,0,0,0.6);
    border-color: rgba(168, 85, 247, 0.35) !important;
}

/* Gradient border animation on hover for interactive cards */
.gradient-border-hover {
    position: relative;
    overflow: hidden;
}
.gradient-border-hover::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, #a855f7, #6366f1, #c084fc, #a855f7);
    background-size: 300% 300%;
    animation: gradient-shift 4s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.gradient-border-hover:hover::after {
    opacity: 1;
}

/* Enhanced glass card hover lift */
.glass-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.glass-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Radial spotlight cursor follower */
#radial-spotlight {
    background: radial-gradient(650px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(168, 85, 247, 0.06), transparent 40%);
    pointer-events: none;
}

/* Cert card hover zoom */
.cert-card {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.cert-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    border-color: rgba(168, 85, 247, 0.25) !important;
}

/* Skill tag hover zoom */
.skill-tag {
    transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.skill-tag:hover {
    transform: scale(1.08);
}

/* Timeline item hover glow */
.timeline-item:hover {
    border-left-color: rgba(168, 85, 247, 0.5) !important;
}

html.workspace-open,
body.workspace-open {
    overflow: hidden !important;
}

.world-grid-layer,
.world-noise-layer,
.world-orbit {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.world-grid-layer {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 1), transparent 88%);
    opacity: 0.7;
}

.world-noise-layer {
    background:
        radial-gradient(circle at 20% 20%, rgba(168, 85, 247, 0.08), transparent 25%),
        radial-gradient(circle at 80% 18%, rgba(59, 130, 246, 0.08), transparent 24%),
        radial-gradient(circle at 50% 82%, rgba(16, 185, 129, 0.06), transparent 28%);
    filter: blur(40px);
    animation: world-drift 24s ease-in-out infinite alternate;
}

.world-orbit {
    width: 85vmin;
    height: 85vmin;
    margin: auto;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    inset: auto;
    top: 50%;
    left: 50%;
}

.world-orbit::before {
    content: "";
    position: absolute;
    top: 18%;
    left: 52%;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.45);
}

.world-orbit-a {
    animation: orbit-spin 38s linear infinite;
}

.world-orbit-b {
    width: 60vmin;
    height: 60vmin;
    top: 50%;
    left: 50%;
    border-color: rgba(168, 85, 247, 0.06);
    animation: orbit-spin-reverse 42s linear infinite;
}

@keyframes world-drift {
    0% { transform: translate3d(-2%, -1%, 0) scale(1); }
    100% { transform: translate3d(2%, 2%, 0) scale(1.08); }
}

@keyframes orbit-spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes orbit-spin-reverse {
    from { transform: translate(-50%, -50%) rotate(360deg); }
    to { transform: translate(-50%, -50%) rotate(0deg); }
}

.project-card {
    min-height: 390px;
}

.project-visual-shell {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.project-visual-grid,
.suite-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.2;
}

.project-theme-purple { background: radial-gradient(circle at 15% 20%, rgba(168, 85, 247, 0.22), transparent 34%), linear-gradient(160deg, rgba(10,10,14,0.96), rgba(18,10,34,0.92)); }
.project-theme-emerald { background: radial-gradient(circle at 82% 18%, rgba(16, 185, 129, 0.18), transparent 34%), linear-gradient(160deg, rgba(8,12,10,0.98), rgba(8,24,20,0.92)); }
.project-theme-cyan { background: radial-gradient(circle at 15% 76%, rgba(34, 211, 238, 0.18), transparent 36%), linear-gradient(160deg, rgba(5,10,16,0.98), rgba(10,20,28,0.92)); }
.project-theme-amber { background: radial-gradient(circle at 84% 78%, rgba(251, 191, 36, 0.16), transparent 32%), linear-gradient(160deg, rgba(14,10,5,0.98), rgba(26,18,8,0.94)); }
.project-theme-blue { background: radial-gradient(circle at 80% 22%, rgba(59, 130, 246, 0.18), transparent 34%), linear-gradient(160deg, rgba(6,9,16,0.98), rgba(10,14,28,0.92)); }
.project-theme-orange { background: radial-gradient(circle at 18% 18%, rgba(249, 115, 22, 0.16), transparent 34%), linear-gradient(160deg, rgba(15,8,6,0.98), rgba(32,14,8,0.92)); }

.project-sports-scoreboard,
.project-bottom-strip,
.portrait-sidebar,
.route-metrics,
.rag-query-box,
.rag-citation-box,
.sql-prompt,
.sql-code,
.search-bar,
.search-card {
    position: absolute;
    font-family: "JetBrains Mono", monospace;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(10, 10, 12, 0.72);
    backdrop-filter: blur(10px);
}

.project-sports-scoreboard {
    top: 18px;
    left: 18px;
    right: 18px;
    padding: 10px 14px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.78);
}

.project-sports-court {
    position: absolute;
    inset: 84px 28px 72px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 28px;
}

.project-sports-court::before,
.project-sports-court::after {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
}

.project-sports-court::after {
    inset: auto 50%;
    top: 14px;
    bottom: 14px;
    width: 1px;
    border: 0;
    background: rgba(255,255,255,0.08);
}

.player-dot,
.ball-dot,
.route-node {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(255,255,255,0.2);
}

.player-dot.purple { background: #c084fc; }
.player-dot.indigo { background: #818cf8; }
.player-dot.amber { background: #fbbf24; }
.ball-dot { background: #fde047; width: 9px; height: 9px; }

.highlight-arc {
    position: absolute;
    left: 34%;
    top: 24%;
    width: 46%;
    height: 38%;
    border-top: 2px dashed rgba(250, 204, 21, 0.48);
    border-right: 2px dashed rgba(250, 204, 21, 0.12);
    border-radius: 999px;
    transform: rotate(18deg);
}

.project-bottom-strip {
    left: 18px;
    right: 18px;
    bottom: 18px;
    border-radius: 18px;
    padding: 10px 12px;
    display: flex;
    gap: 10px;
}

.timeline-chip {
    flex: 1;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 8px 10px;
    text-align: center;
    font-size: 10px;
    color: rgba(255,255,255,0.48);
    letter-spacing: 0.14em;
}

.timeline-chip.active {
    color: white;
    background: rgba(168, 85, 247, 0.16);
    border-color: rgba(168, 85, 247, 0.24);
}

.portrait-preview {
    position: absolute;
    inset: 26px 24px 74px;
    border-radius: 26px;
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(10,10,12,0.6), rgba(6,10,9,0.2));
}

.portrait-wave {
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: 18%;
    height: 40px;
    background:
        linear-gradient(90deg, transparent 0%, rgba(16,185,129,0.7) 18%, rgba(16,185,129,0.15) 50%, rgba(16,185,129,0.7) 82%, transparent 100%);
    mask: radial-gradient(circle at center, black 28%, transparent 29%);
    mask-size: 18px 18px;
}

.portrait-face {
    position: absolute;
    width: 88px;
    height: 120px;
    left: 38%;
    top: 18%;
    border-radius: 48px;
    background: radial-gradient(circle at 50% 28%, rgba(255,255,255,0.7), rgba(16,185,129,0.14) 55%, transparent 56%);
    border: 1px solid rgba(16,185,129,0.35);
    box-shadow: 0 0 30px rgba(16,185,129,0.1);
}

.portrait-crop {
    position: absolute;
    inset: 10% 34%;
    border: 2px dashed rgba(192,132,252,0.72);
    border-radius: 18px;
    background: rgba(168,85,247,0.08);
}

.portrait-sidebar {
    right: 14px;
    top: 14px;
    padding: 10px 12px;
    border-radius: 14px;
    display: grid;
    gap: 8px;
    font-size: 10px;
    color: rgba(255,255,255,0.78);
}

.rag-cluster,
.sql-layout,
.search-surface,
.route-map {
    position: absolute;
    inset: 22px;
}

.rag-node {
    position: absolute;
    padding: 8px 10px;
    border-radius: 999px;
    font: 10px "JetBrains Mono", monospace;
    color: rgba(255,255,255,0.74);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
}

.rag-node.active {
    color: #67e8f9;
    border-color: rgba(103, 232, 249, 0.35);
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.12);
}

.rag-query-box {
    left: 10%;
    right: 28%;
    bottom: 26%;
    padding: 12px 14px;
    border-radius: 18px;
    color: rgba(255,255,255,0.88);
    font-size: 11px;
}

.rag-citation-box {
    left: 24%;
    right: 10%;
    bottom: 10%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 10px;
    color: #67e8f9;
}

.sql-layout {
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 14px;
}

.sql-prompt,
.sql-code,
.search-bar {
    position: relative;
    inset: auto;
    padding: 12px 14px;
    border-radius: 18px;
    color: rgba(255,255,255,0.84);
    font-size: 11px;
    line-height: 1.5;
}

.sql-code {
    color: #fde68a;
}

.sql-table {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
}

.sql-table div {
    background: rgba(10,10,12,0.76);
    padding: 12px;
    font: 10px "JetBrains Mono", monospace;
    color: rgba(255,255,255,0.72);
}

.sql-table div:nth-child(-n+3) {
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.search-surface {
    display: grid;
    gap: 12px;
}

.search-card {
    position: relative;
    inset: auto;
    padding: 14px 16px;
    border-radius: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255,255,255,0.76);
    font-size: 11px;
}

.search-card.active {
    border-color: rgba(59,130,246,0.35);
    box-shadow: 0 0 26px rgba(59,130,246,0.12);
}

.search-card strong {
    color: #93c5fd;
    font-weight: 700;
}

.route-map {
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.08);
}

.route-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.route-lines polyline {
    fill: none;
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.route-lines polyline:first-child {
    stroke: rgba(249,115,22,0.72);
}

.route-lines polyline:last-child {
    stroke: rgba(250,204,21,0.6);
}

.route-node {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-left: -17px;
    margin-top: -17px;
    font: 10px "JetBrains Mono", monospace;
    color: rgba(255,255,255,0.82);
    background: rgba(10,10,12,0.82);
    border: 1px solid rgba(255,255,255,0.12);
}

.route-node.hq {
    width: 46px;
    height: 46px;
    margin-left: -23px;
    margin-top: -23px;
    border-color: rgba(249,115,22,0.42);
    box-shadow: 0 0 24px rgba(249,115,22,0.16);
}

.route-metrics {
    right: 16px;
    bottom: 16px;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 10px;
    color: rgba(255,255,255,0.82);
}

.insta-suite-card {
    min-height: 300px;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.insta-suite-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(0,0,0,0.42);
}

.insta-suite-purple { background: radial-gradient(circle at 22% 20%, rgba(168,85,247,0.12), transparent 34%), rgba(12,12,16,0.78); }
.insta-suite-emerald { background: radial-gradient(circle at 78% 18%, rgba(16,185,129,0.12), transparent 34%), rgba(12,12,16,0.78); }
.insta-suite-amber { background: radial-gradient(circle at 22% 82%, rgba(251,191,36,0.1), transparent 34%), rgba(12,12,16,0.78); }
.insta-suite-cyan { background: radial-gradient(circle at 82% 80%, rgba(34,211,238,0.1), transparent 34%), rgba(12,12,16,0.78); }

.suite-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    box-shadow: 0 0 18px rgba(255,255,255,0.16);
}

.suite-action-btn {
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: hsl(var(--text));
    padding: 10px 14px;
    border-radius: 999px;
    font: 700 11px "JetBrains Mono", monospace;
    letter-spacing: 0.04em;
    transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.suite-action-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.09);
}

.workspace-backdrop {
    position: fixed;
    inset: 0;
    z-index: 130;
    background: rgba(4, 4, 8, 0.72);
    backdrop-filter: blur(14px);
}

.workspace-window {
    position: fixed; /* Enforce fixed viewport layout context */
    display: flex;
    flex-direction: column;
    width: min(94vw, 1420px);
    margin: 0 auto;
    background: rgba(8, 8, 12, 0.94);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
}

.workspace-minimized-tray {
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 150;
    display: grid;
    gap: 10px;
    width: min(240px, 36vw);
}

.workspace-tray-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(10, 10, 12, 0.9);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 38px rgba(0,0,0,0.4);
}

.workspace-tray-open,
.workspace-tray-close {
    border-radius: 12px;
    font: 700 11px "JetBrains Mono", monospace;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.workspace-tray-open {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.82);
    padding: 10px 12px;
    text-align: left;
}

.workspace-tray-open:hover {
    background: rgba(168,85,247,0.14);
}

.workspace-tray-close {
    border: 1px solid rgba(255,255,255,0.06);
    background: transparent;
    color: rgba(255,255,255,0.54);
    width: 36px;
}

.workspace-tray-close:hover {
    background: rgba(239,68,68,0.14);
    color: rgba(255,255,255,0.92);
}

@media (max-width: 900px) {
    .workspace-window {
        inset: 2vh 2vw 10vh !important;
        width: auto;
        border-radius: 24px !important;
    }

    .workspace-minimized-tray {
        top: auto;
        right: 12px;
        left: 12px;
        bottom: 14px;
        width: auto;
        transform: none;
    }

    .project-card {
        min-height: 350px;
    }

    .project-bottom-strip {
        flex-wrap: wrap;
    }
}

/* Playground launch card hover */
.playground-card {
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.playground-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(168, 85, 247, 0.4) !important;
    box-shadow: 0 12px 40px rgba(168, 85, 247, 0.1), 0 4px 20px rgba(0,0,0,0.5);
}

/* Floating nebula orbs - ambient depth particles */
.nebula-orb-wrapper {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.nebula-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(60px);
    animation: nebula-float 20s ease-in-out infinite alternate;
}

@keyframes nebula-float {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    33% { transform: translate3d(15px, -20px, 0) scale(1.06); }
    66% { transform: translate3d(-10px, 15px, 0) scale(0.95); }
    100% { transform: translate3d(8px, -8px, 0) scale(1.03); }
}

/* Particle canvas occupies full viewport behind content */
#particle-canvas {
    opacity: 0.8;
}

/* Sparkle twinkle animation for individual particles */
@keyframes sparkle-twinkle {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.8); }
}

/* Tool category card */
.tool-category-card {
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
}
.tool-category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(168, 85, 247, 0.35) !important;
    box-shadow: 0 12px 40px rgba(168, 85, 247, 0.08), 0 4px 20px rgba(0,0,0,0.5);
}

/* Website preview overlay */
.website-preview-overlay {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 80px rgba(0,0,0,0.7), 0 0 40px rgba(168, 85, 247, 0.08);
}

/* Cinematic Fullscreen Portal opening styles */
#portal-launcher-overlay {
    transition: opacity 0.6s ease;
}
.portal-active {
    pointer-events: auto !important;
    opacity: 1 !important;
}
.portal-bg-active {
    background-color: rgba(2, 2, 4, 0.96) !important;
    backdrop-filter: blur(30px) !important;
}
.portal-ring {
    position: absolute;
    width: 0px;
    height: 0px;
    opacity: 0;
    border: 1px dashed var(--portal-color, #a855f7);
    filter: blur(1.5px);
    transform: translate(-50%, -50%) scale(0);
    will-change: transform, opacity, width, height;
}
.portal-black-hole {
    position: absolute;
    width: 0px;
    height: 0px;
    opacity: 0;
    background: #020204;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    will-change: transform, opacity, width, height;
}

#site-wrapper {
    transition: transform 0.95s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.95s ease;
    will-change: transform, opacity;
    overflow: hidden !important; /* Clip background decorators to prevent scrollable blank space at the bottom */
}

#site-wrapper.sucked-in {
    transform: scale(1.18) !important;
    opacity: 0 !important;
}

/* GPU-Accelerated Concentric Swirling Gaseous Vortex Layers */
.portal-gas-trail {
    position: absolute;
    width: 120px;
    height: 120px;
    opacity: 0;
    filter: blur(12px);
    transform: translate(-50%, -50%) scale(0.6) rotate(0deg);
    will-change: transform, opacity;
}

.trail-1 {
    border: 18px solid var(--portal-color, #a855f7);
    border-radius: 43% 57% 50% 50% / 50% 57% 43% 50%;
    box-shadow: 0 0 45px var(--portal-glow, rgba(168,85,247,0.5)), inset 0 0 45px var(--portal-glow, rgba(168,85,247,0.5));
}

.trail-2 {
    border: 10px solid var(--portal-color-alt, #6366f1);
    border-radius: 50% 50% 40% 60% / 60% 40% 60% 50%;
    box-shadow: 0 0 35px var(--portal-glow-alt, rgba(99,102,241,0.45)), inset 0 0 35px var(--portal-glow-alt, rgba(99,102,241,0.45));
}

.trail-3 {
    border: 14px dashed var(--portal-color, #a855f7);
    border-radius: 55% 45% 55% 45% / 45% 55% 45% 55%;
    filter: blur(6px);
}

.portal-starfield {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffffff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6) rotate(0deg);
    will-change: transform, opacity;
}

/* Layered Starfield definition using rich HSL / white shadows */
.starfield-1 {
    box-shadow: 
        -50px -20px 2.5px #fff, 30px -60px 2px var(--portal-color, #a855f7), -80px 40px 1px #fff, 60px 50px 3px var(--portal-color-alt, #6366f1),
        -10px -90px 2.5px var(--portal-color, #a855f7), 80px -20px 1px #fff, -40px 70px 3px var(--portal-color-alt, #6366f1), 40px -80px 2px #fff,
        -70px -70px 1px #fff, 90px 40px 3px var(--portal-color, #a855f7), -30px 90px 2px #fff, 70px 80px 3px var(--portal-color-alt, #6366f1),
        -90px -10px 2.5px var(--portal-color-alt, #6366f1), 20px -100px 1px #fff, -60px 60px 2px #fff, 50px -50px 2px var(--portal-color, #a855f7);
}

.starfield-2 {
    box-shadow: 
        -40px -40px 2px var(--portal-color-alt, #6366f1), 50px -30px 2.5px #fff, -90px 20px 1px #fff, 30px 80px 3px var(--portal-color, #a855f7),
        -20px -70px 1px #fff, 70px -50px 2px var(--portal-color-alt, #6366f1), -50px 90px 2.5px #fff, 90px -10px 1.5px var(--portal-color, #a855f7),
        -80px -30px 3px var(--portal-color, #a855f7), 10px -90px 2px #fff, -30px 50px 2.5px var(--portal-color-alt, #6366f1), 60px -90px 1.5px #fff;
}

.portal-black-hole {
    position: absolute;
    width: 120px;
    height: 120px;
    background: #020204;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0;
    will-change: transform, opacity;
}

/* Buttery-Smooth 60fps GPU Swirling Vortex Animations */
@keyframes gas-swirl-cw {
    0% {
        transform: translate(-50%, -50%) scale(0.8) rotate(0deg);
        opacity: 0;
    }
    15% {
        opacity: 0.95;
    }
    100% {
        transform: translate(-50%, -50%) scale(35) rotate(480deg);
        opacity: 0;
    }
}

@keyframes gas-swirl-ccw {
    0% {
        transform: translate(-50%, -50%) scale(0.8) rotate(0deg);
        opacity: 0;
    }
    15% {
        opacity: 0.95;
    }
    100% {
        transform: translate(-50%, -50%) scale(28) rotate(-480deg);
        opacity: 0;
    }
}

@keyframes star-swirl {
    0% {
        transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 0.98;
    }
    100% {
        transform: translate(-50%, -50%) scale(30) rotate(720deg);
        opacity: 0;
    }
}

@keyframes black-hole-grow {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.9;
        box-shadow: 0 0 30px var(--portal-color, #a855f7);
    }
    30% {
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(35);
        opacity: 1;
        box-shadow: 0 0 120px #000, 0 0 240px var(--portal-color, #a855f7);
    }
}

.portal-gas-active-cw {
    animation: gas-swirl-cw 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.portal-gas-active-ccw {
    animation: gas-swirl-ccw 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.portal-starfield-active {
    animation: star-swirl 1.1s cubic-bezier(0.1, 0.8, 0.2, 1) forwards;
}

.portal-black-hole-active {
    animation: black-hole-grow 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Floating bubble tooltip styles */
#bubble-tooltip {
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 30px rgba(168,85,247,0.1);
}

/* Floating dynamic skill-hover overlay styles */
#skill-hover-overlay {
    position: fixed; /* Enforce fixed viewport layout context */
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
    box-shadow: 0 25px 60px rgba(0,0,0,0.85), 0 0 40px rgba(168,85,247,0.12);
}

/* Right-Side Floating Section dot Navigation Menu styles */
#side-nav-dots {
    position: fixed; /* Enforce fixed viewport layout context */
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.side-dot-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 20px;
    height: 20px;
    text-decoration: none;
    cursor: pointer;
}

.side-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 0 transparent;
}

.side-dot-wrapper:hover .side-dot,
.side-dot-wrapper.active .side-dot {
    background-color: #a855f7;
    border-color: rgba(168, 85, 247, 0.4);
    transform: scale(1.4);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.8), inset 0 0 4px rgba(255, 255, 255, 0.2);
}

.side-dot-label {
    position: absolute;
    right: 26px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    font: 700 9px "JetBrains Mono", monospace;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(8, 8, 12, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.side-dot-wrapper:hover .side-dot-label {
    opacity: 1;
    transform: translateX(0px);
}

@media (max-width: 768px) {
    #side-nav-dots {
        right: 12px !important;
        gap: 12px;
    }
    .side-dot {
        width: 6px;
        height: 6px;
    }
    .side-dot-label {
        display: none !important;
    }
}

/* Touch displays alternative for Selected Works cards hover states */
@media (hover: none) {
    /* Show details pane by default on touch screens since hover doesn't exist */
    .project-card .group-hover\:opacity-100 {
        opacity: 0.95 !important;
        background: rgba(9, 9, 12, 0.96) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
    }
    .project-card img {
        opacity: 0.35 !important;
    }
    .project-card .group-hover\:scale-110 {
        transform: scale(1) !important;
    }
    /* Hide the static bottom text since it overlaps with the detail overlay */
    .project-card .group-hover\:opacity-0 {
        opacity: 0 !important;
    }
}

/* Mobile Collapsible Cards default hide */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none !important;
    }
}

/* Space Warp Laser Speed Streaks */
.portal-warp-line-container {
    position: absolute;
    width: 2px;
    height: 100px;
    pointer-events: none;
    will-change: transform;
}
.portal-warp-line {
    position: absolute;
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--portal-color, #a855f7) 40%, #ffffff 90%, transparent);
    opacity: 0;
    transform: translateY(0) scaleY(0.1);
    transform-origin: center top;
    will-change: transform, opacity;
}
.portal-warp-line.alt {
    background: linear-gradient(to bottom, transparent, var(--portal-color-alt, #ec4899) 40%, #ffffff 90%, transparent);
}

@keyframes warp-line-fly {
    0% {
        transform: translateY(0) scaleY(0.1);
        opacity: 0;
    }
    15% {
        opacity: 0.95;
    }
    100% {
        transform: translateY(-800px) scaleY(5);
        opacity: 0;
    }
}

.portal-warp-line-active {
    animation: warp-line-fly 0.9s cubic-bezier(0.15, 0.85, 0.3, 1) forwards;
}

/* High-performance scroll-stuck prevention: GPU-accelerated transition overrides */
#nav-pill {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease !important;
    will-change: transform;
}
.nav-pill-scrolled {
    transform: scale(0.98) !important;
}

/* High-performance mobile motion and animation reduction (keeps premium styling static and lightweight) */
@media (max-width: 768px) {
    /* 1. Completely hide fixed background glowing blobs, noise/grid filters, and orb wrappers to eliminate GPU composite passes */
    .glow-blob,
    .world-noise-layer,
    .world-grid-layer,
    .world-orbit,
    .world-orbit-a,
    .world-orbit-b,
    .nebula-orb-wrapper,
    .nebula-orb,
    #particle-canvas {
        display: none !important;
        animation: none !important;
        will-change: auto !important;
    }
    
    /* 2. Disable heavy backdrop-filters on mobile to ensure zero scrolling stutter, using solid/opaque replacements */
    .glass-card,
    .workspace-window,
    #nav-pill,
    #mobile-menu,
    .bg-surface\/30,
    .bg-surface\/40,
    .bg-bg\/60,
    .bg-black\/20,
    .bg-black\/90,
    .portal-bg {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    /* 3. Apply slightly more opaque colors for cards and navbar to maintain a beautiful, contrast-rich glassmorphism layout */
    .glass-card,
    .workspace-window {
        background-color: rgba(10, 10, 12, 0.96) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
    }
    #nav-pill {
        background-color: rgba(9, 9, 11, 0.98) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
    }
    #mobile-menu {
        background-color: rgba(7, 7, 9, 0.99) !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
    }
    .playground-card {
        background-color: rgba(18, 18, 22, 0.9) !important;
        border-color: rgba(255, 255, 255, 0.06) !important;
    }
    .project-card {
        background-color: rgba(10, 10, 12, 0.95) !important;
    }
    .portal-bg-active {
        background-color: rgb(2, 2, 4) !important;
    }

    /* 4. Simplify reveal transitions on scroll (fade-in only, no sliding translations to avoid reflow judder) */
    .reveal {
        transform: none !important;
        transition: opacity 0.35s ease-out !important;
        will-change: auto !important;
    }
    .reveal.reveal-active {
        transform: none !important;
        opacity: 1 !important;
    }
    
    /* 5. Disable continuous vertical floating loops on visual playground elements */
    .floating-element {
        animation: none !important;
    }
    
    /* 6. Make infinite sliding footer text static for a clean, zero-jank mobile footer experience */
    #marquee-track {
        animation: none !important;
        white-space: normal !important;
        text-align: center;
        opacity: 0.8;
    }

    /* 7. Hide floating dot navigation to prevent accidental jump-scroll conflicts during right-swipe scrolling */
    #side-nav-dots {
        display: none !important;
    }

    /* 8. Disable screen spotlight overlay as mobile screens lack mouse cursors */
    #radial-spotlight {
        display: none !important;
    }

    /* 9. Simplify portal transitions: Replace heavy 3D black hole vortex sweeps with standard native 0.3s fades */
    .portal-gas-trail,
    .portal-starfield,
    .portal-warp-line-container,
    .portal-black-hole {
        display: none !important;
        animation: none !important;
    }
    .portal-bg {
        transition: opacity 0.3s ease !important;
    }

    /* 10. Concrete mobile-viewport and scroll lock protection (prevents horizontal scroll jitters) */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative !important;
    }
    #site-wrapper {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative !important;
    }
}

