:root {
    --bg: #000000;
    --bg-elevated: #111111;
    --bg-card: rgba(17, 17, 17, 0.85);
    --text: #ffffff;
    --muted: #b3b3b3;
    --border: rgba(255, 255, 255, 0.1);
    --border-soft: rgba(255, 255, 255, 0.08);
    --radius-btn: 12px;
    --radius-card: 16px;
    --font: "DM Sans", Inter, Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

/* Gaming background + light show */
.site-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.site-bg__image {
    display: none;
}

.site-bg__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 15%, rgba(80, 120, 255, 0.18), transparent 45%),
        radial-gradient(ellipse at 85% 20%, rgba(255, 255, 255, 0.1), transparent 40%),
        radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.92), transparent 55%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.72) 45%, rgba(0, 0, 0, 0.94) 100%);
}

.site-bg__lights {
    position: absolute;
    inset: 0;
}

.site-bg__lights .beam {
    position: absolute;
    top: -10%;
    width: 18vw;
    max-width: 280px;
    height: 130%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.22) 0%,
        rgba(120, 180, 255, 0.12) 35%,
        transparent 75%
    );
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%, #000 65%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 35%, #000 65%, transparent);
    transform-origin: top center;
    opacity: 0.55;
    will-change: transform, opacity;
}

.beam-1 {
    left: 12%;
    animation: beam-swing 9s ease-in-out infinite;
}

.beam-2 {
    left: 48%;
    width: 14vw;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.24) 0%,
        rgba(255, 255, 255, 0.08) 40%,
        transparent 75%
    );
    animation: beam-swing 11s ease-in-out infinite reverse;
    animation-delay: -2s;
}

.beam-3 {
    right: 10%;
    left: auto;
    background: linear-gradient(
        180deg,
        rgba(80, 220, 255, 0.26) 0%,
        rgba(60, 100, 255, 0.1) 40%,
        transparent 75%
    );
    animation: beam-swing 13s ease-in-out infinite;
    animation-delay: -4s;
}

.site-bg__lights .spot {
    position: absolute;
    width: 42vw;
    height: 42vw;
    max-width: 520px;
    max-height: 520px;
    border-radius: 50%;
    opacity: 0.35;
    will-change: transform, opacity;
    animation: spot-pulse 6s ease-in-out infinite;
}

.spot-1 {
    top: -8%;
    left: -5%;
    background: radial-gradient(circle, rgba(100, 160, 255, 0.7), transparent 70%);
}

.spot-2 {
    top: 10%;
    right: -8%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.45), transparent 70%);
    animation-delay: -2s;
}

.spot-3 {
    bottom: 5%;
    left: 35%;
    width: 50vw;
    height: 30vw;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
    animation-delay: -3.5s;
}

.site-bg__particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

@keyframes bg-drift {
    from { transform: scale(1.05) translate3d(0, 0, 0); }
    to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); }
}

@keyframes beam-swing {
    0%, 100% { transform: rotate(-12deg) skewX(-6deg); opacity: 0.35; }
    50% { transform: rotate(14deg) skewX(4deg); opacity: 0.7; }
}

@keyframes spot-pulse {
    0%, 100% { opacity: 0.22; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.12); }
}

a {
    color: var(--text);
    text-decoration: none;
    transition: opacity 0.25s ease, color 0.25s ease;
}

a:hover {
    color: var(--text);
    opacity: 0.85;
}

.site-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar — frosted black like yousifragab.com */
.gaming-nav {
    position: sticky;
    top: 0;
    z-index: 1100;
    min-height: 85px;
    background: rgba(0, 0, 0, 0.85) !important;
    border-bottom: 1px solid var(--border);
    padding: 0;
}

.gaming-nav .container {
    min-height: 85px;
    display: flex;
    align-items: center;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    padding: 0;
}

.brand-logo img {
    height: 72px;
    width: auto;
    display: block;
}

.brand-mark {
    font-family: var(--font);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-mark .pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

.brand-mark span {
    font-weight: 400;
    opacity: 0.7;
}

.nav-link-game {
    font-family: var(--font);
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text) !important;
    opacity: 0.7;
    padding: 0.5rem 0.75rem !important;
    position: relative;
    border: none !important;
    background: transparent !important;
}

.nav-link-game:hover,
.nav-link-game.active {
    opacity: 1 !important;
    color: var(--text) !important;
}

.nav-link-game.active::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.navbar-toggler {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.55rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    filter: invert(1);
}

/* Hero */
.hero {
    min-height: calc(100vh - 85px);
    display: flex;
    align-items: center;
    padding: 4rem 0 5rem;
}

.hero-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.45rem 1rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.04);
}

.hero-title {
    font-family: var(--font);
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.05;
    letter-spacing: -1.5px;
    color: var(--text);
    margin-bottom: 1.25rem;
    text-wrap: balance;
}

.hero--title-only {
    min-height: 0;
    padding: clamp(3rem, 8vw, 5rem) 0 clamp(0.5rem, 2vw, 1rem);
    text-align: center;
}

.hero--title-only .hero-title {
    font-size: clamp(3rem, 9vw, 6.5rem);
    letter-spacing: -2px;
    margin: 0;
}

.glitch {
    position: relative;
    display: inline-block;
    text-shadow: 0.015em 0 rgba(255, 46, 99, 0.4), -0.015em 0 rgba(0, 229, 255, 0.4);
    animation: glitch-main 3.6s infinite steps(1);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    text-shadow: none;
    clip-path: inset(100% 0 0 0);
}

.glitch::before {
    color: #00e5ff;
    animation: glitch-cyan 3.6s infinite steps(1);
}

.glitch::after {
    color: #ff2e63;
    animation: glitch-pink 3.6s infinite steps(1);
}

@keyframes glitch-main {
    0%, 23%, 26%, 58%, 62%, 92%, 100% { transform: none; opacity: 1; }
    20% { transform: translateX(-0.02em) skewX(6deg); text-shadow: 0.08em 0 rgba(255, 46, 99, 0.7), -0.08em 0 rgba(0, 229, 255, 0.7); }
    21% { transform: translateX(0.03em) skewX(-4deg); }
    22% { transform: translate(-0.01em, 0.01em); text-shadow: -0.05em 0 rgba(255, 46, 99, 0.7), 0.05em 0 rgba(0, 229, 255, 0.7); }
    24% { transform: translateX(0.015em); opacity: 0.85; }
    25% { transform: none; opacity: 1; }
    60% { transform: skewX(-8deg); opacity: 0.7; }
    61% { transform: translateX(0.02em); opacity: 1; }
    86% { transform: translateX(0.03em) skewX(3deg); text-shadow: 0.07em 0 rgba(255, 46, 99, 0.7), -0.07em 0 rgba(0, 229, 255, 0.7); }
    87% { transform: translateX(-0.03em); }
    88% { transform: skewX(-5deg); opacity: 0.8; }
    89% { transform: translateX(0.01em); opacity: 1; }
    90% { transform: translateX(-0.015em) skewX(2deg); }
}

@keyframes glitch-cyan {
    0%, 26%, 58%, 63%, 92%, 100% { clip-path: inset(100% 0 0 0); transform: none; }
    20% { clip-path: inset(8% 0 78% 0); transform: translateX(-0.09em); }
    21% { clip-path: inset(46% 0 40% 0); transform: translateX(0.07em); }
    22% { clip-path: inset(70% 0 18% 0); transform: translateX(-0.05em); }
    23% { clip-path: inset(25% 0 66% 0); transform: translateX(0.1em); }
    24% { clip-path: inset(58% 0 34% 0); transform: translateX(-0.06em); }
    25% { clip-path: inset(15% 0 80% 0); transform: translateX(0.04em); }
    60% { clip-path: inset(30% 0 52% 0); transform: translateX(-0.12em); }
    61% { clip-path: inset(62% 0 26% 0); transform: translateX(0.08em); }
    62% { clip-path: inset(100% 0 0 0); transform: none; }
    86% { clip-path: inset(40% 0 50% 0); transform: translateX(0.08em); }
    87% { clip-path: inset(5% 0 85% 0); transform: translateX(-0.07em); }
    88% { clip-path: inset(76% 0 12% 0); transform: translateX(0.05em); }
    89% { clip-path: inset(100% 0 0 0); transform: none; }
    90% { clip-path: inset(52% 0 38% 0); transform: translateX(-0.06em); }
    91% { clip-path: inset(20% 0 72% 0); transform: translateX(0.03em); }
}

@keyframes glitch-pink {
    0%, 26%, 58%, 63%, 92%, 100% { clip-path: inset(100% 0 0 0); transform: none; }
    20% { clip-path: inset(62% 0 24% 0); transform: translateX(0.08em); }
    21% { clip-path: inset(12% 0 74% 0); transform: translateX(-0.1em); }
    22% { clip-path: inset(38% 0 52% 0); transform: translateX(0.06em); }
    23% { clip-path: inset(80% 0 8% 0); transform: translateX(-0.07em); }
    24% { clip-path: inset(3% 0 88% 0); transform: translateX(0.05em); }
    25% { clip-path: inset(50% 0 42% 0); transform: translateX(-0.03em); }
    60% { clip-path: inset(72% 0 14% 0); transform: translateX(0.11em); }
    61% { clip-path: inset(18% 0 70% 0); transform: translateX(-0.09em); }
    62% { clip-path: inset(100% 0 0 0); transform: none; }
    86% { clip-path: inset(66% 0 22% 0); transform: translateX(-0.08em); }
    87% { clip-path: inset(30% 0 60% 0); transform: translateX(0.06em); }
    88% { clip-path: inset(10% 0 82% 0); transform: translateX(-0.05em); }
    89% { clip-path: inset(100% 0 0 0); transform: none; }
    90% { clip-path: inset(84% 0 6% 0); transform: translateX(0.07em); }
    91% { clip-path: inset(44% 0 46% 0); transform: translateX(-0.04em); }
}

.hero-title .accent {
    color: var(--muted);
    font-weight: 500;
    letter-spacing: -1px;
    display: block;
    font-size: 0.55em;
    margin-top: 0.35rem;
}

/* Home: About the developer */
.dev-about {
    padding-top: 2rem;
}

.dev-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background:
        radial-gradient(120% 55% at 50% 100%, rgba(90, 169, 255, 0.09), transparent 70%),
        #0b0b0b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    transition: transform 0.35s ease, border-color 0.35s ease;
}

.dev-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.22);
}

.dev-cover {
    position: relative;
    height: 230px;
    overflow: hidden;
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    gap: 3px;
    background: #111;
}

.dev-cover--1 { grid-template-columns: minmax(0, 1fr); }
.dev-cover--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dev-cover--3 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.dev-cover--3 img:first-child { grid-row: span 2; }

.dev-cover img {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.dev-card:hover .dev-cover img {
    transform: scale(1.05);
}

.dev-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.15) 35%, rgba(11, 11, 11, 0.7) 75%, #0b0b0b 100%);
    pointer-events: none;
}

.dev-cover-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.25);
    background:
        radial-gradient(circle at 30% 30%, rgba(90, 169, 255, 0.35), transparent 60%),
        radial-gradient(circle at 80% 70%, rgba(167, 139, 250, 0.25), transparent 60%),
        #0d0d12;
}

@keyframes dev-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.25); }
    50% { box-shadow: 0 0 0 7px rgba(61, 220, 151, 0); }
}

.dev-card-body {
    position: relative;
    z-index: 1;
    padding: 0 1.75rem 1.75rem;
    margin-top: -62px;
    text-align: center;
}

.dev-avatar {
    width: 112px;
    height: 112px;
    margin: 0 auto 1.5rem;
    padding: 12px;
    border-radius: 28px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 6px #0b0b0b, 0 18px 40px rgba(0, 0, 0, 0.7);
}

.dev-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dev-mail {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 1.1rem;
    border-radius: 16px;
    background: #fff;
    color: #000 !important;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.dev-mail span {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dev-mail:hover {
    transform: translateY(-2px);
    opacity: 0.92;
}

.dev-mail .bi-arrow-up-right {
    transition: transform 0.2s ease;
}

.dev-mail:hover .bi-arrow-up-right {
    transform: translate(2px, -2px);
}


.dev-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.9rem;
}

.dev-eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    background: #fff;
}

.section-title.dev-title {
    margin-bottom: 1.4rem;
    text-wrap: balance;
}

.dev-text {
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.1rem;
    max-width: 600px;
}

.dev-text:last-child {
    margin-bottom: 0;
}

.dev-service {
    height: 100%;
    padding: 1.6rem 1.5rem;
    border-radius: 20px;
    background: rgba(12, 12, 12, 0.9);
    border: 1px solid var(--border);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.dev-service:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.25);
}

.dev-service-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #000;
    background: #fff;
    margin-bottom: 1.1rem;
}

.dev-service h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
}

.dev-service p {
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.6;
    margin: 0;
}

/* Portfolio page */
.pf-hero {
    padding: clamp(3rem, 7vw, 5rem) 0 4.5rem;
}

.pf-intro__status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    margin-bottom: 1.4rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #3ddc97;
    background: rgba(61, 220, 151, 0.08);
    border: 1px solid rgba(61, 220, 151, 0.3);
}

.pf-intro__status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3ddc97;
    animation: dev-pulse 2s ease-in-out infinite;
}

.pf-title {
    font-weight: 900;
    font-size: clamp(2.5rem, 4.6vw, 3.9rem);
    line-height: 1.04;
    letter-spacing: -1.5px;
    margin: 0 0 0.6rem;
}

.pf-role {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1.25rem;
}

.pf-intro__text {
    max-width: 560px;
    margin-bottom: 2rem;
    font-size: 1.06rem;
    line-height: 1.75;
    color: var(--muted);
}

.pf-intro__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.pf-intro__social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.9rem;
}

.pf-intro__social a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.16);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pf-intro__social a:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
    transform: translateY(-3px);
}

.pf-show {
    position: relative;
    width: 100%;
    max-width: 540px;
    aspect-ratio: 1 / 0.88;
    margin-left: auto;
}

.pf-show__glow {
    position: absolute;
    inset: 5%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(90, 169, 255, 0.32), rgba(90, 169, 255, 0.08) 45%, transparent 70%);
    pointer-events: none;
}

.pf-show__card {
    position: absolute;
    aspect-ratio: 4 / 3;
    border-radius: 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 30%, rgba(90, 169, 255, 0.3), transparent 60%),
        #111;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65);
}

.pf-show__card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pf-show__card--back {
    top: 0;
    right: 0;
    width: 62%;
    transform: rotate(6deg);
    z-index: 1;
}

.pf-show__card--back::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
}

.pf-show__card--front {
    left: 4%;
    bottom: 6%;
    width: 76%;
    transform: rotate(-3deg);
    z-index: 2;
}

.pf-show__empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.3);
}

.pf-show__logo {
    position: absolute;
    top: 10%;
    left: 0;
    z-index: 3;
    width: 92px;
    height: 92px;
    padding: 13px;
    border-radius: 24px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 40px rgba(90, 169, 255, 0.2);
    animation: pf-float 6s ease-in-out infinite;
}

.pf-show__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pf-show__chip {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 1.05rem 0.7rem 0.7rem;
    border-radius: 18px;
    background: rgba(10, 10, 10, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
    animation: pf-float 6s ease-in-out infinite;
}

.pf-show__chip .bi {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #000;
    background: #fff;
}

.pf-show__chip span {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.2;
}

.pf-show__chip strong {
    display: block;
    font-size: 0.98rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

.pf-show__chip--a {
    right: 0;
    bottom: 26%;
    animation-delay: -2s;
}

.pf-show__chip--b {
    left: 12%;
    bottom: -2%;
    animation-delay: -4s;
}

@keyframes pf-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@media (max-width: 991.98px) {
    .pf-show {
        margin: 1rem auto 0;
        max-width: 480px;
    }
}

@media (max-width: 575.98px) {
    .pf-show__logo {
        width: 70px;
        height: 70px;
        padding: 10px;
        border-radius: 18px;
    }

    .pf-show__chip {
        padding: 0.5rem 0.8rem 0.5rem 0.5rem;
        gap: 0.5rem;
    }

    .pf-show__chip .bi {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .pf-show__chip strong {
        font-size: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pf-show__logo,
    .pf-show__chip {
        animation: none;
    }
}
.pf-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 4.5rem;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(12, 12, 12, 0.92);
    border: 1px solid var(--border);
}

.pf-stats div {
    padding: 1.6rem 1rem;
    text-align: center;
}

.pf-stats div + div {
    border-left: 1px solid var(--border);
}

.pf-stats strong {
    display: block;
    font-size: clamp(1.8rem, 3.2vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 0.2rem;
}

.pf-stats span {
    font-size: 0.88rem;
    color: var(--muted);
    font-weight: 600;
}
.pf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.pf-chips span {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.pf-work {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: center;
    padding: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: 1.5rem;
    border-radius: 26px;
    background: rgba(12, 12, 12, 0.9);
    border: 1px solid var(--border);
}

.pf-work--reverse .pf-work__media {
    order: 2;
}

.pf-work__media {
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    overflow: hidden;
    background: #111;
}

.pf-work__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.pf-work__media:hover img {
    transform: scale(1.04);
}

.pf-work__empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.25);
}

.pf-work__body {
    padding: 0.5rem 0.5rem 0.5rem 0;
}

.pf-work--reverse .pf-work__body {
    padding: 0.5rem 0 0.5rem 0.5rem;
}

.pf-work__title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 900;
    letter-spacing: -0.8px;
    margin-bottom: 0.75rem;
}

.pf-work__text {
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.pf-work__btn {
    font-size: 0.95rem !important;
    padding: 0.6rem 1.4rem !important;
    min-height: 48px;
}

.pf-work__downloads {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
}

.pf-step {
    height: 100%;
    padding: 1.6rem 1.5rem;
    border-radius: 20px;
    background: rgba(12, 12, 12, 0.9);
    border: 1px solid var(--border);
}

.pf-step__num {
    display: block;
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1px;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.45);
    margin-bottom: 1rem;
}

.pf-step h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
}

.pf-step p {
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.6;
    margin: 0;
}

.pf-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: clamp(1.75rem, 4vw, 3rem);
    border-radius: 26px;
    background:
        radial-gradient(80% 120% at 0% 0%, rgba(90, 169, 255, 0.14), transparent 60%),
        rgba(12, 12, 12, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.pf-cta h2 {
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 0.4rem;
}

.pf-cta p {
    color: var(--muted);
    font-size: 1.05rem;
    margin: 0;
}

@media (max-width: 991.98px) {
    .pf-work {
        grid-template-columns: minmax(0, 1fr);
    }

    .pf-work--reverse .pf-work__media {
        order: 0;
    }

    .pf-work__body,
    .pf-work--reverse .pf-work__body {
        padding: 0 0.25rem 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .pf-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .pf-stats div + div {
        border-left: none;
    }

    .pf-stats div:nth-child(even) {
        border-left: 1px solid var(--border);
    }

    .pf-stats div:nth-child(n + 3) {
        border-top: 1px solid var(--border);
    }
}

@media (max-width: 575.98px) {
    .dev-cover {
        height: 180px;
    }

    .dev-card-body {
        padding: 0 1.1rem 1.25rem;
    }
}

.hero-lead {
    font-size: 1.125rem;
    color: var(--muted);
    max-width: 34rem;
    margin-bottom: 2rem;
    font-weight: 400;
    line-height: 1.6;
}

.btn-neon,
.btn-primary-yr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-size: 1.1rem;
    font-weight: 700;
    color: #000 !important;
    background: #fff !important;
    border: none !important;
    border-radius: var(--radius-btn);
    padding: 16px 48px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    clip-path: none;
    letter-spacing: normal;
    text-transform: none;
}

.btn-neon:hover,
.btn-primary-yr:hover {
    color: #000 !important;
    background: #e8e8e8 !important;
    transform: translateY(-2px);
    box-shadow: none;
    opacity: 1;
}

.btn-ghost,
.btn-outline-yr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff !important;
    background: transparent !important;
    border: 2px solid #fff !important;
    border-radius: var(--radius-btn);
    padding: 14px 46px;
    transition: background 0.2s ease, transform 0.2s ease;
    clip-path: none;
    letter-spacing: normal;
    text-transform: none;
}

.btn-ghost:hover,
.btn-ghost.active,
.btn-outline-yr:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    transform: translateY(-2px);
}

.btn-ghost.active {
    border-color: #fff !important;
}

.btn-filter {
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 10px 22px !important;
    border-radius: 999px !important;
}

.btn-filter.btn-neon {
    padding: 10px 22px !important;
    font-size: 0.8rem !important;
}

.hero-panel {
    background: rgba(10, 10, 10, 0.86);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
    padding: 1.75rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 1rem 1.1rem;
}

.stat-box .value {
    font-family: var(--font);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

.stat-box .label {
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-title {
    font-family: var(--font);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.section-sub {
    color: var(--muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 36rem;
}

.page-banner {
    padding: 5rem 0 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2.5rem;
}

.page-banner h1 {
    font-family: var(--font);
    font-weight: 900;
    letter-spacing: -1.5px;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    margin: 0;
}

.page-banner p {
    color: var(--muted);
    font-size: 1.15rem;
    margin: 0.75rem 0 0;
}

/* Cards — rounded dark panels */
.game-card {
    background: rgba(12, 12, 12, 0.9);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
    height: 100%;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
    display: block;
    color: inherit;
    width: 100%;
}

.game-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: none;
    color: inherit;
    opacity: 1;
}

.game-card .thumb {
    height: 160px;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.game-card .thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.game-card .thumb-placeholder {
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.project-image-preview {
    max-width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.game-card .body {
    padding: 1.35rem 1.5rem 1.6rem;
    background: #111111;
}

.game-card h3 {
    font-family: var(--font);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: normal;
    text-transform: none;
    margin-bottom: 0.4rem;
    color: #fff;
}

.game-card p {
    color: var(--muted);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    margin-bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
}

/* About list */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.15rem 0;
    border-bottom: 1px solid var(--border-soft);
}

.feature-list .icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #fff;
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.04);
}

/* Contact form */
.form-panel {
    background: rgba(12, 12, 12, 0.82);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
    padding: 2rem;
}

.form-label {
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--muted);
}

.form-control,
.form-select {
    background-color: #000 !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    border-radius: 10px !important;
    padding: 0.85rem 1rem;
}

.form-select,
.form-select-dark {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #000 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23b3b3b3' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    padding-right: 2.5rem !important;
}

.form-control:focus {
    box-shadow: 0 0 0 0.15rem rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

.form-control::placeholder {
    color: #666;
}

.alert-success-game {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: 12px;
}

.alert-danger {
    border-radius: 12px !important;
}

/* Footer */
.site-footer {
    background: rgba(8, 8, 8, 0.92);
    border-top: 1px solid var(--border);
    padding: 4rem 0 0;
    margin-top: 4rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.footer-top {
    padding-bottom: 3rem;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 1.1rem;
}

.footer-logo img {
    height: 72px;
    width: auto;
    display: block;
}

.footer-desc {
    max-width: 380px;
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.footer-social a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-social a:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
    transform: translateY(-3px);
    opacity: 1;
}

.footer-heading {
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.footer-links a,
.footer-links span {
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    word-break: break-word;
}

.footer-links a:hover {
    color: #fff;
    opacity: 1;
}

.footer-links .bi-chevron-right {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.footer-links a:hover .bi-chevron-right {
    transform: translateX(3px);
}

.footer-contact .bi {
    color: #fff;
    font-size: 1rem;
}

.footer-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.4rem;
    padding: 10px 20px;
    border-radius: 999px;
    background: #fff;
    color: #000 !important;
    font-weight: 700;
    font-size: 0.9rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer-cta:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 1.4rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.88rem;
}

.footer-bottom-note .bi-heart-fill {
    color: #ff5a6a;
    font-size: 0.8rem;
}

@media (max-width: 575.98px) {
    .site-footer {
        padding-top: 3rem;
        text-align: left;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Icon buttons */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.05);
    color: #fff !important;
    font-size: 1.25rem;
    line-height: 1;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.icon-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.45);
    opacity: 1;
}

.icon-btn--solid {
    background: #fff;
    border-color: #fff;
    color: #000 !important;
}

.icon-btn--solid:hover {
    background: #e8e8e8;
    border-color: #e8e8e8;
}

/* Project detail page */
.pd-hero {
    padding: 2.5rem 0 2.5rem;
}

.pd-topbar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.pd-topbar .icon-btn {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
}

.pd-title {
    font-weight: 900;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    letter-spacing: -1.5px;
    line-height: 1.05;
    margin-bottom: 0.85rem;
}

.pd-lead {
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 32rem;
    margin-bottom: 1.75rem;
}

.pd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pd-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background: #0b0b0b;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.pd-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.25s ease;
}

.pd-cover img.is-fading {
    opacity: 0;
}

.pd-cover__empty {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.2);
}

.pd-thumbs {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scrollbar-width: thin;
}

.pd-thumb {
    flex: 0 0 140px;
    height: 88px;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    background: #111;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pd-thumb:hover,
.pd-thumb.is-active {
    opacity: 1;
}

.pd-thumb.is-active {
    border-color: #fff;
}

.pd-panel {
    background: rgba(12, 12, 12, 0.78);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.pd-heading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.2px;
    margin-bottom: 1rem;
}

.pd-heading i {
    font-size: 1.1rem;
    color: var(--muted);
}

.pd-text {
    color: var(--muted);
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.75;
}

.pd-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.25rem;
}

.pd-features li {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    color: #d6d6d6;
}

.pd-features i {
    color: #fff;
    font-size: 1.05rem;
    margin-top: 0.1rem;
}

.pd-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pd-tech span {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.pd-side {
    position: sticky;
    top: 100px;
}

.pd-side__divider {
    height: 1px;
    background: var(--border-soft);
    margin: 1.4rem 0;
}

.pd-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pd-info li {
    display: flex;
    justify-content: space-between;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.95rem;
}

.pd-info li:last-child {
    border-bottom: none;
}

.pd-info span {
    color: var(--muted);
}

.play-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 48px;
    padding: 0.45rem 1.15rem 0.45rem 0.95rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #fff;
    color: #000 !important;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.play-badge:hover {
    transform: translateY(-2px);
    background: #f0f0f0;
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.12);
}

.play-badge > .bi-google-play {
    font-size: 1.45rem;
    line-height: 1;
}

.play-badge__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: left;
}

.play-badge__text small {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.65;
}

.play-badge__text strong {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.play-badge--block {
    display: flex;
    width: 100%;
    padding: 0.8rem 1.1rem;
    border-radius: 16px;
}

.play-badge__arrow {
    margin-left: auto;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.play-badge:hover .play-badge__arrow {
    transform: translate(2px, -2px);
}

.pd-download__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.pd-download__head strong {
    font-size: 1.05rem;
    font-weight: 800;
}

.pd-download__head span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
}

.project-detail-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background: #000;
}

.project-detail-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 991.98px) {
    .pd-side {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .pd-features {
        grid-template-columns: 1fr;
    }

    .pd-thumb {
        flex-basis: 110px;
        height: 70px;
    }
}

/* Continuous games slider */
.games-slider-section {
    overflow: hidden;
}

.games-marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
    padding: 0.5rem 0 1rem;
}

.games-marquee-track {
    display: flex;
    width: max-content;
    gap: 1.25rem;
    will-change: transform;
}

.games-slide-card {
    flex: 0 0 280px;
    width: 280px;
    max-width: 280px;
}

.project-open-btn {
    border: none;
    padding: 0;
    text-align: left;
    cursor: pointer;
    color: inherit;
    font: inherit;
}

.project-open-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Project detail modal */
.project-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.project-modal.is-open {
    display: flex;
}

.project-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.project-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: min(90vh, 900px);
    overflow: auto;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.project-modal__close {
    position: sticky;
    top: 0.75rem;
    float: right;
    margin: 0.75rem 0.75rem 0 0;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.project-modal__body {
    padding: 1.5rem 1.5rem 2rem;
    clear: both;
}

.project-modal__loading {
    color: var(--muted);
    padding: 2rem;
    text-align: center;
}

.project-modal__tag {
    margin-bottom: 0.75rem;
}

.project-modal__title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
}

.project-modal__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.project-modal__gallery img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.project-modal__video {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    margin-bottom: 1.25rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
}

.project-modal__video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.project-modal__section {
    margin-bottom: 1.25rem;
}

.project-modal__section h4 {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.project-modal__section p {
    color: #cfcfcf;
    margin: 0;
    white-space: pre-wrap;
}

.project-modal__list {
    margin: 0;
    padding-left: 1.1rem;
    color: #cfcfcf;
}

.project-modal__list li {
    margin-bottom: 0.35rem;
}

.project-modal__tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-modal__tech span {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.gallery-admin-item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.modal-open {
    overflow: hidden;
}

.games-slide-card .thumb {
    height: 170px;
}

.games-marquee:hover .games-marquee-track {
    animation-play-state: paused;
}

.games-marquee.is-js .games-marquee-track {
    animation: none;
}

@keyframes games-marquee-scroll {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
}

.games-marquee:not(.is-js) .games-marquee-track {
    animation: games-marquee-scroll 35s linear infinite;
}

@media (max-width: 767.98px) {
    .games-slide-card {
        flex-basis: 220px;
        width: 220px;
        max-width: 220px;
    }

    .games-marquee:not(.is-js) .games-marquee-track {
        animation-duration: 28s;
    }
}

/* Animations — subtle */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.floaty {
    animation: floaty 5s ease-in-out infinite;
}

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Remove old neon scanlines look */
.scanlines {
    display: none;
}

@media (max-width: 991px) {
    .hero {
        min-height: auto;
        padding-top: 3rem;
    }

    .hero-panel {
        margin-top: 2.5rem;
    }

    .btn-neon,
    .btn-ghost,
    .btn-primary-yr,
    .btn-outline-yr {
        padding: 14px 28px;
        font-size: 1rem;
    }
}
