/*
 * Cinematic scroll layer — 2026-08-01
 * Isolated after the historical stylesheet so the existing portfolio remains
 * usable without JavaScript and the motion layer can evolve independently.
 */

:root {
    --cinema-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --cinema-ink: #f3f0e8;
    --cinema-void: #030507;
    --cinema-acid: #ccff00;
    --cinema-cyan: #43dfff;
}

html:not(.js) .preloader {
    display: none !important;
}

html.preloader-skip .preloader {
    display: none !important;
}

html:not(.js) .reveal {
    opacity: 1 !important;
    transform: none !important;
}

html.js-failed-open .preloader {
    display: none !important;
}

html.js-failed-open .reveal {
    opacity: 1 !important;
    transform: none !important;
}

html.js-failed-open .hero-left,
html.js-failed-open .hero-right {
    opacity: 1 !important;
    transform: none !important;
}

html.portfolio-ready .js-fallback-projects {
    display: none;
}

html:not(.js) *,
html.js-failed-open * {
    cursor: auto !important;
}

html:not(.js) .cursor,
html:not(.js) .cursor-follower,
html.js-failed-open .cursor,
html.js-failed-open .cursor-follower,
html:not(.js) .burger-menu,
html:not(.js) .fs-menu,
html:not(.js) .story-rail,
html:not(.js) .terminal-form,
html:not(.js) .terminal-suggestions,
html:not(.js) .cinema-direct-open,
html:not(.js) .project-filters,
html:not(.js) .project-results-status,
html:not(.js) .capability-tabs,
html.js-failed-open .burger-menu,
html.js-failed-open .fs-menu,
html.js-failed-open .story-rail,
html.js-failed-open .terminal-form,
html.js-failed-open .terminal-suggestions,
html.js-failed-open .cinema-direct-open,
html.js-failed-open .project-filters,
html.js-failed-open .project-results-status,
html.js-failed-open .capability-tabs {
    display: none !important;
}

.no-js-nav {
    position: relative;
    z-index: 20;
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    width: min(94vw, 760px);
    margin: 90px auto 0;
    padding: 14px 18px;
    border: 1px solid rgba(204, 255, 0, 0.28);
    border-radius: 18px;
    background: rgba(7, 9, 13, 0.92);
}

html:not(.js) .no-js-nav,
html.js-failed-open .no-js-nav {
    display: flex;
}

.no-js-nav a {
    color: var(--cinema-ink);
    font: 600 0.68rem/1.4 "Fira Code", monospace;
    text-decoration: none;
    text-transform: uppercase;
}

.no-js-nav a:focus-visible,
.no-js-nav a:hover {
    color: var(--cinema-acid);
}

.legal-fallback {
    position: relative;
    z-index: 10;
    display: none;
    padding: clamp(72px, 10vw, 120px) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #05070a;
}

html:not(.js) .legal-fallback,
html.js-failed-open .legal-fallback {
    display: block;
}

.legal-fallback h2 {
    margin-bottom: 28px;
    color: var(--cinema-ink);
    font-size: clamp(2.6rem, 6vw, 5rem);
}

.legal-fallback-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.legal-fallback article {
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
}

.legal-fallback h3 {
    margin-bottom: 8px;
    color: var(--cinema-acid);
    font-size: 1.2rem;
}

.legal-fallback p {
    color: rgba(243, 240, 232, 0.68);
}

.legal-fallback a {
    color: var(--cinema-acid);
}

@media (max-width: 700px) {
    .legal-fallback-grid {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------------------------- */
/* Hero / spatial introduction                                                 */
/* -------------------------------------------------------------------------- */

.hero {
    --hero-progress: 0;
    --pointer-x: 0;
    --pointer-y: 0;
    position: relative;
    min-height: 152svh;
    padding: 0;
    overflow: clip;
    isolation: isolate;
    background:
        radial-gradient(circle at 72% 34%, rgba(67, 223, 255, 0.075), transparent 30%),
        radial-gradient(circle at 34% 58%, rgba(204, 255, 0, 0.045), transparent 34%),
        linear-gradient(180deg, #040609 0%, #05070a 72%, #030507 100%);
}

.hero::before {
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.023) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.023) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 88%);
    opacity: calc(0.36 - (var(--hero-progress) * 0.18));
    transform: perspective(900px) rotateX(64deg) scale(1.55) translateY(calc(var(--hero-progress) * -40px));
    transform-origin: center 72%;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    z-index: 8;
    height: 30svh;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, #030507 92%);
}

.cinematic-canvas {
    position: absolute;
    inset: 0 0 auto;
    z-index: -1;
    width: 100%;
    height: 100svh;
    opacity: calc(0.78 - (var(--hero-progress) * 0.4));
    pointer-events: none;
}

.cinematic-vignette {
    position: absolute;
    inset: 0 0 auto;
    z-index: 0;
    width: 100%;
    height: 100svh;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 46%, transparent 28%, rgba(0, 0, 0, 0.45) 100%),
        linear-gradient(90deg, rgba(3, 5, 7, 0.45), transparent 24%, transparent 74%, rgba(3, 5, 7, 0.35));
}

/* -------------------------------------------------------------------------- */
/* Hero entrance — synchronized with the real preloader exit                  */
/* -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
    html.hero-intro-pending body {
        --hero-intro-ease: cubic-bezier(0.16, 1, 0.3, 1);
    }

    html.hero-intro-pending .navbar,
    html.hero-intro-pending .story-rail,
    html.hero-intro-pending .hero-kicker-row,
    html.hero-intro-pending .hero-title-line > span,
    html.hero-intro-pending .hero-intro,
    html.hero-intro-pending .hero-signature,
    html.hero-intro-pending .hero-actions,
    html.hero-intro-pending .hero-facts,
    html.hero-intro-pending .hero-right {
        opacity: 0;
        will-change: transform, opacity;
    }

    html.hero-intro-pending .cinematic-canvas,
    html.hero-intro-pending .cinematic-vignette {
        opacity: 0;
        will-change: transform, opacity;
    }

    html.hero-intro-pending .navbar {
        transform: translate3d(0, -18px, 0) scale(0.99);
    }

    html.hero-intro-pending .story-rail {
        transform: translate3d(14px, -50%, 0);
    }

    html.hero-intro-pending .cinematic-canvas {
        transform: scale(1.035);
    }

    html.hero-intro-pending .cinematic-vignette {
        transform: scale(1.018);
    }

    html.hero-intro-pending .hero-kicker-row {
        transform: translate3d(0, 16px, 0);
    }

    html.hero-intro-pending .hero-title-line > span {
        display: inline-block;
        transform: translate3d(0, 42px, 0);
    }

    html.hero-intro-pending .hero-intro,
    html.hero-intro-pending .hero-signature,
    html.hero-intro-pending .hero-actions,
    html.hero-intro-pending .hero-facts {
        transform: translate3d(0, 24px, 0);
    }

    html.hero-intro-pending .hero-right {
        transform: translate3d(42px, 14px, 0) scale(0.965);
        transform-origin: 46% 50%;
    }

    html.hero-intro-pending .hero.is-terminal-visible .terminal-border-orbit,
    html.hero-intro-pending .terminal-border-orbit,
    html.hero-intro-pending .hero.is-terminal-visible .profile-stage::after,
    html.hero-intro-pending .profile-stage::after {
        animation-play-state: paused !important;
    }

    html.hero-intro-pending.hero-intro-running .navbar,
    html.hero-intro-pending.hero-intro-running .story-rail,
    html.hero-intro-pending.hero-intro-running .cinematic-canvas,
    html.hero-intro-pending.hero-intro-running .cinematic-vignette,
    html.hero-intro-pending.hero-intro-running .hero-kicker-row,
    html.hero-intro-pending.hero-intro-running .hero-title-line > span,
    html.hero-intro-pending.hero-intro-running .hero-intro,
    html.hero-intro-pending.hero-intro-running .hero-signature,
    html.hero-intro-pending.hero-intro-running .hero-actions,
    html.hero-intro-pending.hero-intro-running .hero-facts,
    html.hero-intro-pending.hero-intro-running .hero-right {
        opacity: 1;
        transform: none;
        transition-property: transform, opacity;
        transition-duration: 920ms;
        transition-timing-function: var(--hero-intro-ease);
    }

    html.hero-intro-pending.hero-intro-running .story-rail {
        transform: translateY(-50%);
    }

    html.hero-intro-pending.hero-intro-running .cinematic-canvas,
    html.hero-intro-pending.hero-intro-running .cinematic-vignette {
        transition-duration: 1200ms;
        transition-delay: 0ms;
    }

    html.hero-intro-pending.hero-intro-running .cinematic-canvas {
        opacity: calc(0.78 - (var(--hero-progress) * 0.4));
    }

    html.hero-intro-pending.hero-intro-running .navbar {
        transition-delay: 0ms;
    }

    html.hero-intro-pending.hero-intro-running .hero-kicker-row {
        transition-delay: 70ms;
    }

    html.hero-intro-pending.hero-intro-running .hero-title-line--one > span {
        transition-delay: 130ms;
    }

    html.hero-intro-pending.hero-intro-running .hero-title-line--two > span {
        transition-delay: 215ms;
    }

    html.hero-intro-pending.hero-intro-running .hero-right {
        transition-delay: 175ms;
    }

    html.hero-intro-pending.hero-intro-running .hero-intro {
        transition-delay: 315ms;
    }

    html.hero-intro-pending.hero-intro-running .hero-signature {
        transition-delay: 385ms;
    }

    html.hero-intro-pending.hero-intro-running .hero-actions {
        transition-delay: 455ms;
    }

    html.hero-intro-pending.hero-intro-running .hero-facts,
    html.hero-intro-pending.hero-intro-running .story-rail {
        transition-delay: 525ms;
    }
}

@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
    html.hero-intro-pending .navbar {
        transform: translate3d(0, -12px, 0);
    }

    html.hero-intro-pending .hero-kicker-row {
        transform: translate3d(0, 12px, 0);
    }

    html.hero-intro-pending .hero-title-line > span {
        transform: translate3d(0, 24px, 0);
    }

    html.hero-intro-pending .hero-intro,
    html.hero-intro-pending .hero-signature,
    html.hero-intro-pending .hero-actions,
    html.hero-intro-pending .hero-facts {
        transform: translate3d(0, 16px, 0);
    }

    html.hero-intro-pending .hero-right {
        transform: translate3d(18px, 10px, 0) scale(0.985);
    }

    html.hero-intro-pending.hero-intro-running .navbar,
    html.hero-intro-pending.hero-intro-running .story-rail,
    html.hero-intro-pending.hero-intro-running .hero-kicker-row,
    html.hero-intro-pending.hero-intro-running .hero-title-line > span,
    html.hero-intro-pending.hero-intro-running .hero-intro,
    html.hero-intro-pending.hero-intro-running .hero-signature,
    html.hero-intro-pending.hero-intro-running .hero-actions,
    html.hero-intro-pending.hero-intro-running .hero-facts,
    html.hero-intro-pending.hero-intro-running .hero-right {
        transition-duration: 720ms;
    }

    html.hero-intro-pending.hero-intro-running .hero-right {
        transition-delay: 260ms;
    }

    html.hero-intro-pending.hero-intro-running .hero-intro {
        transition-delay: 280ms;
    }

    html.hero-intro-pending.hero-intro-running .hero-signature {
        transition-delay: 330ms;
    }

    html.hero-intro-pending.hero-intro-running .hero-actions {
        transition-delay: 380ms;
    }

    html.hero-intro-pending.hero-intro-running .hero-facts {
        transition-delay: 430ms;
    }
}

body .hero-grid {
    position: sticky;
    top: 0;
    z-index: 3;
    grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.92fr);
    gap: clamp(32px, 4vw, 82px);
    width: min(94%, 1580px);
    min-height: 100svh;
    padding-top: clamp(116px, 14vh, 154px);
    padding-bottom: clamp(64px, 8vh, 104px);
    align-items: center;
}

.hero-left {
    position: relative;
    z-index: 5;
    transform: translate3d(0, calc(var(--hero-progress) * -52px), 0);
    opacity: calc(1 - (var(--hero-progress) * 0.54));
}

.hero-kicker-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    width: min(100%, 860px);
    margin-bottom: clamp(18px, 2.4vh, 30px);
}

body .hero-title {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 980px;
    margin: 0;
    font-size: clamp(4rem, 6.7vw, 8rem);
    line-height: 0.78;
    letter-spacing: -0.055em;
    text-wrap: balance;
}

.hero-title-line {
    display: block;
    width: max-content;
    max-width: 100%;
    transform-origin: left center;
}

.hero-title-line--one {
    transform: translate3d(calc(var(--hero-progress) * -24px), 0, 0);
}

.hero-title-line--two {
    margin-top: 0.12em;
    transform: translate3d(calc(var(--hero-progress) * 34px), 0, 0);
}

body .hero-title .outline {
    color: transparent;
    -webkit-text-stroke: 1px rgba(243, 240, 232, 0.7);
    text-shadow: none;
}

body .hero-intro {
    max-width: 700px;
    margin-top: clamp(26px, 3.5vh, 42px);
    color: rgba(243, 240, 232, 0.7);
    font-size: clamp(0.98rem, 1.15vw, 1.18rem);
    line-height: 1.72;
}

body .hero-actions {
    margin-top: 28px;
}

.hero-right {
    --orbit-tilt-x: calc(var(--pointer-y) * -4deg);
    --orbit-tilt-y: calc(var(--pointer-x) * 5deg);
    position: relative;
    z-index: 4;
    min-height: min(660px, 72svh);
    perspective: 1600px;
    transform-style: preserve-3d;
}

.project-orbit {
    position: absolute;
    inset: -7% -14%;
    z-index: 0;
    transform: rotateX(var(--orbit-tilt-x)) rotateY(var(--orbit-tilt-y));
    transform-style: preserve-3d;
    pointer-events: none;
}

.orbit-axis {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    opacity: 0.28;
    background: linear-gradient(90deg, transparent, rgba(67, 223, 255, 0.7), transparent);
    transform-origin: center;
}

.orbit-axis--x {
    width: 108%;
    height: 1px;
    transform: translate(-50%, -50%) rotate(-8deg);
}

.orbit-axis--y {
    width: 82%;
    height: 1px;
    transform: translate(-50%, -50%) rotate(78deg);
}

.orbit-card {
    position: absolute;
    z-index: 1;
    width: clamp(142px, 13vw, 220px);
    aspect-ratio: 1.5;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.19);
    border-radius: 14px;
    opacity: calc(0.72 + (var(--hero-progress) * 0.25));
    background: #080b0f;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    transform-style: preserve-3d;
}

.orbit-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, transparent 48%, rgba(3, 5, 7, 0.86));
}

.orbit-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.orbit-card figcaption {
    position: absolute;
    right: 10px;
    bottom: 9px;
    left: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #fff;
    font: 600 0.64rem/1 "Space Grotesk", sans-serif;
    letter-spacing: 0.04em;
}

.orbit-card figcaption span {
    color: var(--cinema-acid);
    font: 500 0.52rem/1 "Fira Code", monospace;
    letter-spacing: 0.1em;
}

.orbit-card--wheello {
    top: 2%;
    left: 3%;
    transform: translate3d(
        calc((var(--hero-progress) * -76px) + (var(--pointer-x) * -8px)),
        calc((var(--hero-progress) * -34px) + (var(--pointer-y) * -6px)),
        40px
    ) rotate(-7deg) rotateY(8deg);
}

.orbit-card--jessica {
    top: 10%;
    right: 0;
    transform: translate3d(
        calc((var(--hero-progress) * 92px) + (var(--pointer-x) * 10px)),
        calc((var(--hero-progress) * -48px) + (var(--pointer-y) * 8px)),
        -60px
    ) rotate(7deg) rotateY(-10deg);
}

.orbit-card--streamcorner {
    right: 4%;
    bottom: 7%;
    transform: translate3d(
        calc((var(--hero-progress) * 84px) + (var(--pointer-x) * 7px)),
        calc((var(--hero-progress) * 52px) + (var(--pointer-y) * 10px)),
        70px
    ) rotate(-5deg) rotateY(-7deg);
}

.orbit-card--revaloop {
    bottom: 2%;
    left: 0;
    transform: translate3d(
        calc((var(--hero-progress) * -88px) + (var(--pointer-x) * -12px)),
        calc((var(--hero-progress) * 62px) + (var(--pointer-y) * -8px)),
        -30px
    ) rotate(6deg) rotateY(9deg);
}

body .hero-right .profile-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    width: min(88%, 620px);
    transform: translate3d(
        calc(-50% + (var(--pointer-x) * 7px)),
        calc(-50% + (var(--pointer-y) * 5px) + (var(--hero-progress) * -26px)),
        calc(90px + (var(--hero-progress) * 80px))
    ) rotateX(calc(var(--pointer-y) * -1.7deg)) rotateY(calc(var(--pointer-x) * 2deg)) scale(calc(1 - (var(--hero-progress) * 0.055)));
    transform-style: preserve-3d;
}

body .hero-right > .command-grid {
    position: absolute;
    right: 6%;
    bottom: 1%;
    left: 6%;
    z-index: 4;
    opacity: calc(1 - (var(--hero-progress) * 1.35));
    transform: translate3d(0, calc(var(--hero-progress) * 38px), 120px);
}

/* -------------------------------------------------------------------------- */
/* Project cinema / pinned scroll chapter                                      */
/* -------------------------------------------------------------------------- */

.cinematic-projects {
    --cinema-rgb: 67, 223, 255;
    position: relative;
    padding-top: 0;
    overflow: clip;
    background: #030507;
}

.cinema-skip {
    position: fixed;
    top: -120px;
    left: 50%;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    color: rgba(243, 240, 232, 0.58);
    background: rgba(8, 11, 15, 0.74);
    font: 500 0.59rem/1 "Fira Code", monospace;
    letter-spacing: 0.08em;
    text-decoration: none;
    transform: translateX(-50%);
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.cinema-skip:hover,
.cinema-skip:focus-visible {
    top: 96px;
    border-color: var(--cinema-cyan);
    color: #05070a;
    background: var(--cinema-cyan);
    outline: none;
}

.project-cinema {
    position: relative;
    z-index: 1;
    padding: clamp(80px, 10vw, 150px) 4vw;
    color: var(--cinema-ink);
}

.cinema-sticky {
    position: relative;
    min-height: 900px;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(circle at 65% 50%, rgba(var(--cinema-rgb), 0.09), transparent 34%),
        linear-gradient(160deg, #05070a, #020304 75%);
}

.cinema-ambient,
.cinema-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cinema-ambient {
    overflow: hidden;
}

.cinema-grid {
    opacity: 0.23;
    background:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(circle at center, #000, transparent 78%);
    transform: perspective(850px) rotateX(62deg) scale(1.5) translateY(22%);
    transform-origin: center bottom;
}

.cinema-orb {
    position: absolute;
    display: block;
    width: 36vw;
    aspect-ratio: 1;
    border-radius: 50%;
    opacity: 0.2;
    background: radial-gradient(circle, rgba(var(--cinema-rgb), 0.34), rgba(var(--cinema-rgb), 0.12) 38%, transparent 72%);
}

.cinema-orb--one {
    top: -20%;
    right: -8%;
}

.cinema-orb--two {
    bottom: -31%;
    left: -12%;
    opacity: 0.08;
}

.cinema-heading {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    width: min(92%, 1480px);
    margin: 0 auto 52px;
    padding-top: 48px;
}

.cinema-heading > p {
    margin: 8px 0 0;
    color: rgba(243, 240, 232, 0.48);
    font: 500 0.69rem/1 "Fira Code", monospace;
    letter-spacing: 0.12em;
}

.cinema-heading > p span {
    color: rgb(var(--cinema-rgb));
}

.cinema-heading h2 {
    max-width: 900px;
    margin: 0;
    color: var(--cinema-ink);
    font: 500 clamp(3.2rem, 6.7vw, 7.7rem)/0.84 "Oswald", sans-serif;
    letter-spacing: -0.045em;
    text-align: right;
}

.cinema-heading h2 em {
    color: transparent;
    font-style: normal;
    -webkit-text-stroke: 1px rgba(243, 240, 232, 0.46);
}

.cinema-stage {
    position: relative;
    z-index: 4;
    display: grid;
    gap: 28px;
    width: min(92%, 1240px);
    margin: 0 auto;
}

.cinema-card {
    position: relative;
    min-height: 560px;
    margin: 0;
    border-radius: 26px;
    background: #090c10;
}

.cinema-card-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.72fr);
    height: 100%;
    min-height: inherit;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: inherit;
    background:
        linear-gradient(135deg, rgba(var(--card-rgb), 0.09), transparent 28%),
        rgba(8, 11, 15, 0.94);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cinema-card.is-front .cinema-card-shell {
    box-shadow: 0 34px 88px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.cinema-card-shell::before {
    content: none;
    position: absolute;
    inset: 0;
    z-index: 5;
    border-radius: inherit;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.08) 50%, transparent 66%);
    pointer-events: none;
    transform: translateX(-120%);
    transition: transform 1.1s var(--cinema-ease);
}

.cinema-card-media {
    position: relative;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    background: #030507;
}

.cinema-card-media picture {
    display: block;
    width: 100%;
    height: 100%;
}

.cinema-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 70%, #080b0f 100%),
        linear-gradient(180deg, transparent 68%, rgba(3, 5, 7, 0.72));
    pointer-events: none;
}

.cinema-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(var(--card-image-scale, 1.05)) translate3d(var(--card-image-x, 0), 0, 0);
}

.cinema-media-scan {
    position: absolute;
    inset: -30% 0 auto;
    z-index: 2;
    height: 18%;
    opacity: 0.42;
    background: linear-gradient(to bottom, transparent, rgba(var(--card-rgb), 0.2), transparent);
    animation: cinema-scan 5.8s linear infinite;
}

.cinema-card-copy {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
    min-width: 0;
    padding: clamp(32px, 4vw, 64px);
    opacity: var(--card-copy-opacity, 1);
    transform: translate3d(0, var(--card-copy-y, 0), 0);
}

.cinema-card-copy::before {
    content: "";
    width: 58px;
    height: 2px;
    background: var(--card-accent);
    box-shadow: 0 0 18px rgba(var(--card-rgb), 0.58);
}

.cinema-card-index {
    margin: 0;
    color: var(--card-accent);
    font: 500 0.67rem/1 "Fira Code", monospace;
    letter-spacing: 0.14em;
}

.cinema-card-copy h3 {
    margin: 0;
    color: #fff;
    font: 600 clamp(2.8rem, 3.55vw, 4.6rem)/0.84 "Oswald", sans-serif;
    letter-spacing: -0.045em;
    white-space: nowrap;
}

.cinema-card-copy > p:not(.cinema-card-index) {
    max-width: 430px;
    margin: 0;
    color: rgba(243, 240, 232, 0.68);
    font-size: clamp(0.94rem, 1.1vw, 1.08rem);
    line-height: 1.65;
}

.cinema-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cinema-card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: rgba(243, 240, 232, 0.56);
    background: rgba(255, 255, 255, 0.025);
    font: 500 0.58rem/1 "Fira Code", monospace;
    letter-spacing: 0.08em;
}

@keyframes projectCtaOrbit {
    to {
        transform: translate(-50%, -50%) rotate(1turn);
    }
}

.project-cta {
    --cta-accent: var(--project-accent, var(--cinema-acid));
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-color: color-mix(in srgb, var(--cta-accent) 30%, transparent) !important;
    background: rgba(10, 14, 19, 0.94) !important;
    color: var(--cinema-ink) !important;
    box-shadow: none !important;
}

.project-cta::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 0;
    width: calc(100% + 96px);
    aspect-ratio: 1;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    background: conic-gradient(
        transparent 0 68%,
        color-mix(in srgb, var(--cta-accent) 54%, white) 78%,
        var(--cta-accent) 85%,
        transparent 95%
    );
    transform: translate(-50%, -50%) rotate(0turn);
}

.project-cta::after {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: 0;
    border-radius: inherit;
    background: #0a0e13;
    pointer-events: none;
}

.project-cta > * {
    position: relative;
    z-index: 1;
}

.project-cta:hover,
.project-cta:focus-visible {
    border-color: color-mix(in srgb, var(--cta-accent) 18%, transparent) !important;
    background: rgba(10, 14, 19, 0.98) !important;
    color: #fff !important;
    box-shadow: none !important;
    transform: none !important;
}

.project-cta:focus-visible {
    outline: 2px solid var(--cta-accent);
    outline-offset: 4px;
}

.project-cta:focus-visible::before {
    opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
    .project-cta:hover::before {
        opacity: 1;
        animation: projectCtaOrbit 1.15s linear infinite;
        will-change: transform;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-cta:hover::before,
    .project-cta:focus-visible::before {
        opacity: 1;
        animation: none !important;
    }
}

.project-card .project-cta,
.project-modal-wrap .project-cta {
    --cta-accent: var(--project-accent, var(--cinema-acid));
}

.hero-actions .project-cta {
    --cta-accent: var(--cinema-acid);
}

.cinema-open {
    --cta-accent: var(--card-accent);
    position: relative;
    z-index: 8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid rgba(var(--card-rgb), 0.3);
    border-radius: 999px;
    color: var(--cinema-ink);
    background: rgba(10, 14, 19, 0.94);
    font: 600 0.7rem/1 "Space Grotesk", sans-serif;
    letter-spacing: 0.04em;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.35s ease, background 0.35s ease, border-color 0.35s ease, transform 0.35s var(--cinema-ease);
}

.cinema-open:hover,
.cinema-open:focus-visible {
    border-color: rgba(var(--card-rgb), 0.18);
    color: #fff;
    background: rgba(10, 14, 19, 0.98);
    transform: none;
}

.cinema-controls,
.cinema-scroll-hint {
    display: none;
}

html.cinematic-ready .project-cinema {
    height: 520svh;
    padding: 0;
}

html.cinematic-ready .cinema-sticky {
    position: sticky;
    top: 0;
    height: 100svh;
    min-height: 0;
}

html.cinematic-ready .cinema-heading {
    position: absolute;
    inset: clamp(52px, 7vh, 78px) 0 auto;
    align-items: flex-start;
    margin: 0 auto;
    padding: 0;
    opacity: calc(0.78 - (var(--cinema-progress, 0) * 0.38));
    transform: translate3d(0, calc(var(--cinema-progress, 0) * -34px), 0);
}

html.cinematic-ready .cinema-heading h2 {
    opacity: 0.13;
    font-size: clamp(5rem, 9vw, 10rem);
    line-height: 0.78;
}

html.cinematic-ready .cinema-stage {
    position: absolute;
    inset: clamp(122px, 15vh, 162px) 4vw clamp(82px, 10vh, 108px);
    display: block;
    width: auto;
    margin: 0;
    perspective: 1900px;
    pointer-events: none;
    transform-style: preserve-3d;
}

html.cinematic-ready .cinema-card {
    --card-x: 0px;
    --card-y: 0px;
    --card-z: 0px;
    --card-rotate-x: 0deg;
    --card-rotate-y: 0deg;
    --card-rotate-z: 0deg;
    --card-scale: 1;
    --card-opacity: 1;
    --card-z-index: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: var(--card-z-index);
    width: min(77vw, 1240px);
    height: min(64vh, 680px);
    min-height: 0;
    opacity: var(--card-opacity);
    transform: translate3d(
        calc(-50% + var(--card-x)),
        calc(-50% + var(--card-y)),
        var(--card-z)
    ) rotateX(var(--card-rotate-x)) rotateY(var(--card-rotate-y)) rotateZ(var(--card-rotate-z)) scale(var(--card-scale));
    transform-style: preserve-3d;
    transform-origin: center;
}

html.cinematic-ready .cinema-card::before,
html.cinematic-ready .cinema-card::after {
    content: "";
    position: absolute;
    inset: 14px -14px -14px 14px;
    z-index: -1;
    border: 1px solid rgba(var(--card-rgb), 0.13);
    border-radius: 28px;
    background: rgba(6, 8, 11, 0.72);
    transform: translateZ(-42px);
}

html.cinematic-ready .cinema-card::after {
    inset: 28px -28px -28px 28px;
    opacity: 0.48;
    transform: translateZ(-86px);
}

html.cinematic-ready .cinema-card-shell {
    min-height: 0;
}

html.cinematic-ready .cinema-controls {
    position: absolute;
    right: 4vw;
    bottom: 28px;
    left: 4vw;
    z-index: 20;
    display: grid;
    grid-template-columns: auto minmax(140px, 300px) minmax(180px, 1fr) auto;
    align-items: center;
    gap: 18px;
    color: rgba(243, 240, 232, 0.54);
    font: 500 0.61rem/1 "Fira Code", monospace;
    letter-spacing: 0.1em;
}

.cinema-controls p {
    margin: 0;
}

.cinema-controls p:first-child span {
    color: rgb(var(--cinema-rgb));
}

.cinema-controls #cinema-status {
    justify-self: end;
    text-align: right;
}

.cinema-direct-open {
    --cta-accent: rgb(var(--cinema-rgb));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 17px;
    border: 1px solid rgba(var(--cinema-rgb), 0.3);
    border-radius: 999px;
    color: var(--cinema-ink);
    background: rgba(10, 14, 19, 0.94);
    box-shadow: none;
    font: 700 0.68rem/1 "Space Grotesk", sans-serif;
    letter-spacing: 0.04em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 220ms var(--cinema-ease), box-shadow 220ms ease;
}

.cinema-direct-open:hover,
.cinema-direct-open:focus-visible {
    box-shadow: none;
    transform: none;
}

.cinema-progress {
    height: 2px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

.cinema-progress i {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(var(--cinema-progress, 0));
    transform-origin: left;
    background: rgb(var(--cinema-rgb));
    box-shadow: 0 0 16px rgba(var(--cinema-rgb), 0.62);
}

html.cinematic-ready .cinema-scroll-hint {
    position: absolute;
    top: 50%;
    right: 14px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: rgba(243, 240, 232, 0.37);
    font: 500 0.56rem/1 "Fira Code", monospace;
    letter-spacing: 0.13em;
    transform: translateY(-50%) rotate(90deg) translateX(50%);
    transform-origin: right center;
}

.cinema-scroll-hint span {
    width: 44px;
    height: 1px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
}

.cinema-scroll-hint span::after {
    content: "";
    display: block;
    width: 45%;
    height: 100%;
    background: rgb(var(--cinema-rgb));
    animation: cinema-hint 1.8s ease-in-out infinite;
}

.cinematic-projects > .container {
    position: relative;
    z-index: 2;
    padding-top: clamp(100px, 12vw, 190px);
    padding-bottom: clamp(80px, 10vw, 150px);
}

.cinematic-projects > .container::before {
    content: "ALL PROJECTS";
    display: block;
    margin-bottom: 24px;
    color: rgba(243, 240, 232, 0.38);
    font: 500 0.65rem/1 "Fira Code", monospace;
    letter-spacing: 0.16em;
}

.no-js-projects {
    margin-top: 36px;
    padding: clamp(28px, 4vw, 52px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.035);
}

.no-js-projects h3 {
    margin: 0 0 24px;
    font: 600 clamp(2rem, 4vw, 4rem)/1 "Oswald", sans-serif;
}

.no-js-projects ul {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.no-js-projects li,
.no-js-projects p {
    color: rgba(243, 240, 232, 0.68);
    line-height: 1.6;
}

.no-js-projects strong {
    color: var(--cinema-ink);
}

.no-js-projects a {
    text-decoration-color: rgba(204, 255, 0, 0.52);
    text-underline-offset: 4px;
}

.no-js-projects a:hover strong,
.no-js-projects a:focus-visible strong {
    color: var(--cinema-acid);
}

/* -------------------------------------------------------------------------- */
/* Technology watch portal                                                     */
/* -------------------------------------------------------------------------- */

.watch-portal {
    --watch-violet: #9b7cff;
    --watch-violet-rgb: 155, 124, 255;
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.75fr);
    grid-template-areas:
        "copy radar"
        "link radar";
    align-items: center;
    gap: 28px 48px;
    min-height: 430px;
    margin-top: clamp(88px, 11vw, 150px);
    padding: clamp(34px, 5vw, 72px);
    overflow: hidden;
    border: 1px solid rgba(var(--watch-violet-rgb), 0.3);
    border-radius: 30px;
    background:
        radial-gradient(circle at 84% 48%, rgba(var(--watch-violet-rgb), 0.13), transparent 31%),
        radial-gradient(circle at 8% 92%, rgba(var(--watch-violet-rgb), 0.075), transparent 34%),
        linear-gradient(145deg, rgba(12, 15, 22, 0.98), rgba(4, 6, 10, 0.98));
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(205, 195, 255, 0.08);
}

.watch-portal::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: 0.22;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(90deg, #000, transparent 88%);
}

.watch-portal::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    z-index: 4;
    height: 2px;
    background: linear-gradient(90deg, rgba(var(--watch-violet-rgb), 0.22), var(--watch-violet) 54%, transparent);
}

.watch-portal-copy {
    grid-area: copy;
    position: relative;
    z-index: 2;
    max-width: 780px;
}

.watch-portal h3 {
    margin: 0;
    color: var(--cinema-ink);
    font: 600 clamp(2.7rem, 5vw, 6.2rem)/0.92 "Oswald", sans-serif;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.watch-portal h3 em {
    color: transparent;
    font-style: normal;
    -webkit-text-stroke: 1px rgba(var(--watch-violet-rgb), 0.72);
}

.watch-portal-intro {
    max-width: 690px;
    margin: 26px 0 0;
    color: rgba(243, 240, 232, 0.67);
    font-size: clamp(0.94rem, 1.1vw, 1.08rem);
    line-height: 1.7;
}

.watch-portal-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.watch-portal-topics li {
    display: inline-flex;
    align-items: center;
    min-height: 31px;
    padding: 0 11px;
    border: 1px solid rgba(var(--watch-violet-rgb), 0.17);
    border-radius: 999px;
    color: rgba(243, 240, 232, 0.6);
    background: rgba(var(--watch-violet-rgb), 0.035);
    font: 500 0.59rem/1 "Fira Code", monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.watch-portal-radar {
    grid-area: radar;
    position: relative;
    isolation: isolate;
    justify-self: end;
    width: min(27vw, 340px);
    min-width: 250px;
    aspect-ratio: 1;
    contain: paint;
    overflow: hidden;
    border: 1px solid rgba(var(--watch-violet-rgb), 0.3);
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(var(--watch-violet-rgb), 0.12), transparent 58%),
        rgba(3, 5, 9, 0.72);
    box-shadow: inset 0 0 70px rgba(var(--watch-violet-rgb), 0.08), 0 0 0 16px rgba(var(--watch-violet-rgb), 0.018);
}

.watch-radar-sweep,
.watch-radar-ring,
.watch-radar-cross,
.watch-portal-radar b {
    position: absolute;
}

.watch-radar-sweep {
    inset: 4%;
    z-index: 1;
    border-radius: 50%;
    pointer-events: none;
    background: conic-gradient(
        from 0deg,
        transparent 0 309deg,
        rgba(var(--watch-violet-rgb), 0.03) 324deg,
        rgba(var(--watch-violet-rgb), 0.4) 355deg,
        transparent 360deg
    );
    animation: watch-radar-sweep 4.8s linear infinite paused;
    will-change: transform;
}

.watch-portal.is-radar-active .watch-radar-sweep {
    animation-play-state: running;
}

.watch-radar-ring {
    z-index: 2;
    inset: 50%;
    border: 1px solid rgba(var(--watch-violet-rgb), 0.22);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.watch-radar-ring--one { width: 32%; aspect-ratio: 1; }
.watch-radar-ring--two { width: 62%; aspect-ratio: 1; }
.watch-radar-ring--three { width: 90%; aspect-ratio: 1; }

.watch-radar-cross {
    z-index: 2;
    top: 50%;
    left: 50%;
    opacity: 0.42;
    background: rgba(var(--watch-violet-rgb), 0.24);
    transform: translate(-50%, -50%);
}

.watch-radar-cross--x { width: 90%; height: 1px; }
.watch-radar-cross--y { width: 1px; height: 90%; }

.watch-portal-radar b {
    z-index: 3;
    top: 31%;
    right: 28%;
    width: 11px;
    height: 11px;
    border: 2px solid #05070a;
    border-radius: 50%;
    background: var(--watch-violet);
    box-shadow: 0 0 0 7px rgba(var(--watch-violet-rgb), 0.12), 0 0 18px rgba(var(--watch-violet-rgb), 0.78);
}

.watch-portal-radar b::after {
    content: "";
    position: absolute;
    inset: -7px;
    border: 1px solid rgba(var(--watch-violet-rgb), 0.82);
    border-radius: 50%;
    opacity: 0;
    animation: watch-radar-signal 2.6s ease-out infinite paused;
}

.watch-portal.is-radar-active .watch-portal-radar b::after {
    animation-play-state: running;
}

.watch-portal-link {
    grid-area: link;
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    width: min(100%, 520px);
    min-height: 64px;
    padding: 9px 12px 9px 20px;
    overflow: hidden;
    border: 1px solid rgba(var(--watch-violet-rgb), 0.4);
    border-radius: 999px;
    color: var(--cinema-ink);
    background: rgba(7, 9, 14, 0.84);
    text-decoration: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), 0 14px 40px rgba(0, 0, 0, 0.14);
    transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.watch-portal-link strong {
    font: 700 0.86rem/1.25 "Space Grotesk", sans-serif;
}

.watch-portal-link > i {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(var(--watch-violet-rgb), 0.48);
    color: #eee9ff;
    background: rgba(var(--watch-violet-rgb), 0.16);
    box-shadow: 0 0 20px rgba(var(--watch-violet-rgb), 0.12);
    transform: translate3d(var(--watch-arrow-x, 0px), var(--watch-arrow-y, 0px), 0) rotate(-18deg);
    transition: transform 260ms var(--cinema-ease);
    will-change: transform;
}

.watch-portal-link.is-arrow-tracking > i {
    transition-duration: 80ms;
    transition-timing-function: linear;
}

.watch-portal-link:hover,
.watch-portal-link:focus-visible {
    border-color: rgba(var(--watch-violet-rgb), 0.74);
    background: rgba(var(--watch-violet-rgb), 0.085);
    outline: 2px solid var(--watch-violet);
    outline-offset: 4px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 18px 48px rgba(0, 0, 0, 0.2);
}

.watch-portal-link:hover > i,
.watch-portal-link:focus-visible > i {
    transform: translate3d(var(--watch-arrow-x, 0px), var(--watch-arrow-y, 0px), 0) rotate(0deg);
}

/* -------------------------------------------------------------------------- */
/* Motion                                                                      */
/* -------------------------------------------------------------------------- */

@keyframes cinema-status-pulse {
    0%, 100% { opacity: 0.44; transform: scale(0.78); }
    50% { opacity: 1; transform: scale(1); }
}

@keyframes cinema-scan {
    0% { transform: translateY(-120%); }
    68%, 100% { transform: translateY(850%); }
}

@keyframes cinema-hint {
    0% { transform: translateX(-110%); }
    70%, 100% { transform: translateX(250%); }
}

@keyframes watch-radar-sweep {
    to { transform: rotate(1turn); }
}

@keyframes watch-radar-signal {
    0%, 28% { opacity: 0; transform: scale(0.4); }
    36% { opacity: 0.92; }
    100% { opacity: 0; transform: scale(2.35); }
}

/* Responsive                                                                  */
/* -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
    body .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
        gap: 28px;
        width: min(94%, 1240px);
    }

    body .hero-title {
        font-size: clamp(3.7rem, 6.8vw, 6.4rem);
    }

    .hero-right {
        min-height: 600px;
    }

    .orbit-card {
        width: clamp(128px, 14vw, 176px);
    }

    html.cinematic-ready .cinema-card {
        width: min(84vw, 1100px);
    }
}

@media (max-width: 1180px) {
    .hero {
        min-height: auto;
        padding-bottom: 68px;
        overflow: hidden;
    }

    body .hero-grid {
        position: relative;
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 124px;
        padding-bottom: 24px;
    }

    .hero-left {
        transform: none;
        opacity: 1;
    }

    body .hero-title {
        max-width: 820px;
        font-size: clamp(4rem, 11.8vw, 7rem);
    }

    body .hero-intro {
        max-width: 680px;
    }

    .hero-right {
        min-height: 620px;
        margin-top: 24px;
    }

    body .hero-right .profile-stage {
        width: min(78%, 580px);
        transform: translate(-50%, -50%);
    }

    body .hero-right > .command-grid {
        right: 11%;
        left: 11%;
        opacity: 1;
        transform: none;
    }

    html.cinematic-ready .project-cinema,
    .project-cinema {
        height: auto;
        padding: 90px 4vw;
    }

    html.cinematic-ready .cinema-sticky,
    .cinema-sticky {
        position: relative;
        height: auto;
        min-height: 0;
        overflow: visible;
        border: 0;
        background: transparent;
    }

    html.cinematic-ready .cinema-heading,
    .cinema-heading {
        position: relative;
        inset: auto;
        width: 100%;
        margin: 0 0 58px;
        padding: 0;
        opacity: 1;
        transform: none;
    }

    html.cinematic-ready .cinema-heading h2,
    .cinema-heading h2 {
        opacity: 1;
        font-size: clamp(3.4rem, 9vw, 6.4rem);
    }

    html.cinematic-ready .cinema-stage,
    .cinema-stage {
        position: relative;
        inset: auto;
        display: grid;
        gap: 28px;
        width: 100%;
        perspective: none;
    }

    html:not(.cinematic-ready) .cinema-card {
        position: relative;
        top: auto;
        left: auto;
        z-index: auto;
        width: 100%;
        height: auto;
        min-height: 520px;
        opacity: 1;
        transform: none !important;
        will-change: auto;
    }

    .project-orbit,
    .orbit-card,
    .cinema-card-media img,
    .cinema-card-copy {
        will-change: auto;
    }

    html.cinematic-ready .cinema-card::before,
    html.cinematic-ready .cinema-card::after {
        display: none;
    }

    .cinema-card-shell {
        grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    }

    html.cinematic-ready .cinema-controls,
    html.cinematic-ready .cinema-scroll-hint {
        display: none;
    }

    .cinema-ambient {
        display: none;
    }
}

@media (max-width: 700px) {
    body .hero-grid {
        width: min(91%, 680px);
        padding-top: 108px;
    }

    .hero-kicker-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    body .hero-title {
        font-size: clamp(3.15rem, 15vw, 5.5rem);
        line-height: 0.82;
        letter-spacing: -0.045em;
    }

    body .hero-intro {
        margin-top: 24px;
        font-size: 0.94rem;
        line-height: 1.62;
    }

    body .hero-actions {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    body .hero-actions .btn-simple {
        display: inline-flex !important;
        width: 100%;
        justify-content: center;
    }

    .hero-right {
        min-height: 510px;
        margin-top: 12px;
    }

    body .hero-right .profile-stage {
        top: 46%;
        width: min(88%, 460px);
    }

    body .hero-right > .command-grid {
        right: 3%;
        bottom: -1%;
        left: 3%;
    }

    .project-orbit {
        inset: -2% -5%;
    }

    .orbit-card {
        width: clamp(102px, 29vw, 148px);
        border-radius: 10px;
    }

    .orbit-card--wheello {
        top: 2%;
        left: 0;
    }

    .orbit-card--jessica {
        top: 4%;
        right: -1%;
    }

    .orbit-card--streamcorner {
        right: 0;
        bottom: 10%;
    }

    .orbit-card--revaloop {
        bottom: 8%;
        left: -1%;
    }

    .orbit-card figcaption {
        right: 7px;
        bottom: 6px;
        left: 7px;
        font-size: 0.49rem;
    }

    .orbit-card figcaption span {
        display: none;
    }

    html.cinematic-ready .project-cinema,
    .project-cinema {
        padding: 76px 4.5vw;
    }

    .cinema-heading {
        display: block;
        margin-bottom: 42px;
    }

    .cinema-heading > p {
        margin-bottom: 20px;
    }

    html.cinematic-ready .cinema-heading h2,
    .cinema-heading h2 {
        font-size: clamp(3.1rem, 15vw, 5rem);
        text-align: left;
    }

    html.cinematic-ready .cinema-card,
    .cinema-card {
        min-height: 0;
        border-radius: 20px;
    }

    html.cinematic-ready .cinema-stage,
    .cinema-stage {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: min(86vw, 430px);
        grid-template-columns: none;
        gap: 14px;
        width: calc(100vw - 4.5vw);
        margin-right: -4.5vw;
        padding: 0 4.5vw 20px 0;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline mandatory;
        scrollbar-width: thin;
        scrollbar-color: rgba(67, 223, 255, 0.45) rgba(255, 255, 255, 0.05);
    }

    html.cinematic-ready .cinema-card,
    .cinema-card {
        scroll-snap-align: start;
    }

    .cinema-card-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .cinema-card-media {
        min-height: clamp(250px, 68vw, 390px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .cinema-card-media::after {
        background: linear-gradient(180deg, transparent 62%, #080b0f 100%);
    }

    .cinema-card-copy {
        gap: 18px;
        padding: 30px 24px 32px;
        opacity: 1;
        transform: none;
    }

    .cinema-card-copy h3 {
        font-size: clamp(3rem, 15vw, 5.2rem);
        white-space: normal;
    }

    .cinema-open {
        width: 100%;
    }

    .cinematic-projects > .container {
        padding-top: 90px;
    }
}

/* Compact scrollytelling: vertical, tactile and compositor-only. */
@media (prefers-reduced-motion: no-preference) {
    html.cinematic-ready.cinematic-compact body {
        overflow-x: clip;
    }

    html.cinematic-ready.cinematic-compact .cinematic-projects {
        overflow: visible;
    }

    html.cinematic-ready.cinematic-compact .project-cinema {
        height: 440vh;
        height: 440svh;
        padding: 0;
    }

    html.cinematic-ready.cinematic-compact .cinema-sticky {
        position: sticky;
        top: 0;
        height: 100vh;
        height: 100svh;
        min-height: 0;
        overflow: clip;
        border-top: 1px solid rgba(255, 255, 255, 0.09);
        border-bottom: 1px solid rgba(255, 255, 255, 0.09);
        background:
            radial-gradient(circle at 72% 42%, rgba(var(--cinema-rgb), 0.1), transparent 33%),
            linear-gradient(160deg, #05070a, #020304 75%);
    }

    html.cinematic-ready.cinematic-compact .cinema-ambient {
        display: block;
        opacity: 0.72;
    }

    html.cinematic-ready.cinematic-compact .cinema-heading {
        position: absolute;
        inset: max(72px, calc(env(safe-area-inset-top) + 54px)) 16px auto;
        z-index: 12;
        display: flex;
        align-items: flex-start;
        width: auto;
        margin: 0;
        padding: 0;
        pointer-events: none;
    }

    html.cinematic-ready.cinematic-compact .cinema-heading h2 {
        opacity: 0.15;
        font-size: clamp(3.2rem, 12vw, 7rem);
        text-align: right;
    }

    html.cinematic-ready.cinematic-compact .cinema-stage {
        position: absolute;
        inset: clamp(132px, 18vh, 166px) 14px clamp(68px, 9vh, 84px);
        inset: clamp(132px, 18svh, 166px) 14px clamp(68px, 9svh, 84px);
        display: block;
        width: auto;
        margin: 0;
        padding: 0;
        overflow: visible;
        perspective: 1200px;
        pointer-events: none;
        touch-action: pan-y pinch-zoom;
        overscroll-behavior-inline: auto;
        scroll-snap-type: none;
    }

    html.cinematic-ready.cinematic-compact .cinema-card {
        position: absolute;
        top: 50%;
        left: 50%;
        width: min(calc(100vw - 28px), 840px);
        height: min(68vh, 650px);
        height: min(68svh, 650px);
        min-height: 0;
        margin: 0;
        scroll-snap-align: none;
        transform-style: preserve-3d;
        transform-origin: center;
        will-change: transform, opacity;
    }

    html.cinematic-ready.cinematic-compact .cinema-card.is-front {
        pointer-events: auto;
    }

    html.cinematic-ready.cinematic-compact .cinema-card::before,
    html.cinematic-ready.cinematic-compact .cinema-card::after {
        display: none;
    }

    html.cinematic-ready.cinematic-compact .cinema-card-shell {
        height: 100%;
        min-height: 0;
    }

    html.cinematic-ready.cinematic-compact .cinema-media-scan,
    html.cinematic-ready.cinematic-compact .cinema-scroll-hint {
        display: none;
    }

    html.cinematic-ready.cinematic-compact .cinema-controls {
        position: absolute;
        right: 14px;
        bottom: max(12px, env(safe-area-inset-bottom));
        left: 14px;
        z-index: 24;
        display: grid;
        grid-template-columns: auto minmax(56px, 1fr) auto;
        align-items: center;
        gap: 12px;
    }

    html.cinematic-ready.cinematic-compact .cinema-controls #cinema-status {
        display: none;
    }

    html.cinematic-ready.cinematic-compact .cinema-direct-open {
        display: inline-flex;
        min-height: 44px;
        padding-inline: 15px;
    }
}

@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
    html.cinematic-ready.cinematic-compact .cinema-heading {
        inset: max(78px, calc(env(safe-area-inset-top) + 58px)) 4.5vw auto;
        display: block;
    }

    html.cinematic-ready.cinematic-compact .cinema-heading > p {
        margin: 0 0 8px;
    }

    html.cinematic-ready.cinematic-compact .cinema-heading h2 {
        font-size: clamp(2.85rem, 13vw, 4.25rem);
        line-height: 0.82;
        text-align: left;
    }

    html.cinematic-ready.cinematic-compact .cinema-stage {
        inset: clamp(148px, 20vh, 174px) 0 clamp(72px, 9vh, 84px);
        inset: clamp(148px, 20svh, 174px) 0 clamp(72px, 9svh, 84px);
    }

    html.cinematic-ready.cinematic-compact .cinema-card {
        width: min(91vw, 430px);
        height: 100%;
        max-height: 610px;
        border-radius: 22px;
    }

    html.cinematic-ready.cinematic-compact .cinema-card-shell {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(190px, 43%) minmax(0, 57%);
    }

    html.cinematic-ready.cinematic-compact .cinema-card-media {
        min-height: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    html.cinematic-ready.cinematic-compact .cinema-card-copy {
        gap: 12px;
        min-height: 0;
        padding: 18px 20px 20px;
        overflow: hidden;
    }

    html.cinematic-ready.cinematic-compact .cinema-card-copy::before {
        width: 42px;
    }

    html.cinematic-ready.cinematic-compact .cinema-card-copy h3 {
        font-size: clamp(2.45rem, 13vw, 4rem);
        line-height: 0.86;
    }

    html.cinematic-ready.cinematic-compact .cinema-card-copy > p:not(.cinema-card-index) {
        display: -webkit-box;
        overflow: hidden;
        font-size: 0.86rem;
        line-height: 1.5;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }

    html.cinematic-ready.cinematic-compact .cinema-card-meta {
        gap: 6px;
    }

    html.cinematic-ready.cinematic-compact .cinema-card-meta span {
        min-height: 25px;
        padding-inline: 8px;
        font-size: 0.52rem;
    }

    html.cinematic-ready.cinematic-compact .cinema-open {
        width: 100%;
        min-height: 44px;
    }

    html.cinematic-ready.cinematic-compact .cinema-controls {
        right: 4.5vw;
        left: 4.5vw;
    }

    html.cinematic-ready.cinematic-compact .cinema-direct-open {
        min-width: 132px;
    }
}

@media (max-width: 700px) and (max-height: 740px) and (prefers-reduced-motion: no-preference) {
    html.cinematic-ready.cinematic-compact .cinema-heading {
        inset-block-start: max(82px, calc(env(safe-area-inset-top) + 58px));
    }

    html.cinematic-ready.cinematic-compact .cinema-heading h2 {
        font-size: clamp(2.35rem, 11vw, 3.3rem);
    }

    html.cinematic-ready.cinematic-compact .cinema-stage {
        inset-block: 124px 68px;
    }

    html.cinematic-ready.cinematic-compact .cinema-card-shell {
        grid-template-rows: minmax(150px, 48%) minmax(0, 52%);
    }

    html.cinematic-ready.cinematic-compact .cinema-card-copy {
        gap: 9px;
        padding: 14px 18px 16px;
    }

    html.cinematic-ready.cinematic-compact .cinema-card-copy::before,
    html.cinematic-ready.cinematic-compact .cinema-card-meta,
    html.cinematic-ready.cinematic-compact .cinema-card-copy > p:not(.cinema-card-index) {
        display: none;
    }
}

@media (max-height: 600px) and (orientation: landscape) and (prefers-reduced-motion: no-preference) {
    html.cinematic-ready.cinematic-compact .cinema-heading {
        inset-block-start: max(84px, calc(env(safe-area-inset-top) + 58px));
    }

    html.cinematic-ready.cinematic-compact .cinema-heading h2 {
        font-size: clamp(2.35rem, 6vw, 3.2rem);
    }

    html.cinematic-ready.cinematic-compact .cinema-stage {
        inset: 102px 14px 58px;
    }

    html.cinematic-ready.cinematic-compact .cinema-card {
        width: min(calc(100vw - 28px), 840px);
        height: min(58vh, 360px);
        height: min(58svh, 360px);
    }

    html.cinematic-ready.cinematic-compact .cinema-card-shell {
        grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
        grid-template-rows: minmax(0, 1fr);
    }

    html.cinematic-ready.cinematic-compact .cinema-card-media,
    html.cinematic-ready.cinematic-compact .cinema-card-copy {
        min-width: 0;
        min-height: 0;
        overflow: hidden;
    }

    html.cinematic-ready.cinematic-compact .cinema-card-media {
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 0;
    }

    html.cinematic-ready.cinematic-compact .cinema-card-copy {
        gap: 8px;
        padding: 14px 18px;
    }

    html.cinematic-ready.cinematic-compact .cinema-card-copy::before {
        width: 34px;
    }

    html.cinematic-ready.cinematic-compact .cinema-card-copy h3 {
        font-size: clamp(2.1rem, 6vw, 3.4rem);
        line-height: 0.86;
    }

    html.cinematic-ready.cinematic-compact .cinema-card-meta,
    html.cinematic-ready.cinematic-compact .cinema-card-copy > p:not(.cinema-card-index) {
        display: none;
    }

    html.cinematic-ready.cinematic-compact .cinema-open {
        width: 100%;
        min-height: 44px;
    }

    html.cinematic-ready.cinematic-compact .cinema-controls {
        bottom: max(8px, env(safe-area-inset-bottom));
    }
}

@media (hover: none), (pointer: coarse) {
    .hero {
        min-height: auto;
    }

    body .hero-grid {
        position: relative;
    }

    .project-orbit {
        transform: none;
    }

    .cinema-card-shell::before {
        display: none;
    }
}

/* -------------------------------------------------------------------------- */
/* Compositing and off-screen animation budget                                  */
/* -------------------------------------------------------------------------- */

body .navbar,
body .navbar.sticky {
    width: min(1380px, calc(100vw - 64px));
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(7, 9, 13, 0.94);
    transition: background var(--motion-ui), border-color var(--motion-ui), box-shadow var(--motion-ui);
}

.hero.is-motion-near .hero-left,
.hero.is-motion-near .hero-title-line,
.hero.is-motion-near .project-orbit,
.hero.is-motion-near .hero-right .profile-stage,
.hero.is-motion-near .hero-right > .command-grid {
    will-change: transform, opacity;
}

.hero.is-motion-near .orbit-card,
.cinematic-projects.is-motion-near .cinema-heading,
html.cinematic-ready .cinematic-projects.is-motion-near .cinema-card {
    will-change: transform, opacity;
}

.cinematic-projects.is-motion-near .cinema-card.is-front .cinema-card-media img,
.cinematic-projects.is-motion-near .cinema-card.is-front .cinema-card-copy,
.cinematic-projects.is-motion-near .cinema-card.is-adjacent .cinema-card-media img {
    will-change: transform, opacity;
}

.cinema-media-scan,
.cinema-scroll-hint span::after,
.marquee-wrap .track,
.hero:not(.is-terminal-visible) .profile-stage::after,
.hero:not(.is-terminal-visible) .terminal-border-orbit,
.hero:not(.is-terminal-visible) .terminal-card {
    animation-play-state: paused !important;
}

.cinematic-projects.is-motion-near .cinema-card.is-front .cinema-media-scan,
.cinematic-projects.is-motion-near .cinema-scroll-hint span::after,
.marquee-wrap.is-motion-visible .track,
.hero.is-terminal-visible .profile-stage::after,
.hero.is-terminal-visible .terminal-border-orbit,
.hero.is-terminal-visible .terminal-card {
    animation-play-state: running !important;
}

.modal-overlay:not(.active) *,
.project-modal-wrap:not(.active) *,
.image-lightbox:not(.active) *,
.fs-menu:not(.active) * {
    animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
    .hero {
        min-height: auto;
    }

    body .hero-grid {
        position: relative;
    }

    .hero-left,
    body .hero-title-line,
    body .hero-right .profile-stage,
    body .hero-right > .command-grid,
    .orbit-card {
        opacity: 1;
        transform: none;
    }

    body .hero-right .profile-stage {
        transform: translate(-50%, -50%);
    }

    .cinema-media-scan,
    .cinema-scroll-hint span::after {
        animation: none;
    }

    html.cinematic-ready .project-cinema {
        height: auto;
        padding: 90px 4vw;
    }

    html.cinematic-ready .cinema-sticky,
    html.cinematic-ready .cinema-heading,
    html.cinematic-ready .cinema-stage,
    html.cinematic-ready .cinema-card {
        position: relative;
        inset: auto;
        top: auto;
        left: auto;
        width: 100%;
        height: auto;
        min-height: 0;
        opacity: 1;
        transform: none;
    }

    html.cinematic-ready .cinema-sticky {
        overflow: visible;
        background: transparent;
    }

    html.cinematic-ready .cinema-heading {
        margin-bottom: 48px;
        padding: 0;
    }

    html.cinematic-ready .cinema-heading h2 {
        opacity: 1;
    }

    html.cinematic-ready .cinema-stage {
        display: grid;
        gap: 28px;
    }

    html.cinematic-ready .cinema-card {
        min-height: 520px;
    }

    html.cinematic-ready .cinema-card::before,
    html.cinematic-ready .cinema-card::after,
    html.cinematic-ready .cinema-controls,
    html.cinematic-ready .cinema-scroll-hint {
        display: none;
    }

    .project-orbit,
    .orbit-card,
    .cinema-card,
    .cinema-card-media img,
    .cinema-card-copy {
        will-change: auto;
    }
}

@media (max-width: 900px) {
    .watch-portal {
        grid-template-columns: minmax(0, 1fr) minmax(210px, 0.58fr);
        gap: 26px;
        padding: clamp(28px, 5vw, 48px);
    }

    .watch-portal-radar {
        width: min(31vw, 270px);
        min-width: 210px;
    }
}

@media (max-width: 700px) {
    .watch-portal {
        grid-template-columns: 1fr;
        grid-template-areas:
            "copy"
            "radar"
            "link";
        min-height: 0;
        margin-top: 74px;
    }

    .watch-portal-radar {
        justify-self: center;
        width: min(72vw, 290px);
        min-width: 0;
    }

    .watch-portal-link {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .watch-portal {
        gap: 24px;
        padding: 26px 20px;
        border-radius: 22px;
    }

    .watch-portal h3 {
        font-size: clamp(2.45rem, 13vw, 3.6rem);
    }

    .watch-portal-link {
        min-height: 60px;
        padding-left: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .watch-portal-link,
    .watch-portal-link > i,
    .watch-portal-radar b {
        transition: none;
    }

    .watch-radar-sweep,
    .watch-portal-radar b::after {
        animation: none !important;
    }
}

/* -------------------------------------------------------------------------- */
/* Adaptive rendering budget                                                   */
/* -------------------------------------------------------------------------- */

/* The secondary index is far below the fold. Let Chromium skip its paint work
   without changing the geometry used by the sticky chapters above it. */
.projects-grid .project-card {
    content-visibility: auto;
    contain-intrinsic-size: 0 410px;
}

@media (min-width: 1181px) {
    html[data-render-tier="balanced"] .projects-grid.is-deferred,
    html[data-render-tier="lite"] .projects-grid.is-deferred {
        min-height: clamp(1330px, calc(100vw + 50px), 1620px);
    }
}

/* Keep terminal work idle only while its card is outside the viewport. */
.hero:not(.is-terminal-visible) .terminal-card::before {
    animation-play-state: paused !important;
}

.hero.is-terminal-visible .terminal-card::before {
    animation-play-state: running;
}

html[data-render-tier="balanced"] .cinematic-canvas,
html[data-render-tier="lite"] .cinematic-canvas {
    display: none !important;
}

html[data-render-tier="balanced"] .grain-effect,
html[data-render-tier="lite"] .grain-effect {
    display: none;
}

/* Fixed backdrop filters are disproportionately expensive on several Windows
   and Linux compositors. A nearly opaque surface preserves the navbar contrast
   without forcing the page behind it to be re-sampled while scrolling. */
html[data-render-tier="balanced"] .navbar,
html[data-render-tier="lite"] .navbar,
html[data-render-tier="balanced"] .navbar.sticky,
html[data-render-tier="lite"] .navbar.sticky {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(7, 9, 13, 0.94);
}

html[data-render-tier="balanced"] .ambient-grid,
html[data-render-tier="balanced"] .light-field {
    transform: none !important;
    will-change: auto;
}

html[data-render-tier="lite"] .ambient-grid,
html[data-render-tier="lite"] .light-field {
    display: none;
}

html[data-render-tier="balanced"] body .hero-title,
html[data-render-tier="lite"] body .hero-title {
    filter: none;
}

/* Replace the paint-bound SVG dash + two shadows by a conic rim. The existing
   inner panel masks the centre, so only the 3 px rim is visible. */
html[data-render-tier="balanced"] .terminal-border-track,
html[data-render-tier="lite"] .terminal-border-track {
    display: none;
}

html[data-render-tier="balanced"] .profile-stage::after,
html[data-render-tier="lite"] .profile-stage::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 0;
    display: block;
    width: 132%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 50%;
    opacity: 0.82;
    background: conic-gradient(
        from 0turn,
        transparent 0 73%,
        rgba(67, 223, 255, 0.68) 82%,
        rgba(204, 255, 0, 0.96) 88%,
        rgba(255, 255, 255, 0.72) 91%,
        transparent 98%
    );
    animation: none;
    pointer-events: none;
    will-change: auto;
    transform: translate(-50%, -50%) rotate(0.86turn);
}

html[data-render-tier="lite"] .profile-stage::after {
    opacity: 0.58;
    transform: translate(-50%, -50%) rotate(0.86turn);
}

@keyframes terminalFallbackOrbit {
    from { transform: translate(-50%, -50%) rotate(0.86turn); }
    to { transform: translate(-50%, -50%) rotate(1.86turn); }
}

@media (prefers-reduced-motion: no-preference) {
    html[data-render-tier="balanced"] .profile-stage::after,
    html[data-render-tier="lite"] .profile-stage::after {
        animation: terminalFallbackOrbit 9s linear infinite;
        will-change: transform;
    }

    html[data-render-tier="lite"] .profile-stage::after {
        animation-duration: 11s;
    }
}

html[data-render-tier="balanced"] .terminal-card::before,
html[data-render-tier="lite"] .terminal-card::before {
    mix-blend-mode: normal;
    opacity: 0.16;
    animation: none;
}

/* Keep the hero depth, but avoid perspective layers on constrained desktop
   compositors. Pointer motion remains available in the high tier only. */
html[data-render-tier="balanced"] .project-orbit,
html[data-render-tier="lite"] .project-orbit,
html[data-render-tier="balanced"] body .hero-right .profile-stage,
html[data-render-tier="lite"] body .hero-right .profile-stage {
    transform-style: flat;
}

html[data-render-tier="balanced"] body .hero-right .profile-stage {
    transform: translate3d(
        -50%,
        calc(-50% + (var(--hero-progress) * -18px)),
        0
    ) scale(calc(1 - (var(--hero-progress) * 0.035)));
}

html[data-render-tier="lite"] body .hero-right .profile-stage {
    transform: translate3d(-50%, -50%, 0);
}

html[data-render-tier="balanced"] .orbit-card--wheello,
html[data-render-tier="lite"] .orbit-card--wheello {
    transform: translate3d(
        calc(var(--hero-progress) * -52px),
        calc(var(--hero-progress) * -24px),
        0
    ) rotate(-7deg);
}

html[data-render-tier="balanced"] .orbit-card--jessica,
html[data-render-tier="lite"] .orbit-card--jessica {
    transform: translate3d(
        calc(var(--hero-progress) * 60px),
        calc(var(--hero-progress) * -30px),
        0
    ) rotate(7deg);
}

html[data-render-tier="balanced"] .orbit-card--streamcorner,
html[data-render-tier="lite"] .orbit-card--streamcorner {
    transform: translate3d(
        calc(var(--hero-progress) * 54px),
        calc(var(--hero-progress) * 34px),
        0
    ) rotate(-5deg);
}

html[data-render-tier="balanced"] .orbit-card--revaloop,
html[data-render-tier="lite"] .orbit-card--revaloop {
    transform: translate3d(
        calc(var(--hero-progress) * -58px),
        calc(var(--hero-progress) * 40px),
        0
    ) rotate(6deg);
}

/* Preserve the pinned narrative while keeping at most the active card and its
   neighbours in the GPU layer tree. */
html[data-render-tier="balanced"] .cinema-stage,
html[data-render-tier="lite"] .cinema-stage,
html[data-render-tier="balanced"] .cinema-card,
html[data-render-tier="lite"] .cinema-card {
    perspective: none;
    transform-style: flat;
}

html[data-render-tier="balanced"] .cinema-grid,
html[data-render-tier="lite"] .cinema-grid {
    transform: none;
    mask-image: none;
}

html[data-render-tier="balanced"] .cinema-card:not(.is-front):not(.is-adjacent),
html[data-render-tier="lite"] .cinema-card:not(.is-front):not(.is-adjacent) {
    visibility: hidden;
}

html[data-render-tier="balanced"] .cinema-card,
html[data-render-tier="lite"] .cinema-card,
html[data-render-tier="balanced"] .cinema-card-media img,
html[data-render-tier="balanced"] .cinema-card-copy,
html[data-render-tier="lite"] .cinema-card-media img,
html[data-render-tier="lite"] .cinema-card-copy {
    will-change: auto;
}

html[data-render-tier="balanced"] .cinematic-projects.is-motion-near .cinema-card.is-front,
html[data-render-tier="balanced"] .cinematic-projects.is-motion-near .cinema-card.is-adjacent,
html[data-render-tier="lite"] .cinematic-projects.is-motion-near .cinema-card.is-front,
html[data-render-tier="lite"] .cinematic-projects.is-motion-near .cinema-card.is-adjacent {
    will-change: transform, opacity;
}

html[data-render-tier="balanced"] .cinema-card::before,
html[data-render-tier="balanced"] .cinema-card::after,
html[data-render-tier="lite"] .cinema-card::before,
html[data-render-tier="lite"] .cinema-card::after,
html[data-render-tier="balanced"] .cinema-media-scan,
html[data-render-tier="lite"] .cinema-media-scan {
    display: none;
}

html[data-render-tier="balanced"] .cinema-card-shell,
html[data-render-tier="balanced"] .cinema-card.is-front .cinema-card-shell,
html[data-render-tier="lite"] .cinema-card-shell,
html[data-render-tier="lite"] .cinema-card.is-front .cinema-card-shell {
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

/* Constrained desktop tiers keep the sticky chapters but leave the expensive
   magnetic/tilt effects disabled. The lightweight cursor is shared by every
   desktop tier and stays independent from the motion engine. */
html[data-render-tier="balanced"] *,
html[data-render-tier="balanced"] *::before,
html[data-render-tier="balanced"] *::after,
html[data-render-tier="lite"] *,
html[data-render-tier="lite"] *::before,
html[data-render-tier="lite"] *::after {
    cursor: auto;
}

html[data-render-tier="balanced"] [data-magnetic],
html[data-render-tier="lite"] [data-magnetic] {
    transform: none !important;
    will-change: auto;
}

html[data-render-tier="balanced"] .project-card,
html[data-render-tier="lite"] .project-card {
    transform: none;
    transform-style: flat;
    will-change: auto;
}

html[data-render-tier="lite"] .capability-media-scan::before,
html[data-render-tier="lite"] .capability-flow path,
html[data-render-tier="lite"] .watch-portal-radar b::after,
html[data-render-tier="lite"] .status-pill i,
html[data-render-tier="lite"] .contact-status i {
    animation: none !important;
}

/* The radar is a key part of the watch portal, including on constrained
   desktops. Its sweep only animates a composited transform; keep it alive at a
   calmer pace while the paint-heavy signal pulse remains disabled above. */
html[data-render-tier="lite"] .watch-radar-sweep {
    animation-duration: 7.2s;
}

@media (max-width: 1180px) {
    /* Mobile already uses the compact compositor-only path. Do not override its
       carefully tuned terminal geometry with desktop fallback rules. */
    html[data-render-tier="balanced"] .profile-stage::after,
    html[data-render-tier="lite"] .profile-stage::after {
        display: none;
    }
}
