/* ============================================================
   AJAY CHAUDHARY — PORTFOLIO STYLES
   Light theme on the Color Hunt palette:
   #000000 · #CB2957 · #DDDDDD · #EEEEEE
   (+ crimson family tones #E04E72 / #8E1C3E for card variety)
   ============================================================ */

:root {
    --bg:         #EEEEEE;
    --bg-alt:     #DDDDDD;
    --ink:        #000000;
    --ink-soft:   #3a3a3a;
    --muted:      #5d5d5d;
    --card-bg:    #0a0a0a;
    --card-text:  #f2f2f2;
    --card-muted: #b8b8b8;
    --accent:     #CB2957;
    --accent-2:   #8E1C3E;
    --line:       rgba(0, 0, 0, .12);
    --font-display: 'Chakra Petch', sans-serif;
    --font-body:    'Inter', sans-serif;
    --radius: 16px;
    --nav-h: 72px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: min(1160px, 92%); margin-inline: auto; }
.accent { color: var(--accent); }
.section { padding: clamp(80px, 12vh, 140px) 0; position: relative; }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

::selection { background: var(--accent); color: #fff; }

/* ============ CUSTOM CURSOR (desktop only) ============ */
.cursor-dot, .cursor-ring {
    position: fixed; top: 0; left: 0;
    pointer-events: none;
    border-radius: 50%;
    z-index: 9999;
    opacity: 0;
    transform: translate(-50%, -50%);
}
.cursor-dot {
    width: 8px; height: 8px;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(203, 41, 87, .6);
}
.cursor-ring {
    width: 38px; height: 38px;
    border: 1.5px solid rgba(203, 41, 87, .55);
    transition: width .25s ease, height .25s ease, border-color .25s ease, background .25s ease;
}
body.cursor-on .cursor-dot, body.cursor-on .cursor-ring { opacity: 1; }
body.cursor-hover .cursor-ring {
    width: 64px; height: 64px;
    background: rgba(203, 41, 87, .08);
    border-color: var(--accent);
}
@media (pointer: fine) {
    body.cursor-on, body.cursor-on a, body.cursor-on button,
    body.cursor-on input, body.cursor-on textarea, body.cursor-on [data-hover] {
        cursor: none;
    }
}
@media (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none; }
}

/* ============ NAV ============ */
.nav {
    position: fixed; inset: 0 0 auto 0;
    height: var(--nav-h);
    z-index: 100;
    transition: background .35s ease, box-shadow .35s ease, backdrop-filter .35s ease;
}
.nav--solid {
    background: rgba(238, 238, 238, .85);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--line);
}
.nav__inner {
    width: min(1240px, 94%);
    margin-inline: auto;
    height: 100%;
    display: flex; align-items: center; justify-content: space-between;
}
.nav__logo {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: .06em;
    font-size: 1.05rem;
    color: var(--ink);
}
.nav__logo-mark { color: var(--accent); margin-right: 2px; }
.nav__logo-thin { color: var(--muted); font-weight: 400; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a {
    font-size: .86rem; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--muted);
    transition: color .25s ease;
    position: relative;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:not(.nav__cta)::after {
    content: ''; position: absolute; left: 0; bottom: -6px;
    width: 0; height: 2px; background: var(--accent);
    transition: width .3s ease;
}
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
    background: var(--ink);
    color: #fff !important;
    padding: 10px 22px; border-radius: 999px;
    transition: background .25s ease, box-shadow .25s ease, transform .25s ease;
}
.nav__cta:hover {
    background: var(--accent);
    box-shadow: 0 8px 22px -8px rgba(203, 41, 87, .7);
    transform: translateY(-1px);
}
/* Social icon links in nav */
.nav__social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    color: var(--muted) !important;
    transition: color .25s ease, background .25s ease, transform .25s ease;
}
.nav__social:hover {
    color: var(--accent) !important;
    background: rgba(203, 41, 87, .1);
    transform: translateY(-2px);
}
.nav__social::after { display: none !important; }
.nav__burger {
    display: none;
    background: none; border: 0;
    width: 42px; height: 42px;
    flex-direction: column; justify-content: center; align-items: center; gap: 6px;
}
.nav__burger span {
    display: block; width: 24px; height: 2px;
    background: var(--ink);
    transition: transform .3s ease, opacity .3s ease;
}
.nav--dark .nav__burger span { background: #fff; }
.nav--open .nav__burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav--open .nav__burger span:nth-child(2) { opacity: 0; }
.nav--open .nav__burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============ FIXED ANIMATED BACKGROUND (whole site) ============ */
.site-bg {
    position: fixed; inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* ============ HERO ============ */
.hero {
    min-height: 100svh;
    display: flex; align-items: center; justify-content: center;
    /* Sticky: the hero stays pinned and the next sections slide over it */
    position: sticky; top: 0;
    z-index: 0;
    text-align: center;
    padding: calc(var(--nav-h) + 20px) 5% 70px;
}
.hero__grid {
    position: absolute; inset: -2%;
    background-image:
        linear-gradient(rgba(0, 0, 0, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, .055) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 35%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 35%, transparent 78%);
}
.orb {
    position: absolute; border-radius: 50%;
    filter: blur(70px);
    will-change: transform;
}
.orb--1 { width: 440px; height: 440px; top: -8%; left: -8%;  background: radial-gradient(circle, rgba(203, 41, 87, .18), transparent 70%); }
.orb--2 { width: 380px; height: 380px; bottom: -10%; right: -6%; background: radial-gradient(circle, rgba(142, 28, 62, .16), transparent 70%); }
.orb--3 { width: 300px; height: 300px; top: 35%; right: 18%;  background: radial-gradient(circle, rgba(0, 0, 0, .10), transparent 70%); }
.shape {
    position: absolute;
    font-family: var(--font-display);
    font-weight: 700;
    color: rgba(0, 0, 0, .18);
    will-change: transform;
    animation: float 7s ease-in-out infinite;
    user-select: none;
}
.shape--tri  { top: 22%; left: 12%;  font-size: 2rem;   color: rgba(203, 41, 87, .4); animation-delay: -1s; }
.shape--x    { top: 64%; left: 8%;   font-size: 2.6rem; color: rgba(0, 0, 0, .22); animation-delay: -3s; }
.shape--o    { top: 18%; right: 14%; font-size: 2.2rem; color: rgba(142, 28, 62, .35); animation-delay: -2s; }
.shape--sq   { top: 70%; right: 10%; font-size: 2rem;   color: rgba(0, 0, 0, .18); animation-delay: -4.5s; }
.shape--dpad { top: 44%; left: 21%;  font-size: 1.6rem; color: rgba(224, 78, 114, .45); animation-delay: -5.5s; }
@keyframes float {
    0%, 100% { translate: 0 0; rotate: 0deg; }
    50%      { translate: 0 -22px; rotate: 8deg; }
}
@keyframes floatVertical {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-20px); }
}

.hero__content { position: relative; max-width: 1100px; width: 100%; will-change: transform, opacity; }

/* Big name headline */
.hero__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 8.6vw, 5.8rem);
    line-height: 1.04;
    letter-spacing: .02em;
    color: var(--ink);
}

/* Typewriter line: rotating crimson word + fixed black "DESIGN" */
.hero__typed-wrap {
    margin-top: 14px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 5.4vw, 3.4rem);
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: .02em;
    min-height: 1.35em;           /* reserve space so layout doesn't jump */
    text-align: center;
}
.hero__typed { display: inline; color: var(--accent); }
.hero__typed-fixed { color: var(--ink); margin-left: .32em; }
.hero__caret {
    display: inline-block;
    width: .09em;
    height: .95em;
    margin-left: .08em;
    vertical-align: -.08em;
    background: var(--accent);
    animation: caretBlink 1s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }

/* Metric strip — always a single row */
.hero__metrics {
    margin-top: clamp(40px, 7vh, 70px);
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(14px, 4.5vw, 64px);
}
.metric {
    display: flex; flex-direction: column; align-items: center;
    gap: 7px;
    flex: 0 1 auto;
    min-width: 0;
}
.metric__icon { color: var(--ink); display: block; }
.metric__icon svg {
    width: clamp(28px, 4.6vw, 46px);
    height: clamp(28px, 4.6vw, 46px);
    display: block;
    transition: transform .3s ease, color .3s ease;
}
.metric:hover .metric__icon svg { transform: translateY(-4px); color: var(--accent); }
.metric__value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(.92rem, 2.1vw, 1.45rem);
    letter-spacing: .12em;
    color: var(--accent);
}
.metric__label {
    font-family: var(--font-body);
    font-size: clamp(.5rem, 1.05vw, .72rem);
    font-weight: 600;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-align: center;
    max-width: 12ch;
    line-height: 1.5;
}
.btn {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: .1em;
    font-size: .9rem;
    padding: 15px 34px;
    border-radius: 999px;
    border: 0;
    display: inline-block;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
    will-change: transform;
}
.btn--primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 12px 30px -10px rgba(203, 41, 87, .65);
}
.btn--primary:hover {
    background: var(--ink);
    box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .5);
}
.btn--ghost {
    border: 2px solid var(--ink);
    color: var(--ink);
    background: transparent;
    padding: 13px 32px;
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero__scroll {
    position: absolute; bottom: 28px; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    color: var(--muted);
}
.hero__scroll-text { font-family: var(--font-display); font-size: .65rem; letter-spacing: .35em; }
.hero__scroll-line {
    width: 1px; height: 44px;
    background: linear-gradient(var(--accent), transparent);
    animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { transform: scaleY(.4); transform-origin: top; opacity: .4; }
    50%      { transform: scaleY(1);  opacity: 1; }
}

/* Everything after the hero scrolls OVER the pinned hero */
.section, .studios, .footer {
    position: relative;
    z-index: 1;
}
/* Sections without their own tint stay transparent so the fixed
   animated background shows through the whole page. */
.about, .skills { background: var(--bg-alt); }

/* ============ SECTION HEADINGS ============ */
.section__kicker {
    font-family: var(--font-display);
    color: var(--accent);
    letter-spacing: .22em;
    font-size: .8rem;
    margin-bottom: 14px;
}
.section__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.9rem, 5vw, 3.2rem);
    line-height: 1.12;
    margin-bottom: 18px;
    color: var(--ink);
}
.section__sub { color: var(--muted); max-width: 560px; margin-bottom: 50px; }

/* Giant ghost words that parallax behind sections */
.about__deco, .games__deco, .contact__deco {
    position: absolute;
    top: 4%;
    right: -2%;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(5rem, 17vw, 14rem);
    color: transparent;
    -webkit-text-stroke: 1px rgba(0, 0, 0, .07);
    pointer-events: none;
    white-space: nowrap;
    will-change: transform;
    z-index: 0;
}
.games__deco { left: -3%; right: auto; }

/* ============ ABOUT ============ */
.about { background: var(--bg-alt); border-block: 1px solid var(--line); }
.about__cols {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 64px;
    align-items: center;
    position: relative; z-index: 1;
}
.about__eyebrow {
    font-family: var(--font-display);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}
.about__heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.55rem, 3.6vw, 2.5rem);
    line-height: 1.22;
    color: var(--ink);
    margin-bottom: 28px;
}
.about__para { color: var(--ink-soft); font-size: 1.03rem; }
.about__para + .about__para { margin-top: 20px; }
.about__para b.accent { color: var(--accent); font-weight: 600; }
.about__interested {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--ink);
    margin: 30px 0 18px;
}

/* Rhombus profile photo, sloping towards the left */
.about__photo {
    position: relative;
    width: min(350px, 86%);
    justify-self: center;
}
.about__photo::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(24% 0, 100% 0, 76% 100%, 0 100%);
    background: var(--accent);
    transform: translate(16px, 16px);
    opacity: .3;
}
.about__photo-frame {
    position: relative;
    aspect-ratio: 4 / 5;
    clip-path: polygon(24% 0, 100% 0, 76% 100%, 0 100%);
    transition: transform .4s ease;
}
.about__photo:hover .about__photo-frame { transform: translateY(-6px); }
.about__photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============ GAMES — HORIZONTAL GALLERY ============ */
.games {
    position: relative;
    z-index: 1;
    padding: clamp(50px, 7vh, 90px) 0;
}
.games__gallery { position: relative; }

/* Heading closer to cards */
.games__head { margin-bottom: clamp(4px, 1vh, 12px); }
.games__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.1;
    color: var(--ink);
}

/* Sub text — lives inside the overlay on desktop, flows on mobile */
.games__sub {
    color: var(--muted);
    max-width: 26ch;
    font-size: 1.35rem;
    line-height: 1.75;
}

/* Left-side overlay: feather gradient covers scrolled-past cards; text centred in lead spacer zone */
.games__sub-overlay {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    /* width matches the lead spacer (50vw minus half-card + small buffer) */
    width: max(80px, calc(50vw - 130px));
    /* fully opaque through the text zone, feather only at the trailing edge */
    background: linear-gradient(90deg, var(--bg) 0%, var(--bg) 95%, transparent 100%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    padding-left: max(4%, calc((100vw - 1160px) / 2));
    /* keep the text inside the opaque zone, clear of the feathered edge */
    padding-right: clamp(48px, 9vw, 170px);
    z-index: 42;   /* above cards (1-11) and fog (40) */
}

/* Game Portfolio button — electric wire hover */
.electric-btn-wrap {
    position: relative;
    display: inline-block;
    margin-top: 12px;
}
.games__portfolio-btn {
    display: inline-block;
    padding: 11px 24px;
    font-family: var(--font-display);
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    background: transparent;
    border: 1.5px solid var(--ink);
    outline: 1.5px solid var(--ink);
    outline-offset: 5px;
    border-radius: 0;
    position: relative;
    overflow: visible;
    cursor: pointer;
    transition: color .25s, background .25s, border-color .25s, outline-color .25s;
    z-index: 1;
}
.games__portfolio-btn:hover {
    color: #fff;
    background: #CB2957;
    border-color: #CB2957;
    outline-color: rgba(203,41,87,.4);
}
.games__portfolio-btn.is-electric-frozen {
    animation: electricPulse 1.5s infinite;
}
@keyframes electricPulse {
    0% {
        box-shadow: 0 0 10px rgba(203,41,87,0.3);
        outline-color: rgba(203,41,87,0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(203,41,87,0.8), inset 0 0 10px rgba(203,41,87,0.5);
        outline-color: rgba(203,41,87,0.8);
    }
    100% {
        box-shadow: 0 0 10px rgba(203,41,87,0.3);
        outline-color: rgba(203,41,87,0.4);
    }
}
/* Electric SVG overlay */
.electric-btn-svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: visible;
    pointer-events: none;
    z-index: 0;
}
.electric-wire {
    fill: none;
    stroke: #CB2957;
    stroke-width: 1.5;
    stroke-linecap: square;
    opacity: 0;
    filter: drop-shadow(0 0 3px #CB2957) drop-shadow(0 0 7px rgba(203,41,87,.6));
    transition: opacity .15s;
}
.electric-wire--white {
    stroke: #fff;
    stroke-width: .7;
    filter: drop-shadow(0 0 2px #fff);
}
.electric-btn-wrap:hover .electric-wire { opacity: 1; }
@keyframes electric-pulse {
    0%   { stroke-dashoffset: var(--len); opacity: 0; }
    15%  { opacity: 1; }
    80%  { opacity: .7; }
    100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes electric-flicker {
    0%,100% { opacity: .9; }
    20%      { opacity: .3; }
    40%      { opacity: 1; }
    60%      { opacity: .5; }
    80%      { opacity: .85; }
}

/* Hint — desktop shows below gallery, mobile shows above cards */
.games__hint {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--font-display);
    font-size: .72rem; font-weight: 600;
    letter-spacing: .2em; text-transform: uppercase;
    color: var(--accent);
}
.games__hint--mobile { display: none; }
.games__hint--desktop { display: inline-flex; }

/* Row container below the gallery — centered on the page */
.games__hint-row { margin-top: 20px; text-align: center; }

.games__hint-arrow { display: inline-block; animation: hintArrow 1.3s ease-in-out infinite; }
@keyframes hintArrow { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(7px); } }

/* The horizontal scroller. Vertical wheel is mapped to this in JS. */
.games__viewport {
    display: flex;
    align-items: center;
    gap: 24px;
    height: clamp(520px, 76vh, 640px);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-x: contain;
}
.games__viewport::-webkit-scrollbar { display: none; }

/* Lead spacer centres the first card in the middle of the page */
.games__lead { flex: 0 0 max(16px, calc(50vw - 150px)); }
.games__spacer { flex: 0 0 clamp(60px, 12vw, 200px); }

/* Burst word — contained inside an overflow-hidden line so the
   explosion can never touch the cards, the nav, or anything else. */
.burst-line {
    display: inline-block;
    position: relative;
    overflow: hidden;
    vertical-align: bottom;
    max-width: 100%;
    padding: 0 2px;
}
.burst-word {
    display: inline-block;
    position: relative;
    color: var(--accent);
    white-space: nowrap;
}
.burst-letter {
    display: inline-block;
    will-change: transform, opacity;
    transition: transform .55s cubic-bezier(.25, .8, .35, 1), opacity .45s ease;
}
.burst-particle {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 2px;
    background: var(--accent);
    pointer-events: none;
    transition: transform .6s cubic-bezier(.2, .7, .3, 1), opacity .6s ease;
}

/* Edge fog: cards fade out behind it on both sides */
.games__fog {
    position: absolute;
    top: 0; bottom: 0;
    width: clamp(80px, 12vw, 190px);
    pointer-events: none;
    z-index: 40;
}
.games__fog--right { right: 0; background: linear-gradient(90deg, transparent, var(--bg) 88%); }
.games__fog--left  { left: 0;  background: linear-gradient(270deg, transparent, var(--bg) 88%); }

/* Portrait game card */
.gcard {
    --card-accent: var(--accent);
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: clamp(248px, 23vw, 296px);
    align-self: center;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: linear-gradient(170deg, #141414 0%, var(--card-bg) 55%, #000 100%);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 20px;
    overflow: hidden;
    transform-style: flat;
    transform-origin: center center;
    will-change: transform;
    transition: box-shadow .35s ease, border-color .35s ease;
    box-shadow: 0 18px 44px -22px rgba(0, 0, 0, .55);
}
.gcard:hover, .gcard:focus-visible {
    border-color: color-mix(in srgb, var(--card-accent) 45%, transparent);
    box-shadow: 0 30px 60px -22px color-mix(in srgb, var(--card-accent) 55%, transparent);
    outline: none;
}
.gcard__media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    border-bottom: 2px solid var(--card-accent);
    /* iOS Safari: force WebKit to honour overflow+border-radius clipping */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}
/* Blurred backdrop span — same image zoomed + blurred behind the contained foreground */
.gcard__blur-bg {
    position: absolute;
    inset: -12px;
    background-size: cover;
    background-position: center;
    filter: blur(14px) brightness(0.55) saturate(1.2);
    z-index: 0;
    pointer-events: none;
}
.gcard__media img {
    width: 100%; height: 100%;
    object-fit: contain;
    object-position: center center;
    position: relative;
    z-index: 1;
    transition: transform .6s ease;
}
.gcard:hover .gcard__media img { transform: scale(1.05); }
.gcard__media::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .55));
    pointer-events: none;
}
.gcard__downloads {
    position: absolute; top: 12px; right: 12px;
    z-index: 1;
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-display);
    font-size: .74rem; font-weight: 600;
    letter-spacing: .1em;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    border: 1px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(6px);
    padding: 6px 12px;
    border-radius: 999px;
}
.gcard__downloads svg { width: 14px; height: 14px; }
.gcard__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.gcard__title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--card-text);
}
.gcard__genre {
    font-family: var(--font-display);
    font-size: .82rem; font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #d9d9d9;
    margin: 6px 0 14px;
}
.gcard__sep { color: var(--card-accent); margin: 0 .4em; font-weight: 700; }
.gcard__platforms {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0;
    border-block: 1px solid rgba(255, 255, 255, .09);
    font-size: .86rem; font-weight: 600;
    color: var(--card-text);
}
.gcard__platform { display: inline-flex; align-items: center; gap: 7px; }
.gcard__platform svg { width: 16px; height: 16px; }
.gcard__dot { color: var(--card-accent); font-weight: 700; }
.gcard__rows { margin: 14px 0 20px; display: grid; gap: 10px; }
.gcard__row {
    display: flex; align-items: center; gap: 10px;
    font-size: .86rem;
    color: var(--card-muted);
}
.gcard__row svg { width: 18px; height: 18px; flex-shrink: 0; }
.gcard__row--tag {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: .06em;
}
.gcard__row--tag.is-casual  { color: #33c46d; }
.gcard__row--tag.is-midcore { color: #e0a52a; }
.gcard__cta {
    display: block;
    width: 100%;
    text-align: center;
    font-size: .82rem;
    padding: 12px 20px;
    margin-top: auto;
}

/* ============ GAME DETAIL PAGE (game.php) ============ */
.gpage-body { min-height: 100vh; display: flex; flex-direction: column; }
.gpage-nav {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--nav-h);
    width: min(1160px, 92%);
    margin: 0 auto;
}
.gpage-back {
    font-family: var(--font-display);
    font-size: .85rem; font-weight: 600;
    letter-spacing: .08em;
    color: var(--muted);
    transition: color .25s ease;
}
.gpage-back:hover { color: var(--accent); }
.gpage {
    flex: 1;
    width: min(1060px, 92%);
    margin: 0 auto;
    padding: clamp(18px, 4vh, 46px) 0 80px;
    display: flex; align-items: center;
}
.gpage__card {
    width: 100%;
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    background: linear-gradient(165deg, #161616 0%, var(--card-bg) 60%, #000 100%);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .6);
}
.gpage__art { position: relative; min-height: 340px; }
.gpage__art img { width: 100%; height: 100%; object-fit: cover; }
.gpage__art::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 58%, rgba(0, 0, 0, .45));
}
.gpage__downloads {
    position: absolute; left: 16px; bottom: 16px;
    display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--font-display);
    font-size: .76rem; font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    border: 1px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(6px);
    padding: 7px 14px;
    border-radius: 999px;
}
.gpage__downloads svg { width: 15px; height: 15px; }
.gpage__info { padding: clamp(28px, 3vw, 46px); align-self: center; }
.gpage__genre {
    font-family: var(--font-display);
    font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: #d9d9d9; font-size: .8rem;
}
.gpage__title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    color: var(--card-text);
    margin: 8px 0 18px;
}
.gpage__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-bottom: 16px; }
.gpage__platforms { display: inline-flex; align-items: center; gap: 12px; color: var(--card-text); font-weight: 600; font-size: .9rem; }
.gpage__platforms svg { width: 17px; height: 17px; }
.gpage__chip {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-display);
    font-weight: 600; letter-spacing: .05em; font-size: .82rem;
    padding: 6px 14px;
    border: 1px solid currentColor;
    border-radius: 999px;
}
.gpage__chip svg { width: 16px; height: 16px; }
.gpage__chip.is-casual  { color: #33c46d; }
.gpage__chip.is-midcore { color: #e0a52a; }
.gpage__rolerow { display: flex; align-items: center; gap: 10px; color: var(--card-muted); font-size: .92rem; margin-bottom: 22px; }
.gpage__rolerow svg { width: 18px; height: 18px; color: var(--card-accent); }
.gpage__long { color: var(--card-muted); line-height: 1.75; }
.gpage__role {
    margin-top: 22px;
    padding: 14px 18px;
    border-left: 3px solid var(--card-accent);
    background: rgba(255, 255, 255, .05);
    border-radius: 0 10px 10px 0;
    color: var(--card-text);
    font-size: .92rem;
}
.gpage__role b { font-family: var(--font-display); color: color-mix(in srgb, var(--card-accent) 70%, #fff); letter-spacing: .08em; }
.gpage__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* ============ CASE STUDY (game.php with case_study data) ============ */

/* Override .gpage constraints when case study is present */
.gpage--cs {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: block;
    align-items: unset;
}

/* Hero */
.cs-hero {
    position: relative;
    height: 100vh;
    min-height: 560px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.cs-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.32) saturate(1.15);
    transform: scale(1.04);
}
.cs-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 25%, rgba(10,10,10,0.85) 75%, #0a0a0a 100%);
}
.cs-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: 72px;
}
.cs-eyebrow {
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--card-accent, #CB2957);
    margin: 0 0 14px;
}
.cs-hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 5rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 28px;
    line-height: 1.05;
}
.cs-hero__tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.cs-tag {
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 2px;
    background: var(--card-accent, #CB2957);
    color: #fff;
}
.cs-tag--outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.28);
    color: rgba(255,255,255,0.65);
}
.cs-back-btn {
    position: absolute;
    top: calc(var(--nav-h) + 20px);
    left: 40px;
    z-index: 10;
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    transition: color 0.2s;
}
.cs-back-btn:hover { color: var(--card-accent, #CB2957); }
.cs-hero__scroll {
    position: absolute;
    bottom: 28px;
    right: 40px;
    font-family: var(--font-display);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    color: rgba(255,255,255,0.25);
    writing-mode: vertical-rl;
}

/* Shared section layout */
.cs-section {
    background: #0a0a0a;
    padding: 88px 0;
}
.cs-section--alt { background: rgba(20,20,20,0.97); }
.cs-section--outcome { background: #0a0a0a; }
.cs-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 44px;
}
.cs-section__label {
    font-family: var(--font-display);
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--card-accent, #CB2957);
    margin: 0 0 10px;
}
.cs-section__title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 44px;
    line-height: 1.15;
}
.cs-body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.65);
    max-width: 720px;
    margin: 0 0 44px;
}
.cs-body--wide { max-width: 820px; margin-bottom: 48px; }

/* Goals */
.cs-goals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.cs-goal-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 34px;
    transition: border-color 0.25s;
}
.cs-goal-card:hover { border-color: var(--card-accent, #CB2957); }
.cs-goal-card__icon {
    display: block;
    font-size: 1.8rem;
    color: var(--card-accent, #CB2957);
    margin-bottom: 18px;
    line-height: 1;
}
.cs-goal-card__title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 12px;
}
.cs-goal-card__desc {
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.65;
    color: rgba(255,255,255,0.55);
    margin: 0;
}

/* AI Brain */
.cs-brain {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 8px;
}
.cs-brain__layer {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-left: 3px solid var(--card-accent, #CB2957);
    border-radius: 10px;
    padding: 32px;
}
.cs-brain__layer h3 {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--card-accent, #CB2957);
    margin: 0 0 22px;
}
.cs-brain__layer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
}
.cs-brain__layer ul li {
    font-family: var(--font-body);
    font-size: 0.94rem;
    color: rgba(255,255,255,0.7);
    padding-left: 18px;
    position: relative;
}
.cs-brain__layer ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--card-accent, #CB2957);
    font-size: 0.8rem;
}

/* Personalities */
.cs-personalities {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.cs-persona-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 34px;
    transition: border-color 0.25s;
}
.cs-persona-card:hover { border-color: var(--card-accent, #CB2957); }
.cs-persona-card__icon {
    display: block;
    font-size: 1.6rem;
    color: var(--card-accent, #CB2957);
    margin-bottom: 16px;
    line-height: 1;
}
.cs-persona-card__name {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 18px;
}
.cs-persona-card__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.cs-persona-card__list li {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: rgba(255,255,255,0.55);
    padding-left: 16px;
    position: relative;
}
.cs-persona-card__list li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--card-accent, #CB2957);
    font-weight: 700;
    font-size: 1rem;
}

/* Timeline */
.cs-timeline {
    position: relative;
    padding-left: 36px;
    display: flex;
    flex-direction: column;
}
.cs-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: rgba(255,255,255,0.09);
}
.cs-timeline__item {
    position: relative;
    padding-bottom: 44px;
}
.cs-timeline__item:last-child { padding-bottom: 0; }
.cs-timeline__dot {
    position: absolute;
    left: -36px;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--card-accent, #CB2957);
    border: 3px solid #0a0a0a;
    box-shadow: 0 0 0 1px var(--card-accent, #CB2957);
}
.cs-timeline__body { }
.cs-timeline__phase {
    display: block;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--card-accent, #CB2957);
    margin-bottom: 8px;
}
.cs-timeline__body p {
    font-family: var(--font-body);
    font-size: 0.96rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.62);
    margin: 0 0 14px;
    max-width: 680px;
}
.cs-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cs-pill {
    font-family: var(--font-display);
    font-size: 0.68rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 4px 13px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 20px;
    color: rgba(255,255,255,0.45);
}

/* Balancing split */
.cs-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}
.cs-split__heading {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin: 0 0 20px;
}
.cs-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cs-check-list li {
    font-family: var(--font-body);
    font-size: 0.96rem;
    color: rgba(255,255,255,0.7);
    padding-left: 22px;
    position: relative;
}
.cs-check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--card-accent, #CB2957);
    font-size: 0.82rem;
    font-weight: 700;
}
.cs-split__body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(255,255,255,0.65);
    margin: 0;
}

/* Ownership grid */
.cs-owned {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.cs-owned__item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 28px 30px;
}
.cs-owned__item h3 {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--card-accent, #CB2957);
    margin: 0 0 10px;
}
.cs-owned__item p {
    font-family: var(--font-body);
    font-size: 0.88rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.55);
    margin: 0;
}

/* Impact / Outcome */
.cs-impact {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 600px;
}
.cs-impact__item {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
}
.cs-impact__check {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--card-accent, #CB2957);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* Coming-soon fallback */
.gpage__soon {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    text-align: center;
    padding: 40px;
}
.gpage__soon h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: rgba(255,255,255,0.45);
}
.gpage__soon a {
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--card-accent, #CB2957);
}

/* Responsive */
@media (max-width: 860px) {
    .cs-goals,
    .cs-personalities { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .cs-goals,
    .cs-personalities,
    .cs-brain,
    .cs-split { grid-template-columns: 1fr; }
    .cs-container { padding: 0 22px; }
    .cs-section { padding: 60px 0; }
    .cs-hero__content { padding-bottom: 56px; }
    .cs-back-btn { left: 22px; }
    .cs-hero__scroll { display: none; }
}

/* ============================================================
   WWE MAYHEM CASE STUDY  (game-templates/wwe-mayhem.php)
   ============================================================ */

:root {
    --wwe-green: #CB2957;
    --wwe-green-dim: rgba(203,41,87,0.15);
    --wwe-bg: #0A0A0A;
    --wwe-bg-alt: #111111;
    --wwe-card: rgba(0,0,0,0.05);
    --wwe-border: rgba(0,0,0,0.12);
}

.wcs { background: var(--wwe-bg); color: #000; }

/* ---- Container ---- */
.wcs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 44px;
}

/* ---- Section ---- */
.wcs-section { background: var(--wwe-bg); padding: 72px 0; }
.wcs-section--dark { background: var(--wwe-bg-alt); }

/* Section header with extending line */
.wcs-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--wwe-green);
    margin-bottom: 32px;
}
.wcs-section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--wwe-green);
    opacity: 0.45;
}
.wcs-eyebrow {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--wwe-green);
    margin-bottom: 18px;
}
.wcs-subsection-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.38);
    margin-bottom: 14px;
}

/* ============ HERO ============ */
.wcs-hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 48% 52%;
    overflow: hidden;
    background: #060606;
}
.wcs-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center right;
    filter: brightness(0.18) saturate(1.2);
    z-index: 0;
}
.wcs-hero__left {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--nav-h) + 48px) 0 64px 44px;
}
.wcs-logo-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.wcs-logo-w {
    width: 38px;
    height: 38px;
    background: var(--wwe-green);
    color: #000;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    letter-spacing: -0.04em;
}
.wcs-logo-text {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--wwe-green);
}
.wcs-hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 6rem);
    font-weight: 700;
    line-height: 1.0;
    letter-spacing: -0.01em;
    color: #fff;
    margin: 0 0 20px;
}
.wcs-hero__game {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin: 0 0 4px;
}
.wcs-hero__role {
    font-family: var(--font-body);
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    margin: 0 0 6px;
}
.wcs-hero__duration {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--wwe-green);
    margin: 0 0 22px;
    font-weight: 600;
}
.wcs-hero__desc {
    font-family: var(--font-body);
    font-size: 0.96rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.55);
    max-width: 440px;
    margin: 0 0 32px;
}
.wcs-back {
    font-family: var(--font-display);
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.38);
    transition: color 0.2s;
    align-self: flex-start;
}
.wcs-back:hover { color: var(--wwe-green); }
.wcs-hero__right {
    position: relative;
    z-index: 1;
    overflow: hidden;
}
.wcs-hero__right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 20%, #000 50%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 20%, #000 50%);
}

/* ============ OVERVIEW ============ */
.wcs-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}
.wcs-overview__img {
    border-radius: 10px;
    overflow: visible;
    border: 1px solid var(--wwe-border);
}
.wcs-overview__img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}
.wcs-overview__heading {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    margin: 0 0 18px;
}
.wcs-overview__body {
    font-family: var(--font-body);
    font-size: 0.98rem;
    line-height: 1.75;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

/* ============ DESIGN GOALS ============ */
.wcs-goals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.wcs-goal {
    background: var(--wwe-card);
    border: 1px solid var(--wwe-border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.25s;
}
.wcs-goal:hover { border-color: var(--wwe-green); }
.wcs-goal__top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 18px 14px;
}
.wcs-goal__icon {
    width: 22px;
    height: 22px;
    color: var(--wwe-green);
    flex-shrink: 0;
}
.wcs-goal__top h3 {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}
.wcs-goal__img { width: 100%; }
.wcs-goal__img img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.wcs-goal > p {
    font-family: var(--font-body);
    font-size: 0.88rem;
    line-height: 1.65;
    color: rgba(255,255,255,0.55);
    padding: 14px 18px 20px;
    margin: 0;
}

/* ============ AI BRAIN + PERSONALITY ============ */
.wcs-bp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}
/* AI Brain */
.wcs-brain__intro {
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.75;
    color: rgba(255,255,255,0.6);
    margin-bottom: 28px;
    max-width: 460px;
}
.wcs-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.wcs-diagram__box {
    width: 100%;
    max-width: 280px;
    text-align: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 12px 16px;
    border-radius: 6px;
}
.wcs-diagram__box--action {
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    background: rgba(255,255,255,0.05);
}
.wcs-diagram__box--ai {
    border: 2px solid var(--wwe-green);
    color: var(--wwe-green);
    background: var(--wwe-green-dim);
}
.wcs-diagram__box--ai small {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(139,195,74,0.7);
    letter-spacing: 0.06em;
    text-transform: none;
    margin-top: 2px;
}
.wcs-diagram__arrow {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.25);
    line-height: 1;
    padding: 4px 0;
}
.wcs-diagram__layers {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    width: 100%;
    max-width: 320px;
    margin: 4px 0;
}
.wcs-diagram__layer {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--wwe-border);
    border-radius: 6px;
    padding: 10px 12px;
    text-align: center;
}
.wcs-diagram__layer strong {
    display: block;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 3px;
}
.wcs-diagram__layer span {
    font-family: var(--font-body);
    font-size: 0.68rem;
    color: rgba(255,255,255,0.4);
}
.wcs-diagram__layer-sep {
    width: 8px;
}
.wcs-diagram__actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 320px;
    margin-top: 4px;
}
.wcs-diagram__action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--wwe-border);
    border-radius: 6px;
    padding: 10px 6px;
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
}
.wcs-diagram__action svg {
    width: 20px;
    height: 20px;
    color: var(--wwe-green);
}

/* Personalities */
.wcs-personas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.wcs-persona {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--wwe-border);
    background: var(--wwe-card);
}
.wcs-persona__header {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    padding: 10px 8px;
    color: #fff;
}
.wcs-persona--aggressive .wcs-persona__header { background: #C62828; }
.wcs-persona--defensive  .wcs-persona__header { background: #1565C0; }
.wcs-persona--balanced   .wcs-persona__header { background: #E65100; }
.wcs-persona__img img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.wcs-persona ul {
    list-style: none;
    padding: 12px 14px 16px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.wcs-persona ul li {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: rgba(255,255,255,0.65);
    padding-left: 14px;
    position: relative;
    line-height: 1.4;
}
.wcs-persona ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--wwe-green);
}

/* ============ DEVELOPMENT JOURNEY ============ */
.wcs-journey {
    display: flex;
    align-items: flex-start;
    gap: 0;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: none;
}
.wcs-journey::-webkit-scrollbar { display: none; }
.wcs-phase {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.wcs-phase__dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-bottom: 10px;
    flex-shrink: 0;
    border: 3px solid var(--wwe-bg-alt);
    box-shadow: 0 0 0 1px currentColor;
}
.wcs-phase__label {
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wwe-green);
    margin-bottom: 5px;
    line-height: 1.3;
}
.wcs-phase__desc {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 14px;
    line-height: 1.45;
    padding: 0 8px;
}
.wcs-phase__img {
    width: calc(100% - 16px);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--wwe-border);
}
.wcs-phase__img img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.wcs-phase__arrow {
    flex-shrink: 0;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.2);
    align-self: flex-start;
    margin-top: 4px;
    padding: 0 4px;
}

/* ============ BALANCING + OWNED ============ */
.wcs-bo-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr auto;
    gap: 48px;
    align-items: start;
}
.wcs-measured {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.wcs-measured li {
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: rgba(255,255,255,0.7);
    padding-left: 18px;
    position: relative;
}
.wcs-measured li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--wwe-green);
}
.wcs-bal-img {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--wwe-border);
}
.wcs-bal-img img {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.wcs-owned-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
}
.wcs-owned-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.4;
}
.wcs-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--wwe-green);
    color: #000;
    font-size: 0.68rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.wcs-char-col {
    width: 160px;
    flex-shrink: 0;
    align-self: flex-end;
}
.wcs-char-col img {
    width: 100%;
    display: block;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.8));
}

/* ============ OUTCOME ============ */
.wcs-outcome {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.wcs-outcome__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.25) saturate(1.1);
}
.wcs-outcome__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10,10,10,0.95) 40%, rgba(10,10,10,0.4) 100%);
}
.wcs-outcome__content {
    position: relative;
    z-index: 2;
    padding-top: 64px;
    padding-bottom: 64px;
}
.wcs-outcome__text {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.5vw, 1.9rem);
    font-weight: 700;
    color: #fff;
    max-width: 560px;
    line-height: 1.35;
    margin: 0 0 18px;
}
.wcs-outcome__sub {
    font-family: var(--font-body);
    font-size: 0.98rem;
    line-height: 1.75;
    color: rgba(255,255,255,0.6);
    max-width: 480px;
    margin: 0;
}

/* ============ WCS RESPONSIVE ============ */
@media (max-width: 1024px) {
    .wcs-bo-grid { grid-template-columns: 1fr 1fr; }
    .wcs-char-col { display: none; }
    .wcs-bp-grid { gap: 40px; }
}
@media (max-width: 860px) {
    .wcs-hero { grid-template-columns: 1fr; min-height: auto; }
    .wcs-hero__right {
        height: 50vw;
        max-height: 360px;
    }
    .wcs-hero__right img {
        mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
        object-position: center center;
    }
    .wcs-hero__left { padding: calc(var(--nav-h) + 32px) 24px 32px; }
    .wcs-overview { grid-template-columns: 1fr; gap: 28px; }
    .wcs-goals { grid-template-columns: 1fr 1fr; }
    .wcs-bp-grid { grid-template-columns: 1fr; gap: 48px; }
    .wcs-personas { grid-template-columns: 1fr; }
    .wcs-bo-grid { grid-template-columns: 1fr; gap: 36px; }
    .wcs-container { padding: 0 24px; }
    .wcs-section { padding: 56px 0; }
    .wcs-journey { gap: 0; }
}
@media (max-width: 580px) {
    .wcs-goals { grid-template-columns: 1fr; }
    .wcs-hero__title { font-size: clamp(2.4rem, 10vw, 3.5rem); }
    .wcs-personas { grid-template-columns: 1fr 1fr; }
    .wcs-phase { min-width: 130px; }
    .wcs-owned-grid { grid-template-columns: 1fr; }
    .wcs-container { padding: 0 18px; }
}

/* ============ WCS v2 — light/parallax overrides ============ */

/* Fully transparent so site-bg parallax shows through; black text */
.wcs { background: transparent; color: #000; }
.wcs-section { background: transparent; }
.wcs-section--alt { background: rgba(0,0,0,0.04); }

/* Section header line uses crimson */
.wcs-section-header { color: var(--wwe-green); }
.wcs-section-header::after { background: var(--wwe-green); }

/* ---- Intro ---- */
.wcs-intro {
    padding: calc(var(--nav-h,72px) + 56px) 0 56px;
    background: transparent;
}
.wcs-intro__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 52px;
    align-items: center;
}
.wcs-intro__meta {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.45);
    margin: 0 0 18px;
    display: block;
}
.wcs-intro__sep { margin: 0 9px; color: rgba(0,0,0,0.2); }
.wcs-intro__accent { color: var(--wwe-green); }
.wcs-intro__title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 5.5vw, 5.5rem);
    font-weight: 700;
    line-height: 1.0;
    letter-spacing: -0.01em;
    color: #000;
    margin: 0 0 30px;
}
.wcs-intro__right {
    border-radius: 12px;
    overflow: visible;
    border: 1px solid rgba(0,0,0,0.12);
    box-shadow: 0 20px 48px rgba(0,0,0,0.18);
}
.wcs-intro__right img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}
.wcs-back {
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.38);
    display: inline-block;
    transition: color 0.2s;
}
.wcs-back:hover { color: var(--wwe-green); text-decoration: none; }

/* ---- Body text helpers ---- */
.wcs-lede {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.76;
    color: rgba(0,0,0,0.82);
    margin: 0 0 18px;
}
.wcs-lede--narrow { max-width: 760px; }
.wcs-body {
    font-family: var(--font-body);
    font-size: 0.96rem;
    line-height: 1.82;
    color: rgba(0,0,0,0.60);
    margin: 0 0 14px;
}
.wcs-body:last-child { margin-bottom: 0; }

/* ---- Overview — copy column ---- */
.wcs-overview__copy { display: flex; flex-direction: column; justify-content: center; }

/* ---- Goal cards v2 (numbered, no images) ---- */
.wcs-goal--v2 { overflow: visible; padding: 28px 28px 30px; }
.wcs-goal__n {
    display: block;
    font-family: var(--font-display);
    font-size: 3.6rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(203,41,87,0.12);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}
.wcs-goal__h {
    font-family: var(--font-display);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: #000;
    margin: 0 0 14px;
}
.wcs-goal--v2 > p {
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.72;
    color: rgba(0,0,0,0.58);
    padding: 0;
    margin: 0;
}

/* ---- Vertical development timeline ---- */
.wcs-dev {
    position: relative;
    padding-left: 30px;
    border-left: 2px solid rgba(203,41,87,0.25);
    display: flex;
    flex-direction: column;
}
.wcs-step { position: relative; padding-bottom: 48px; }
.wcs-step:last-child { padding-bottom: 0; }
.wcs-step__hd { display: flex; align-items: center; margin-bottom: 14px; }
.wcs-step__dot {
    position: absolute;
    left: -37px;
    top: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--wwe-green);
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px var(--wwe-green);
}
.wcs-step__name {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--wwe-green);
}
.wcs-step__bd p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.78;
    color: rgba(0,0,0,0.62);
    max-width: 700px;
    margin: 0 0 16px;
}
.wcs-step__bd p:last-child { margin-bottom: 0; }
.wcs-step__bd img {
    width: 100%;
    height: auto;
    max-width: 560px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.12);
    display: block;
    margin-top: 4px;
}

/* ---- Ownership chips ---- */
.wcs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
}
.wcs-chips span {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    padding: 7px 16px;
    border: 1px solid rgba(203,41,87,0.40);
    border-radius: 999px;
    color: var(--wwe-green);
    background: rgba(203,41,87,0.06);
}

/* ---- Results / Outcome 2-col grid ---- */
.wcs-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}
.wcs-impact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.wcs-impact-list li {
    font-family: var(--font-body);
    font-size: 0.96rem;
    color: rgba(0,0,0,0.72);
    padding-left: 26px;
    position: relative;
    line-height: 1.55;
}
.wcs-impact-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--wwe-green);
    font-size: 0.82rem;
    font-weight: 700;
    top: 1px;
}

/* ---- 10% image size reduction across the WWE case study ---- */
.wcs-intro__right { width: 90%; margin-inline: auto; }
.wcs-overview__img { width: 90%; }
.wcs-ev-split__imgs { width: 90%; }
.wcs-step__bd img { max-width: 504px; } /* 560 × 0.9 */
.wcs-kpi-img {
    display: block;
    width: 90%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.12);
    margin-top: 20px;
}

/* ---- Tab bar ---- */
.wcs-tabs {
    position: sticky;
    top: var(--nav-h, 72px);
    z-index: 90;
    background: rgba(238,238,238,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(203,41,87,0.18);
}
.wcs-tabs__nav {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}
.wcs-tab {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 9px 20px;
    border-radius: 6px;
    color: rgba(0,0,0,0.45);
    background: transparent;
    border: 1px solid transparent;
    transition: color 0.18s, background 0.18s, border-color 0.18s;
    white-space: nowrap;
}
.wcs-tab:hover {
    color: var(--wwe-green);
    border-color: rgba(203,41,87,0.30);
    text-decoration: none;
}
.wcs-tab--active {
    color: #fff;
    background: var(--wwe-green);
    border-color: var(--wwe-green);
}
.wcs-tab--active:hover { color: #fff; }

/* ---- Section divider between case studies ---- */
.wcs-section-divider { padding: 16px 0; background: transparent; }
.wcs-divider-line {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(203,41,87,0.35) 30%, rgba(203,41,87,0.35) 70%, transparent);
}

/* ---- Events: brand split (copy left / stacked images right) ---- */
.wcs-ev-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 52px;
    align-items: start;
}
.wcs-ev-split__imgs {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.wcs-ev-split__imgs img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.12);
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* ---- v2 responsive ---- */
@media (max-width: 860px) {
    .wcs-intro__grid { grid-template-columns: 1fr; gap: 32px; }
    .wcs-intro { padding: calc(var(--nav-h,72px) + 56px) 0 44px; }
    .wcs-results-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 680px) {
    .wcs-ev-split { grid-template-columns: 1fr; }
    .wcs-ev-split__imgs { width: 100%; }
    .wcs-tabs { display: none; }
    .wcs-container {
        padding-left: max(20px, env(safe-area-inset-left, 20px));
        padding-right: max(20px, env(safe-area-inset-right, 20px));
    }
}
@media (max-width: 580px) {
    .wcs-intro__title { font-size: clamp(2.4rem, 10vw, 3.5rem); }
    .wcs-dev { padding-left: 22px; }
    .wcs-step__dot { left: -29px; border-color: transparent; }
    .wcs-step__bd img { max-width: 100%; }
}

/* ============ MODALS ============ */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 5%; }
.modal[hidden] { display: none; }
.modal__backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 10, 12, .6);
    backdrop-filter: blur(8px);
    animation: fadeIn .3s ease;
}
.modal__box {
    position: relative;
    width: min(680px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 40px 90px -30px color-mix(in srgb, var(--card-accent) 60%, #000);
    animation: popIn .35s cubic-bezier(.2, 1.2, .35, 1);
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(28px) scale(.95); } }
.modal__close {
    position: absolute; top: 14px; right: 14px;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(0, 0, 0, .5);
    color: #fff;
    font-size: 1rem;
    z-index: 2;
    transition: background .25s ease, rotate .25s ease;
}
.modal__close:hover { background: var(--accent); rotate: 90deg; }
.modal__art {
    height: 200px;
    display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(130% 130% at 75% 10%, color-mix(in srgb, var(--card-accent) 50%, transparent), transparent 62%),
        repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 10px, transparent 10px 20px),
        #111;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
}
.modal__art img { width: 100%; height: 100%; object-fit: cover; }
.modal__initial {
    font-family: var(--font-display);
    font-size: 5.5rem; font-weight: 700;
    color: color-mix(in srgb, var(--card-accent) 70%, #fff);
    text-shadow: 0 0 44px color-mix(in srgb, var(--card-accent) 70%, transparent);
}
.modal__content { padding: 30px 34px 36px; }
.modal__content h3 {
    font-family: var(--font-display);
    font-size: 1.7rem;
    margin: 10px 0 6px;
    color: var(--card-text);
}
.modal__stat-line {
    color: color-mix(in srgb, var(--card-accent) 65%, #fff);
    font-family: var(--font-display);
    font-size: .85rem; letter-spacing: .1em;
    margin-bottom: 16px;
}
.modal__content > p { color: var(--card-muted); }
.modal__role {
    margin-top: 20px !important;
    padding: 14px 18px;
    border-left: 3px solid var(--card-accent);
    background: rgba(255, 255, 255, .05);
    border-radius: 0 10px 10px 0;
    font-size: .92rem;
    color: var(--card-text) !important;
}
.modal__role b { font-family: var(--font-display); color: color-mix(in srgb, var(--card-accent) 65%, #fff); letter-spacing: .1em; }
body.modal-open { overflow: hidden; }

/* ============ DESIGN SKILLS (PREMIUM LIGHT THEME) ============ */
.dskills.section {
    padding: clamp(24px, 4vh, 44px) 0;
}
.dskills {
    background: #EEEEEE;
    border-top: 1px solid rgba(0, 0, 0, .05);
    position: relative;
    /* z-auto (overrides .section's z-index:1): the section must NOT create a
       stacking context, so the sonar ring from #tech-skills paints above this
       background but below .dskills .container (z2) — wave behind the boxes */
    z-index: auto;
}
.dskills .container {
    position: relative;
    z-index: 2;
}

/* ── Section Header ── */
.dskills__head {
    text-align: center;
    margin-bottom: clamp(18px, 3vh, 30px);
}
.dskills__eyebrow {
    display: block;
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #CB2957;
    margin-bottom: 10px;
    font-family: var(--font-display);
    font-weight: 600;
}
.dskills__title {
    font-family: var(--font-display);
    font-size: clamp(48px, 6vw, 96px);
    font-weight: 800;
    line-height: 1;
    color: #000000;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
}
.dskills__desc {
    font-size: clamp(18px, 2.5vw, 22px);
    line-height: 1.6;
    max-width: 700px;
    margin: auto;
    color: #333333;
}

/* ── Skill Cards Grid ── */
.dskills__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: clamp(20px, 3vh, 32px);
}

/* Make the second row (3 cards) center align on desktop by making them span nicely, 
   or we can just let CSS Grid handle it with a flex container fallback for the bottom row if needed.
   A simpler approach for a 7-card layout (4 top, 3 bottom centered) is to use flexbox for the container: */
@media (min-width: 1024px) {
    .dskills__grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    .dskill-card {
        width: calc(25% - 18px); /* 4 per row */
    }
    /* The last 3 cards will naturally center if we use justify-content: center */
}

.dskill-card {
    background: #F8F8F8;
    border-radius: 28px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,.05);
    border: 1px solid rgba(0,0,0,.04);
    transition: transform 300ms ease, box-shadow 1.5s ease, border-color 1.5s ease;
    display: flex;
    flex-direction: column;
}
.dskill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,.08);
    border-color: rgba(203, 41, 87, 0.3); /* Accent tint on border */
}

/* ── Card Header (Icon + Number) ── */
.dskill-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.dskill-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #EEEEEE;
    border-radius: 14px;
    color: #000;
}
.dskill-card__icon svg {
    width: 24px;
    height: 24px;
}
.dskill-card__num {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    color: #000;
    opacity: .08;
    letter-spacing: -0.05em;
}

/* ── Card Content ── */
.dskill-card__cat {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #000;
    margin: 0 0 12px;
}
.dskill-card__list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}
.dskill-card__list li {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 7px;
    line-height: 1.5;
    position: relative;
    padding-left: 16px;
}
.dskill-card__list li::before {
    content: "•";
    color: #CB2957;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* ── Wave Pulse Glow for Cards ── */
.dskill-card.wave-pulse, .dprocess.wave-pulse {
    border-color: transparent !important;
    box-shadow: 0 0 36px rgba(203, 41, 87, .12), 0 0 0 2px rgba(203, 41, 87, .06) !important;
    transition: border-color 0s, box-shadow 0s !important;
}

/* Ensure boxes in design and tech sections stack above the sonar waves */
.dskill-card, .dprocess, .tcategory__header, .tskill-card {
    position: relative;
    z-index: 2;
}

/* ── Design Skill Glow Animations ──
   Hit → glow fades in (0.5s) → holds ~1.5–2s → fades out over the last 1s → zero.
   Loops each time the sonar wave reaches the card.
   Glow only (box-shadow) — the border is never tinted. Peak intensity = 40%
   (rgba alpha .4). 3.5s total.
   NOTE: !important is invalid inside @keyframes (browsers silently drop
   those declarations) — never add it here. */
@keyframes dskillGlow {
    0% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, .05);
    }
    /* 14.3% of 3.5s = exactly 0.5s fade-in */
    14.3%, 71% {
        box-shadow: 0 10px 40px rgba(0,0,0,.05), 0 0 28px rgba(203, 41, 87, .4);
    }
    100% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, .05);
    }
}

@keyframes dprocessGlow {
    0% {
        box-shadow: none;
    }
    14.3%, 71% {
        box-shadow: 0 0 28px rgba(203, 41, 87, .4);
    }
    100% {
        box-shadow: none;
    }
}

.dskill-card.wave-glow {
    animation: dskillGlow 3.5s ease forwards !important;
}

.dprocess.wave-glow {
    animation: dprocessGlow 3.5s ease forwards !important;
}

/* ── Design Process Section ── */
.dprocess {
    background: #F6F6F6;
    border-radius: 32px;
    padding: clamp(20px, 3vw, 30px);
    border: 1px solid rgba(0,0,0,.03);
    transition: box-shadow 1.5s ease, border-color 1.5s ease;
}
.dprocess__title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 20px;
    color: #000;
}
.dprocess__steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.dprocess__step {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.dprocess__icon {
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #000;
    box-shadow: 0 8px 24px rgba(0,0,0,.04);
}
.dprocess__icon svg {
    width: 28px;
    height: 28px;
}
.dprocess__name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #000;
    margin: 0 0 10px;
}
.dprocess__desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}
.dprocess__arrow {
    font-size: 24px;
    color: #CB2957;
    opacity: 0.4;
    padding-top: 20px;
    transform: rotate(-90deg); /* points right on desktop */
}


/* ============ GLOBAL EXPERIENCE ============ */
.global-experience {
    position: relative;
    padding: 60px 0 40px;
    background: #EEEEEE;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.global-experience__bg-map {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    max-width: 1200px;
    height: auto;
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0.08;
    filter: grayscale(100%);
    pointer-events: none;
    z-index: 0;
}

.global-experience__header {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 30px;
}

.global-experience__eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.eyebrow-line {
    display: block;
    width: 20px;
    height: 1px;
    background: var(--accent);
}

.global-experience__title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 60px);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 12px;
}

.global-experience__title .text-black { color: #000000; }
.global-experience__title .text-accent { color: var(--accent); }

.global-experience__subtitle {
    font-size: 16px;
    font-weight: 400;
    color: rgba(0,0,0,0.7);
}

/* CAROUSEL */
.global-experience__carousel-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px; /* Wider to allow partial visibility on sides */
    margin: 0 auto;
    padding: 0 10px;
}

.global-experience__carousel {
    display: flex;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    padding: 10px 0; /* Space for shadow/hover */
}

.global-experience__carousel-track {
    display: flex;
    gap: 16px;
    align-items: center;
    animation: studioMarquee 20s linear infinite;
    /* ensure there is no layout jump, enough width is critical */
}

@keyframes studioMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 8px)); } /* Half width minus half gap */
}

.studio-card {
    width: 160px;
    height: 140px;
    background: rgba(255,255,255,0.70);
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-align: center;
    padding: 15px;
}

.studio-card__logo-wrapper {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.studio-card__logo {
    max-height: 45px;
    max-width: 100%;
    object-fit: contain;
}

.studio-card__logo-placeholder {
    font-size: 10px;
    color: rgba(0,0,0,0.3);
    font-style: italic;
}

.studio-card__name {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    line-height: 1.1;
}

/* STATS BAR */
.global-experience__stats-container {
    position: relative;
    z-index: 2;
    margin-top: 12px;
    width: 100%;
    max-width: 800px; /* fit the visible cards width approximately */
}

.global-experience__stats {
    background: rgba(255,255,255,0.80);
    border-radius: 14px;
    padding: 16px 24px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
    margin-bottom: 6px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: rgba(0,0,0,0.75);
}

/* Decorative elements */
.stat-decor {
    position: absolute;
    opacity: 0.08;
    pointer-events: none;
}

.stat-decor--tl, .stat-decor--tr {
    width: 20px; height: 20px;
    top: -5px;
    background-image: radial-gradient(circle, #000 1px, transparent 1.5px);
    background-size: 5px 5px;
}

.stat-decor--tl { left: -5px; }
.stat-decor--tr { right: -5px; }

.stat-decor--bl, .stat-decor--br {
    width: 50px; height: 50px;
    bottom: -15px;
    border: 1px solid #000;
    border-radius: 50%;
}
.stat-decor--bl::after, .stat-decor--br::after {
    content: '';
    position: absolute;
    top: 5px; left: 5px; right: 5px; bottom: 5px;
    border: 1px solid #000;
    border-radius: 50%;
}

.stat-decor--bl { left: -20px; }
.stat-decor--br { right: -20px; }

/* Responsive */
@media (max-width: 1024px) {
    .global-experience__stats {
        padding: 12px 16px;
    }
    .stat-value { font-size: 20px; }
    .stat-label { font-size: 12px; }
}

@media (max-width: 768px) {
    .global-experience__bg-map {
        display: none;
    }
    .global-experience__subtitle {
        font-size: 14px;
    }
    .global-experience__stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 10px;
        padding: 16px 12px;
    }
    .studio-card {
        width: 140px;
        height: 125px;
    }
    .studio-card__name { font-size: 14px; }
}

/* ============ MY STORY ============ */
.my-story {
    position: relative;
    z-index: 10;
    background: #050505;
    color: #fff;
    overflow: hidden;
    padding: clamp(20px, 3vh, 40px) 0;
}
.my-story__bg-map {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 600'%3E%3C/svg%3E") center/cover no-repeat;
    opacity: 0.03;
    pointer-events: none;
}
.my-story__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    position: relative;
    z-index: 2;
}
@media (max-width: 860px) {
    .my-story__inner { grid-template-columns: 1fr; }
}
.my-story__eyebrow-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.my-story__eyebrow {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 600;
    text-transform: uppercase;
    color: #CB2957;
    margin: 0;
}
.my-story__eyebrow-line {
    height: 1px;
    flex-grow: 1;
    max-width: 40px;
    background: rgba(203,41,87,0.4);
}
.my-story__title {
    font-family: var(--font-display);
    font-size: clamp(28px, 3.5vw, 52px);
    font-weight: 800;
    line-height: 0.92;
    margin: 0 0 12px;
    color: #fff;
}
.my-story__title .text-accent { color: #CB2957; }
.my-story__intro {
    font-family: var(--font-display);
    font-size: clamp(13px, 1.4vw, 18px);
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 16px;
    color: rgba(255,255,255,0.9);
}
.my-story__para {
    font-family: var(--font-body);
    font-size: clamp(11px, 1.1vw, 14px);
    line-height: 1.7;
    color: rgba(255,255,255,0.75);
    margin: 0 0 12px;
}
.my-story__para .text-accent { color: #CB2957; }
.my-story__para .highlight { color: #CB2957; }
.my-story__image-wrap {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
}
.my-story__image {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: cover;
    display: block;
}
.my-story__image-accent {
    position: absolute;
    width: 40px;
    height: 40px;
    border-color: #CB2957;
    border-style: solid;
    z-index: 2;
}
.my-story__image-accent.top-left    { top: -4px; left: -4px; border-width: 3px 0 0 3px; }
.my-story__image-accent.bottom-right { bottom: -4px; right: -4px; border-width: 0 3px 3px 0; }
.my-story__quote-container {
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 16px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.my-story__quote-icon {
    font-family: var(--font-display);
    font-size: 28px;
    color: #CB2957;
    line-height: 1;
    margin-bottom: 6px;
}
.my-story__quote-text {
    font-family: var(--font-body);
    font-size: clamp(12px, 1.2vw, 16px);
    font-style: italic;
    font-weight: 300;
    line-height: 1.5;
    color: #fff;
    margin: 0;
}
.my-story__quote-underline {
    margin-top: 10px;
    width: 32px;
    height: 2px;
    background: #CB2957;
    border-radius: 2px;
}

/* ============ PHILOSOPHY ============ */
.philosophy {
    position: relative;
    z-index: 10;
    background: #050505;
    color: #fff;
    overflow: hidden;
    padding: clamp(10px, 1.5vh, 17px) 0;
}
.philosophy__bg-diagram {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}
.philosophy__inner {
    position: relative;
    z-index: 2;
}
@media (min-width: 1024px) {
    .philosophy__inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: start;
    }
}
.philosophy__eyebrow-wrapper {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 3px;
}
.philosophy__eyebrow {
    font-family: var(--font-display);
    font-size: 7px;
    letter-spacing: 1px;
    font-weight: 600;
    text-transform: uppercase;
    color: #CB2957;
    margin: 0;
}
.philosophy__eyebrow-line {
    height: 1px;
    flex-grow: 1;
    max-width: 15px;
    background: rgba(203,41,87,0.4);
}
.philosophy__title {
    font-family: var(--font-display);
    font-size: clamp(28px, 3.5vw, 49px);
    font-weight: 800;
    line-height: 0.9;
    margin: 0 0 5px;
    color: #fff;
}
.philosophy__title .text-accent { color: #CB2957; }
.philosophy__intro {
    font-family: var(--font-display);
    font-size: clamp(16px, 1.75vw, 21px);
    font-weight: 500;
    line-height: 1.4;
    max-width: 600px;
    margin-bottom: 10px;
    color: #fff;
}
.philosophy__para {
    font-family: var(--font-body);
    font-size: clamp(11px, 1.1vw, 14px);
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
    margin: 0;
}
.philosophy__para .highlight { color: #CB2957; }
.philosophy__divider {
    height: 1px;
    width: 60%;
    background: rgba(255,255,255,0.08);
    border: none;
    margin: 7px 0;
}
.philosophy__visual { margin-bottom: 10px; }
.philosophy__image-wrap {
    border-radius: 6px;
    overflow: hidden;
}
.philosophy__image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
}
.philosophy .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease var(--d, 0s), transform 0.8s ease var(--d, 0s);
}
.philosophy .reveal.in {
    opacity: 1;
    transform: none;
}

/* ============ CONTACT ============ */
.contact__inner { 
    position: relative; 
    z-index: 1; 
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.contact__form { 
    max-width: 640px; 
    width: 100%;
    margin-top: 16px; 
    text-align: left;
}
.contact__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: block; margin-bottom: 18px; }
.field__label {
    display: block;
    font-family: var(--font-display);
    font-size: .68rem; letter-spacing: .22em;
    color: var(--muted);
    margin-bottom: 8px;
}
.field input, .field textarea {
    width: 100%;
    background: #fff;
    border: 1.5px solid rgba(0, 0, 0, .16);
    border-radius: 12px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: .98rem;
    padding: 15px 18px;
    transition: border-color .25s ease, box-shadow .25s ease;
    resize: vertical;
}
.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(203, 41, 87, .14);
}
.field input::placeholder, .field textarea::placeholder { color: #9a9a9a; }
.hp { position: absolute; left: -5000px; opacity: 0; height: 0; }
.contact__submit { margin-top: 6px; }
.contact__status { margin-top: 16px; font-size: .92rem; min-height: 1.4em; }
.contact__status.ok  { color: #1d8a52; }
.contact__status.err { color: var(--accent); }
.contact__alt { margin-top: 44px; display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; width: 100%; }
.contact__link {
    font-family: var(--font-display);
    color: var(--ink-soft);
    letter-spacing: .04em;
    border-bottom: 1.5px dashed rgba(0, 0, 0, .3);
    padding-bottom: 3px;
    transition: color .25s ease, border-color .25s ease;
}
.contact__link:hover { color: var(--accent); border-color: var(--accent); }

/* ============ PROJECTS PAGE (projects.php) ============ */
.nav__links a.is-active { color: var(--accent); }

.pwrap {
    position: relative;
    z-index: 1;
    padding: calc(var(--nav-h) + clamp(40px, 8vh, 90px)) 0 clamp(70px, 12vh, 130px);
}

/* Intro header */
.pintro { text-align: center; max-width: 760px; margin: 0 auto clamp(40px, 6vh, 70px); }
.pintro__eyebrow {
    font-family: var(--font-display);
    font-size: .8rem; font-weight: 600;
    letter-spacing: .22em; text-transform: uppercase;
    color: var(--accent);
}
.pintro__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.6rem, 7vw, 4.6rem);
    line-height: 1.05;
    color: var(--ink);
    margin: 12px 0 18px;
}
.pintro__desc { color: var(--muted); font-size: 1.05rem; line-height: 1.7; max-width: 60ch; margin: 0 auto; }
.pintro__back {
    display: inline-block;
    margin-top: 22px;
    font-family: var(--font-display);
    font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--ink-soft);
    border-bottom: 1.5px dashed rgba(0, 0, 0, .3);
    padding-bottom: 3px;
    transition: color .25s ease, border-color .25s ease;
}
.pintro__back:hover { color: var(--accent); border-color: var(--accent); }

/* Card grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 26px;
}

/* Project card — black glass, matching the game cards */
.pcard {
    --card-accent: var(--accent);
    display: flex;
    flex-direction: column;
    background: linear-gradient(170deg, #141414 0%, var(--card-bg) 55%, #000 100%);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 18px 44px -22px rgba(0, 0, 0, .55);
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.pcard:hover {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--card-accent) 45%, transparent);
    box-shadow: 0 30px 60px -24px color-mix(in srgb, var(--card-accent) 55%, transparent);
}
.pcard__media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 2px solid var(--card-accent);
}
.pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.pcard:hover .pcard__media img { transform: scale(1.05); }
.pcard__year {
    position: absolute; top: 12px; right: 12px;
    font-family: var(--font-display);
    font-size: .74rem; font-weight: 600; letter-spacing: .1em;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    border: 1px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(6px);
    padding: 5px 11px;
    border-radius: 999px;
}
.pcard__body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.pcard__title { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--card-text); margin: 0 0 8px; }
.pcard__short { color: var(--card-muted); font-size: .96rem; line-height: 1.5; margin: 0 0 14px; }
.pcard__tech { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pcard__chip {
    font-family: var(--font-display);
    font-size: .72rem; font-weight: 600; letter-spacing: .04em;
    color: color-mix(in srgb, var(--card-accent) 80%, #fff);
    background: color-mix(in srgb, var(--card-accent) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--card-accent) 30%, transparent);
    padding: 5px 11px; border-radius: 999px;
}
.pcard__long { color: var(--card-muted); font-size: .9rem; line-height: 1.6; margin: 0 0 18px; }
.pcard__links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; }
.pcard__link { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; padding: 9px 16px; }
.pcard__link svg { width: 16px; height: 16px; }

/* Portfolio page — all game cards in a static grid (reuses .gcard).
   Override the gallery's fixed flex width so cards fill the grid tracks. */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
    gap: 26px;
    align-items: stretch;
}
.portfolio-grid .gcard {
    width: auto;            /* override clamp() width from the gallery */
    flex: initial;
    align-self: stretch;
    will-change: auto;      /* not transformed here — drop the gallery hint */
}
.portfolio-grid .gcard:hover { transform: translateY(-6px); }

@media (max-width: 680px) {
    .projects-grid, .portfolio-grid { grid-template-columns: 1fr; }
    .pwrap { padding-top: calc(var(--nav-h) + 36px); }
}

/* ============================================================
   PROJECT ARCHIVE (projects.php) — light artifact archive
   ============================================================ */
.arc { position: relative; z-index: 1; }

/* Intro */
.arc-intro { text-align: center; max-width: 820px; margin: 0 auto clamp(38px, 6vh, 64px); }
.arc-intro__eyebrow {
    font-family: var(--font-display);
    font-size: .82rem; font-weight: 600;
    letter-spacing: .26em; text-transform: uppercase;
    color: var(--accent);
}
.arc-intro__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.8rem, 8vw, 5.4rem);
    line-height: 1.02; letter-spacing: .01em;
    margin: 10px 0 14px;
}
.arc-intro__tags {
    font-family: var(--font-display);
    font-size: clamp(.78rem, 1.6vw, .95rem); font-weight: 600;
    letter-spacing: .2em; text-transform: uppercase;
    color: var(--ink-soft);
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px;
}
.arc-intro__dot { color: var(--accent); }
.arc-intro__back {
    display: inline-block; margin-top: 22px;
    font-family: var(--font-display);
    font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--ink-soft);
    border-bottom: 1.5px dashed rgba(0, 0, 0, .3); padding-bottom: 3px;
    transition: color .25s ease, border-color .25s ease;
}
.arc-intro__back:hover { color: var(--accent); border-color: var(--accent); }

/* Grid — Case Studies tall on the right (60%), 01/03 stacked left (40%) */
.arc-grid {
    display: grid;
    grid-template-columns: 40fr 60fr;
    gap: 26px;
    align-items: start;
}
.arc-card--documents { grid-column: 1; grid-row: 1; }
.arc-card--case      { grid-column: 2; grid-row: 2; }
.arc-card--level     { grid-column: 1; grid-row: 2; }
.arc-ga-cell         { grid-column: 2; grid-row: 1; container-type: inline-size; min-width: 0; }

/* Card */
.arc-card {
    position: relative;
    background: #fcfcfd;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 22px;
    padding: 26px 28px 28px;
    box-shadow: 0 18px 40px -28px rgba(0, 0, 0, .35);
    transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s ease, border-color .4s ease;
    overflow: hidden;
}
/* accent line that expands on hover */
.arc-card::before {
    content: '';
    position: absolute; top: 0; left: 28px;
    width: 46px; height: 3px;
    background: var(--accent);
    border-radius: 0 0 3px 3px;
    transition: width .45s cubic-bezier(.22,1,.36,1);
}
.arc-card:hover {
    transform: translateY(-6px);
    border-color: rgba(203, 41, 87, .35);
    box-shadow: 0 34px 60px -30px rgba(203, 41, 87, .4);
}
.arc-card:hover::before { width: calc(100% - 56px); }

/* Card head */
.arc-card__head {
    display: flex; align-items: center; gap: 14px;
    width: 100%; background: none; border: 0; padding: 0;
    cursor: default; text-align: left; color: inherit; font: inherit;
    margin-bottom: 6px;
}
.arc-card__icon {
    flex: none;
    display: grid; place-items: center;
    width: 46px; height: 46px; border-radius: 12px;
    color: var(--accent);
    background: rgba(203, 41, 87, .08);
    border: 1px solid rgba(203, 41, 87, .22);
}
.arc-card__icon svg { width: 23px; height: 23px; }
.arc-card__num {
    margin-left: auto;
    font-family: var(--font-display);
    font-weight: 800; font-size: clamp(2.4rem, 4.6vw, 3.6rem);
    line-height: 1; color: rgba(203, 41, 87, .16);
    letter-spacing: .02em;
}
/* container name shown in the collapsed head — mobile only */
.arc-card__label { display: none; }
.arc-card__chev { display: none; }

.arc-card__title {
    font-family: var(--font-display);
    font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    line-height: 1.08; margin: 10px 0 10px; color: var(--ink);
}
.arc-card--case .arc-card__title { font-size: clamp(1.7rem, 3vw, 2.5rem); }
.arc-card__desc {
    color: var(--muted); font-size: .98rem; line-height: 1.6;
    max-width: 46ch; margin-bottom: 18px;
}
.arc-card__desc:empty { display: none; }

/* List rows */
.arc-list { list-style: none; display: grid; gap: 2px; margin: 4px 0 22px; }
.arc-list li {
    display: flex; align-items: center; gap: 12px;
    font-family: var(--font-display); font-weight: 500;
    font-size: .96rem; color: var(--ink-soft);
    padding: 11px 4px; border-top: 1px solid rgba(0, 0, 0, .07);
}
.arc-list li:last-child { border-bottom: 1px solid rgba(0, 0, 0, .07); }
.arc-list__ic {
    flex: none; display: grid; place-items: center;
    width: 26px; height: 26px; border-radius: 7px;
    color: var(--accent); background: rgba(203, 41, 87, .08);
}
.arc-list__ic svg { width: 15px; height: 15px; }

/* CTA */
.arc-cta {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--font-display); font-weight: 700;
    font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--accent);
}
.arc-cta span { transition: transform .3s ease; }
.arc-cta:hover span { transform: translateX(5px); }

/* ---- Isometric / floating visuals ---- */
.arc-visual { margin: 4px 0 18px; }
.arc-visual svg { width: 100%; height: auto; display: block; overflow: visible; }
.arc-visual--docs  svg { max-height: 230px; }
.arc-visual--level svg { max-height: 220px; }
/* image visuals are cropped to compact banners so the left-column cards match
   the height of Game Analysis / Case Studies on their right */
.arc-visual img {
    width: 100%; display: block; border-radius: 8px;
    object-fit: cover; object-position: center;
}
.arc-visual--docs  img { height: 305px; }
.arc-visual--level img { height: 218px; }

/* ---- Case Studies: stats, floating boards, metrics ---- */
.arc-stats {
    display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.arc-stat {
    display: flex; flex-direction: column; align-items: flex-start;
    padding: 12px 20px 12px 0;
}
.arc-stat + .arc-stat { border-left: 1px solid rgba(0,0,0,.1); padding-left: 22px; }
.arc-stat__n {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--accent); line-height: 1;
}
.arc-stat__l {
    font-family: var(--font-display); font-size: .72rem; font-weight: 600;
    letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px;
}

.arc-boards {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    gap: 0; min-height: 160px; margin: 6px 0 14px;
    perspective: 1400px;
}
.arc-board {
    position: relative;
    width: 33%; max-width: 240px;
    border-radius: 12px; overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 24px 40px -26px rgba(0,0,0,.5);
    transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.arc-board__bar { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); z-index: 2; }
.arc-board img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.arc-board--0 { transform: translateX(34%) rotateY(26deg) scale(.9); z-index: 1; }
.arc-board--1 { transform: translateY(-10px) scale(1.04); z-index: 3; }
.arc-board--2 { transform: translateX(-34%) rotateY(-26deg) scale(.9); z-index: 1; }
.arc-card--case:hover .arc-board--0 { transform: translateX(40%) rotateY(22deg) scale(.92); }
.arc-card--case:hover .arc-board--2 { transform: translateX(-40%) rotateY(-22deg) scale(.92); }
.arc-board--chart {
    position: absolute; bottom: -6px; left: 4%;
    width: 130px; padding: 12px 12px 8px;
    overflow: visible; z-index: 4;
}
.arc-board--chart svg { width: 100%; height: auto; }

.arc-metrics {
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 10px; padding: 12px 16px;
    background: rgba(203, 41, 87, .05);
    border: 1px solid rgba(203, 41, 87, .14);
    border-radius: 14px; margin-bottom: 22px;
}
.arc-metric { display: flex; flex-direction: column; gap: 6px; }
.arc-metric__l {
    font-family: var(--font-display); font-size: .62rem; font-weight: 600;
    letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.arc-metric__v {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(1.05rem, 2vw, 1.5rem); color: var(--accent); line-height: 1;
}

/* ---- Tablet (681–1199px): Case Studies full width on top, 01 | 03 below, GA full width ---- */
@media (max-width: 1199px) {
    .arc-grid { grid-template-columns: 1fr 1fr; }
    .arc-card--case      { grid-column: 1 / -1; grid-row: 1; }
    .arc-card--documents { grid-column: 1; grid-row: 2; }
    .arc-card--level     { grid-column: 2; grid-row: 2; }
    .arc-ga-cell         { grid-column: 1 / -1; grid-row: 3; }
}

/* ---- Mobile (≤680px): vertical stack + tap accordion ---- */
@media (max-width: 680px) {
    .arc-grid { grid-template-columns: 1fr; }
    .arc-card--documents, .arc-card--case, .arc-card--level, .arc-ga-cell {
        grid-column: 1; grid-row: auto;
    }
    .arc-card { padding: 20px 20px 22px; }
    .arc-card__head { cursor: pointer; margin-bottom: 0; }
    .arc-card__chev {
        display: block; flex: none;
        width: 12px; height: 12px; margin-left: 12px;
        border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
        transform: rotate(45deg); transition: transform .3s ease;
    }
    .arc-card.is-open .arc-card__chev { transform: rotate(-135deg); }
    .arc-card__label {
        display: block; flex: 1; min-width: 0;
        font-family: var(--font-display);
        font-weight: 700; font-size: 1.05rem; line-height: 1.15;
        color: var(--ink);
    }
    .arc-card__num { margin-left: 10px; font-size: 1.7rem; }

    /* collapse body until opened */
    .arc-card__rest {
        max-height: 0; overflow: hidden;
        opacity: 0;
        transition: max-height .45s ease, opacity .35s ease, margin-top .35s ease;
    }
    .arc-card.is-open .arc-card__rest {
        max-height: 1600px; opacity: 1; margin-top: 14px;
    }
    .arc-metrics { grid-template-columns: repeat(2, 1fr); }
    .arc-boards { min-height: 180px; }
    .arc-board { max-width: 180px; }
}

/* ============================================================
   GAME ANALYSIS container (projects.php)
   Professional review-dashboard aesthetic, light theme.
   ============================================================ */
.ga {
    background: rgba(255, 255, 255, .85);
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 24px;
    padding: clamp(16px, 3cqi, 26px);
    box-shadow: 0 24px 60px -36px rgba(0, 0, 0, .3);
}
/* accordion header — hidden on desktop/tablet, shown on mobile */
.ga__head { display: none; }

/* ---- Hero ---- */
.ga-hero {
    display: grid;
    grid-template-columns: 1fr;          /* stacked by default; widens via @container */
    gap: clamp(22px, 3vw, 44px);
    align-items: center;
    margin-bottom: 34px;
}
.ga-icon {
    display: grid; place-items: center;
    width: 54px; height: 54px; border-radius: 15px;
    color: var(--accent);
    background: rgba(203, 41, 87, .08);
    border: 1px solid rgba(203, 41, 87, .22);
    margin-bottom: 20px;
}
.ga-icon svg { width: 28px; height: 28px; }
.ga-title {
    font-family: var(--font-display);
    font-weight: 800; font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.04; color: var(--ink); margin-bottom: 16px;
}
.ga-copy { color: var(--muted); font-size: 1.02rem; line-height: 1.65; max-width: 42ch; margin-bottom: 14px; }

.ga-iconcards { display: flex; gap: 14px; margin-bottom: 16px; }
.ga-iconcard {
    display: grid; place-items: center;
    width: 78px; height: 70px; border-radius: 14px;
    color: var(--ink-soft);
    background: rgba(255, 255, 255, .7);
    border: 1px solid rgba(0, 0, 0, .1);
    transition: transform .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.ga-iconcard:hover {
    transform: translateY(-4px); color: var(--accent);
    border-color: rgba(203, 41, 87, .3);
    box-shadow: 0 16px 30px -18px rgba(203, 41, 87, .5);
}
.ga-iconcard svg { width: 30px; height: 30px; }

.ga-cta {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--font-display); font-weight: 700;
    font-size: .82rem; letter-spacing: .16em; text-transform: uppercase;
    color: var(--accent); position: relative; padding-bottom: 5px;
}
.ga-cta::after {
    content: ''; position: absolute; left: 0; bottom: 0;
    width: 0; height: 2px; background: var(--accent); transition: width .35s ease;
}
.ga-cta:hover::after { width: 100%; }
.ga-cta span { transition: transform .3s ease; }
.ga-cta:hover span { transform: translateX(8px); }

/* ---- Hero archetype decks ---- */
.ga-hero__right { position: relative; }
.ga-decks {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    min-height: 200px; perspective: 1500px;
}
.ga-deck {
    position: relative;
    width: 25%; flex: none;
    margin: 0 -1.5%;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 16px; padding: 12px;
    box-shadow: 0 26px 46px -28px rgba(0, 0, 0, .45);
    transition: transform .5s cubic-bezier(.22,1,.36,1), box-shadow .5s ease;
}
.ga-deck__label {
    display: block;
    font-family: var(--font-display); font-weight: 700;
    font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ink); margin-bottom: 9px;
}
.ga-deck__art { border-radius: 10px; overflow: hidden; }
.ga-deck__art svg { width: 100%; height: auto; display: block; }
.ga-deck__tags { margin-top: 10px; display: grid; gap: 6px; }
.ga-deck__tags span {
    display: flex; align-items: center; gap: 7px;
    font-family: var(--font-display); font-size: .62rem; font-weight: 500;
    letter-spacing: .03em; color: var(--ink-soft);
}
.ga-deck__tags i { width: 10px; height: 10px; border-radius: 3px; background: rgba(203,41,87,.18); border: 1px solid rgba(203,41,87,.4); flex: none; }
.ga-deck--rpg    { transform: rotateY(16deg) scale(.82); z-index: 1; transform-origin: right center; }
.ga-deck--live   { transform: rotateY(-13deg) scale(.84); z-index: 1; transform-origin: left center; }
.ga-deck--puzzle { transform: rotateY(-22deg) scale(.72); z-index: 0; transform-origin: left center; opacity: .96; }
.ga-deck--feature {
    width: 30%; z-index: 3;
    transform: translateY(-12px) scale(1.05);
    box-shadow: 0 36px 60px -28px rgba(203, 41, 87, .5);
    border-color: rgba(203, 41, 87, .25);
}
.ga-deck__play {
    position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%);
    width: 48px; height: 48px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .4);
}
.ga-deck__play svg { width: 22px; height: 22px; margin-left: 3px; }

/* ---- Widgets row ---- */
.ga-widgets {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
    margin-bottom: 26px;
}
.ga-widget {
    background: rgba(255, 255, 255, .7);
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 16px; padding: 16px 16px 14px;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.ga-widget:hover {
    transform: translateY(-4px);
    border-color: rgba(203, 41, 87, .22);
    box-shadow: 0 18px 36px -22px rgba(203, 41, 87, .4);
}
.ga-widget__hd {
    display: flex; align-items: center; justify-content: space-between;
    font-family: var(--font-display); font-size: .64rem; font-weight: 600;
    letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
    margin-bottom: 12px;
}
.ga-widget__clock, .ga-widget__arrow { width: 14px; height: 14px; flex: none; opacity: .5; }
.ga-widget__clock { border: 1.5px solid currentColor; border-radius: 50%; position: relative; }
.ga-widget__clock::after { content: ''; position: absolute; top: 2px; left: 50%; width: 1.5px; height: 4px; background: currentColor; transform: translateX(-50%); }
.ga-widget__arrow::before { content: '›'; font-size: 16px; line-height: 14px; }
.ga-chart { width: 100%; height: 72px; display: block; }
.ga-chart--bars { height: 56px; }
.ga-widget__axis {
    display: flex; justify-content: space-between; margin-top: 6px;
    font-family: var(--font-display); font-size: .56rem; letter-spacing: .06em;
    text-transform: uppercase; color: var(--muted);
}
.ga-widget__big { font-family: var(--font-display); color: var(--ink); margin: 4px 0 6px; font-size: .9rem; }
.ga-widget__big strong { font-size: 1.9rem; font-weight: 800; color: var(--accent); }
.ga-widget__big--accent strong { font-size: 1.7rem; }
.ga-widget--donut { display: flex; flex-direction: column; }
.ga-donut { display: flex; align-items: center; gap: 8px; }
.ga-donut svg { width: 88px; height: 88px; flex: none; }
.ga-donut__legend { display: grid; gap: 8px; }
.ga-donut__legend span { display: flex; align-items: center; gap: 7px; font-family: var(--font-display); font-size: .66rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ga-dot { width: 9px; height: 9px; border-radius: 3px; background: #cdd1d7; flex: none; }
.ga-dot--on { background: var(--accent); }
.ga-radar { width: 100%; height: 96px; display: block; }

/* ---- Bottom panels ---- */
.ga-panels {
    display: grid; grid-template-columns: 1fr; gap: 14px;   /* stacked by default; widens via @container */
}
.ga-panel {
    background: rgba(255, 255, 255, .7);
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 18px; padding: 22px 24px;
}
.ga-panel__t {
    font-family: var(--font-display); font-size: .66rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft);
    margin-bottom: 18px;
}

/* key areas */
.ga-areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ga-area { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.ga-area__ic {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
    color: var(--accent); background: rgba(203, 41, 87, .07); border: 1px solid rgba(203, 41, 87, .18);
    transition: transform .3s ease;
}
.ga-area:hover .ga-area__ic { transform: translateY(-4px); }
.ga-area__ic svg { width: 22px; height: 22px; }
.ga-area__l { font-family: var(--font-display); font-size: .72rem; font-weight: 600; color: var(--ink-soft); line-height: 1.25; }

/* recent analyses */
.ga-recent { list-style: none; display: grid; gap: 4px; }
.ga-recent__item {
    display: flex; align-items: center; gap: 12px; padding: 9px 6px;
    border-top: 1px solid rgba(0, 0, 0, .07); cursor: pointer;
    transition: background .25s ease;
}
.ga-recent__item:first-child { border-top: 0; }
.ga-recent__item:hover { background: rgba(203, 41, 87, .04); border-radius: 8px; }
.ga-recent__thumb {
    flex: none; width: 42px; height: 42px; border-radius: 9px;
    display: grid; place-items: center;
}
.ga-recent__thumb svg { width: 22px; height: 22px; }
.ga-recent__thumb--rpg    { background: linear-gradient(135deg, #8E1C3E, #CB2957); }
.ga-recent__thumb--open   { background: linear-gradient(135deg, #CB2957, #E04E72); }
.ga-recent__thumb--live   { background: linear-gradient(135deg, #6d1530, #b8234d); }
.ga-recent__thumb--puzzle { background: linear-gradient(135deg, #E04E72, #CB2957); }
.ga-recent__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ga-recent__title { font-family: var(--font-display); font-weight: 700; font-size: .86rem; color: var(--ink); }
.ga-recent__tags { font-size: .72rem; color: var(--muted); }
.ga-recent__arrow { color: var(--accent); font-size: 1rem; transition: transform .3s ease; }
.ga-recent__item:hover .ga-recent__arrow { transform: translateX(4px); }

/* insight quote */
.ga-panel--insight { display: flex; flex-direction: column; }
.ga-quote__mark { font-family: var(--font-display); font-size: 3.4rem; line-height: .6; color: rgba(203, 41, 87, .3); margin-bottom: 6px; }
.ga-quote__body { font-size: .96rem; line-height: 1.6; color: var(--ink-soft); margin-bottom: 16px; }
.ga-quote__by { margin-top: auto; font-family: var(--font-display); font-size: .76rem; font-weight: 600; letter-spacing: .06em; color: var(--accent); }

/* ---- Container-driven layout: GA expands with its own cell width ---- */
@container (min-width: 440px) {
    .ga-widgets { grid-template-columns: repeat(3, 1fr); }
}
@container (min-width: 520px) {
    .ga-widgets { grid-template-columns: repeat(5, 1fr); }
    .ga-areas { grid-template-columns: repeat(6, 1fr); }
    .ga-panels { grid-template-columns: 1fr 1fr; }
    .ga-panel--areas { grid-column: 1 / -1; }
}
@container (min-width: 780px) {
    .ga-hero { grid-template-columns: 0.85fr 1.15fr; }
    .ga-panels { grid-template-columns: 1.55fr 1.1fr 1fr; }
    .ga-panel--areas { grid-column: auto; }
}

/* ---- Mobile (≤680px): collapsible accordion ---- */
@media (max-width: 680px) {
    .ga-decks { min-height: 240px; }
    .ga-deck { width: 40%; }
    .ga-deck--feature { width: 46%; }
    .ga-deck--puzzle { display: none; }
    .ga-iconcards { gap: 10px; }
    .ga-areas { grid-template-columns: repeat(2, 1fr); gap: 16px; }

    /* accordion */
    .ga__head {
        display: flex; align-items: center; gap: 14px; width: 100%;
        background: none; border: 0; padding: 0; cursor: pointer;
        color: inherit; font: inherit; text-align: left;
    }
    .ga.is-open .arc-card__chev { transform: rotate(-135deg); }
    .ga-icon, .ga-title { display: none; }   /* header already shows the title */
    .ga__rest {
        max-height: 0; overflow: hidden; opacity: 0;
        transition: max-height .5s ease, opacity .35s ease, margin-top .35s ease;
    }
    .ga.is-open .ga__rest { max-height: 5000px; opacity: 1; margin-top: 14px; }
}

/* ============================================================
   PORTFOLIO PAGE — full-viewport slide layout (portfolio.php)
   ============================================================ */

.pf-body {
    background: #0a0a0a;
    overflow: hidden;
    height: 100vh;
}
.pf-body .nav {
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pf-body .nav__logo,
.pf-body .nav__links a { color: rgba(255, 255, 255, 0.8); }
.pf-body .nav__links a:hover,
.pf-body .nav__links a.is-active { color: #fff; }

/* Fixed numbered sidebar */
.pf-sidenav {
    position: fixed;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
}
.pf-sidenav__track {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.pf-sidenav__line {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.18);
}
.pf-sidenav__item {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: border-color .3s, background .3s, color .3s;
    cursor: pointer;
}
.pf-sidenav__item.is-active,
.pf-sidenav__item:hover {
    border-color: var(--accent);
    background: rgba(203, 41, 87, 0.18);
    color: #fff;
}

/* Horizontal scroll container */
.pf-slides {
    display: flex;
    overflow-x: scroll;
    overflow-y: hidden;
    height: 100vh;
    /* No CSS scroll-snap — it fights the JS easing/snap loop and can
       freeze the scroll on slide 0. Snapping is handled in JS. */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    /* hide scrollbar */
    scrollbar-width: none;
}
.pf-slides::-webkit-scrollbar { display: none; }

/* Each slide */
.pf-slide {
    position: relative;
    min-width: 100vw;
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    /* Skip painting off-screen slides — keeps 12 blurred slides from
       freezing the compositor. Reserve their size so scroll width is correct. */
    content-visibility: auto;
    contain-intrinsic-size: 100vw 100vh;
}
.pf-slide__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.28) saturate(1.1);
    transform: scale(1.04);
}
.pf-slide__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.72) 50%, rgba(0,0,0,0.25) 100%);
}

/* Ghost slide number */
.pf-slide__num {
    position: absolute;
    right: 4vw;
    bottom: 20px;
    font-family: var(--font-display);
    font-size: clamp(6rem, 16vw, 13rem);
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.035);
    user-select: none;
    pointer-events: none;
}

/* Two-column content */
.pf-slide__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 110px 60px 80px 100px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

/* Left text */
.pf-slide__left { color: #fff; }
.pf-slide__genre {
    font-family: var(--font-display);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}
.pf-slide__title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.08;
    color: #fff;
    margin-bottom: 8px;
}
.pf-slide__role-title {
    font-size: .9rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    margin-bottom: 28px;
}
.pf-slide__desc {
    font-size: .97rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.72);
    max-width: 50ch;
    margin-bottom: 22px;
}
.pf-slide__bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.pf-slide__bullets li {
    font-size: .88rem;
    color: rgba(255, 255, 255, 0.6);
    padding-left: 18px;
    position: relative;
}
.pf-slide__bullets li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: .75rem;
    top: 2px;
}
.pf-slide__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.pf-slide__platform {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: rgba(255, 255, 255, 0.45);
}
.pf-slide__platform svg { width: 14px; height: 14px; }
.pf-slide__downloads {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-display);
    font-size: .72rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(203, 41, 87, .12);
    border: 1px solid rgba(203, 41, 87, .3);
    padding: 3px 12px;
    border-radius: 20px;
}
.pf-slide__downloads svg { width: 12px; height: 12px; }
.pf-slide__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.pf-slide__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 30px;
    font-family: var(--font-display);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background .25s, transform .2s;
}
.pf-slide__cta:hover { background: #e04e72; transform: translateY(-2px); }

/* Floating character art — sits over the bottom-left corner of the trailer */
.pf-char-art {
    position: absolute;
    top: 66%;
    bottom: auto;
    right: -1%;
    left: auto;
    transform: translateX(-18%);
    height: 41%;
    width: auto;
    object-fit: contain;
    z-index: 3;
    pointer-events: none;
    filter: drop-shadow(0 12px 28px rgba(0,0,0,0.8));
}
@media (max-width: 860px) { .pf-char-art { display: none; } }

.pf-char-art--farmville-3 { top: 61%; }
.pf-char-art--drones-2-free-assault { top: 58%; height: 38%; }
.pf-char-art--monster-truck-xtreme-racing { top: 60%; height: 40%; }
.pf-char-art--super-market-city-farming-game { top: 60%; height: 40%; }
.pf-char-art--cafe-tycoon-cooking-fun { top: 60%; height: 40%; }
.pf-char-art--money-bunny-survive-horde { top: 60%; height: 40%; }
.pf-char-art--zombie-ultimate-fighting-champ { top: 60%; height: 40%; }

/* Right image frame */
.pf-slide__right {
    display: flex;
    justify-content: center;
    align-items: center;
}
.pf-slide__img-frame {
    width: 100%;
    max-width: 540px;
    aspect-ratio: 16 / 10;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255,255,255,0.04);
    position: relative;
}
.pf-slide__img-frame .pf-blur-bg {
    position: absolute;
    inset: -10px;
    background-size: cover;
    background-position: center;
    filter: blur(12px) brightness(0.45);
    z-index: 0;
}
.pf-slide__img-frame img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Video frame — thumbnail fills fully like a cover image */
.pf-video-frame { cursor: pointer; }
.pf-video-frame .pf-video-thumb {
    object-fit: cover;
}

/* Crimson play button centred over the thumbnail */
.pf-play-btn {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(203, 41, 87, 0.88);
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    cursor: pointer;
    transition: transform .2s, background .2s;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.pf-play-btn svg { width: 28px; height: 28px; color: #fff; margin-left: 4px; }
.pf-video-frame:hover .pf-play-btn {
    transform: scale(1.1);
    background: var(--accent);
}

/* Slim elongated edge arrow buttons — left and right sides of the viewport */
.pf-nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    width: 32px;
    height: 110px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition: border-color .25s, background .25s, color .25s, opacity .25s;
    padding: 0;
}
.pf-nav-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.pf-nav-btn--prev { left: 72px; }   /* after sidenav dots (~28px + 38px wide + gap) */
.pf-nav-btn--next { right: 12px; }
.pf-nav-btn:hover {
    border-color: var(--accent);
    background: rgba(203, 41, 87, .2);
    color: #fff;
}
.pf-nav-btn.is-dim { opacity: 0.18; pointer-events: none; }

@media (max-width: 860px) {
    .pf-nav-btn { width: 26px; height: 80px; }
    .pf-nav-btn--prev { left: 6px; }
    .pf-nav-btn--next { right: 6px; }
}

/* Mobile scroll hint — fixed bottom-right, visible only on ≤860px */
.pf-scroll-hint {
    display: none;
    position: fixed;
    bottom: 28px;
    right: 20px;
    z-index: 300;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.65);
    pointer-events: none;
    transition: opacity .5s ease;
}
.pf-scroll-hint__label {
    font-family: var(--font-display);
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.pf-scroll-hint svg {
    width: 26px;
    height: 26px;
    animation: pfScrollBounce 1.5s ease-in-out infinite;
}
@keyframes pfScrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}
.pf-scroll-hint.is-hidden { opacity: 0; }
@media (max-width: 860px) {
    .pf-scroll-hint { display: flex; }
}

/* Footer on portfolio page */
.pf-footer { background: #000 !important; border-top: 1px solid rgba(255,255,255,0.07); }

/* Tablet + mobile: vertical page scroll — avoids iOS Safari overflow-hidden clip */
@media (max-width: 860px) {
    /* Let the page scroll normally so no content is ever clipped */
    .pf-body { overflow: auto !important; height: auto !important; }
    .pf-slides {
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: visible;
        height: auto;
    }
    .pf-slide {
        min-width: 100%;
        width: 100%;
        height: auto;
        min-height: 100vh;
        min-height: 100svh;
        overflow: visible;
        align-items: flex-start;
    }
    .pf-slide__content {
        grid-template-columns: 1fr;
        padding: calc(var(--nav-h, 72px) + 28px) 24px 80px;
        gap: 28px;
    }
    .pf-slide__right { order: -1; }
    .pf-slide__img-frame { max-width: 100%; aspect-ratio: 16 / 9; }
    .pf-slide__num { display: none; }
    .pf-sidenav { display: none; }
    .pf-nav-btn { display: none; }
}

/* ============ FOOTER ============ */
.footer { background: var(--ink); padding: 34px 0; }
.footer__inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
}
.footer__credit, .footer__quote { color: #9a9a9a; font-size: .85rem; }
.footer__quote { font-family: var(--font-display); font-size: .75rem; letter-spacing: .08em; }
.footer__quote .accent { color: #E04E72; }
.footer__top {
    font-family: var(--font-display);
    font-size: .72rem; letter-spacing: .2em;
    color: #9a9a9a;
    transition: color .25s ease;
}
.footer__top:hover { color: #E04E72; }

/* ============ REVEAL ANIMATIONS ============ */
.reveal {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity .8s ease var(--d, 0s), transform .8s cubic-bezier(.22, 1, .36, 1) var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* Contact section: fade-in only (no slide-up) */
.contact.reveal { transform: none; transition: opacity .9s ease .1s; }
.contact.reveal.in { opacity: 1; }

/* Hide the scroll hint when the viewport is too short for it */
@media (max-height: 600px) {
    .hero__scroll { display: none; }
}

/* ============ RESPONSIVE — NAV COLLAPSE (tablet + mobile) ============ */
/* iPad Air portrait = 820px, so collapse at 1024px to cover all tablets */
@media (max-width: 1024px) {
    .nav__links {
        position: fixed;
        inset: var(--nav-h) 0 auto 0;
        flex-direction: column;
        gap: 6px;
        background: rgba(238, 238, 238, .98);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--line);
        padding: 18px 6% 26px;
        align-items: stretch;
        text-align: center;
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: transform .3s ease, opacity .3s ease;
    }
    .nav--open .nav__links { transform: none; opacity: 1; pointer-events: auto; }
    .nav__links a { padding: 13px 0; font-size: 1rem; }
    .nav__links a:not(.nav__cta)::after { display: none; }
    .nav__cta { margin-top: 10px; }
    .nav__burger { display: flex; }
    .nav--open .nav__links a:not(.nav__cta) { color: var(--ink) !important; }
    .nav--open .nav__links a.nav__social { color: var(--muted) !important; align-self: center; }
}

/* ============ RESPONSIVE — TABLET ============ */
@media (max-width: 980px) {
    .about__cols, .skills__cols { grid-template-columns: 1fr; gap: 36px; }
    /* Photo above the text + contact button on smaller screens */
    .about__photo { order: -1; width: min(300px, 78%); }
    .gpage__card { grid-template-columns: 1fr; }
    .gpage__art { min-height: 240px; }
    
    /* Design Skills */
    .dskills__grid { grid-template-columns: repeat(2, 1fr); }
    .dskill-card { width: 100%; } /* Overrides the flex width on tablet */
    .dprocess__steps { flex-wrap: wrap; justify-content: center; gap: 32px; }
    .dprocess__step { min-width: 40%; }
    .dprocess__arrow { display: none; } /* Hide arrows on tablet wrap to keep it clean */
}

/* ============ RESPONSIVE — MOBILE ============ */
@media (max-width: 680px) {
    .hero { padding-inline: 4%; }
    .hero__typed-wrap { min-height: 2.5em; }
    .hero__metrics { gap: 10px; }
    .metric__label { letter-spacing: .08em; }
    .shape--dpad, .shape--sq { display: none; }
    .orb { filter: blur(50px); }

    .gcard__body { padding: 20px 20px 24px; }
    .games__viewport { height: clamp(500px, 72vh, 580px); gap: 18px; }
    .games__heading { width: calc(min(66vw, 290px) + 18px + clamp(232px, 74vw, 286px)); padding-left: 5vw; padding-right: 18px; }
    .games__title { font-size: clamp(1.7rem, 8vw, 2.3rem); }
    .gcard { width: clamp(232px, 74vw, 286px); }

    /* Minimal fog on both edges for mobile */
    .games__fog { width: 24px; }

    /* Sub overlay: collapse to normal flow above the gallery */
    .games__sub-overlay {
        position: static;
        width: 100%;
        background: none;
        padding: 0 4%;
        margin-bottom: 14px;
    }
    .games__sub { max-width: none; font-size: .9rem; }

    /* Hint: hide desktop hint, show mobile hint below cards */
    .games__hint--desktop { display: none; }
    .games__hint--mobile { display: inline-flex; }
    .games__hint-row { display: block; text-align: center; }

    /* Design skills */
    .dskills__grid { grid-template-columns: 1fr; gap: 16px; }
    .dskill-card { width: 100%; padding: 24px; }
    .dprocess__steps { flex-direction: column; align-items: center; gap: 20px; }
    .dprocess__step { min-width: 100%; }
    .dprocess__arrow { display: block; transform: none; padding-top: 0; padding-bottom: 0; font-size: 20px; }
    .contact__row { grid-template-columns: 1fr; gap: 0; }
    .footer__inner { flex-direction: column; text-align: center; }
    .gpage__info { padding: 26px 22px 30px; }
}




/* ============ TECHNICAL SKILLS ============ */
/* Section is transparent so the site-bg shows through */
.tskills.section {
    padding: clamp(60px, 10vh, 120px) 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Global experience slides over the sticky tskills from above */
.global-experience {
    position: relative;
    z-index: 10;
}

/* ============ SCROLL-LINKED SLIDE ANIMATIONS ============ */
/* Hardware acceleration for the sliding content inside these sections */
.my-story .container,
.philosophy .container,
.contact .container {
    will-change: transform;
}

/* Add a background to the contact section so it's not transparent */
.contact.section {
    background: #ffffff;
    overflow: hidden;
    padding: clamp(60px, 9vh, 100px) 0; /* Reduced by ~25% from default 12vh to move it down relative to the viewport top and shrink white background */
}

/* ── Section header ── */
.tskills__head { text-align: center; margin-bottom: clamp(36px, 5vh, 64px); }
.tskills__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    letter-spacing: .04em;
    color: var(--ink);
    margin: 0 0 18px;
    line-height: 1.1;
}
.tskills__divider {
    width: 72px; height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 999px;
    margin: 0 auto;
}

/* ── Mobile-first base: hidden net, visible accordion ── */
.tskills__net     { display: none; }
.tskills__accordion { display: flex; flex-direction: column; gap: 12px; }

/* ── Shared: category icon chip ── */
.tcategory__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    color: var(--ts-accent, var(--accent));
    background: color-mix(in srgb, var(--ts-accent, var(--accent)) 14%, transparent);
}
.tcategory__icon svg { width: 22px; height: 22px; }

/* ── Shared: category header card ── */
.tcategory__header {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 22px;
    background: rgba(12, 12, 18, .88);
    border: 1.5px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    margin-bottom: 14px;
    cursor: default;
    backdrop-filter: blur(10px);
    transition: transform .3s ease, box-shadow 1.5s ease, border-color 1.5s ease;
}
.tcategory__header:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px -8px color-mix(in srgb, var(--ts-accent, var(--accent)) 38%, transparent);
    border-color: color-mix(in srgb, var(--ts-accent, var(--accent)) 45%, transparent);
}
.tcategory__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: .06em;
    color: #fff;
    margin: 0;
}

/* ── Shared: skill cards ── */
.tcategory__cards { display: flex; flex-direction: column; gap: 8px; }
.tskill-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    background: rgba(10, 12, 18, .78);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 12px;
    color: rgba(255, 255, 255, .84);
    font-family: var(--font-body);
    font-size: .88rem;
    font-weight: 500;
    backdrop-filter: blur(6px);
    cursor: default;
    transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.tskill-card svg { width: 17px; height: 17px; color: var(--ts-accent, var(--accent)); flex-shrink: 0; opacity: .85; }
.tskill-card:hover {
    transform: translateX(5px);
    border-color: color-mix(in srgb, var(--ts-accent, var(--accent)) 38%, transparent);
    background: color-mix(in srgb, var(--ts-accent, var(--accent)) 7%, rgba(10, 12, 18, .9));
}

/* Wave-hit glow (class toggled by JS when sonar ring arrives) */
.tcategory__header.wave-pulse {
    border-color: rgba(203, 41, 87, .5) !important;
    box-shadow: 0 0 22px rgba(203, 41, 87, .22), 0 0 0 1px rgba(203, 41, 87, .12) !important;
    transition: border-color 0s, box-shadow 0s !important;
}

/* ── Accordion (mobile only, shown < 768px) ── */
.taccordion__item {
    border-radius: 16px;
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, .08);
    background: rgba(10, 12, 18, .78);
    backdrop-filter: blur(8px);
}
.taccordion__trigger {
    display: flex; align-items: center; gap: 14px;
    width: 100%; padding: 18px 20px;
    background: none; border: none; cursor: pointer;
    text-align: left;
    transition: background .2s ease;
}
.taccordion__trigger:hover { background: rgba(255,255,255,.03); }
.taccordion__title {
    font-family: var(--font-display);
    font-weight: 700; font-size: .95rem; letter-spacing: .06em;
    color: #fff; flex: 1;
}
.taccordion__arrow {
    font-size: .7rem;
    color: rgba(255,255,255,.45);
    transition: transform .3s ease;
}
.taccordion__item.is-open .taccordion__arrow { transform: rotate(180deg); }
.taccordion__body {
    max-height: 0; overflow: hidden;
    transition: max-height .4s cubic-bezier(.4, 0, .2, 1), padding .3s ease;
    padding: 0 16px;
    display: flex; flex-direction: column; gap: 8px;
}
.taccordion__item.is-open .taccordion__body {
    max-height: 520px;
    padding: 4px 16px 16px;
}

/* ── Tablet (768px – 1199px): 2-column card grid, no hub ── */
@media (min-width: 768px) {
    .tskills__net { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
    .tskills__accordion { display: none; }
    .tskills__hub-wrap { display: none; }
    .tskills__lines    { display: none; }
    .tskills__category--engines  { grid-column: 1; }
    .tskills__category--workflows { grid-column: 2; }
    .tskills__category--software {
        grid-column: 1 / 3;
        .tcategory__cards { flex-direction: row; flex-wrap: wrap; gap: 8px; }
    }
}

/* ── Desktop (1200px+): hub-and-node constellation ── */
@media (min-width: 1200px) {
    .tskills__net {
        grid-template-columns: 1fr 260px 1fr;
        grid-template-rows: auto auto;
        grid-template-areas:
            "engines hub workflows"
            "bottom  bottom  bottom";
        gap: 56px 72px;
        align-items: start;
        position: relative;
        min-height: 480px;
    }
    .tskills__hub-wrap {
        display: flex; align-items: center; justify-content: center;
        grid-area: hub;
        position: relative;
        align-self: center;
    }
    .tskills__category--engines  { grid-area: engines;  align-self: center; }
    .tskills__category--workflows { grid-area: workflows; align-self: center; }
    .tskills__category--software {
        grid-area: bottom;
        display: flex; flex-direction: column; align-items: center;
    }
    .tskills__category--software .tcategory__cards {
        display: flex; flex-direction: row; flex-wrap: wrap;
        justify-content: center; gap: 10px;
        max-width: 740px;
    }
    .tskills__category--software .tskill-card { min-width: 200px; }

    /* SVG connection lines (fills entire .tskills__net) */
    .tskills__lines {
        display: none;
        position: absolute; inset: 0;
        width: 100%; height: 100%;
        overflow: visible;
        pointer-events: none;
        z-index: 1;
    }
    .tline {
        fill: none;
        stroke: rgba(203, 41, 87, .28);
        stroke-width: 1.8;
        vector-effect: non-scaling-stroke;
        stroke-linecap: round;
        stroke-dasharray: 1;
        stroke-dashoffset: 1;
        transition: stroke-dashoffset 1.4s cubic-bezier(.4, 0, .2, 1) var(--tld, 0.1s),
                    stroke .3s ease, opacity .3s ease;
    }
    .tskills__net.in .tline { stroke-dashoffset: 0; }

    /* Sonar wrap */
    .tskills__sonar {
        position: absolute;
        left: 50%; top: 50%;
        transform: translate(-50%, -50%);
        width: 0; height: 0;
        pointer-events: none; z-index: 1; /* Bring sonar wrap to layer 1 */
    }
    .sonar-ring {
        position: absolute;
        border: 2px solid rgba(203, 41, 87, .26);
        border-radius: 50%;
        /* linear (constant speed) so the JS glow scheduler — which predicts
           arrival linearly — stays perfectly in sync with the visible ring */
        animation: sonarExpand 8s linear infinite;
        opacity: 0;
        top: 0; left: 0;
        transform: translate(-50%, -50%);
    }
    .sonar-ring--1 { animation-delay: 0s; }
    /* Single wave on screen at a time — rings 2 & 3 disabled (JS SONAR_RINGS = 1) */
    .sonar-ring--2 { display: none; }
    .sonar-ring--3 { display: none; }
    @keyframes sonarExpand {
        0%   { width: 260px; height: 260px; opacity: .9; border-color: rgba(203,41,87,.6); }
        100% { width: 3000px; height: 3000px; opacity: 0;  border-color: rgba(203,41,87,.15); }
    }

    /* Hub card */
    .tskills__hub {
        position: relative; z-index: 3; /* Keep hub on layer 3, above sonar (layer 1) and lines (layer 1) */
        width: 200px; height: 200px;
        border-radius: 24px;
        display: flex; flex-direction: column;
        align-items: center; justify-content: center;
        gap: 12px;
        background: rgba(12, 12, 18, .92);
        border: 2px solid rgba(203, 41, 87, .5);
        box-shadow:
            0 0 34px rgba(203, 41, 87, .28),
            0 0 80px rgba(203, 41, 87, .12),
            inset 0 1px 0 rgba(255, 255, 255, .06);
        backdrop-filter: blur(14px);
        animation: tHubFloat 10s ease-in-out infinite;
        transition: box-shadow .35s ease;
        cursor: default;
    }
    .tskills__hub:hover {
        box-shadow:
            0 0 56px rgba(203, 41, 87, .52),
            0 0 110px rgba(203, 41, 87, .22);
    }
    .tskills__hub svg { width: 36px; height: 36px; color: var(--accent); }
    .tskills__hub-label {
    letter-spacing: .06em;
    color: #fff;
    margin: 0;
    }
}

/* ── Shared: skill cards ── */
.tcategory__cards { display: flex; flex-direction: column; gap: 8px; }
.tskill-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    background: rgba(10, 12, 18, .78);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 12px;
    color: rgba(255, 255, 255, .84);
    font-family: var(--font-body);
    font-size: .88rem;
    font-weight: 500;
    backdrop-filter: blur(6px);
    cursor: default;
    transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.tskill-card svg { width: 17px; height: 17px; color: var(--ts-accent, var(--accent)); flex-shrink: 0; opacity: .85; }
.tskill-card:hover {
    transform: translateX(5px);
    border-color: color-mix(in srgb, var(--ts-accent, var(--accent)) 38%, transparent);
    background: color-mix(in srgb, var(--ts-accent, var(--accent)) 7%, rgba(10, 12, 18, .9));
}

/* Wave-hit glow (class toggled by JS when sonar ring arrives) */
.tcategory__header.wave-pulse {
    border-color: rgba(203, 41, 87, .5) !important;
    box-shadow: 0 0 22px rgba(203, 41, 87, .22), 0 0 0 1px rgba(203, 41, 87, .12) !important;
    transition: border-color 0s, box-shadow 0s !important;
}

/* ── Accordion (mobile only, shown < 768px) ── */
.taccordion__item {
    border-radius: 16px;
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, .08);
    background: rgba(10, 12, 18, .78);
    backdrop-filter: blur(8px);
}
.taccordion__trigger {
    display: flex; align-items: center; gap: 14px;
    width: 100%; padding: 18px 20px;
    background: none; border: none; cursor: pointer;
    text-align: left;
    transition: background .2s ease;
}
.taccordion__trigger:hover { background: rgba(255,255,255,.03); }
.taccordion__title {
    font-family: var(--font-display);
    font-weight: 700; font-size: .95rem; letter-spacing: .06em;
    color: #fff; flex: 1;
}
.taccordion__arrow {
    font-size: .7rem;
    color: rgba(255,255,255,.45);
    transition: transform .3s ease;
}
.taccordion__item.is-open .taccordion__arrow { transform: rotate(180deg); }
.taccordion__body {
    max-height: 0; overflow: hidden;
    transition: max-height .4s cubic-bezier(.4, 0, .2, 1), padding .3s ease;
    padding: 0 16px;
    display: flex; flex-direction: column; gap: 8px;
}
.taccordion__item.is-open .taccordion__body {
    max-height: 520px;
    padding: 4px 16px 16px;
}

/* ── Tablet (768px – 1199px): 2-column card grid, no hub ── */
@media (min-width: 768px) {
    .tskills__net { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
    .tskills__accordion { display: none; }
    .tskills__hub-wrap { display: none; }
    .tskills__lines    { display: none; }
    .tskills__category--engines  { grid-column: 1; }
    .tskills__category--workflows { grid-column: 2; }
    .tskills__category--software {
        grid-column: 1 / 3;
        .tcategory__cards { flex-direction: row; flex-wrap: wrap; gap: 8px; }
    }
}

/* ── Desktop (1200px+): hub-and-node constellation ── */
@media (min-width: 1200px) {
    .tskills__net {
        grid-template-columns: 1fr 260px 1fr;
        grid-template-rows: auto auto;
        grid-template-areas:
            "engines hub workflows"
            "bottom  bottom  bottom";
        gap: 56px 72px;
        align-items: start;
        position: relative;
        min-height: 480px;
    }
    .tskills__hub-wrap {
        display: flex; align-items: center; justify-content: center;
        grid-area: hub;
        position: relative;
        align-self: center;
    }
    .tskills__category--engines  { grid-area: engines;  align-self: center; }
    .tskills__category--workflows { grid-area: workflows; align-self: center; }
    .tskills__category--software {
        grid-area: bottom;
        display: flex; flex-direction: column; align-items: center;
    }
    .tskills__category--software .tcategory__cards {
        display: flex; flex-direction: row; flex-wrap: wrap;
        justify-content: center; gap: 10px;
        max-width: 740px;
    }
    .tskills__category--software .tskill-card { min-width: 200px; }

    /* SVG connection lines (fills entire .tskills__net) */
    .tskills__lines {
        display: none;
        position: absolute; inset: 0;
        width: 100%; height: 100%;
        overflow: visible;
        pointer-events: none;
        z-index: 1;
    }
    .tline {
        fill: none;
        stroke: rgba(203, 41, 87, .28);
        stroke-width: 1.8;
        vector-effect: non-scaling-stroke;
        stroke-linecap: round;
        stroke-dasharray: 1;
        stroke-dashoffset: 1;
        transition: stroke-dashoffset 1.4s cubic-bezier(.4, 0, .2, 1) var(--tld, 0.1s),
                    stroke .3s ease, opacity .3s ease;
    }
    .tskills__net.in .tline { stroke-dashoffset: 0; }

    /* Sonar wrap */
    .tskills__sonar {
        position: absolute;
        left: 50%; top: 50%;
        transform: translate(-50%, -50%);
        width: 0; height: 0;
        pointer-events: none; z-index: 1; /* Bring sonar wrap to layer 1 */
    }
    .sonar-ring {
        position: absolute;
        border: 2px solid rgba(203, 41, 87, .26);
        border-radius: 50%;
        /* linear (constant speed) so the JS glow scheduler — which predicts
           arrival linearly — stays perfectly in sync with the visible ring */
        animation: sonarExpand 8s linear infinite;
        opacity: 0;
        top: 0; left: 0;
        transform: translate(-50%, -50%);
    }
    .sonar-ring--1 { animation-delay: 0s; }
    /* Single wave on screen at a time — rings 2 & 3 disabled (JS SONAR_RINGS = 1) */
    .sonar-ring--2 { display: none; }
    .sonar-ring--3 { display: none; }
    @keyframes sonarExpand {
        0%   { width: 260px; height: 260px; opacity: .9; border-color: rgba(203,41,87,.6); }
        100% { width: 3000px; height: 3000px; opacity: 0;  border-color: rgba(203,41,87,.15); }
    }

    /* Hub card */
    .tskills__hub {
        position: relative; z-index: 3; /* Keep hub on layer 3, above sonar (layer 1) and lines (layer 1) */
        width: 200px; height: 200px;
        border-radius: 24px;
        display: flex; flex-direction: column;
        align-items: center; justify-content: center;
        gap: 12px;
        background: rgba(12, 12, 18, .92);
        border: 2px solid rgba(203, 41, 87, .5);
        box-shadow:
            0 0 34px rgba(203, 41, 87, .28),
            0 0 80px rgba(203, 41, 87, .12),
            inset 0 1px 0 rgba(255, 255, 255, .06);
        backdrop-filter: blur(14px);
        animation: tHubFloat 10s ease-in-out infinite;
        transition: box-shadow .35s ease;
        cursor: default;
    }
    .tskills__hub:hover {
        box-shadow:
            0 0 56px rgba(203, 41, 87, .52),
            0 0 110px rgba(203, 41, 87, .22);
    }
    .tskills__hub svg { width: 36px; height: 36px; color: var(--accent); }
    .tskills__hub-label {
        font-family: var(--font-display);
        font-weight: 700; font-size: .95rem;
        letter-spacing: .08em; text-align: center;
        color: #fff; line-height: 1.35;
    }
    @keyframes tHubFloat {
        0%, 100% { transform: translateY(0);    }
        50%       { transform: translateY(-8px); }
    }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .skillbar__fill, .dskill__fill { transition: none; }
    .sonar-ring { display: none; }
    .tskills__hub { animation: none; }
}

/* ============ EXPANDING REVEAL CARD ============ */
.reveal-card {
    position: relative;
    width: 100%;
    max-width: 280px;
    height: 406px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    margin: 0;
}

@media (max-width: 1024px) {
    .reveal-card { height: 350px; max-width: 260px; }
}

@media (max-width: 768px) {
    .reveal-card { height: 300px; max-width: 100%; }
}

.reveal-card__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 500ms ease;
    transform: scale(1);
}

.reveal-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.15));
    z-index: 2;
}

.reveal-card__panel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%; /* Default height */
    background: rgba(203, 41, 87, 0.90);
    backdrop-filter: blur(8px);
    z-index: 3;
    padding: 16px;
    display: flex;
    flex-direction: column;
    transition: height 350ms ease-out, transform 350ms ease;
    color: #fff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.reveal-card__title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.reveal-card__desc {
    font-family: var(--font-body);
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0;
}

.reveal-card__extra {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 350ms ease, transform 350ms ease;
    margin-top: 12px;
    font-size: 0.8rem;
    line-height: 1.5;
}

.reveal-card__panel-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.reveal-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #000;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 8px 16px;
    border-radius: 999px;
    margin-top: 12px;
    text-decoration: none;
    align-self: flex-start;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.reveal-card__cta .arrow {
    margin-left: 8px;
    transition: transform 0.25s ease;
}

/* Hover States (Desktop) */
@media (hover: hover) {
    .reveal-card:hover .reveal-card__bg {
        transform: scale(1.04);
    }
    .reveal-card:hover .reveal-card__panel {
        height: 70%;
    }
    .reveal-card:hover .reveal-card__extra {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 100ms;
    }
    .reveal-card__cta:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(203, 41, 87, 0.6);
    }
    .reveal-card__cta:hover .arrow {
        transform: translateX(4px);
    }
}

/* Tap Interaction (Mobile) */
@media (hover: none) {
    .reveal-card.is-expanded .reveal-card__bg {
        transform: scale(1.04);
    }
    .reveal-card.is-expanded .reveal-card__panel {
        height: 80%;
    }
    .reveal-card.is-expanded .reveal-card__extra {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 100ms;
    }
}

/* SEO Utilities */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Content Protection */
body {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}
img {
    -webkit-user-drag: none;
    user-drag: none;
}
