/* ============================================
   GAME DEVELOPER PORTFOLIO - STYLES
   Theme: Dark Cyberpunk / Neon Gaming
   ============================================ */

/* --- CSS Variables --- */
:root {
    --primary: #7fd0ff;
    --primary-dark: #4b9ed4;
    --secondary: #a98bff;
    --accent: #ffc27a;
    --space-blue: #4fb4ff;
    --space-violet: #7b77ff;
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a2e;
    --text: #e9f3ff;
    --text-muted: #9bb0c8;
    --text-bright: #ffffff;
    --gradient-primary: linear-gradient(135deg, #68c7ff, #9ea8ff);
    --gradient-accent: linear-gradient(135deg, #8ed7ff, #ffc27a);
    --border-color: rgba(127, 208, 255, 0.24);
    --glow-primary: 0 0 24px rgba(127, 208, 255, 0.35);
    --glow-secondary: 0 0 20px rgba(255, 194, 122, 0.25);
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-vi-display: 'Roboto', sans-serif;
    --font-vi-body: 'Roboto', sans-serif;
    --transition: 0.3s ease;
}

/* Vietnamese font override */
html.lang-vi {
    --font-display: 'Roboto', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

/* --- Scrollbar --- */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(255, 255, 255, 0.06);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(127, 208, 255, 0.9), rgba(255, 194, 122, 0.85));
    border-radius: 999px;
    border: 2px solid rgba(10, 10, 15, 0.8);
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(127, 208, 255, 1), rgba(255, 194, 122, 1));
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    background-image:
        radial-gradient(circle at 20% 15%, rgba(79, 180, 255, 0.16), transparent 34%),
        radial-gradient(circle at 80% 8%, rgba(123, 119, 255, 0.14), transparent 28%),
        radial-gradient(circle at 70% 75%, rgba(255, 172, 125, 0.1), transparent 38%),
        linear-gradient(180deg, #05050a 0%, #080812 45%, #090910 100%);
    --mx: 0px;
    --my: 0px;
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body::before {
    background:
        radial-gradient(circle at 15% 25%, rgba(79, 180, 255, 0.22), transparent 24%),
        radial-gradient(circle at 75% 12%, rgba(123, 119, 255, 0.2), transparent 22%),
        radial-gradient(circle at 50% 85%, rgba(255, 194, 122, 0.11), transparent 32%);
    filter: blur(10px) saturate(125%);
    animation: nebulaShift 18s ease-in-out infinite alternate;
}

body::after {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 140px 140px;
    opacity: 0.12;
    transform: perspective(1000px) rotateX(62deg) translateY(22%);
    transform-origin: center top;
}

@keyframes nebulaShift {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.9;
    }
    100% {
        transform: translate3d(0, -2.5%, 0) scale(1.08);
        opacity: 1;
    }
}

.space-parallax {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    transition: opacity 0.35s ease;
}

.space-layer {
    position: absolute;
    inset: -8%;
    transform: translate3d(calc(var(--mx) * 0.04), calc(var(--my) * 0.04), 0);
    transition: transform 0.25s ease-out;
}

.layer-far {
    background:
        radial-gradient(circle at 22% 18%, rgba(120, 190, 255, 0.2), transparent 24%),
        radial-gradient(circle at 78% 16%, rgba(136, 128, 255, 0.2), transparent 28%),
        radial-gradient(circle at 52% 92%, rgba(255, 120, 86, 0.14), transparent 38%);
    filter: none;
}

.layer-mid {
    transform: translate3d(calc(var(--mx) * 0.07), calc(var(--my) * 0.07), 0);
    background:
        radial-gradient(circle at 40% 30%, rgba(79, 180, 255, 0.22), transparent 22%),
        radial-gradient(circle at 63% 52%, rgba(169, 139, 255, 0.14), transparent 20%);
    filter: none;
}

.layer-near {
    transform: translate3d(calc(var(--mx) * 0.1), calc(var(--my) * 0.1), 0);
    background:
        radial-gradient(circle at 12% 70%, rgba(255, 255, 255, 0.08), transparent 16%),
        radial-gradient(circle at 86% 68%, rgba(79, 180, 255, 0.1), transparent 16%);
    filter: none;
}

.planet-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.75;
}

.planet-a {
    width: 300px;
    height: 300px;
    top: -80px;
    right: -60px;
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.65), rgba(128, 160, 255, 0.18) 26%, rgba(72, 82, 152, 0.12) 58%, transparent 72%);
    box-shadow: 0 0 90px rgba(104, 128, 255, 0.28);
    animation: planetDriftA 20s ease-in-out infinite alternate;
}

.planet-a::after {
    content: '';
    position: absolute;
    inset: 42% -18% 42% -18%;
    border: 1px solid rgba(173, 192, 255, 0.35);
    border-radius: 50%;
    transform: rotate(-18deg);
}

.planet-b {
    width: 180px;
    height: 180px;
    bottom: 10%;
    left: -65px;
    background:
        radial-gradient(circle at 38% 35%, rgba(255, 210, 165, 0.45), rgba(255, 96, 78, 0.2) 40%, transparent 74%);
    box-shadow: 0 0 80px rgba(255, 106, 74, 0.22);
    animation: planetDriftB 16s ease-in-out infinite alternate;
}

@keyframes planetDriftA {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-22px, 16px, 0); }
}

@keyframes planetDriftB {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(16px, -20px, 0); }
}

#meteorField {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Keep first paint light, then enable full space FX after load */
body.fx-boot::before {
    animation: none !important;
    filter: none !important;
    opacity: 0.18;
}

body.fx-boot .space-parallax {
    opacity: 0.4;
}

body.fx-boot .planet-ring {
    animation: none !important;
}

body.fx-boot #meteorField {
    display: none;
}

.meteor {
    position: absolute;
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(140, 202, 255, 0.5), transparent 80%);
    filter: drop-shadow(0 0 8px rgba(146, 195, 255, 0.7));
    transform: rotate(var(--meteor-rot, -24deg));
    animation: meteorFall linear forwards;
}

@keyframes meteorFall {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) rotate(var(--meteor-rot, -24deg));
    }
    10% { opacity: 1; }
    100% {
        opacity: 0;
        transform: translate3d(var(--meteor-dx, -44vw), var(--meteor-dy, 44vh), 0) rotate(var(--meteor-rot, -24deg));
    }
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--text-bright);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Particle Canvas --- */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.8;
    transition: opacity 0.35s ease;
}

body.fx-boot #particles {
    opacity: 0;
}

/* During mobile scroll: reduce expensive compositing, restore when idle */
@media (pointer: coarse) {
    body::before,
    body::after {
        content: none !important;
    }

    .space-parallax,
    #meteorField {
        display: none !important;
    }

    #particles {
        mix-blend-mode: normal;
        opacity: 0.72;
    }

    body.is-scrolling .space-layer {
        filter: none !important;
    }

    body.is-scrolling .planet-ring {
        animation-play-state: paused;
    }

    body.is-scrolling #meteorField {
        opacity: 0;
    }

    body.is-scrolling .navbar {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(6, 8, 22, 0.92);
    }
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: rgba(6, 8, 22, 0.72);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 15px 40px;
    background: rgba(6, 8, 22, 0.9);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    user-select: none;
}

.logo-bracket {
    color: var(--primary);
}

.logo-text {
    color: var(--text-bright);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: rgba(127, 208, 255, 0.12);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary);
    box-shadow: var(--glow-primary);
}

/* --- Language Toggle --- */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    transition: var(--transition);
    margin-left: 8px;
}

.lang-toggle:hover {
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
}

.lang-flag {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.lang-flag.active {
    color: var(--primary);
    text-shadow: 0 0 8px rgba(127, 208, 255, 0.5);
}

.lang-separator {
    color: var(--text-muted);
    font-size: 0.7rem;
    opacity: 0.4;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Section Title --- */
.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-bright);
    text-align: center;
    margin-bottom: 60px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.title-decorator {
    color: var(--primary);
    margin-right: 8px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-dark);
    box-shadow: var(--glow-primary);
}

.btn-primary:hover {
    box-shadow: 0 0 40px rgba(127, 208, 255, 0.5);
    color: var(--bg-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: rgba(127, 208, 255, 0.14);
    box-shadow: var(--glow-primary);
    color: var(--primary);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    font-size: 1rem;
}

.hero-cta .btn .btn-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.3em;
    height: 1.3em;
    margin-top: 0;
}

.hero-cta .btn .icon-svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 120px 40px calc(60px + env(safe-area-inset-bottom));
    z-index: 1;
    overflow: hidden;
}

.hero-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 60px;
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 2;
}

.hero-model {
    flex: 0 0 420px;
    height: 420px;
}

/* --- Scroll-down indicator (anchored to the bottom of the hero) --- */
.scroll-down {
    position: absolute;
    left: 50%;
    bottom: calc(22px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.scroll-down:hover {
    color: var(--primary);
}

/* Mouse outline with an animated wheel dropping inside */
.scroll-down-mouse {
    width: 26px;
    height: 42px;
    border: 2px solid currentColor;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    padding-top: 7px;
    box-sizing: border-box;
}

.scroll-down-wheel {
    width: 4px;
    height: 8px;
    border-radius: 2px;
    background: currentColor;
    animation: scrollWheel 1.8s ease-in-out infinite;
}

.scroll-down-chevron {
    width: 20px;
    height: 20px;
    animation: scrollChevron 1.8s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%   { transform: translateY(0);    opacity: 1; }
    60%  { transform: translateY(12px); opacity: 0; }
    61%  { transform: translateY(0);    opacity: 0; }
    100% { transform: translateY(0);    opacity: 1; }
}

@keyframes scrollChevron {
    0%, 100% { transform: translateY(0);   opacity: 0.5; }
    50%      { transform: translateY(5px); opacity: 1; }
}

/* Note: the scroll-down hint keeps animating even with "Reduce Motion" on — it's a
   small, expected UI cue (like the carousel autoplay), not a large distracting
   effect. Heavy background effects (particles/meteors) still honour reduced motion. */

/* Touch devices have no mouse — drop the mouse graphic and show only the
   bouncing chevron. */
@media (hover: none), (max-width: 768px) {
    .scroll-down-mouse {
        display: none;
    }
    .scroll-down-chevron {
        width: 28px;
        height: 28px;
    }
    /* Pin to the REAL viewport bottom measured at load (--vh-load), so the browser's
       address bar / bottom toolbar never clips the chevron. Falls back to the hero
       bottom if the JS var isn't set yet. */
    .scroll-down {
        bottom: auto;
        top: calc(var(--vh-load, 100svh) - 54px - env(safe-area-inset-bottom));
    }
}

.hero::before {
    content: '';
    position: absolute;
    width: 620px;
    height: 620px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%);
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(79, 180, 255, 0.12), rgba(123, 119, 255, 0.08) 34%, transparent 68%);
    filter: blur(2px);
    pointer-events: none;
    z-index: 1;
}


.hero-content {
    flex: 1;
    min-width: 0;
    max-width: 600px;
    text-align: center;
    position: relative;
    z-index: 2;
    transform-style: preserve-3d;
    perspective: 1200px;
    transform: translate3d(calc(var(--mx) * -0.06), calc(var(--my) * -0.06), 0);
    transition: transform 0.3s ease-out;
}

/* Hero Stagger Entrance */
.hero-content > * {
    opacity: 0;
    transform: translateY(25px);
    animation: heroEntrance 0.7s ease forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.2s; }
.hero-content > *:nth-child(2) { animation-delay: 0.45s; }
.hero-content > *:nth-child(3) { animation-delay: 0.7s; }
.hero-content > *:nth-child(4) { animation-delay: 0.95s; }
.hero-content > *:nth-child(5) { animation-delay: 1.2s; }

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

.hero-glitch {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--primary);
    letter-spacing: 8px;
    text-transform: uppercase;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 14px rgba(127, 208, 255, 0.35);
}

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

.hero-glitch::before {
    animation: glitch-1 2s infinite linear alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
    color: var(--secondary);
}

.hero-glitch::after {
    animation: glitch-2 3s infinite linear alternate-reverse;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
    color: var(--accent);
}

@keyframes glitch-1 {
    0%, 90% { transform: translate(0); }
    91% { transform: translate(-2px, 1px); }
    93% { transform: translate(2px, -1px); }
    95% { transform: translate(-1px, 2px); }
    97% { transform: translate(1px, -2px); }
    100% { transform: translate(0); }
}

@keyframes glitch-2 {
    0%, 85% { transform: translate(0); }
    86% { transform: translate(2px, -1px); }
    89% { transform: translate(-2px, 1px); }
    92% { transform: translate(1px, 2px); }
    96% { transform: translate(-1px, -1px); }
    100% { transform: translate(0); }
}

.hero-name {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 16px;
    line-height: 1.1;
    color: #f4fbff;
    text-shadow: 0 0 22px rgba(127, 208, 255, 0.35), 0 0 42px rgba(127, 208, 255, 0.2);
    transform: translateZ(30px);
    letter-spacing: 1.6px;
}

.hero-tagline {
    font-size: 1.3rem;
    color: #c6d7ea;
    margin-bottom: 40px;
    min-height: 2em;
    white-space: nowrap;
    transform: translateZ(18px);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid rgba(127, 208, 255, 0.3);
    background: linear-gradient(120deg, rgba(127, 208, 255, 0.08), rgba(169, 139, 255, 0.07));
    backdrop-filter: blur(6px);
    box-shadow: inset 0 0 16px rgba(127, 208, 255, 0.12), 0 8px 26px rgba(0, 0, 0, 0.24);
}

.typing-text {
    color: #d7f0ff;
    text-shadow: 0 0 10px rgba(127, 208, 255, 0.28);
}

.cursor {
    color: var(--primary);
    animation: blink 0.8s infinite;
    text-shadow: 0 0 8px rgba(127, 208, 255, 0.5);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
    transform: translateZ(24px);
}

.hero-cta .btn {
    width: 220px;
    justify-content: center;
}


.hero-stats {
    display: flex;
    gap: 60px;
    justify-content: center;
}

.stat {
    text-align: center;
    position: relative;
}

.stat + .stat::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, transparent, rgba(127, 208, 255, 0.45), transparent);
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: float 2s ease-in-out infinite;
}

.scroll-indicator span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 3px;
    height: 8px;
    background: var(--primary);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 1.5s ease-in-out infinite;
}

@keyframes scroll-wheel {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    position: relative;
    z-index: 1;
    padding: 100px 0;
    perspective: 1000px;
}

.about-grid {
    display: grid;
    grid-template-columns: 275px 1fr;
    gap: 60px;
    align-items: start;
}

.image-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.image-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(79, 180, 255, 0.2), transparent 36%, rgba(169, 139, 255, 0.16));
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.image-frame:hover {
    transform: rotateX(4deg) rotateY(-4deg);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35), 0 0 28px rgba(79, 180, 255, 0.2);
    border-color: rgba(79, 180, 255, 0.4);
}

.image-frame:hover::before {
    opacity: 1;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 1rem;
}

.placeholder-icon {
    font-size: 4rem;
}

.frame-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--primary);
    border-style: solid;
}

.frame-corner.top-left {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.frame-corner.top-right {
    top: -1px;
    right: -1px;
    border-width: 2px 2px 0 0;
}

.frame-corner.bottom-left {
    bottom: -1px;
    left: -1px;
    border-width: 0 0 2px 2px;
}

.frame-corner.bottom-right {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.about-intro {
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.highlight {
    color: var(--primary);
    font-weight: 600;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-muted);
    line-height: 1.8;
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 30px;
    padding: 20px;
    background:
        linear-gradient(160deg, rgba(79, 180, 255, 0.05), transparent 45%),
        var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.detail-label {
    color: var(--primary);
    font-weight: 600;
    margin-right: 8px;
}

.detail-value {
    color: var(--text);
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills {
    position: relative;
    z-index: 1;
    padding: 100px 0;
    background: linear-gradient(180deg, transparent, rgba(127, 208, 255, 0.04), transparent);
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    transition: var(--transition);
    transform-style: preserve-3d;
    background:
        linear-gradient(160deg, rgba(79, 180, 255, 0.06), transparent 44%),
        linear-gradient(338deg, rgba(169, 139, 255, 0.08), transparent 40%),
        var(--bg-card);
}

.skill-category:hover {
    border-color: rgba(127, 208, 255, 0.38);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.38), var(--glow-primary);
    transform: rotateX(3deg) rotateY(-3deg);
}

.category-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-icon {
    font-size: 1.3rem;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.skill-name {
    font-weight: 500;
    color: var(--text);
}

.skill-percent {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--primary);
}

.skill-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    width: 0;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 1.2s ease-out;
    box-shadow: var(--glow-primary);
}

.skill-fill.animate {
    width: var(--fill-width);
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.project-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 24px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(127, 208, 255, 0.12);
    box-shadow: var(--glow-primary);
}

/* Reveal toggle button (centered). It sits BEFORE the carousel in the DOM, so
   a bottom margin spaces it from the cards once they're revealed. */
.btn-projects-toggle {
    display: flex;
    margin: 8px auto;
}

/* Only add the gap below the button when the carousel is actually open. */
.projects-carousel:not(.is-collapsed) {
    margin-top: 32px;
}

.projects-carousel.is-collapsed {
    display: none;
}

/* Google-Play store style: a Swiper carousel showing a page of cards (up to 4)
   with prev/next arrows. .projects-carousel is the Swiper viewport, .projects-grid
   is its .swiper-wrapper, and each card sits in a .swiper-slide. */
.projects-carousel {
    position: relative;
    margin-bottom: 8px;
    /* Wide side gutters so the round nav arrows sit fully OUTSIDE the cards,
       clear of them (Google-Play style), not overlapping the artwork. */
    padding: 4px 64px 8px;
}

.projects-grid {
    /* Swiper controls layout via .swiper-wrapper — clear the old grid rules. */
    display: flex;
    margin-bottom: 0;
}

/* Each slide is a column of two cards stacked vertically (the two rows). */
.projects-carousel .swiper-slide {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.projects-carousel:not(.swiper-css-mode) .swiper-slide {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.projects-carousel .swiper-slide .project-card {
    width: 100%;
    flex: 0 0 auto;   /* keep each card's natural height; don't collapse to 0 */
}

/* Lock text/image selection while dragging the carousel so a swipe never
   highlights a title or "ghost-drags" a game icon (same as the store carousel). */
.projects-carousel .project-card,
.projects-carousel .project-card * {
    user-select: none;
    -webkit-user-select: none;
}

.projects-carousel .project-card img {
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

/* Round nav arrows on both sides (reuses the store carousel's look). */
.projects-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

/* Arrows pinned to the outer gutters, fully clear of the cards. */
.projects-nav-prev { left: 0; }
.projects-nav-next { right: 0; }

.projects-nav:hover {
    border-color: rgba(127, 208, 255, 0.6);
    color: var(--primary);
    box-shadow: 0 0 16px rgba(127, 208, 255, 0.25);
}

.projects-nav::after {
    content: '';
    width: 10px;
    height: 10px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.projects-nav-prev::after { transform: rotate(-135deg); margin-left: 3px; }
.projects-nav-next::after { transform: rotate(45deg); margin-right: 3px; }

.projects-nav.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
    box-shadow: none;
    border-color: var(--border-color);
    color: var(--text);
}

.projects-pagination {
    margin-top: 16px;
    text-align: center;
}

.projects-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.22);
    opacity: 1;
    transition: var(--transition);
}

.projects-pagination .swiper-pagination-bullet-active {
    background: var(--primary);
    box-shadow: var(--glow-primary);
}

.project-card {
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(160deg, rgba(79, 180, 255, 0.06), transparent 44%),
        linear-gradient(340deg, rgba(169, 139, 255, 0.08), transparent 42%),
        var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    position: relative;
}

.project-card.hidden {
    display: none;
}

.project-card:hover {
    border-color: rgba(127, 208, 255, 0.4);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), var(--glow-primary);
}

.project-image {
    position: relative;
    background: #000;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    transition: transform 0.35s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.07);
}

/* Game Jam highlight — accent border + glow on the whole card */
.project-card.is-jam {
    border-color: rgba(255, 194, 122, 0.55);
    box-shadow: 0 0 0 1px rgba(255, 194, 122, 0.25), 0 10px 30px rgba(255, 152, 51, 0.12);
}

.project-card.is-jam:hover {
    border-color: rgba(255, 194, 122, 0.85);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 26px rgba(255, 168, 76, 0.4);
}

/* Trophy badge pinned to the game icon's top-left corner */
.jam-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #1a1206;
    background: linear-gradient(135deg, #ffd27a, #ff9a33);
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(255, 152, 51, 0.45);
    pointer-events: none;
    white-space: nowrap;
}

.jam-badge i {
    font-size: 0.7rem;
}

/* =========================================
   Published / live games — store links
   ========================================= */
.store-feature {
    margin-bottom: 48px;
    padding: 26px 0;
}

.store-feature-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 34px;
}

.store-feature-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: 0.5px;
    margin: 0;
}

.store-feature-sub {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 620px;
    margin: 12px auto 0;
}

/* --- Store carousel --- */
.store-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    /* Room on the sides for the round nav arrows so they don't overlap the cards. */
    padding: 0 52px;
}

/* Swiper viewport */
.storeSwiper {
    flex: 1;
    min-width: 0;
    padding: 4px 4px 8px;
}

.storeSwiper .swiper-slide {
    height: auto;           /* let cards stretch to equal height */
    display: flex;
}

/* Round nav arrows on both sides (Swiper navigation) */
.store-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    margin: 0;
}

.store-nav-prev { left: 0; }
.store-nav-next { right: 0; }

.store-nav:hover {
    border-color: rgba(127, 208, 255, 0.6);
    color: var(--primary);
    box-shadow: 0 0 16px rgba(127, 208, 255, 0.25);
}

/* Draw our own chevron (Swiper's default ::after glyph is turned off). */
.store-nav::after {
    content: '';
    width: 10px;
    height: 10px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.store-nav-prev::after { transform: rotate(-135deg); margin-left: 3px; }
.store-nav-next::after { transform: rotate(45deg); margin-right: 3px; }

.store-nav.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
    box-shadow: none;
    border-color: var(--border-color);
    color: var(--text);
}

/* Pagination dots */
.storeSwiper .swiper-pagination {
    position: static;
    margin-top: 16px;
}

.storeSwiper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.22);
    opacity: 1;
    transition: var(--transition);
}

.storeSwiper .swiper-pagination-bullet-active {
    background: var(--primary);
    transform: scale(1.15);
}

/* Vertical "big avatar" card: large icon on top, name + store badge below.
   No frame by default — the border/background only appear on hover. */
.store-card {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 28px 18px 24px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: transparent;
    text-decoration: none;
    transition: var(--transition);
}

.store-card[data-project-slug] {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.store-card[data-project-slug]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -3px;
}

.store-card[data-project-slug] .gp-badge {
    cursor: pointer;
}

.project-detail-sources {
    display: none !important;
}

.store-card-icon {
    flex: 0 0 auto;
    width: 140px;
    height: 140px;
    border-radius: 28px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform var(--transition);
}

.store-card:hover .store-card-icon {
    transform: scale(1.05);
}

.store-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Don't let the icon behave as a draggable image while scrubbing the carousel. */
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.store-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 0;
    width: 100%;
}

.store-card-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Don't let a drag select the title, same as the icon. */
    user-select: none;
    -webkit-user-select: none;
}

/* Official-style "GET IT ON Google Play" badge */
.gp-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 24px;
    padding: 8px 14px;
    /* Fixed width so every badge (Google Play, Steam, …) is the same size, no matter
       how long the store name is. Sized to just fit the widest label ("Google Play"). */
    width: 130px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    background: #000;
    color: #fff;
    transition: var(--transition);
}

.gp-badge-logo {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

.gp-badge-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
    /* Fixed text width so the icon lines up identically across every badge,
       regardless of label length ("Google Play" vs "Steam"). */
    width: 82px;
}

/* Brand badges keep a fixed font in both languages — the labels are proper nouns
   ("Google Play", "Steam"), and the wider VI body font (Roboto) would otherwise
   overflow the fixed-width badge. */
.gp-badge-top {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.52rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
}

.gp-badge-main {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: #fff;
    margin-top: 2px;
    white-space: nowrap;
}

.store-card:hover .gp-badge {
    border-color: rgba(127, 208, 255, 0.6);
    box-shadow: 0 0 14px rgba(127, 208, 255, 0.25);
}

/* Steam badge — Steam's signature dark-blue gradient instead of the Play black. */
.steam-badge {
    background: linear-gradient(180deg, #1b2838 0%, #0e1621 100%);
    border-color: rgba(102, 192, 244, 0.35);
}

.store-card:hover .steam-badge {
    border-color: rgba(102, 192, 244, 0.75);
    box-shadow: 0 0 14px rgba(102, 192, 244, 0.3);
}

/* itch.io badge — itch's signature red/pink instead of the Play black. */
.itch-badge {
    background: #ff2449;
    border-color: rgba(255, 255, 255, 0.4);
}

.store-card:hover .itch-badge {
    border-color: #fff;
    box-shadow: 0 0 14px rgba(255, 36, 73, 0.45);
}

/* Google Play badge pinned to the in-grid game icon */
.store-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #061320;
    background: var(--gradient-primary);
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(127, 208, 255, 0.45);
    pointer-events: none;
    white-space: nowrap;
}

/* Official Google Play 4-color logo */
.gp-icon {
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
    display: inline-block;
    vertical-align: -0.12em;
}

.store-badge .gp-icon {
    width: 0.8rem;
    height: 0.8rem;
}

/* Cards per view (1 / 2 / 3) are handled by Swiper's breakpoints in main.js. */

/* Tablet & mobile: hide the arrows (swipe + dots only) and give the carousel
   the full width, like the reference site. */
@media (max-width: 1024px) {
    .store-nav {
        display: none;
    }
    .store-carousel {
        padding: 0;
    }
}

@media (max-width: 600px) {
    .store-feature {
        padding: 18px;
    }
    /* Bigger cards on mobile — larger icon, roomier padding. */
    .store-card {
        padding: 30px 20px 26px;
    }
    .store-card-icon {
        width: 128px;
        height: 128px;
    }
}

.project-info {
    padding: 12px 13px 11px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-tags {
    display: flex;
    gap: 5px;
    margin-bottom: 7px;
    flex-wrap: wrap;
}

.tag {
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--primary);
    background: rgba(127, 208, 255, 0.1);
    padding: 2px 8px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    transition: color var(--transition);
    /* One-line, ellipsised: long names (e.g. "Card Association Sort") no longer
       wrap and make their card taller than the others in the row. Using block +
       nowrap (not flex) so text-overflow works; the store icon flows inline. */
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Store icon next to the title for games live on Google Play */
.title-store {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    vertical-align: middle;   /* sit centred on the now-inline title text */
    margin-left: 6px;
    transition: transform var(--transition);
}

.title-store .gp-icon {
    width: 0.85rem;
    height: 0.85rem;
    vertical-align: 0;
}

.project-card:hover .title-store {
    transform: scale(1.12);
}

.project-card:hover .project-title {
    color: var(--primary);
}

.project-desc {
    display: none;
}

/* Company + Role meta */
.project-meta {
    display: flex;
    gap: 20px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding-top: 10px;
}

.project-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meta-label {
    font-family: var(--font-display);
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.6;
}

.meta-value {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-bright);
}

/* Arrow icon */
.project-arrow {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.3s ease, color 0.3s ease;
    pointer-events: none;
}

.project-card:hover .project-arrow {
    opacity: 1;
    color: var(--primary);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
    position: relative;
    z-index: 1;
    padding: 100px 0;
    background: linear-gradient(180deg, transparent, rgba(127, 208, 255, 0.04), transparent);
    perspective: 1000px;
}

.contact-center {
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}

.contact-eyebrow {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.contact-heading {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 3.2vw, 2.2rem);
    font-weight: 900;
    color: var(--text-bright);
    line-height: 1.15;
    margin-bottom: 20px;
}

.contact-highlight {
    color: var(--primary);
    white-space: nowrap;
}

.contact-sub {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 40px;
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    margin-bottom: 32px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 0;
    min-width: 0;
    padding: 14px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: var(--text-bright);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}

/* Platform icons sized independently of the (smaller) label text. */
.contact-btn i {
    font-size: 1.35rem;
    line-height: 1;
}

.contact-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 768px) {
    /* On narrow screens 5 buttons in one row is too cramped — let them wrap. */
    .contact-actions {
        flex-wrap: wrap;
    }
    .contact-btn {
        flex: 1 1 120px;
        min-width: 120px;
        padding: 12px 14px;
        gap: 6px;
        font-size: 0.68rem;
        letter-spacing: 1px;
    }
    .contact-btn i {
        font-size: 1.2rem;
    }
}

/* Thông tin studio đối tác */
.collab-card {
    position: relative !important;
}

.collab-info {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    z-index: 20;
    display: grid;
    gap: 2px;
    width: max-content;
    max-width: 190px;
    padding: 8px 11px;
    visibility: hidden;
    border: 1px solid rgba(195, 215, 235, 0.2);
    border-radius: 9px;
    background: #111722;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity 0.18s ease, visibility 0.18s ease;
    white-space: nowrap;
}

.collab-info::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-right: 1px solid rgba(195, 215, 235, 0.2);
    border-bottom: 1px solid rgba(195, 215, 235, 0.2);
    background: inherit;
    transform: translate(-50%, -50%) rotate(45deg);
}

.collab-info-name {
    color: var(--text-bright);
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
}

.collab-info-site {
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    line-height: 1.25;
}

.collab-card:hover,
.collab-card:focus-visible {
    z-index: 10;
}

.collab-card:hover .collab-info,
.collab-card:focus-visible .collab-info {
    visibility: visible;
    opacity: 1;
}

.collab-card:focus-visible .collab-logo-wrap {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 24%, transparent) !important;
}

html[data-theme="light"] .collab-info {
    border-color: rgba(42, 67, 92, 0.18);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(30, 50, 70, 0.18);
}

html[data-theme="light"] .collab-info::after {
    border-color: rgba(42, 67, 92, 0.18);
}

.contact-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
    letter-spacing: 0.5px;
}

.contact-meta a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.contact-meta a:hover {
    color: var(--primary);
    opacity: 1;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    position: relative;
    z-index: 1;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.footer-credit {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   ANIMATIONS - Fade In on Scroll
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   PROJECT MODAL
   ============================================ */
body.modal-open > *:not(.project-modal):not(.media-lightbox) {
    pointer-events: none;
    user-select: none;
}

html.project-route-pending body > *:not(.project-modal):not(.media-lightbox) {
    visibility: hidden;
}

.project-modal {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: flex;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    align-items: center;
    justify-content: center;
    padding:
        max(12px, env(safe-area-inset-top))
        max(12px, env(safe-area-inset-right))
        max(12px, env(safe-area-inset-bottom))
        max(12px, env(safe-area-inset-left));
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.project-modal.is-instant-open,
.project-modal.is-instant-open .modal-backdrop,
.project-modal.is-instant-open .modal-content {
    transition: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 22%, rgba(151, 205, 255, 0.1), transparent 52%),
        rgba(1, 3, 11, 0.78);
    /* Static, light blur — not animated (animating backdrop-filter is the
       single most expensive part of opening the modal). */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.project-modal.active .modal-backdrop {
    opacity: 1;
}

.modal-content {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    width: 92%;
    max-width: 980px;
    height: min(88vh, 880px);
    height: min(88svh, 880px);
    height: min(88dvh, 880px);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #0d0d15;
    opacity: 0;
    transform: translateY(20px);
    box-shadow: 0 40px 85px rgba(0, 0, 0, 0.7), 0 0 36px rgba(127, 208, 255, 0.15);
    transition: opacity 0.2s ease, transform 0.22s ease;
    z-index: 1;
}


.project-modal.active .modal-content {
    opacity: 1;
    transform: translateY(0);
}

.project-modal.closing .modal-content {
    opacity: 0;
    transform: translateY(12px);
}

/* Scrollable inner container */
.modal-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.modal-scroll::-webkit-scrollbar {
    width: 8px;
}

.modal-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 8px;
}

/* Hero banner with video */
.modal-hero {
    position: relative;
    width: calc(100% - 88px);
    margin: 0 44px 16px;
    aspect-ratio: 16 / 9;
    max-height: 50vh;
    background: radial-gradient(circle at 50% 40%, rgba(127, 208, 255, 0.18) 0%, rgba(10, 10, 18, 0.95) 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: zoom-in;
}

.modal-hero-video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

/* Body content */
.modal-body {
    padding: 22px 44px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-header-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-bright);
    letter-spacing: 0.5px;
    line-height: 1.15;
    margin: 0;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    min-width: 38px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(10, 10, 18, 0.6);
    color: var(--text-bright);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 5;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.modal-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.modal-inline-link {
    display: inline;
    color: var(--primary);
    font-weight: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(127, 208, 255, 0.42);
    text-underline-offset: 3px;
    white-space: normal;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.modal-inline-link:hover {
    color: #b8e7ff;
    text-decoration-color: currentColor;
}

.modal-inline-link:focus-visible {
    border-radius: 2px;
    outline: 2px solid rgba(127, 208, 255, 0.72);
    outline-offset: 2px;
}

.modal-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-tag {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(127, 208, 255, 0.1);
    border: 1px solid rgba(127, 208, 255, 0.22);
    padding: 4px 10px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* Phone-mockup screenshots strip */
.modal-screenshots-wrap {
    padding: 0 44px 28px;
}

.modal-screenshots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 8px 0 4px;
}

.modal-screenshot {
    position: relative;
    flex: 0 1 200px;
    background: #0a0a0f;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modal-screenshot:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

/* Frame hugs the real image — height follows the image's own aspect ratio,
   so mixed-size screenshots have no letterbox bars and sit close together. */
.modal-screenshot img,
.modal-screenshot video {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    background: #000;
}

/* Video frames keep a fixed ratio so the player isn't a zero-height sliver
   before metadata loads. */
.modal-screenshot--video {
    aspect-ratio: 9 / 16;
}

.modal-screenshot.is-pending {
    aspect-ratio: var(--media-ratio, 9 / 16);
}

.modal-screenshots-wrap.is-landscape .modal-screenshot.is-pending {
    aspect-ratio: var(--media-ratio, 16 / 9);
}

.modal-screenshot--video video {
    height: 100%;
}

.modal-screenshot--placeholder img {
    object-fit: contain;
    background: #0a0a0f;
}

.modal-screenshot--video {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 18px rgba(127, 208, 255, 0.18);
}

/* Landscape project — screenshots split into 2 cols on desktop, 1 col on mobile.
   No fixed ratio: each frame's height follows its own image. */
.modal-screenshots-wrap.is-landscape .modal-screenshot {
    flex: 0 1 calc(50% - 8px);
    max-width: none;
}
.modal-screenshots-wrap.is-landscape .modal-screenshot--video {
    aspect-ratio: 16 / 9;
}
/* The lead video in a landscape project spans the full strip width so it
   reads as the hero, with screenshots tiled in 2 columns beneath it. */
.modal-screenshots-wrap.is-landscape .modal-screenshot--video:first-child {
    flex-basis: 100%;
}

/* Media Lightbox (fullscreen viewer) */
.media-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.media-lightbox.active {
    display: flex;
    animation: lightboxFadeIn 0.2s ease both;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: zoom-out;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(20, 20, 28, 0.7);
    color: var(--text-bright);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.18s ease, transform 0.18s ease;
    z-index: 2;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: scale(1.05);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lightboxScaleIn 0.25s cubic-bezier(0.2, 0.76, 0.24, 1) both;
}

@keyframes lightboxScaleIn {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}

.lightbox-content.slide-in-right {
    animation: lightboxSlideInRight 0.28s cubic-bezier(0.2, 0.76, 0.24, 1) both;
}

.lightbox-content.slide-in-left {
    animation: lightboxSlideInLeft 0.28s cubic-bezier(0.2, 0.76, 0.24, 1) both;
}

@keyframes lightboxSlideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes lightboxSlideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

.lightbox-content img,
.lightbox-content video {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    display: block;
    border-radius: 6px;
    background: #000;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(20, 20, 28, 0.7);
    color: var(--text-bright);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.18s ease, transform 0.18s ease;
    z-index: 3;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(20, 20, 28, 0.7);
    color: var(--text-bright);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 3;
}

@media (max-width: 768px) {
    .lightbox-nav {
        display: none !important;
    }
    .lightbox-counter {
        bottom: 16px;
        font-size: 0.72rem;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.btn-show-more {
    display: none;
    margin: 28px auto;
}

/* Collapsed projects beyond the limit — hidden at every screen size.
   JS toggles .btn-show-more visibility via inline display. */
.project-card.collapse-hidden {
    display: none;
}

@media (max-width: 768px) {
    .planet-a {
        width: 190px;
        height: 190px;
        right: -80px;
    }

    .planet-b {
        width: 120px;
        height: 120px;
        left: -48px;
    }

    .hamburger {
        display: flex;
    }

    .lang-toggle {
        margin-left: auto;
        margin-right: 12px;
    }

    .hamburger {
        position: relative;
        z-index: 20;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        background: rgba(7, 9, 20, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 100px 24px 24px;
        gap: 18px;
        transition: right 0.4s ease;
        border-left: 1px solid var(--border-color);
        z-index: 10;
        overflow-y: auto;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 0.95rem;
        padding: 16px 18px;
        line-height: 1.5;
        display: block;
        width: 100%;
    }

    .hero-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .hero-content {
        text-align: center;
        width: 100%;
        max-width: 100%;
    }

    /* Hide the interactive hero preview on mobile — it overlapped the
       scroll-down indicator and the hero reads cleaner without it. */
    .hero-model {
        display: none;
    }

    .hero-name {
        font-size: 2.2rem;
    }

    .hero-stats {
        gap: 30px;
        justify-content: center;
    }

    .stat-number {
        font-size: 2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        max-width: 280px;
        margin: 0 auto;
    }

    .about-details {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* Tablet: smaller side padding so 2–3 cards fit nicely. */
    .projects-carousel {
        padding: 4px 44px 8px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .hero-stats {
        gap: 30px;
    }

    .stat + .stat::before {
        left: -15px;
    }

    .navbar {
        padding: 12px 20px;
    }

    .navbar.scrolled {
        padding: 12px 20px;
    }

    .hero {
        padding-bottom: calc(100px + env(safe-area-inset-bottom));
    }

    .scroll-indicator {
        position: absolute;
        left: 0;
        right: 0;
        bottom: calc(14px + env(safe-area-inset-bottom));
        width: max-content;
        margin: 0 auto;
        z-index: 3;
    }

    .modal-content {
        width: 95%;
        height: 92vh;
        height: 92svh;
        height: 92dvh;
        max-height: 100%;
        border-radius: 12px;
    }

    .modal-body {
        padding: 18px 20px 12px;
        gap: 10px;
    }

    .modal-hero {
        width: calc(100% - 40px);
        margin: 0 20px 14px;
        max-height: 42vh;
    }

    .modal-screenshots-wrap {
        padding: 0 20px 20px;
    }

    .modal-title {
        font-size: 1.4rem;
    }

    .modal-desc {
        font-size: 0.88rem;
        line-height: 1.55;
    }

    /* Portrait screenshots: horizontal swipe carousel so the tall frames don't
       make the modal endlessly long. Each frame keeps its real aspect ratio. */
    .modal-screenshots {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 10px;
        padding: 8px 0 10px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .modal-screenshot {
        flex: 0 0 auto;
        width: 62vw;
        max-width: 240px;
        border-radius: 8px;
        scroll-snap-align: center;
    }

    /* Landscape screenshots stay a single vertical column (swiping wide 16:9
       frames horizontally would shrink them too much). */
    .modal-screenshots-wrap.is-landscape .modal-screenshots {
        flex-wrap: wrap;
        overflow-x: visible;
        scroll-snap-type: none;
        gap: 8px;
        padding-top: 0;
    }

    .modal-screenshots-wrap.is-landscape .modal-screenshot {
        flex: 0 1 100%;
        width: auto;
        max-width: none;
    }

    /* Thin scrollbar for the portrait carousel */
    .modal-screenshots::-webkit-scrollbar {
        height: 4px;
    }
    .modal-screenshots::-webkit-scrollbar-thumb {
        background: rgba(127, 208, 255, 0.35);
        border-radius: 4px;
    }
    .modal-screenshots-wrap.is-landscape .modal-screenshots::-webkit-scrollbar {
        height: 0;
    }
}

/* Lightweight rendering mode for mobile / coarse pointer devices */
html.perf-lite {
    scroll-behavior: auto;
}

html.perf-lite body::before {
    animation: none !important;
    filter: none !important;
    opacity: 0.35;
}

html.perf-lite .navbar,
html.perf-lite .nav-links,
html.perf-lite .hero-tagline,
html.perf-lite .modal-backdrop {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.perf-lite .hero-content {
    transform: none !important;
}

html.perf-lite #particles {
    opacity: 0.45;
}

html.perf-lite .planet-ring {
    animation-duration: 32s !important;
}

html.perf-lite .hero-glitch::before,
html.perf-lite .hero-glitch::after,
html.perf-lite .scroll-indicator,
html.perf-lite .cursor {
    animation: none !important;
}

html.perf-min #particles,
html.perf-min .space-parallax,
html.perf-min #meteorField {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    body > *:not(.project-modal):not(.media-lightbox) {
        transition: none !important;
    }

    body.modal-open > *:not(.project-modal):not(.media-lightbox) {
        filter: none !important;
        transform: none !important;
    }

    body::before {
        animation: none;
    }

    .planet-a,
    .planet-b,
    .meteor {
        animation: none !important;
    }

    .project-card,
    .skill-category,
    .image-frame,
    .about-details,
    .hero-content,
    .social-link {
        transform: none !important;
        transition: none !important;
    }

    .modal-backdrop,
    .modal-content,
    .project-modal.active .modal-content,
    .project-modal.closing .modal-content {
        animation: none !important;
        transition: none !important;
        filter: none !important;
        transform: none !important;
    }
}

@media (max-width: 480px) {
    /* Phone: tighter side padding; carousel shows 1 card per page (see JS breakpoints). */
    .projects-carousel {
        padding: 4px 40px 8px;
    }

    .hero-name {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .hero-tagline {
        font-size: 1rem;
        padding: 8px 14px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn {
        width: 220px;
        max-width: 100%;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-label {
        white-space: nowrap;
        font-size: 0.72rem;
    }

}

/* --- Collaborated With Section --- */
/* "Proudly collaborated with" now lives inside the About section */
.collaborated-block {
    margin-top: 72px;
    padding-top: 56px;
    border-top: 1px solid var(--border-color);
}

.collaborated-header {
    text-align: center;
    margin-bottom: 52px;
}

.collaborated-label {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 14px;
    opacity: 0.9;
}

.collaborated-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    color: var(--text-bright);
}

.collab-track {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.collab-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    background: none;
    border: none;
    border-radius: 0;
    transition: var(--transition), opacity 0.6s ease, translate 0.6s ease;
    cursor: default;
    text-decoration: none;
    color: inherit;
    flex: 1 1 160px;
    max-width: 170px;
    opacity: 0;
    translate: 0 32px;
}

.collab-card.collab-visible {
    opacity: 1;
    translate: 0 0;
}

a.collab-card {
    cursor: pointer;
}

.collab-logo-wrap {
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    overflow: hidden;
}

.collab-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.collab-card:hover .collab-logo-wrap img {
    transform: scale(1.08);
}

.collab-logo-text {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 1px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.collab-card:hover .collab-logo-text {
    color: var(--primary);
}

.collab-role {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(127, 208, 255, 0.08);
    border: 1px solid rgba(127, 208, 255, 0.2);
    border-radius: 4px;
    padding: 4px 10px;
    letter-spacing: 0.5px;
    text-align: center;
    transition: var(--transition);
}

.collab-card:hover .collab-role {
    color: var(--primary);
    background: rgba(127, 208, 255, 0.14);
    border-color: rgba(127, 208, 255, 0.4);
}

@media (max-width: 768px) {
    .collaborated-block {
        margin-top: 44px;
        padding-top: 36px;
    }

    .collaborated-header {
        margin-bottom: 28px;
    }

    .collaborated-title {
        font-size: 1.3rem;
    }

    .collab-track {
        gap: 12px;
    }

    .collab-card {
        flex: 1 1 calc(33% - 12px);
        max-width: calc(33% - 12px);
        padding: 12px 8px;
    }

    .collab-logo-wrap {
        width: 80px;
        height: 80px;
    }
}

/* ==============================================================
   ORBIT-INSPIRED PRODUCT STUDIO REFRESH
   A focused, original visual system for TheColors.
   ============================================================== */
:root {
    --primary: #78f0c1;
    --primary-dark: #32c995;
    --secondary: #a8b5ff;
    --accent: #ffd166;
    --space-blue: #7da7ff;
    --space-violet: #9b8cff;
    --bg-dark: #070a0f;
    --bg-card: #0e131b;
    --bg-card-hover: #131a24;
    --text: #dce4ee;
    --text-muted: #8b98a8;
    --text-bright: #f7f9fc;
    --gradient-primary: linear-gradient(135deg, #8ff4ce 0%, #72d7ff 100%);
    --gradient-accent: linear-gradient(135deg, #a8b5ff 0%, #78f0c1 100%);
    --border-color: rgba(184, 203, 224, 0.14);
    --border-strong: rgba(190, 210, 232, 0.24);
    --surface-soft: rgba(255, 255, 255, 0.035);
    --glow-primary: 0 0 34px rgba(83, 224, 176, 0.16);
    --glow-secondary: 0 0 30px rgba(143, 163, 255, 0.14);
    --font-display: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: 0.28s cubic-bezier(0.2, 0.75, 0.25, 1);
}

html.lang-vi {
    --font-display: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;
}

html {
    scroll-padding-top: 108px;
    overflow-x: clip;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 76% 9%, rgba(104, 143, 255, 0.11), transparent 28rem),
        radial-gradient(circle at 12% 26%, rgba(62, 221, 165, 0.08), transparent 25rem),
        linear-gradient(180deg, #070a0f 0%, #080b11 46%, #070a0f 100%);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
    overflow-x: clip;
}

body::before {
    background:
        radial-gradient(circle at 70% 16%, rgba(110, 143, 255, 0.12), transparent 24rem),
        radial-gradient(circle at 18% 52%, rgba(69, 220, 169, 0.06), transparent 26rem);
    filter: none;
    animation: studioGlow 18s ease-in-out infinite alternate;
}

body::after {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 72%);
    transform: none;
    opacity: 0.65;
}

@keyframes studioGlow {
    from { opacity: 0.72; transform: translate3d(0, 0, 0); }
    to { opacity: 1; transform: translate3d(0, 22px, 0); }
}

#particles,
.space-parallax,
#meteorField {
    display: none !important;
}

* {
    scrollbar-color: rgba(120, 240, 193, 0.6) rgba(255, 255, 255, 0.04);
}

*::-webkit-scrollbar-thumb {
    background: rgba(120, 240, 193, 0.6);
    border-color: #080b11;
}

.container {
    width: min(100%, 1240px);
    max-width: 1240px;
    padding-inline: 32px;
}

a {
    color: var(--primary);
}

/* Floating product navigation */
.navbar,
.navbar.scrolled {
    top: 18px;
    right: auto;
    left: 50%;
    width: min(calc(100% - 36px), 1180px);
    padding: 9px 10px 9px 18px;
    transform: translateX(-50%);
    background: rgba(10, 14, 20, 0.78);
    border: 1px solid rgba(195, 215, 235, 0.15);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28), inset 0 1px rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
}

.navbar.scrolled {
    background: rgba(8, 12, 18, 0.92);
    border-color: rgba(195, 215, 235, 0.2);
}

.nav-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.nav-logo::before,
.footer-logo::before {
    display: none;
}

.logo-bracket {
    display: none;
}

.logo-text {
    color: var(--text-bright);
}

.logo-text::after {
    content: '.';
    color: var(--primary);
}

.nav-links {
    gap: 2px;
    padding: 3px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
}

.nav-links a {
    padding: 8px 14px;
    border-radius: 10px;
    color: #9aa7b7;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-bright);
    background: rgba(255, 255, 255, 0.065);
}

.nav-links a.active::after {
    display: none;
}

.lang-toggle {
    min-height: 36px;
    margin-left: 6px;
    padding: 7px 11px;
    border-color: var(--border-color);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.035);
    box-shadow: none;
}

.lang-toggle:hover {
    border-color: rgba(120, 240, 193, 0.4);
    box-shadow: none;
}

.lang-flag {
    font-family: var(--font-mono);
    font-size: 0.63rem;
    letter-spacing: 0;
}

.lang-flag.active {
    color: var(--primary);
    text-shadow: none;
}

/* Hero: editorial copy + a live Unity product frame */
.hero {
    min-height: 100svh;
    padding: 142px 42px 104px;
    overflow: hidden;
    overflow: clip;
}

.hero::before {
    width: min(70vw, 880px);
    height: min(70vw, 880px);
    top: 45%;
    left: 77%;
    background: radial-gradient(circle, rgba(99, 128, 224, 0.12), rgba(65, 220, 168, 0.035) 42%, transparent 70%);
    filter: blur(10px);
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
    gap: clamp(46px, 6vw, 92px);
    width: min(100%, 1240px);
    max-width: 1240px;
}

.hero-content {
    max-width: 660px;
    text-align: left;
    transform: none;
    perspective: none;
}

.hero-content > *:nth-child(1) { animation-delay: 0.06s; }
.hero-content > *:nth-child(2) { animation-delay: 0.14s; }
.hero-content > *:nth-child(3) { animation-delay: 0.22s; }
.hero-content > *:nth-child(4) { animation-delay: 0.3s; }
.hero-content > *:nth-child(5) { animation-delay: 0.38s; }
.hero-content > *:nth-child(6) { animation-delay: 0.46s; }

.hero-glitch {
    display: block;
    margin-bottom: 13px;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-shadow: none;
}

.hero-glitch::before,
.hero-glitch::after {
    display: none;
}

.hero-name {
    max-width: 660px;
    margin-bottom: 22px;
    color: var(--text-bright);
    font-family: var(--font-display);
    font-size: clamp(3.7rem, 6vw, 5.9rem);
    font-weight: 800;
    letter-spacing: -0.07em;
    line-height: 0.92;
    text-wrap: balance;
    white-space: nowrap;
    text-shadow: none;
    transform: none;
}

.hero-name::after {
    content: '.';
    color: var(--primary);
}

.hero-lead {
    max-width: 570px;
    margin-bottom: 19px;
    color: #aab6c5;
    font-size: clamp(1rem, 1.4vw, 1.14rem);
    line-height: 1.72;
}

.hero-tagline {
    min-height: auto;
    margin: 0 0 28px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: #bdc8d5;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    transform: none;
    backdrop-filter: none;
}

.hero-tagline::before {
    content: '›';
    margin-right: 8px;
    color: var(--primary);
}

.typing-text {
    color: #bdc8d5;
    text-shadow: none;
}

.hero-cta {
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 34px;
    transform: none;
}

.hero-cta .btn {
    width: auto;
}

.btn {
    min-height: 44px;
    gap: 9px;
    padding: 11px 17px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: none;
}

.btn-primary {
    background: var(--text-bright);
    color: #080b10;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
}

.btn-primary:hover {
    background: var(--primary);
    color: #07110d;
    box-shadow: 0 14px 40px rgba(69, 220, 169, 0.14);
}

.btn-outline {
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.035);
    color: #d8e0ea;
}

.btn-outline:hover {
    border-color: rgba(120, 240, 193, 0.35);
    background: rgba(120, 240, 193, 0.07);
    box-shadow: none;
    color: var(--text-bright);
}

.hero-cta .btn .btn-icon {
    width: 17px;
    height: 17px;
    font-size: 1rem;
}

.hero-stats {
    justify-content: flex-start;
    gap: 0;
    width: min(100%, 560px);
    padding-top: 4px;
}

.stat {
    flex: 1;
    text-align: left;
}

.stat + .stat {
    padding-left: 24px;
    margin-left: 24px;
    border-left: 1px solid var(--border-color);
}

.stat + .stat::before {
    display: none;
}

.stat-number {
    margin-bottom: 6px;
    color: var(--text-bright);
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    font-weight: 750;
    letter-spacing: -0.06em;
}

.stat-label {
    color: #738092;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-model {
    position: relative;
    flex: none;
    width: 100%;
    height: auto;
    perspective: 1200px;
}

.hero-model::before {
    content: '';
    position: absolute;
    inset: 15% 8% -8%;
    z-index: -1;
    border-radius: 50%;
    background: rgba(86, 219, 175, 0.1);
    filter: blur(70px);
}

.mac-window {
    overflow: hidden;
    border: 1px solid rgba(196, 216, 237, 0.2);
    border-radius: 20px;
    background: #0c1118;
    box-shadow: 0 36px 90px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(255, 255, 255, 0.018) inset;
}

.hero-window {
    width: 100%;
    transform: none;
    transition: border-color 0.35s ease;
}

.hero-window:hover {
    border-color: rgba(120, 240, 193, 0.32);
}

.window-bar {
    position: relative;
    display: grid;
    grid-template-columns: 88px 1fr 88px;
    align-items: center;
    height: 48px;
    padding: 0 15px;
    border-bottom: 1px solid rgba(196, 216, 237, 0.12);
    background: linear-gradient(180deg, #151b24, #111720);
}

.traffic-lights {
    display: flex;
    align-items: center;
    gap: 7px;
}

.traffic-light {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.24);
}

.traffic-close { background: #ff5f57; }
.traffic-minimize { background: #febc2e; }
.traffic-expand { background: #28c840; }

.window-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    color: #909cac;
    font-family: var(--font-mono);
    font-size: 0.61rem;
    white-space: nowrap;
}

.window-title svg {
    width: 15px;
    height: 15px;
    fill: var(--primary);
    opacity: 0.86;
}

.window-play-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    min-width: 74px;
    min-height: 28px;
    gap: 7px;
    padding: 5px 9px;
    border: 1px solid rgba(120, 240, 193, 0.28);
    border-radius: 8px;
    background: rgba(120, 240, 193, 0.07);
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    touch-action: manipulation;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.window-play-toggle:hover {
    border-color: rgba(120, 240, 193, 0.58);
    background: rgba(120, 240, 193, 0.13);
    color: #b8ffe3;
}

.window-play-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.window-play-toggle-icon {
    font-size: 0.52rem;
    line-height: 1;
}

.hero-window.is-game-active .window-play-toggle {
    border-color: rgba(155, 130, 255, 0.38);
    background: rgba(155, 130, 255, 0.1);
    color: #c7b8ff;
}

.window-canvas {
    position: relative;
    height: clamp(350px, 34vw, 440px);
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 48%, rgba(87, 112, 155, 0.21), transparent 42%),
        linear-gradient(180deg, #0b1017, #090d13);
}

.window-canvas::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 90%);
    pointer-events: none;
}

.preview-shell {
    isolation: isolate;
}

.preview-panel {
    position: absolute;
    inset: 0;
}

.preview-panel[hidden] {
    display: none !important;
}

.model-preview {
    z-index: 1;
}

.model-preview model-viewer {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    background-color: transparent;
    --poster-color: transparent;
    --progress-bar-height: 0px;
}

.game-library {
    z-index: 2;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 25px 28px 20px;
    background:
        radial-gradient(circle at 82% 12%, rgba(155, 130, 255, 0.14), transparent 36%),
        radial-gradient(circle at 15% 88%, rgba(79, 220, 255, 0.09), transparent 34%),
        linear-gradient(165deg, rgba(14, 20, 29, 0.98), rgba(7, 10, 15, 0.99));
    scrollbar-width: thin;
    scrollbar-color: rgba(120, 240, 193, 0.32) transparent;
}

.game-library-heading {
    position: relative;
    z-index: 1;
    flex: none;
    margin-bottom: 15px;
}

.game-library-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.game-library-heading h3 {
    margin: 0 0 4px;
    color: var(--text-bright);
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.2vw, 1.45rem);
    letter-spacing: -0.04em;
}

.game-library-heading p {
    max-width: 360px;
    margin: 0;
    color: #7f8c9d;
    font-size: 0.65rem;
    line-height: 1.45;
}

.game-library-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(142px, 174px));
    justify-content: center;
    gap: 12px;
}

.game-library-item {
    min-width: 0;
}

.game-library-card {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    width: 100%;
    height: 184px;
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(196, 216, 237, 0.15);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    color: inherit;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
    transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.game-library-card:hover {
    border-color: rgba(120, 240, 193, 0.42);
    background: rgba(120, 240, 193, 0.055);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.game-library-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.game-library-cover {
    position: relative;
    display: grid;
    min-height: 0;
    overflow: hidden;
    place-items: center;
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 139, 61, 0.2), transparent 44%),
        linear-gradient(145deg, #171e29, #090c12);
}

.game-library-cover img {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.45);
}

.game-library-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 11px 11px;
    text-align: center;
}

.game-library-copy strong {
    overflow: hidden;
    color: #e9eef5;
    font-size: 0.7rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unity-playground {
    z-index: 2;
    display: grid;
    isolation: isolate;
    place-items: center;
}

.game-dialog-title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

.hero-model.is-player-active {
    perspective: none;
}

.hero-model.is-player-active .hero-window {
    transform: none !important;
}

.hero-model.is-player-active .preview-shell {
    isolation: auto;
}

body.game-player-active .hero-inner {
    z-index: auto;
}

body.game-popup-open {
    overflow: hidden;
}

body.game-popup-open .hero {
    z-index: 12000;
    overflow: visible !important;
}

body.game-popup-open .hero-window,
body.game-popup-open .window-canvas {
    overflow: visible;
}

.unity-playground[data-expanded="true"] {
    position: fixed;
    inset: 0;
    z-index: 13000;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    box-sizing: border-box;
    padding:
        max(20px, env(safe-area-inset-top))
        max(20px, env(safe-area-inset-right))
        max(20px, env(safe-area-inset-bottom))
        max(20px, env(safe-area-inset-left));
    overflow: hidden;
    place-items: center;
    background:
        radial-gradient(circle at 50% 44%, rgba(94, 135, 175, 0.16), transparent 42%),
        rgba(2, 5, 9, 0.96);
}

.unity-playground[data-expanded="true"] .unity-phone {
    width: auto;
    height: min(920px, 100%);
    max-width: 100%;
    max-height: none;
}

.game-player-controls {
    position: absolute;
    right: 8px;
    bottom: 8px;
    left: 8px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    pointer-events: none;
}

.game-player-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    gap: 6px;
    box-sizing: border-box;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background: rgba(8, 12, 18, 0.82);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.32);
    color: #eef3f8;
    font-family: var(--font-mono);
    font-size: 0.5rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.04em;
    text-decoration: none;
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
    appearance: none;
    -webkit-appearance: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.game-player-control:hover {
    border-color: rgba(120, 240, 193, 0.52);
    background: rgba(15, 24, 30, 0.94);
    color: var(--primary);
    transform: translateY(-1px);
}

.game-player-control:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.game-player-control[hidden] {
    display: none;
}

.game-itch-link {
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(255, 36, 73, 0.9);
    color: #fff;
}

.game-itch-link:hover {
    border-color: #fff;
    background: #ff2449;
    color: #fff;
}

.game-itch-link .fa-itch-io {
    font-size: 0.85rem;
    line-height: 1;
}

.game-expand-icon {
    display: block;
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.game-expand-icon[hidden] {
    display: none;
}

.unity-playground[data-expanded="true"] .game-player-controls {
    right: 12px;
    bottom: 12px;
    left: 12px;
}

.unity-phone-stage {
    position: relative;
    z-index: 1;
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
}

.unity-playground::after {
    content: '';
    position: absolute;
    inset: 13% 20%;
    z-index: 0;
    border: 1px solid rgba(120, 240, 193, 0.08);
    border-radius: 50%;
    box-shadow:
        0 0 0 44px rgba(124, 137, 255, 0.025),
        0 0 0 88px rgba(120, 240, 193, 0.018);
    transform: rotate(-12deg);
    pointer-events: none;
}

.unity-phone {
    position: relative;
    z-index: 2;
    height: calc(100% - 22px);
    max-height: 418px;
    aspect-ratio: 11 / 20;
    overflow: hidden;
    box-sizing: border-box;
    padding: 26px 7px 8px;
    border: 1px solid rgba(235, 232, 225, 0.48);
    border-radius: 31px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.38), transparent 12%),
        linear-gradient(120deg, #d4d0c8 0%, #77736c 9%, #282827 26%, #161717 52%, #716e68 82%, #d9d5cc 100%);
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.58),
        0 0 0 2px #050606,
        0 0 0 3px rgba(230, 226, 216, 0.16),
        inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.unity-phone::before {
    content: '';
    position: absolute;
    inset: 3px;
    z-index: 3;
    border: 1px solid rgba(0, 0, 0, 0.82);
    border-radius: 28px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
    pointer-events: none;
}

.unity-phone[data-state="idle"]:hover {
    border-color: rgba(245, 242, 235, 0.7);
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.58),
        0 0 0 2px #050606,
        0 0 0 3px rgba(230, 226, 216, 0.24),
        inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.unity-phone-screen {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    contain: paint;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: #030507;
    box-shadow:
        0 0 0 2px #020303,
        inset 0 0 24px rgba(0, 0, 0, 0.72);
}

.iphone-top-sensors,
.iphone-side-button {
    position: absolute;
    display: block;
    pointer-events: none;
}

.iphone-top-sensors {
    top: 0;
    right: 0;
    left: 0;
    z-index: 9;
    height: 26px;
}

.iphone-front-camera {
    position: absolute;
    top: 10px;
    left: calc(50% - 34px);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 38% 35%, #385772 0 12%, #101b27 28%, #020305 62%);
    box-shadow:
        inset 0 0 0 1px rgba(101, 143, 178, 0.32),
        0 0 3px rgba(48, 90, 130, 0.3);
}

.iphone-earpiece {
    position: absolute;
    top: 11px;
    left: 50%;
    width: 31px;
    height: 3px;
    border-radius: 999px;
    background: #070808;
    box-shadow:
        inset 0 1px rgba(255, 255, 255, 0.08),
        0 1px rgba(0, 0, 0, 0.55);
    transform: translateX(-50%);
}

.iphone-side-button {
    z-index: 1;
    width: 4px;
    background: linear-gradient(180deg, #aaa69e, #464541 18%, #1d1e1d 82%, #89857e);
    box-shadow:
        inset 0 1px rgba(255, 255, 255, 0.32),
        0 1px 2px rgba(0, 0, 0, 0.45);
}

.iphone-mute-switch,
.iphone-volume-up,
.iphone-volume-down {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.iphone-mute-switch {
    top: 18%;
    height: 20px;
}

.iphone-volume-up {
    top: 27%;
    height: 34px;
}

.iphone-volume-down {
    top: 38%;
    height: 34px;
}

.iphone-power-button {
    top: 30%;
    right: 0;
    height: 58px;
    border-radius: 0 3px 3px 0;
}

.unity-game-frame-host {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background: #000;
}

.unity-game-frame-host:empty {
    display: none;
}

.unity-game-frame {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box;
    border: 0;
    background: #000;
}

.unity-game-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 18px;
    text-align: center;
}

.unity-game-overlay[hidden] {
    display: none;
}

.unity-game-poster {
    background:
        radial-gradient(circle at 50% 26%, rgba(255, 139, 61, 0.22), transparent 36%),
        radial-gradient(circle at 25% 82%, rgba(79, 220, 255, 0.13), transparent 38%),
        linear-gradient(165deg, #111823 0%, #070a0f 62%, #10131b 100%);
}

.unity-game-poster::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 82%);
    pointer-events: none;
}

.unity-game-poster img {
    position: relative;
    width: clamp(76px, 24vw, 108px);
    max-width: 56%;
    height: auto;
    margin-bottom: 4px;
    filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.45));
}

.unity-game-poster > strong {
    position: relative;
    color: #f5f8fc;
    font-family: var(--font-display);
    font-size: clamp(0.9rem, 2vw, 1.08rem);
    letter-spacing: -0.04em;
}

.unity-game-hint {
    position: relative;
    max-width: 160px;
    margin: 6px 0 13px;
    color: #8491a2;
    font-size: 0.58rem;
    line-height: 1.45;
}

.unity-game-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    gap: 7px;
    padding: 8px 13px;
    border: 1px solid rgba(120, 240, 193, 0.45);
    border-radius: 10px;
    background: var(--primary);
    box-shadow: 0 10px 24px rgba(72, 222, 169, 0.16);
    color: #07110d;
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.unity-game-action:hover {
    background: #a2f7d6;
    box-shadow: 0 12px 28px rgba(72, 222, 169, 0.24);
}

.unity-game-action:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.unity-game-action-icon {
    width: 13px;
    height: 13px;
}

.unity-game-action-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.unity-game-error {
    gap: 10px;
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 95, 87, 0.15), transparent 40%),
        rgba(5, 7, 10, 0.96);
    color: #e4e9ef;
}

.unity-game-error-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 95, 87, 0.45);
    border-radius: 50%;
    background: rgba(255, 95, 87, 0.1);
    color: #ff7c75;
    font-family: var(--font-mono);
    font-weight: 700;
}

.unity-game-error strong {
    max-width: 150px;
    font-size: 0.7rem;
    line-height: 1.4;
}

.unity-game-error .unity-game-action {
    min-height: 32px;
    padding: 7px 11px;
    background: transparent;
    color: var(--primary);
}

@keyframes heroPlaySignal {
    0%,
    100% {
        border-color: rgba(120, 240, 193, 0.28);
        background: rgba(120, 240, 193, 0.07);
        color: var(--primary);
        box-shadow: 0 0 0 0 rgba(120, 240, 193, 0);
    }

    45% {
        border-color: rgba(120, 240, 193, 0.68);
        background: rgba(120, 240, 193, 0.15);
        color: #c5ffea;
        box-shadow:
            0 0 0 5px rgba(120, 240, 193, 0.05),
            0 0 18px rgba(120, 240, 193, 0.2);
    }
}

.hero-window:not(.is-game-active) .window-play-toggle {
    animation: heroPlaySignal 1.8s ease-in-out infinite;
}

.hero-window:not(.is-game-active) .window-play-toggle:hover,
.hero-window:not(.is-game-active) .window-play-toggle:focus-visible {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .unity-phone,
    .unity-game-action {
        transition: none;
    }

    .hero-window:not(.is-game-active) .window-play-toggle {
        animation: none;
    }
}

.scene-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: rgba(9, 13, 19, 0.7);
    backdrop-filter: blur(10px);
    font-family: var(--font-mono);
    font-size: 0.54rem;
}

.scene-badge span { color: #7d8a9b; }
.scene-badge strong { color: var(--primary); font-weight: 600; }

.scene-pills {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 3;
    display: flex;
    gap: 6px;
}

.model-preview .scene-badge,
.model-preview .scene-pills {
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.scene-pills span {
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(9, 13, 19, 0.72);
    color: #9ba8b8;
    font-family: var(--font-mono);
    font-size: 0.52rem;
    backdrop-filter: blur(8px);
}

.window-console {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 16px;
    border-top: 1px solid rgba(196, 216, 237, 0.1);
    background: #0b1017;
    color: #7f8c9d;
    font-family: var(--font-mono);
    font-size: 0.56rem;
}

.console-prompt { color: var(--primary); font-size: 0.9rem; }
.console-result { margin-left: auto; color: #6fd8ae; }

.scroll-down {
    bottom: 22px;
    color: #556273;
}

.scroll-down-mouse {
    width: 23px;
    height: 36px;
    border-width: 1px;
}

/* Section rhythm and editorial headings */
.about,
.projects,
.contact {
    padding: 116px 0;
}

.section-title {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 54px;
    color: var(--text-bright);
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 4rem);
    font-weight: 750;
    letter-spacing: -0.055em;
    line-height: 1.06;
    text-align: left;
    text-transform: none;
}

.section-title::before {
    margin-bottom: 13px;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.about .section-title::before { content: 'PROFILE / 01'; }
.projects .section-title::before { content: 'SELECTED WORK / 02'; }

.section-title::after {
    content: '';
    width: 42px;
    height: 2px;
    margin-top: 20px;
    border-radius: 999px;
    background: var(--primary);
}

.title-decorator {
    display: none;
}

/* Profile */
.about {
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.012), transparent);
}

.about-grid {
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: clamp(42px, 7vw, 90px);
    align-items: center;
}

.image-frame {
    height: 430px;
    padding-top: 42px;
    aspect-ratio: auto;
    border-color: rgba(196, 216, 237, 0.18);
    border-radius: 20px;
    background: #0d1219;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
}

.image-frame::before {
    inset: 0 0 auto;
    z-index: 4;
    height: 42px;
    border-bottom: 1px solid rgba(196, 216, 237, 0.12);
    background: linear-gradient(180deg, #151b24, #111720);
    opacity: 1;
}

.image-frame::after {
    content: '';
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 5;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5f57;
    box-shadow: 17px 0 #febc2e, 34px 0 #28c840;
}

.image-frame .profile-window-title {
    position: absolute;
    inset: 0 64px auto;
    z-index: 5;
    height: 42px;
    font-size: 0.61rem;
    pointer-events: none;
}

.image-frame:hover {
    border-color: rgba(120, 240, 193, 0.3);
    box-shadow: 0 34px 74px rgba(0, 0, 0, 0.38);
}

.avatar-img {
    height: 100%;
    object-position: center top;
}

.frame-corner {
    display: none;
}

.about-text p {
    max-width: 760px;
    margin-bottom: 18px;
    color: #97a4b4;
    font-size: 0.96rem;
    line-height: 1.84;
}

.about-text .about-intro {
    color: #dce4ed;
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    font-weight: 550;
    line-height: 1.55;
}

.highlight {
    color: var(--primary);
    font-weight: 650;
}

.about-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 28px;
    padding: 0;
    border: 0;
    background: none;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 78px;
    padding: 15px 17px;
    border: 1px solid var(--border-color);
    border-radius: 13px;
    background: var(--surface-soft);
}

.detail-label {
    margin: 0;
    color: #707d8e;
    font-family: var(--font-mono);
    font-size: 0.57rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.detail-value {
    color: #d8e0ea;
    font-size: 0.82rem;
    font-weight: 600;
}

.collaborated-block {
    margin-top: 88px;
    padding: 55px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.collaborated-header {
    margin-bottom: 38px;
    text-align: left;
}

.collaborated-label {
    margin-bottom: 10px;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.12em;
}

.collaborated-title {
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 3vw, 2.2rem);
    font-weight: 650;
    letter-spacing: -0.045em;
}

.collab-track {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.collab-card {
    width: 100%;
    max-width: none;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.collab-card:hover {
    border-color: transparent;
    background: transparent;
}

.collab-logo-wrap {
    width: clamp(84px, 8vw, 104px);
    max-width: 100%;
    height: auto;
    margin-inline: auto;
    aspect-ratio: 1;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

/* Shipped games and project browser frames */
.projects {
    background: transparent;
}

.store-feature {
    position: relative;
    overflow: hidden;
    margin-bottom: 58px;
    padding: 78px 30px 34px;
    border: 1px solid rgba(196, 216, 237, 0.17);
    border-radius: 22px;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.012));
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.22);
}

.store-feature::before {
    content: 'published-games / release-channel';
    position: absolute;
    inset: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    border-bottom: 1px solid rgba(196, 216, 237, 0.11);
    background: linear-gradient(180deg, #151b24, #111720);
    color: #738092;
    font-family: var(--font-mono);
    font-size: 0.58rem;
}

.store-feature::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5f57;
    box-shadow: 17px 0 #febc2e, 34px 0 #28c840;
}

.store-feature-head {
    margin-bottom: 22px;
}

.store-feature-sub {
    margin: 0 auto;
    color: #8794a5;
    font-size: 0.88rem;
}

.store-card {
    gap: 14px;
    padding: 20px 12px;
    border-radius: 16px;
}

.store-card:hover {
    border-color: var(--border-color);
    background: rgba(255, 255, 255, 0.032);
}

.store-card-icon {
    width: 118px;
    height: 118px;
    border-radius: 25px;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
}

.store-card-name {
    font-family: var(--font-display);
    font-size: 0.86rem;
    font-weight: 650;
}

.gp-badge {
    width: 132px;
    gap: 7px;
    margin-top: 9px;
    padding: 7px 10px;
    border-color: rgba(255, 255, 255, 0.14);
    border-radius: 9px;
    opacity: 0.84;
}

.gp-badge-logo {
    width: 19px;
    height: 19px;
}

.gp-badge-text {
    width: 78px;
}

.gp-badge-top {
    font-family: var(--font-body);
    font-size: 0.45rem;
    letter-spacing: 0.03em;
}

.gp-badge-main {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.store-nav,
.projects-nav {
    width: 38px;
    height: 38px;
    border-color: var(--border-color);
    background: #111720;
}

.store-nav:hover,
.projects-nav:hover {
    border-color: rgba(120, 240, 193, 0.38);
    color: var(--primary);
    box-shadow: none;
}

.btn-projects-toggle {
    margin: 0 auto 6px;
}

.projects-carousel {
    padding-inline: 56px;
}

.projects-carousel .swiper-slide {
    gap: 18px;
}

.project-card {
    border-color: rgba(196, 216, 237, 0.15);
    border-radius: 17px;
    background: #0e131b;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.project-card:hover {
    border-color: rgba(120, 240, 193, 0.28);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.32), 0 0 28px rgba(120, 240, 193, 0.045);
}

.project-card.is-jam,
.project-card.is-jam:hover {
    border-color: rgba(255, 209, 102, 0.32);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.project-image {
    background: #090d12;
}

.project-card:hover .project-image img {
    transform: scale(1.035);
}

.project-info {
    padding: 15px 15px 14px;
}

.project-tags {
    gap: 5px;
    margin-bottom: 10px;
}

.tag {
    padding: 3px 7px;
    border: 1px solid rgba(120, 240, 193, 0.12);
    border-radius: 6px;
    background: rgba(120, 240, 193, 0.055);
    color: #82d8b8;
    font-family: var(--font-mono);
    font-size: 0.51rem;
    letter-spacing: 0;
}

.project-title {
    color: #e7edf5;
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    text-transform: none;
}

.project-meta {
    gap: 13px;
    margin-top: 12px;
    padding-top: 11px;
    border-color: rgba(255, 255, 255, 0.055);
}

.project-meta-item {
    min-width: 0;
}

.meta-label {
    color: #647183;
    font-family: var(--font-mono);
    font-size: 0.48rem;
    letter-spacing: 0.04em;
}

.meta-value {
    overflow: hidden;
    color: #aab6c5;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-arrow {
    top: 12px;
    right: 15px;
    z-index: 6;
    color: #6e7a8b;
    font-family: var(--font-mono);
    font-size: 0.76rem;
}

/* Contact callout as one last polished desktop window */
.contact {
    background: linear-gradient(180deg, transparent, rgba(120, 240, 193, 0.018), transparent);
}

.contact-center {
    position: relative;
    overflow: hidden;
    max-width: 940px;
    padding: 94px 58px 52px;
    border: 1px solid rgba(196, 216, 237, 0.18);
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 0%, rgba(120, 240, 193, 0.085), transparent 42%),
        #0d1219;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.3);
}

.contact-center::before {
    content: 'contact / new-message';
    position: absolute;
    inset: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-bottom: 1px solid rgba(196, 216, 237, 0.11);
    background: linear-gradient(180deg, #151b24, #111720);
    color: #738092;
    font-family: var(--font-mono);
    font-size: 0.58rem;
}

.contact-center::after {
    content: '';
    position: absolute;
    top: 19px;
    left: 19px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5f57;
    box-shadow: 17px 0 #febc2e, 34px 0 #28c840;
}

.contact-eyebrow {
    margin-bottom: 17px;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.13em;
}

.contact-heading {
    width: 100%;
    max-width: 100%;
    margin-bottom: 18px;
    color: var(--text-bright);
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.065em;
    line-height: 1.03;
    overflow-wrap: break-word;
    text-wrap: balance;
}

.contact-highlight {
    color: var(--primary);
}

.contact-sub {
    max-width: 780px;
    margin: 0 auto 34px;
    color: #909dae;
    font-size: 0.9rem;
    line-height: 1.55;
    text-wrap: pretty;
}

.contact-actions {
    gap: 8px;
    margin-bottom: 28px;
}

.contact-btn {
    min-height: 48px;
    padding: 11px 12px;
    border-color: var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.028);
    color: #cbd5e0;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 650;
    letter-spacing: 0;
}

.contact-btn i {
    color: #8e9bab;
    font-size: 1rem;
}

.contact-btn:hover {
    border-color: rgba(120, 240, 193, 0.32);
    background: rgba(120, 240, 193, 0.055);
    color: var(--text-bright);
}

.contact-btn:hover i {
    color: var(--primary);
}

.contact-meta {
    color: #6f7c8d;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    opacity: 1;
}

.footer {
    padding: 34px 0;
    border-color: rgba(255, 255, 255, 0.07);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    text-align: left;
}

.footer-logo {
    margin: 0;
}

.footer-logo::before {
    width: 20px;
    height: 20px;
    border-radius: 6px;
}

.footer-text,
.footer-credit {
    margin: 0;
    color: #657284;
    font-size: 0.68rem;
}

.footer-credit {
    justify-self: end;
}

/* Modal inherits the same premium surface language */
.modal-content {
    border-color: rgba(196, 216, 237, 0.2);
    border-radius: 22px;
    background: #0d1219;
    box-shadow: 0 42px 120px rgba(0, 0, 0, 0.68);
}

.modal-close,
.lightbox-close,
.lightbox-nav {
    border-color: var(--border-color);
    background: rgba(14, 19, 27, 0.86);
    color: #cbd5e0;
}

.modal-window-bar {
    z-index: 7;
    flex: 0 0 48px;
    user-select: none;
}

.modal-window-bar .window-title {
    overflow: hidden;
    font-size: 0.61rem;
}

.modal-window-title-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-window-bar .modal-window-dismiss,
.modal-window-bar .modal-window-dismiss:hover {
    position: static;
    width: 30px;
    min-width: 30px;
    height: 30px;
    display: grid;
    flex: 0 0 30px;
    place-items: center;
    justify-self: end;
    gap: 0;
    padding: 0;
    border: 1px solid rgba(196, 216, 237, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    color: #aeb9c7;
    font-family: var(--font-mono);
    font-size: 0.54rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    box-shadow: none;
    transform: none;
    appearance: none;
    -webkit-appearance: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.modal-window-bar .modal-window-dismiss svg {
    display: block;
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.modal-window-bar .modal-window-dismiss:hover {
    border-color: rgba(255, 95, 87, 0.42);
    background: rgba(255, 95, 87, 0.1);
    color: #f4c2bf;
}

.modal-window-bar .modal-window-dismiss:focus-visible {
    outline: 2px solid rgba(255, 95, 87, 0.7);
    outline-offset: 2px;
}

.modal-title {
    font-family: var(--font-display);
    letter-spacing: -0.04em;
    text-transform: none;
}

/* Responsive refinement */
@media (max-width: 1100px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1fr) minmax(390px, 0.86fr);
        gap: 42px;
    }

    .hero-name {
        font-size: clamp(3.4rem, 6vw, 4.7rem);
    }

    .collab-track {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .collab-logo-wrap {
        max-width: 104px;
        margin-inline: auto;
    }
}

@media (max-width: 900px) {
    .hero {
        min-height: auto;
        padding-top: 146px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 62px;
    }

    .hero-content {
        width: min(100%, 680px);
        max-width: 680px;
        margin-inline: auto;
        text-align: center;
    }

    .hero-name,
    .hero-lead {
        margin-inline: auto;
    }

    .hero-cta,
    .hero-stats {
        justify-content: center;
    }

    .hero-model {
        display: block;
        width: min(100%, 640px);
        margin-inline: auto;
    }

    .hero-window {
        transform: none;
    }

    .window-canvas {
        height: 420px;
    }

    .scroll-down {
        display: none;
    }

    .about,
    .projects,
    .contact {
        padding: 92px 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding-inline: 20px;
    }

    .navbar,
    .navbar.scrolled {
        top: 12px;
        width: calc(100% - 24px);
        padding: 9px 12px 9px 14px;
        border-radius: 16px;
    }

    .nav-logo {
        font-size: 0.84rem;
    }

    .nav-logo::before {
        width: 21px;
        height: 21px;
        border-radius: 7px;
    }

    .lang-toggle {
        margin-right: 8px;
    }

    .hamburger {
        position: relative;
        width: 34px;
        height: 34px;
        padding: 0;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.035);
        color: var(--text);
        appearance: none;
        -webkit-appearance: none;
    }

    .hamburger span {
        position: absolute;
        left: 50%;
        width: 16px;
        height: 1px;
        border-radius: 999px;
        background: currentColor;
        transform: translateX(-50%);
        transform-origin: center;
        transition: top 0.22s ease, opacity 0.18s ease, transform 0.22s ease;
    }

    .hamburger span:nth-child(1) { top: 11px; }
    .hamburger span:nth-child(2) { top: 16px; }
    .hamburger span:nth-child(3) { top: 21px; }

    .hamburger.active {
        border-color: rgba(120, 240, 193, 0.32);
        background: rgba(120, 240, 193, 0.07);
        color: var(--text-bright);
    }

    .hamburger.active span:nth-child(1),
    .hamburger.active span:nth-child(3) {
        top: 50%;
    }

    .hamburger.active span:nth-child(1) {
        transform: translate(-50%, -50%) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-50%) scaleX(0);
    }

    .hamburger.active span:nth-child(3) {
        transform: translate(-50%, -50%) rotate(-45deg);
    }

    .nav-links {
        top: 0;
        right: 12px;
        width: min(82vw, 320px);
        padding: 92px 22px 28px;
        border: 0;
        border-left: 1px solid var(--border-color);
        border-radius: 0;
        background: rgba(8, 12, 18, 0.97);
        opacity: 0;
        visibility: hidden;
        transform: translateX(18px);
        pointer-events: none;
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    }

    .nav-links.open {
        right: 12px;
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        pointer-events: auto;
    }

    .nav-links a {
        padding: 13px 14px;
        font-size: 0.88rem;
    }

    .hero {
        padding: 128px 20px 76px;
    }

    .hero-inner {
        gap: 48px;
    }

    .hero-name {
        font-size: clamp(3rem, 13vw, 4.5rem);
    }

    .hero-lead {
        max-width: 540px;
        font-size: 0.96rem;
    }

    .hero-tagline {
        display: flex;
        justify-content: center;
        white-space: normal;
    }

    .hero-cta {
        margin-bottom: 32px;
    }

    .hero-cta .btn {
        width: auto;
    }

    .hero-stats {
        gap: 0;
    }

    .stat + .stat {
        margin-left: 14px;
        padding-left: 14px;
    }

    .stat-label {
        font-size: 0.5rem;
        white-space: normal;
    }

    .hero-model {
        display: block;
    }

    .window-canvas {
        height: min(78vw, 380px);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .about-image {
        width: min(100%, 370px);
        max-width: 370px;
    }

    .image-frame {
        height: min(112vw, 440px);
    }

    .collaborated-block {
        margin-top: 62px;
        padding: 36px 0 0;
    }

    .collab-track {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .collab-card {
        max-width: none;
    }

    .store-feature {
        padding: 68px 16px 26px;
    }

    .projects-carousel {
        padding-inline: 0;
    }

    .contact-center {
        padding: 82px 22px 38px;
        border-radius: 20px;
    }

    .contact-actions {
        flex-wrap: wrap;
    }

    .contact-btn {
        flex: 1 1 130px;
        min-width: 130px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 10px;
        text-align: center;
    }

    .footer-credit {
        justify-self: center;
    }
}

@media (max-width: 520px) {
    .hero-name {
        font-size: clamp(2.2rem, 12vw, 3.4rem);
    }

    .contact-center {
        padding-inline: clamp(14px, 5vw, 22px);
    }

    .contact-heading {
        font-size: clamp(1.65rem, 8vw, 2.3rem);
        letter-spacing: -0.05em;
        line-height: 1.08;
    }

    .contact-highlight {
        white-space: normal;
    }

    .hero-cta {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
        padding-inline: 12px;
    }

    .hero-cta .cv-btn {
        grid-column: 1 / -1;
    }

    .stat-number {
        font-size: 1.2rem;
    }

    .window-bar {
        grid-template-columns: 72px 1fr 54px;
        padding-inline: 12px;
    }

    .window-title {
        font-size: 0;
    }

    .window-title svg {
        width: 16px;
        height: 16px;
    }

    .window-console {
        font-size: 0.48rem;
    }

    .about-details {
        grid-template-columns: 1fr;
    }

    .detail-item {
        min-height: auto;
    }

    .collab-track {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .collab-card {
        max-width: none;
    }

    .collab-logo-wrap {
        width: clamp(68px, 21vw, 84px);
    }

    .store-feature::before,
    .contact-center::before {
        justify-content: flex-end;
        padding-right: 15px;
        font-size: 0.48rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body::before {
        animation: none !important;
    }

    .hero-window {
        transform: none !important;
    }
}

/* Orbit refresh complete */

/* ==============================================================
   FINAL BRAND / COMPANY / STORE-BADGE OVERRIDES
   Kept last intentionally so legacy responsive rules cannot win.
   ============================================================== */
.nav-logo::before,
.footer-logo::before {
    content: none !important;
    display: none !important;
}

.nav-logo,
.footer-logo {
    gap: 0 !important;
}

.collaborated-block,
.collab-card,
.collab-card:hover,
.collab-logo-wrap {
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.collaborated-block {
    padding-inline: 0 !important;
}

.collab-track {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    align-items: center;
    gap: clamp(4px, 0.7vw, 8px) !important;
}

.collab-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 !important;
}

.collab-logo-wrap {
    width: 100% !important;
    max-width: 76px !important;
    overflow: hidden !important;
    border-radius: 12px !important;
}

.collab-logo-wrap img {
    border-radius: inherit;
}

.gp-badge {
    width: 130px !important;
    max-width: 100%;
    gap: 6px !important;
    padding: 10px 10px !important;
    overflow: hidden;
}

.gp-badge-logo {
    width: 18px !important;
    height: 18px !important;
}

.gp-badge-text {
    flex: 1 1 auto;
    width: auto !important;
    min-width: 0;
    overflow: hidden;
}

.gp-badge-top {
    max-width: 100%;
    font-family: var(--font-body) !important;
    font-size: 0.42rem !important;
    letter-spacing: 0.02em !important;
}

.gp-badge-main {
    max-width: 100%;
    overflow: hidden;
    font-family: var(--font-body) !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em !important;
    text-overflow: clip;
}

@media (max-width: 768px) {
    .collab-track {
        gap: 4px !important;
    }

    .collab-logo-wrap {
        max-width: 44px !important;
        border-radius: 9px !important;
    }
}

/* ==============================================================
   COLOR, ICON & MICRO-MOTION PASS
   Multi-accent details inspired by polished product interfaces.
   ============================================================== */
:root {
    --accent-cyan: #4fdcff;
    --accent-violet: #9b82ff;
    --accent-pink: #ff6f9f;
    --accent-amber: #ffc857;
    --accent-coral: #ff7d73;
    --gradient-spectrum: linear-gradient(110deg, #6ee7ff 0%, #8f9bff 48%, #ff7ca8 100%);
}

.brand-mark {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    margin-right: 9px;
    overflow: hidden;
    border: 1px solid rgba(155, 130, 255, 0.42);
    border-radius: 9px;
    background:
        radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.38), transparent 34%),
        linear-gradient(145deg, #4fdcff 0%, #7f8dff 48%, #ff6f9f 100%);
    box-shadow: 0 7px 22px rgba(112, 120, 255, 0.22);
    color: #fff;
    font-size: 0.72rem;
    transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.brand-mark::before {
    content: '';
    position: absolute;
    inset: -80%;
    z-index: -1;
    background: conic-gradient(from 90deg, transparent, rgba(255, 255, 255, 0.45), transparent 30%);
    animation: brandShimmer 7s linear infinite;
}

.footer-logo .brand-mark {
    width: 26px;
    height: 26px;
    margin-right: 8px;
    border-radius: 8px;
    font-size: 0.64rem;
}

.hero-name {
    color: var(--text-bright);
    background: none;
    background-clip: border-box;
    -webkit-background-clip: border-box;
    -webkit-text-fill-color: var(--text-bright);
    animation: heroEntrance 0.7s ease 0.22s forwards;
    text-shadow: 0 0 36px rgba(155, 130, 255, 0.12);
}

.hero-name::after {
    color: var(--accent-pink);
    -webkit-text-fill-color: var(--accent-pink);
}

.hero-glitch,
.hero-tagline::before {
    color: var(--accent-cyan);
}

.hero-model::after {
    content: '';
    position: absolute;
    inset: 8% -7% -7%;
    z-index: -2;
    border-radius: 46% 54% 52% 48%;
    background:
        radial-gradient(circle at 25% 55%, rgba(79, 220, 255, 0.3), transparent 35%),
        radial-gradient(circle at 72% 28%, rgba(155, 130, 255, 0.3), transparent 36%),
        radial-gradient(circle at 70% 78%, rgba(255, 111, 159, 0.2), transparent 34%);
    filter: blur(42px);
    opacity: 0.48;
    pointer-events: none;
    animation: ambientColorDrift 12s ease-in-out infinite alternate;
}

.section-title-copy {
    display: inline-flex;
    align-items: center;
    gap: 15px;
}

.section-title-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: clamp(48px, 4.2vw, 60px);
    height: clamp(48px, 4.2vw, 60px);
    border: 1px solid rgba(79, 220, 255, 0.28);
    border-radius: clamp(14px, 1.25vw, 18px);
    background: linear-gradient(145deg, rgba(79, 220, 255, 0.14), rgba(155, 130, 255, 0.08));
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 10px 28px rgba(79, 220, 255, 0.08);
    color: var(--accent-cyan);
    font-size: clamp(1rem, 1.35vw, 1.25rem);
}

.projects .section-title-icon {
    border-color: rgba(155, 130, 255, 0.3);
    background: linear-gradient(145deg, rgba(155, 130, 255, 0.15), rgba(255, 111, 159, 0.08));
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 10px 28px rgba(155, 130, 255, 0.08);
    color: var(--accent-violet);
}

.section-title::after {
    width: 72px;
    background: var(--gradient-spectrum);
    background-size: 180% 100%;
    animation: accentLineFlow 6s ease-in-out infinite alternate;
}

.about .section-title::before {
    color: var(--accent-cyan);
}

.projects .section-title::before {
    color: var(--accent-violet);
}

.detail-item {
    --detail-accent: var(--accent-cyan);
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    background:
        radial-gradient(circle at 0 0, color-mix(in srgb, var(--detail-accent) 9%, transparent), transparent 58%),
        var(--surface-soft);
    transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.detail-item:nth-child(2) { --detail-accent: var(--accent-violet); }
.detail-item:nth-child(3) { --detail-accent: var(--accent-amber); }
.detail-item:nth-child(4) { --detail-accent: var(--accent-pink); }

.detail-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid color-mix(in srgb, var(--detail-accent) 26%, transparent);
    border-radius: 11px;
    background: color-mix(in srgb, var(--detail-accent) 10%, transparent);
    color: var(--detail-accent);
    font-size: 0.84rem;
    transition: background-color 0.24s ease;
}

.detail-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.collaborated-block {
    position: relative;
    overflow: hidden;
    margin-top: 88px;
    max-width: 700px;
    margin-inline: auto;
    padding: 80px 28px 28px !important;
    border: 1px solid rgba(196, 216, 237, 0.18) !important;
    border-radius: 22px;
    background:
        radial-gradient(circle at 10% 24%, rgba(79, 220, 255, 0.08), transparent 30%),
        radial-gradient(circle at 88% 78%, rgba(155, 130, 255, 0.09), transparent 34%),
        #0d1219 !important;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28) !important;
}

.collaborated-block::before {
    content: 'career / studio-partners';
    position: absolute;
    inset: 0 0 auto;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    border-bottom: 1px solid rgba(196, 216, 237, 0.11);
    background: linear-gradient(180deg, #151b24, #111720);
    color: #738092;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.04em;
}

.collaborated-block::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 3;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5f57;
    box-shadow: 17px 0 #febc2e, 34px 0 #28c840;
}

.collaborated-header,
.collab-track {
    position: relative;
    z-index: 1;
}

.collaborated-header {
    margin-bottom: 26px;
}

.collaborated-label {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid rgba(155, 130, 255, 0.26);
    border-radius: 8px;
    background: rgba(155, 130, 255, 0.08);
    color: var(--accent-violet);
}

.store-feature {
    background:
        radial-gradient(circle at 8% 18%, rgba(79, 220, 255, 0.09), transparent 28%),
        radial-gradient(circle at 88% 85%, rgba(155, 130, 255, 0.08), transparent 30%),
        linear-gradient(150deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.012));
}

.project-card,
.project-card.is-jam {
    --project-accent: var(--accent-cyan);
    border-color: transparent;
}

.project-card[data-category="3d"] {
    --project-accent: var(--accent-violet);
}

.project-card.is-jam {
    --project-accent: var(--accent-amber);
}

.project-card .tag {
    border-color: color-mix(in srgb, var(--project-accent) 24%, transparent);
    background: color-mix(in srgb, var(--project-accent) 8%, transparent);
    color: color-mix(in srgb, var(--project-accent) 82%, white);
}

.project-card .project-arrow {
    color: var(--project-accent);
}

.contact-center {
    background:
        radial-gradient(circle at 18% 8%, rgba(79, 220, 255, 0.1), transparent 34%),
        radial-gradient(circle at 82% 6%, rgba(255, 111, 159, 0.09), transparent 34%),
        radial-gradient(circle at 50% 0%, rgba(155, 130, 255, 0.08), transparent 45%),
        #0d1219;
}

.contact-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.contact-eyebrow i {
    color: var(--accent-amber);
}

.contact-highlight {
    color: transparent;
    background: var(--gradient-spectrum);
    background-size: 180% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    animation: headlineSpectrum 7s ease-in-out infinite alternate;
}

.contact-btn {
    --social-accent: var(--primary);
}

.contact-btn:nth-child(1) { --social-accent: #63a4ff; }
.contact-btn:nth-child(2) { --social-accent: #56c5ff; }
.contact-btn:nth-child(3) { --social-accent: var(--accent-violet); }
.contact-btn:nth-child(4) { --social-accent: var(--accent-cyan); }
.contact-btn:nth-child(5) { --social-accent: var(--accent-pink); }

.contact-btn i {
    color: var(--social-accent);
    transition: transform 0.22s ease, color 0.22s ease;
}

@media (hover: hover) and (pointer: fine) {
    .nav-logo:hover .brand-mark,
    .footer-logo:hover .brand-mark {
        transform: rotate(8deg) scale(1.05);
        box-shadow: 0 9px 28px rgba(112, 120, 255, 0.32);
    }

    .detail-item:hover {
        border-color: color-mix(in srgb, var(--detail-accent) 36%, transparent);
        box-shadow: 0 13px 30px color-mix(in srgb, var(--detail-accent) 8%, transparent);
    }

    .detail-item:hover .detail-icon {
        background: color-mix(in srgb, var(--detail-accent) 16%, transparent);
    }

    .project-card:hover,
    .project-card.is-jam:hover {
        border-color: transparent;
        box-shadow: 0 24px 54px rgba(0, 0, 0, 0.32);
    }

    .project-card:hover .project-arrow {
        transform: translateX(2px);
    }

    .contact-btn:hover {
        border-color: color-mix(in srgb, var(--social-accent) 38%, transparent);
        background: color-mix(in srgb, var(--social-accent) 8%, transparent);
        box-shadow: 0 10px 28px color-mix(in srgb, var(--social-accent) 9%, transparent);
        transform: none;
    }

    .contact-btn:hover i {
        color: var(--social-accent);
        transform: scale(1.13);
    }
}

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

@keyframes headlineSpectrum {
    from { background-position: 0% 50%; }
    to { background-position: 100% 50%; }
}

@keyframes accentLineFlow {
    from { background-position: 0% 50%; }
    to { background-position: 100% 50%; }
}

@keyframes ambientColorDrift {
    from { transform: scale(0.96) rotate(-3deg); opacity: 0.4; }
    to { transform: scale(1.04) rotate(3deg); opacity: 0.58; }
}

@media (max-width: 768px) {
    .brand-mark {
        width: 27px;
        height: 27px;
        margin-right: 7px;
    }

    .section-title-copy {
        gap: 11px;
    }

    .section-title-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 0.8rem;
    }

    .collaborated-block {
        margin-top: 62px;
        padding: 78px 18px 28px !important;
        border-radius: 18px;
    }

    .collaborated-block::before {
        justify-content: flex-end;
        padding-right: 14px;
        font-size: 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-content > * {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .brand-mark::before,
    .hero-name,
    .hero-model::after,
    .section-title::after,
    .contact-highlight {
        animation: none !important;
    }
}

/* Compact icon cards inside the expandable project browser. */
.projects-carousel .project-card,
.projects-carousel .project-card.is-jam {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: center;
    column-gap: 13px;
    min-height: 102px;
    padding: 14px;
}

.projects-carousel .project-image {
    width: 74px;
    height: 74px;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 17px;
    background: #090d12;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.projects-carousel .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.projects-carousel .project-info {
    min-width: 0;
    padding: 0;
}

.projects-carousel .project-tags {
    display: none;
}

.projects-carousel .title-store {
    display: none;
}

.projects-carousel .project-title {
    overflow: visible;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.28;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.projects-carousel .project-platform {
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-top: 6px;
    color: #758295;
    line-height: 1;
}

.projects-carousel .project-platform i {
    width: auto;
    color: var(--primary);
    font-size: 0.78rem;
    text-align: center;
}

.modal-project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.modal-body {
    display: grid;
    grid-template-columns: clamp(150px, 22vw, 220px) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
}

.modal-project-logo {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 32px;
    background: #090d12;
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.38);
}

.modal-project-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-project-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 9px;
}

.modal-project-copy .modal-tags {
    padding-bottom: 8px;
    border-bottom: 0;
}

.modal-screenshots-wrap {
    margin-top: 8px;
    background: linear-gradient(180deg, rgba(120, 240, 193, 0.035), transparent 160px);
    box-shadow: inset 0 1px 0 rgba(196, 216, 237, 0.12);
}

.modal-media-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 18px;
}

.modal-media-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #8491a2;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    white-space: nowrap;
}

.modal-media-title i {
    color: var(--primary);
    font-size: 0.72rem;
}

.modal-media-rule {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(120, 240, 193, 0.24), transparent);
}

.modal-project-meta-item {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    flex: 0 1 auto;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.03);
}

.modal-project-meta-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #6f7c8d;
    font-family: var(--font-mono);
    font-size: 0.54rem;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.modal-project-meta-label i {
    color: var(--accent-violet);
}

.modal-project-company,
.modal-project-role {
    min-width: 0;
    overflow: visible;
    color: #cfd8e4;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.projects-carousel .jam-badge {
    position: static;
    inset: auto;
    width: auto;
    height: auto;
    margin-top: 6px;
    padding: 0;
    justify-content: flex-start;
    color: #ffd166;
    background: none;
    border-radius: 0;
    box-shadow: none;
    font-family: var(--font-mono);
    font-size: 0.54rem;
    letter-spacing: 0.045em;
}

.projects-carousel .jam-badge span {
    display: inline;
}

.projects-carousel .project-card.is-jam {
    border-color: transparent;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.projects-carousel .project-card.is-jam:hover {
    border-color: transparent;
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.32);
}

@media (max-width: 768px), (pointer: coarse), (prefers-reduced-motion: reduce) {
    .projects-carousel .project-card,
    .projects-carousel .project-card:hover,
    .projects-carousel .project-card.is-jam,
    .projects-carousel .project-card.is-jam:hover {
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    }

    .projects-carousel .project-image {
        box-shadow: none;
    }
}

@media (max-width: 559px) {
    .modal-body {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 14px;
    }

    .modal-project-logo {
        grid-column: 1;
        grid-row: 1;
        width: 96px;
        border-radius: 21px;
    }

    .modal-project-copy {
        display: contents;
    }

    .modal-project-copy .modal-header-text {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
    }

    .modal-project-copy .modal-project-meta {
        display: flex;
        grid-column: 1 / -1;
        grid-row: 2;
        margin-top: 0;
    }

    .modal-project-copy .modal-desc {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .modal-project-copy .modal-tags {
        grid-column: 1 / -1;
        grid-row: 4;
    }

    .modal-project-meta-item {
        width: fit-content;
        max-width: 100%;
        min-width: 0;
    }

    .projects-carousel .project-card,
    .projects-carousel .project-card.is-jam {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .projects-carousel .project-image {
        width: 82px;
        height: 82px;
        border-radius: 19px;
    }
}

@media (max-width: 380px) {
    .modal-body {
        grid-template-columns: 78px minmax(0, 1fr);
        column-gap: 11px;
    }

    .modal-project-logo {
        width: 78px;
        border-radius: 17px;
    }

    .projects-carousel .project-card,
    .projects-carousel .project-card.is-jam {
        grid-template-columns: 64px minmax(0, 1fr);
        column-gap: 11px;
        padding-inline: 12px;
    }

    .projects-carousel .project-image {
        width: 64px;
        height: 64px;
        border-radius: 14px;
    }
}

/* Keep the playable Unity preview desktop-only. This final override prevents
   earlier responsive refresh rules from turning the phone frame back on. */
@media (max-width: 768px) {
    .hero {
        min-height: 100svh;
        min-height: 100dvh;
    }

    .hero-model {
        display: none !important;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: min(100%, 380px);
        margin-inline: auto;
        gap: 0;
    }

    .hero-stats .stat,
    .hero-stats .stat + .stat {
        min-width: 0;
        margin: 0;
        padding: 0 8px;
        text-align: center;
    }

    .hero-stats .stat + .stat {
        border-left: 1px solid var(--border-color);
    }

    .hero-stats .stat-label {
        display: block;
        width: 100%;
        text-align: center;
    }

    .scroll-down {
        display: flex;
    }
}

/* On short portrait screens the hero content is taller than the viewport.
   Anchor the cue to the real hero bottom so it cannot overlap text or controls. */
@media (max-width: 768px) and (max-height: 740px) and (orientation: portrait) {
    .hero {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .scroll-down {
        top: auto;
        bottom: calc(22px + env(safe-area-inset-bottom));
    }
}

/* Chuyển đổi giao diện sáng / tối */
html[data-theme="dark"] {
    color-scheme: dark;
}

.nav-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
}

.nav-actions .lang-toggle {
    margin: 0;
}

.theme-toggle {
    display: inline-grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--border-color);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-muted);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
    border-color: rgba(120, 240, 193, 0.4);
    background: rgba(120, 240, 193, 0.07);
    color: var(--primary);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.theme-icon {
    --theme-icon-color: var(--accent-amber);
    grid-area: 1 / 1;
    width: 17px;
    height: 17px;
    color: var(--theme-icon-color);
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.theme-icon-moon {
    --theme-icon-color: var(--accent-violet);
}

.theme-icon-moon,
html[data-theme="light"] .theme-icon-sun {
    display: none;
}

html[data-theme="light"] .theme-icon-moon {
    display: block;
}

html[data-theme="light"] {
    color-scheme: light;
    --primary: #087b63;
    --primary-dark: #05624f;
    --secondary: #5868c9;
    --accent: #946200;
    --space-blue: #4875c8;
    --space-violet: #7259bd;
    --bg-dark: #f4f7fb;
    --bg-card: #ffffff;
    --bg-card-hover: #edf3f8;
    --text: #2c3948;
    --text-muted: #607084;
    --text-bright: #111923;
    --gradient-primary: linear-gradient(135deg, #087b63 0%, #147d9d 100%);
    --gradient-accent: linear-gradient(135deg, #5868c9 0%, #087b63 100%);
    --border-color: rgba(42, 67, 92, 0.16);
    --border-strong: rgba(42, 67, 92, 0.28);
    --surface-soft: rgba(255, 255, 255, 0.76);
    --glow-primary: 0 0 28px rgba(8, 123, 99, 0.12);
    --glow-secondary: 0 0 26px rgba(88, 104, 201, 0.1);
    --accent-cyan: #087f9b;
    --accent-violet: #6750b5;
    --accent-pink: #bd376d;
    --accent-amber: #936300;
    --accent-coral: #bd4c43;
    --gradient-spectrum: linear-gradient(110deg, #087f9b 0%, #6750b5 48%, #bd376d 100%);
}

html[data-theme="light"] body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 76% 9%, rgba(88, 104, 201, 0.1), transparent 28rem),
        radial-gradient(circle at 12% 26%, rgba(8, 123, 99, 0.08), transparent 25rem),
        linear-gradient(180deg, #f8fafc 0%, #f1f5f9 46%, #f7f9fc 100%);
}

html[data-theme="light"] body::before {
    background:
        radial-gradient(circle at 70% 16%, rgba(88, 104, 201, 0.09), transparent 24rem),
        radial-gradient(circle at 18% 52%, rgba(8, 123, 99, 0.06), transparent 26rem);
}

html[data-theme="light"] body::after {
    background-image:
        linear-gradient(rgba(27, 49, 70, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(27, 49, 70, 0.055) 1px, transparent 1px);
}

html[data-theme="light"] * {
    scrollbar-color: rgba(8, 123, 99, 0.5) rgba(27, 49, 70, 0.06);
}

html[data-theme="light"] *::-webkit-scrollbar-track {
    background: rgba(27, 49, 70, 0.05);
}

html[data-theme="light"] *::-webkit-scrollbar-thumb {
    background: rgba(8, 123, 99, 0.55);
    border-color: #eef3f7;
}

html[data-theme="light"] .navbar,
html[data-theme="light"] .navbar.scrolled {
    border-color: rgba(42, 67, 92, 0.16);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 18px 46px rgba(30, 50, 70, 0.12), inset 0 1px rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .navbar.scrolled {
    background: rgba(255, 255, 255, 0.94);
}

html[data-theme="light"] .nav-links {
    background: rgba(31, 52, 73, 0.045);
}

html[data-theme="light"] .nav-links a {
    color: #526174;
}

html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a.active {
    color: var(--text-bright);
    background: rgba(31, 52, 73, 0.08);
}

html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .lang-toggle,
html[data-theme="light"] .hamburger {
    border-color: var(--border-color);
    background: rgba(31, 52, 73, 0.045);
    color: #526174;
}

html[data-theme="light"] .theme-toggle:hover,
html[data-theme="light"] .lang-toggle:hover {
    border-color: rgba(8, 123, 99, 0.34);
    background: rgba(8, 123, 99, 0.07);
}

html[data-theme="light"] .hero::before {
    background: radial-gradient(circle, rgba(88, 104, 201, 0.1), rgba(8, 123, 99, 0.035) 42%, transparent 70%);
}

html[data-theme="light"] .hero-lead,
html[data-theme="light"] .hero-tagline,
html[data-theme="light"] .typing-text {
    color: #58677a;
}

html[data-theme="light"] .stat-label,
html[data-theme="light"] .scroll-down {
    color: #607084;
}

html[data-theme="light"] .btn-primary {
    background: #17212c;
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(30, 50, 70, 0.16);
}

html[data-theme="light"] .btn-primary:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(8, 123, 99, 0.18);
}

html[data-theme="light"] .btn-outline {
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.58);
    color: #334256;
}

html[data-theme="light"] .btn-outline:hover {
    border-color: rgba(8, 123, 99, 0.35);
    background: rgba(8, 123, 99, 0.07);
    color: var(--primary);
}

html[data-theme="light"] .hero-window {
    border-color: rgba(42, 67, 92, 0.18);
    background: #ffffff;
    box-shadow: 0 32px 72px rgba(30, 50, 70, 0.16), inset 0 1px rgba(255, 255, 255, 0.8);
}

html[data-theme="light"] .hero-window:hover {
    border-color: rgba(8, 123, 99, 0.34);
}

html[data-theme="light"] .hero-window .window-bar {
    border-color: rgba(42, 67, 92, 0.12);
    background: linear-gradient(180deg, #f8fafc, #edf2f7);
}

html[data-theme="light"] .hero-window .window-title {
    color: #607084;
}

html[data-theme="light"] .window-play-toggle {
    border-color: rgba(8, 123, 99, 0.28);
    background: rgba(8, 123, 99, 0.07);
    color: var(--primary);
}

html[data-theme="light"] .window-play-toggle:hover {
    border-color: rgba(8, 123, 99, 0.48);
    background: rgba(8, 123, 99, 0.12);
    color: #05624f;
}

html[data-theme="light"] .window-play-toggle:focus-visible {
    outline-color: var(--primary);
}

html[data-theme="light"] .hero-window.is-game-active .window-play-toggle {
    border-color: rgba(103, 80, 181, 0.34);
    background: rgba(103, 80, 181, 0.08);
    color: var(--accent-violet);
}

html[data-theme="light"] .window-canvas {
    background:
        radial-gradient(circle at 50% 48%, rgba(88, 104, 201, 0.11), transparent 42%),
        linear-gradient(180deg, #f8fafc, #eef3f8);
}

html[data-theme="light"] .window-canvas::before {
    background-image:
        linear-gradient(rgba(42, 67, 92, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 67, 92, 0.055) 1px, transparent 1px);
}

html[data-theme="light"] .game-library {
    background:
        radial-gradient(circle at 82% 12%, rgba(103, 80, 181, 0.08), transparent 36%),
        radial-gradient(circle at 15% 88%, rgba(8, 127, 155, 0.07), transparent 34%),
        linear-gradient(165deg, rgba(250, 252, 254, 0.98), rgba(239, 244, 248, 0.99));
    scrollbar-color: rgba(8, 123, 99, 0.38) transparent;
}

html[data-theme="light"] .game-library-heading h3,
html[data-theme="light"] .game-library-copy strong {
    color: var(--text-bright);
}

html[data-theme="light"] .game-library-heading p {
    color: #607084;
}

html[data-theme="light"] .game-library-card {
    border-color: rgba(42, 67, 92, 0.16);
    background: rgba(255, 255, 255, 0.76);
}

html[data-theme="light"] .game-library-card:hover {
    border-color: rgba(8, 123, 99, 0.34);
    background: rgba(8, 123, 99, 0.06);
    box-shadow: 0 14px 28px rgba(30, 50, 70, 0.12);
}

html[data-theme="light"] .game-library-cover {
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 139, 61, 0.14), transparent 44%),
        linear-gradient(145deg, #f3f6fa, #e5ebf2);
}

html[data-theme="light"] .game-library-cover img {
    box-shadow: 0 10px 18px rgba(30, 50, 70, 0.2);
}

html[data-theme="light"] .scene-badge,
html[data-theme="light"] .scene-pills span {
    border-color: rgba(42, 67, 92, 0.16);
    background: rgba(255, 255, 255, 0.78);
    color: #536276;
}

html[data-theme="light"] .scene-badge span {
    color: #607084;
}

html[data-theme="light"] .window-console {
    border-color: rgba(42, 67, 92, 0.12);
    background: #edf2f7;
    color: #607084;
}

html[data-theme="light"] .console-result {
    color: var(--primary);
}

html[data-theme="light"] .unity-playground[data-expanded="true"] {
    background:
        radial-gradient(circle at 50% 44%, rgba(88, 104, 201, 0.1), transparent 42%),
        rgba(244, 247, 251, 0.98);
}

html[data-theme="light"] .unity-game-poster {
    background:
        radial-gradient(circle at 50% 26%, rgba(255, 139, 61, 0.14), transparent 36%),
        radial-gradient(circle at 25% 82%, rgba(8, 127, 155, 0.08), transparent 38%),
        linear-gradient(165deg, #f8fafc 0%, #edf2f7 62%, #f4f7fb 100%);
}

html[data-theme="light"] .unity-game-poster::before {
    background-image:
        linear-gradient(rgba(42, 67, 92, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 67, 92, 0.045) 1px, transparent 1px);
}

html[data-theme="light"] .unity-game-poster > strong {
    color: var(--text-bright);
}

html[data-theme="light"] .unity-game-hint {
    color: #607084;
}

html[data-theme="light"] .unity-game-action {
    border-color: rgba(8, 123, 99, 0.42);
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(8, 123, 99, 0.16);
}

html[data-theme="light"] .unity-game-action:hover {
    background: #05624f;
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(8, 123, 99, 0.22);
}

html[data-theme="light"] .unity-game-action:focus-visible {
    outline-color: var(--primary);
}

html[data-theme="light"] .game-player-control:hover {
    color: #78f0c1;
}

html[data-theme="light"] .unity-game-error {
    background:
        radial-gradient(circle at 50% 35%, rgba(184, 54, 48, 0.1), transparent 40%),
        rgba(248, 250, 252, 0.98);
    color: var(--text-bright);
}

html[data-theme="light"] .unity-game-error .unity-game-action {
    background: transparent;
    color: var(--primary);
}

html[data-theme="light"] .unity-game-error .unity-game-action:hover {
    background: var(--primary);
    color: #ffffff;
}

@keyframes heroPlaySignalLight {
    0%,
    100% {
        border-color: rgba(8, 123, 99, 0.28);
        background: rgba(8, 123, 99, 0.07);
        color: var(--primary);
        box-shadow: 0 0 0 0 rgba(8, 123, 99, 0);
    }

    45% {
        border-color: rgba(8, 123, 99, 0.5);
        background: rgba(8, 123, 99, 0.12);
        color: #05624f;
        box-shadow:
            0 0 0 5px rgba(8, 123, 99, 0.05),
            0 0 18px rgba(8, 123, 99, 0.14);
    }
}

html[data-theme="light"] .hero-window:not(.is-game-active) .window-play-toggle {
    animation-name: heroPlaySignalLight;
}

html[data-theme="light"] .about {
    background: linear-gradient(180deg, transparent, rgba(31, 52, 73, 0.025), transparent);
}

html[data-theme="light"] .image-frame {
    border-color: rgba(42, 67, 92, 0.16);
    background: #ffffff;
    box-shadow: 0 28px 58px rgba(30, 50, 70, 0.13);
}

html[data-theme="light"] .image-frame::before,
html[data-theme="light"] .store-feature::before,
html[data-theme="light"] .contact-center::before,
html[data-theme="light"] .collaborated-block::before,
html[data-theme="light"] .modal-window-bar {
    border-color: rgba(42, 67, 92, 0.12);
    background: linear-gradient(180deg, #f7f9fc, #edf2f7);
    color: #607084;
}

html[data-theme="light"] .profile-window-title,
html[data-theme="light"] .about-text p,
html[data-theme="light"] .store-feature-sub,
html[data-theme="light"] .contact-sub {
    color: #5f6e81;
}

html[data-theme="light"] .about-text .about-intro,
html[data-theme="light"] .detail-value,
html[data-theme="light"] .collaborated-title,
html[data-theme="light"] .project-title,
html[data-theme="light"] .store-card-name {
    color: var(--text-bright);
}

html[data-theme="light"] .detail-label,
html[data-theme="light"] .meta-label,
html[data-theme="light"] .project-arrow,
html[data-theme="light"] .projects-carousel .project-platform {
    color: #607084;
}

html[data-theme="light"] .detail-item,
html[data-theme="light"] .modal-project-meta-item {
    background-color: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .collaborated-block {
    border-color: rgba(42, 67, 92, 0.16) !important;
    background:
        radial-gradient(circle at 10% 24%, rgba(8, 127, 155, 0.07), transparent 30%),
        radial-gradient(circle at 88% 78%, rgba(103, 80, 181, 0.07), transparent 34%),
        #ffffff !important;
    box-shadow: 0 28px 62px rgba(30, 50, 70, 0.13) !important;
}

.collab-logo-wrap {
    border: 1px solid #7b8794 !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 6px 16px rgba(0, 0, 0, 0.18) !important;
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

html[data-theme="dark"] .collab-logo-wrap {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)) !important;
}

html[data-theme="light"] .collab-logo-wrap {
    background: linear-gradient(145deg, #f8fafc, #e4eaf1) !important;
}

a.collab-card:hover .collab-logo-wrap {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 18%, transparent), 0 8px 20px color-mix(in srgb, var(--primary) 14%, transparent) !important;
}

html[data-theme="light"] .store-feature {
    border-color: rgba(42, 67, 92, 0.16);
    background:
        radial-gradient(circle at 8% 18%, rgba(8, 127, 155, 0.07), transparent 28%),
        radial-gradient(circle at 88% 85%, rgba(103, 80, 181, 0.06), transparent 30%),
        rgba(255, 255, 255, 0.72);
    box-shadow: 0 28px 62px rgba(30, 50, 70, 0.12);
}

html[data-theme="light"] .store-card:hover {
    background: rgba(31, 52, 73, 0.045);
}

html[data-theme="light"] .store-nav,
html[data-theme="light"] .projects-nav {
    border-color: var(--border-color);
    background: #ffffff;
    color: #526174;
    box-shadow: 0 8px 20px rgba(30, 50, 70, 0.1);
}

html[data-theme="light"] .store-nav:hover:not(.swiper-button-disabled),
html[data-theme="light"] .projects-nav:hover:not(.swiper-button-disabled) {
    border-color: rgba(8, 123, 99, 0.34);
    background: #f5faf8;
    color: var(--primary);
    box-shadow: 0 10px 24px rgba(8, 123, 99, 0.12);
}

html[data-theme="light"] .storeSwiper .swiper-pagination-bullet,
html[data-theme="light"] .projects-pagination .swiper-pagination-bullet {
    background: rgba(42, 67, 92, 0.6);
}

html[data-theme="light"] .storeSwiper .swiper-pagination-bullet-active,
html[data-theme="light"] .projects-pagination .swiper-pagination-bullet-active {
    background: var(--primary);
}

html[data-theme="light"] .project-card,
html[data-theme="light"] .project-card.is-jam {
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(30, 50, 70, 0.11);
}

html[data-theme="light"] .project-card:hover,
html[data-theme="light"] .project-card.is-jam:hover {
    box-shadow: 0 22px 44px rgba(30, 50, 70, 0.16);
}

html[data-theme="light"] .project-meta {
    border-color: rgba(42, 67, 92, 0.1);
}

html[data-theme="light"] .meta-value {
    color: #536276;
}

html[data-theme="light"] .projects-carousel .jam-badge {
    color: #875a00;
}

html[data-theme="light"] .contact {
    background: linear-gradient(180deg, transparent, rgba(8, 123, 99, 0.025), transparent);
}

html[data-theme="light"] .contact-center {
    border-color: rgba(42, 67, 92, 0.16);
    background:
        radial-gradient(circle at 18% 8%, rgba(8, 127, 155, 0.07), transparent 34%),
        radial-gradient(circle at 82% 6%, rgba(189, 55, 109, 0.06), transparent 34%),
        radial-gradient(circle at 50% 0%, rgba(103, 80, 181, 0.055), transparent 45%),
        #ffffff;
    box-shadow: 0 30px 66px rgba(30, 50, 70, 0.13);
}

html[data-theme="light"] .contact-btn {
    border-color: var(--border-color);
    background: rgba(255, 255, 255, 0.62);
    color: #435267;
}

html[data-theme="light"] .contact-btn:hover {
    border-color: color-mix(in srgb, var(--social-accent) 38%, transparent);
    background: color-mix(in srgb, var(--social-accent) 7%, white);
    color: var(--text-bright);
    box-shadow: 0 10px 26px color-mix(in srgb, var(--social-accent) 10%, transparent);
}

html[data-theme="light"] .contact-meta,
html[data-theme="light"] .footer-text,
html[data-theme="light"] .footer-credit {
    color: #607084;
}

html[data-theme="light"] .footer {
    border-color: rgba(42, 67, 92, 0.12);
}

html[data-theme="light"] .modal-content {
    border-color: rgba(42, 67, 92, 0.18);
    background: #ffffff;
    box-shadow: 0 38px 100px rgba(13, 27, 42, 0.28);
}

html[data-theme="light"] .lightbox-counter {
    color: #f7f9fc;
}

html[data-theme="light"] .modal-window-bar .window-title {
    color: #607084;
}

html[data-theme="light"] .modal-window-bar .modal-window-dismiss {
    border-color: rgba(42, 67, 92, 0.14);
    background: rgba(31, 52, 73, 0.045);
    color: #536276;
}

html[data-theme="light"] .modal-window-bar .modal-window-dismiss:hover {
    border-color: rgba(184, 54, 48, 0.36);
    background: rgba(184, 54, 48, 0.08);
    color: #9f302b;
}

html[data-theme="light"] .modal-scroll {
    scrollbar-color: rgba(42, 67, 92, 0.24) transparent;
}

html[data-theme="light"] .modal-scroll::-webkit-scrollbar-thumb {
    background: rgba(42, 67, 92, 0.24);
}

html[data-theme="light"] .modal-project-meta-label,
html[data-theme="light"] .modal-media-title {
    color: #607084;
}

html[data-theme="light"] .modal-project-company,
html[data-theme="light"] .modal-project-role {
    color: #334256;
}

html[data-theme="light"] .modal-inline-link:hover {
    color: var(--primary);
    text-decoration-color: currentColor;
}

html[data-theme="light"] .modal-inline-link:focus-visible {
    outline-color: var(--primary);
}

html[data-theme="light"] .modal-screenshots-wrap {
    background: linear-gradient(180deg, rgba(8, 123, 99, 0.04), transparent 160px);
    box-shadow: inset 0 1px 0 rgba(42, 67, 92, 0.12);
}

html[data-theme="light"] .modal-tag {
    border-color: rgba(8, 123, 99, 0.2);
    background: rgba(8, 123, 99, 0.07);
}

@media (max-width: 768px) {
    .nav-actions {
        gap: 5px;
        margin-left: auto;
    }

    .theme-toggle {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border-radius: 10px;
    }

    .nav-actions .lang-toggle {
        min-height: 34px;
        margin: 0;
        padding: 6px 8px;
    }

    html[data-theme="light"] .nav-links {
        border-color: rgba(42, 67, 92, 0.14);
        background: rgba(248, 250, 252, 0.98);
        box-shadow: -18px 0 46px rgba(30, 50, 70, 0.12);
    }

    html[data-theme="light"] .hamburger.active {
        border-color: rgba(8, 123, 99, 0.32);
        background: rgba(8, 123, 99, 0.08);
        color: var(--text-bright);
    }
}
