/* sora-latin-400-normal */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/build/fonts/sora-latin-400-normal.29e6b7ae.woff2) format('woff2'), url(/build/fonts/sora-latin-400-normal.3d2dd7af.woff) format('woff');
}
/* sora-latin-500-normal */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/build/fonts/sora-latin-500-normal.e41a5cf2.woff2) format('woff2'), url(/build/fonts/sora-latin-500-normal.b5a58fcd.woff) format('woff');
}
/* inter-latin-400-normal */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/build/fonts/inter-latin-400-normal.eca1e215.woff2) format('woff2'), url(/build/fonts/inter-latin-400-normal.2ea1079c.woff) format('woff');
}
/* inter-latin-500-normal */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/build/fonts/inter-latin-500-normal.b7c27c60.woff2) format('woff2'), url(/build/fonts/inter-latin-500-normal.5014db63.woff) format('woff');
}
/* ibm-plex-mono-latin-400-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/build/fonts/ibm-plex-mono-latin-400-normal.2b13cc93.woff2) format('woff2'), url(/build/fonts/ibm-plex-mono-latin-400-normal.12ede62e.woff) format('woff');
}
/* ibm-plex-mono-latin-500-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/build/fonts/ibm-plex-mono-latin-500-normal.a1fc5384.woff2) format('woff2'), url(/build/fonts/ibm-plex-mono-latin-500-normal.89a2903a.woff) format('woff');
}
:root {
    --color-background: #05090e;
    --color-graphite: #0b1219;
    --color-surface: #111b24;
    --color-text: #f2f3ee;
    --color-muted: #a9b3ba;
    --color-blue: #4dbbff;
    --color-amber: #ffc857;
    --color-line: rgb(242 243 238 / 14%);
    --content-width: 75rem;
    --page-gutter: clamp(1.5rem, 3vw, 2rem);
    --header-height: 4.75rem;
    --scene-stage-width: min(100vw, calc(100svh * 7 / 3));
    --scene-edge-feather: clamp(7rem, 9vw, 15rem);
    --space-noise: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2796%27 height=%2796%27 viewBox=%270 0 96 96%27%3E%3Cfilter id=%27n%27%3E%3CfeTurbulence type=%27fractalNoise%27 baseFrequency=%27.72%27 numOctaves=%272%27 stitchTiles=%27stitch%27/%3E%3C/filter%3E%3Crect width=%27100%25%27 height=%27100%25%27 filter=%27url%28%23n%29%27 opacity=%27.055%27/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

html.is-section-navigating {
    scroll-behavior: auto;
    overflow-anchor: none;
}

html.is-section-navigating body {
    overflow-anchor: none;
}

.liquid-chapter-snapshot.liquid-chapter-snapshot {
    position: fixed;
    z-index: 15;
    overflow: hidden;
    margin: 0;
    pointer-events: none;
    transform-origin: center;
    will-change: transform, filter, opacity;
}

body {
    position: relative;
    isolation: isolate;
    margin: 0;
    min-width: 20rem;
    min-height: 100vh;
    background: var(--color-background);
    color: var(--color-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

.liquid-filter-definitions {
    position: fixed;
    overflow: hidden;
    pointer-events: none;
}

html.is-page-navigating {
    scroll-behavior: auto;
    overflow-anchor: none;
}

/* GPU-drawn navigation veil, attached to <html> by LiquidVeil.ts. */
.liquid-veil {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2147483647;
    pointer-events: none;
    visibility: hidden;
}

[data-liquid-layer] {
    transform-origin: center top;
}

/* Promote layers only while they move: permanent layers cost GPU memory. */
html.is-page-navigating [data-liquid-layer],
html.is-section-navigating [data-liquid-layer] {
    will-change: transform;
}

.scene-background {
    position: fixed;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    isolation: isolate;
    pointer-events: none;
}

.scene-background::before {
    position: absolute;
    z-index: 0;
    inset: 0;
    background:
        radial-gradient(
            ellipse 58% 66% at 84% 28%,
            rgb(68 45 92 / 16%) 0%,
            transparent 70%
        ),
        radial-gradient(
            ellipse 62% 58% at 74% 62%,
            rgb(12 62 68 / 14%) 0%,
            transparent 72%
        ),
        linear-gradient(
            110deg,
            #03070c 0%,
            #04080e 48%,
            #070b12 100%
        );
    content: "";
    pointer-events: none;
}

.scene-background__stage {
    position: absolute;
    z-index: 2;
    width: var(--scene-stage-width);
    height: 100%;
    inset-block: 0;
    left: 50%;
    transform: translateX(-50%);
}

.scene-background::after {
    z-index: 1;
}

.scene-background::after {
    position: absolute;
    inset: 0;
    background-image:
        var(--space-noise),
        linear-gradient(
            90deg,
            rgb(3 7 12 / 94%) 0%,
            rgb(3 7 12 / 70%) 31%,
            rgb(3 7 12 / 18%) 61%,
            transparent 78%
        ),
        radial-gradient(
            ellipse 88% 82% at 68% 47%,
            transparent 32%,
            rgb(2 5 9 / 42%) 100%
        );
    background-repeat: repeat, no-repeat, no-repeat;
    background-size: 96px 96px, 100% 100%, 100% 100%;
    content: "";
}

.scene-background__canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
}

.scene-background__canvas {
    display: block;
    opacity: 1;
    transform-origin: center;
    transition: opacity 800ms ease;
}

/* The home scene fades in once ready: never a half-built scene popping in. */
.scene-background__canvas[data-controller="three-scene"]:not([data-three-status="ready"]) {
    opacity: 0;
}

.cinematic-edge-fade {
    position: fixed;
    z-index: 30;
    display: none;
    inset: 0;
    pointer-events: none;
}

.cinematic-edge-fade::before,
.cinematic-edge-fade::after {
    position: absolute;
    width: calc(
        (100vw - var(--scene-stage-width)) / 2
        + var(--scene-edge-feather)
    );
    inset-block: 0;
    content: "";
}

.cinematic-edge-fade::before {
    left: 0;
    background: linear-gradient(
        90deg,
        #000 0,
        #000 calc(100% - var(--scene-edge-feather)),
        transparent 100%
    );
}

.cinematic-edge-fade::after {
    right: 0;
    background: linear-gradient(
        270deg,
        #000 0,
        #000 calc(100% - var(--scene-edge-feather)),
        transparent 100%
    );
}

@media (min-aspect-ratio: 7 / 3) {
    .cinematic-edge-fade {
        display: block;
    }
}

a {
    color: inherit;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    font-family: Sora, Inter, system-ui, sans-serif;
    font-weight: 500;
    line-height: 1.08;
    text-wrap: balance;
}

h1 {
    margin-bottom: 1rem;
    font-size: clamp(4.5rem, 6.2vw, 6rem);
    letter-spacing: -0.065em;
}

h2 {
    margin-bottom: 1.25rem;
    font-size: clamp(2.25rem, 5vw, 4.75rem);
    letter-spacing: -0.055em;
}

h3 {
    margin-bottom: 0.8rem;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    letter-spacing: -0.03em;
}

p {
    max-width: 65ch;
}

::selection {
    background: var(--color-amber);
    color: var(--color-background);
}

:focus-visible {
    outline: 2px solid var(--color-amber);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    translate: 0 -200%;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: var(--color-amber);
    color: var(--color-background);
    font-weight: 500;
    text-decoration: none;
}

.skip-link:focus {
    translate: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    border-bottom: 1px solid var(--color-line);
    background: rgb(5 9 14 / 78%);
    backdrop-filter: blur(18px);
}

.site-header__inner {
    display: flex;
    width: min(
        calc(100% - (var(--page-gutter) * 2)),
        calc(var(--scene-stage-width) - (var(--page-gutter) * 2)),
        var(--content-width)
    );
    min-height: var(--header-height);
    margin-inline: auto;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.site-header__toggle.button {
    display: none;
}

.site-nav .site-nav__home {
    display: none;
}

.site-header__brand,
.site-nav {
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    font-size: clamp(0.75rem, 0.7vw, 0.8rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-header__brand {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    gap: 0.65rem;
    font-weight: 500;
    text-decoration: none;
}

.site-brand-logo {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
    object-fit: contain;
    transition: filter 180ms ease;
}

.site-header__brand-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    align-self: stretch;
}

.site-header__brand:is(:hover, :focus-visible) .site-brand-logo,
.site-nav__home:is(:hover, :focus-visible) .site-brand-logo,
.site-footer__brand:hover .site-brand-logo {
    filter: brightness(1.15) drop-shadow(0 0 0.35rem rgb(255 200 87 / 55%));
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: clamp(0.8rem, 2vw, 1.75rem);
    color: var(--color-muted);
}

.site-nav a {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    text-decoration: none;
    transition: color 180ms ease;
}

.site-nav a:hover {
    color: var(--color-text);
}

@media (min-width: 38.001rem) {
    .site-header__brand {
        color: var(--color-muted);
        transition: color 180ms ease;
    }

    .site-header__brand:hover,
    .site-header__brand:focus-visible {
        color: var(--color-text);
    }

    .site-nav {
        flex-wrap: nowrap;
        gap: clamp(0.65rem, 2vw, 1.75rem);
    }

    .site-header__brand[aria-current="location"],
    .site-nav a[aria-current="location"] {
        position: relative;
        color: var(--color-text);
    }

    .site-header__brand[aria-current="location"] .site-header__brand-label::after,
    .site-nav a[aria-current="location"]::after {
        position: absolute;
        bottom: 0.25rem;
        left: 50%;
        width: 0.25rem;
        height: 0.25rem;
        border-radius: 50%;
        background: var(--color-blue);
        box-shadow: 0 0 0.45rem rgb(77 187 255 / 45%);
        transform: translateX(-50%);
        content: "";
    }
}

.portfolio,
.project-page,
.site-footer__inner {
    position: relative;
    z-index: 1;
    width: min(
        calc(100% - (var(--page-gutter) * 2)),
        calc(var(--scene-stage-width) - (var(--page-gutter) * 2)),
        var(--content-width)
    );
    margin-inline: auto;
}

.site-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--color-line);
    background: rgb(5 9 14 / 88%);
    color: var(--color-muted);
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    line-height: 1.6;
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    min-height: var(--header-height);
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    text-align: center;
    padding-block: 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
}

.site-footer__identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
}

.site-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--color-text);
    letter-spacing: 0.1em;
}

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
    font-size: 0.68rem;
    text-transform: uppercase;
}

.site-footer__legal a {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    text-decoration: none;
}

.site-footer__legal a:is(:hover, :focus-visible) {
    color: var(--color-text);
}

@media (max-width: 38rem) {
    .site-footer__inner,
    .site-footer__identity {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

.hero,
.section {
    scroll-margin-top: 0;
}

.hero {
    display: grid;
    min-height: calc(100svh - var(--header-height));
    grid-template-columns: minmax(0, 0.92fr) minmax(25rem, 1.08fr);
    align-items: center;
    gap: clamp(2.5rem, 5vw, 5rem);
    padding-block: clamp(3rem, 7vh, 5.5rem);
}

.hero__content {
    position: relative;
    z-index: 2;
    grid-column: 1;
    max-width: 34rem;
}

.hero h1 {
    white-space: nowrap;
}

.section-label,
.hero__availability,
.project__index,
.project__meta {
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.76rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.hero .section-label {
    margin-bottom: 1.15rem;
    font-size: clamp(0.82rem, 0.78vw, 0.9rem);
    letter-spacing: 0.105em;
}

.section-label,
.project__index {
    color: var(--color-blue);
}

.hero__statement {
    max-width: 18ch;
    margin-bottom: 1.25rem;
    color: var(--color-amber);
    font-family: Sora, Inter, system-ui, sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.35rem);
    line-height: 1.2;
}

.hero__summary,
.section__header > p:last-child,
.profile__content p,
.contact > p {
    color: var(--color-muted);
}

.hero__availability {
    margin-block: 1.5rem;
    color: var(--color-text);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.hero__seed-space {
    display: none;
}

@media (min-width: 56.001rem) {
    .hero .section-label {
        margin-bottom: 0.8rem;
        font-size: clamp(0.9rem, 0.9vw, 1rem);
        font-weight: 500;
        letter-spacing: 0.09em;
    }

    .hero__statement {
        max-width: none;
        font-size: clamp(1.5rem, 2.4vw, 2rem);
        line-height: 1.25;
    }

    .hero__statement > span {
        display: block;
    }

    .hero__summary {
        max-width: 48ch;
        margin-bottom: 1.5rem;
    }
}

.button {
    --button-amber: 255 170 63;
    --button-blue: 77 187 255;
    --button-edge-opacity: 34%;
    position: relative;
    isolation: isolate;
    display: inline-flex;
    min-height: 3.35rem;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    overflow: hidden;
    padding: 0.82rem 1.35rem 0.82rem 1.5rem;
    border: 0;
    background:
        radial-gradient(circle at 4% 48%, rgb(var(--button-amber) / var(--button-edge-opacity)), transparent 21%),
        radial-gradient(circle at 96% 52%, rgb(var(--button-blue) / var(--button-edge-opacity)), transparent 23%),
        linear-gradient(102deg, rgb(255 213 175 / 32%), rgb(255 255 255 / 7%) 24% 70%, rgb(151 193 255 / 36%));
    clip-path: polygon(6% 0, 92% 0, 100% 17%, 97% 78%, 91% 100%, 7% 96%, 0 77%, 2% 23%);
    color: var(--color-text);
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
    filter:
        drop-shadow(-0.12rem 0.13rem 0.18rem rgb(0 0 0 / 72%))
        drop-shadow(0 0 0.45rem rgb(var(--button-blue) / 8%));
    transform: translateZ(0);
    transition:
        color 240ms ease,
        filter 320ms ease,
        transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.button::before {
    position: absolute;
    z-index: -2;
    inset: 2px 3px 4px;
    background:
        linear-gradient(164deg, rgb(255 255 255 / 10%) 0 7%, transparent 18%),
        linear-gradient(112deg, rgb(18 24 34 / 98%), rgb(5 10 18 / 100%) 48%, rgb(11 17 31 / 98%)),
        var(--color-graphite);
    clip-path: polygon(6% 0, 92% 0, 100% 17%, 97% 78%, 91% 100%, 7% 96%, 0 77%, 2% 23%);
    box-shadow:
        inset 0.55rem 0 0.9rem rgb(var(--button-amber) / 7%),
        inset -0.65rem 0 1rem rgb(var(--button-blue) / 9%),
        inset 0 -0.35rem 0.65rem rgb(0 0 0 / 72%);
    content: "";
}

.button::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        radial-gradient(ellipse 24% 82% at 2% 50%, rgb(var(--button-amber) / 24%), transparent 72%),
        radial-gradient(ellipse 25% 82% at 98% 50%, rgb(var(--button-blue) / 25%), transparent 74%),
        linear-gradient(112deg, transparent 20%, rgb(255 255 255 / 4%) 48%, transparent 70%);
    content: "";
    opacity: 0.3;
    transform: scaleX(0.94);
    transition:
        opacity 320ms ease,
        transform 460ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.button__label,
.button__icon {
    position: relative;
    z-index: 1;
}

.button__label {
    text-shadow: 0 0 0.9rem rgb(255 255 255 / 12%);
}

.button__energy {
    position: absolute;
    z-index: 0;
    inset: 0;
    pointer-events: none;
}

.button__energy::before {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent, rgb(var(--button-amber) / 72%), transparent) 10% 1px / 38% 1px no-repeat,
        linear-gradient(90deg, transparent, rgb(var(--button-blue) / 78%), transparent) 90% calc(100% - 3px) / 42% 1px no-repeat,
        linear-gradient(180deg, transparent, rgb(var(--button-amber) / 68%), transparent) 2px 50% / 1px 52% no-repeat,
        linear-gradient(180deg, transparent, rgb(var(--button-blue) / 72%), transparent) calc(100% - 3px) 50% / 1px 48% no-repeat;
    content: "";
    opacity: 0.18;
    transform: scaleX(0.72);
    transition:
        opacity 300ms ease,
        transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.button__energy::after {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 5% 24%, rgb(var(--button-amber) / 94%) 0 1.5px, transparent 2.5px),
        radial-gradient(circle at 8% 87%, rgb(var(--button-amber) / 72%) 0 1px, transparent 2.25px),
        radial-gradient(circle at 92% 8%, rgb(var(--button-blue) / 82%) 0 1.2px, transparent 2.4px),
        radial-gradient(circle at 97% 72%, rgb(var(--button-blue) / 96%) 0 1.5px, transparent 2.6px);
    content: "";
    opacity: 0.24;
    transition: opacity 300ms ease;
}

.button__icon {
    display: inline-grid;
    width: 1.35rem;
    height: 1.35rem;
    place-items: center;
    color: var(--color-blue);
    filter: drop-shadow(0 0 0.35rem rgb(77 187 255 / 35%));
    transition:
        color 260ms ease,
        filter 260ms ease,
        transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.button__icon svg {
    width: 100%;
    height: 100%;
}

.button__icon svg * {
    stroke-dasharray: 100;
    stroke-dashoffset: 0;
}

.button--primary {
    min-width: 15.5rem;
}

.button--secondary {
    --button-edge-opacity: 18%;
    min-width: 11.75rem;
    color: rgb(242 243 238 / 78%);
}

.button:is(:hover, :focus-visible) {
    --button-edge-opacity: 88%;
    color: #fff;
    filter:
        drop-shadow(-0.18rem 0 0.55rem rgb(var(--button-amber) / 23%))
        drop-shadow(0.22rem 0 0.7rem rgb(var(--button-blue) / 30%));
    transform: translateY(-1px);
}

.button:is(:hover, :focus-visible)::after {
    opacity: 0.92;
    transform: scaleX(1);
}

.button:is(:hover, :focus-visible) .button__energy::before {
    opacity: 0.92;
    transform: scaleX(1);
    animation: button-perimeter-pulse 1.45s ease-in-out infinite alternate;
}

.button:is(:hover, :focus-visible) .button__energy::after {
    opacity: 1;
    animation: button-node-pulse 1.1s ease-in-out infinite alternate;
}

.button:is(:hover, :focus-visible) .button__icon {
    color: var(--color-amber);
    filter:
        drop-shadow(0 0 0.28rem rgb(var(--button-amber) / 82%))
        drop-shadow(0 0 0.6rem rgb(var(--button-blue) / 34%));
    transform: translateX(0.22rem);
}

.button:is(:hover, :focus-visible) .button__icon svg * {
    animation: button-icon-charge 900ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.button:active {
    filter: drop-shadow(0 0 0.45rem rgb(77 187 255 / 28%));
    transform: translateY(0) scale(0.985);
}

@keyframes button-perimeter-pulse {
    from {
        filter: brightness(0.8);
    }

    to {
        filter: brightness(1.55) saturate(1.25);
    }
}

@keyframes button-node-pulse {
    from {
        filter: blur(0) brightness(0.8);
    }

    to {
        filter: blur(0.35px) brightness(1.65);
    }
}

@keyframes button-icon-charge {
    from {
        stroke-dashoffset: 100;
        opacity: 0.35;
    }

    to {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}


.section {
    position: relative;
    min-height: calc(100svh - var(--header-height));
    padding-block: clamp(5rem, 11vw, 10rem);
}

/* Decorative loops stop while their section is off-screen (offscreenAnimations.ts). */
.is-offscreen *,
.is-offscreen *::before,
.is-offscreen *::after {
    animation-play-state: paused !important;
}

/*
 * Without a GPU or on too slow a device (html.is-low-power, set by
 * ThreeScene) and with reduced motion, decorative loops play once: there,
 * every frame of a loop recomposites the whole page on the CPU.
 */
html.is-low-power :is(.button__energy, .project-node__energy, .projects__detail-energy, .journey__detail-energy)::before,
html.is-low-power :is(.button__energy, .project-node__energy, .projects__detail-energy, .journey__detail-energy)::after,
html.is-low-power .profile__portrait-energy-anchor,
html.is-low-power .profile__portrait-energy-anchor::after,
html.is-low-power .mist-edge::before,
html.is-low-power .mist-edge::after {
    animation-iteration-count: 1 !important;
}

@media (prefers-reduced-motion: reduce) {
    :is(.button__energy, .project-node__energy, .projects__detail-energy, .journey__detail-energy)::before,
    :is(.button__energy, .project-node__energy, .projects__detail-energy, .journey__detail-energy)::after,
    .profile__portrait-energy-anchor,
    .profile__portrait-energy-anchor::after {
        animation-iteration-count: 1 !important;
    }
}

[data-section-withdrawing] {
    opacity: var(--withdraw-opacity, 0) !important;
    transition: none !important;
}

/* Keep intermediate chapters hidden until their entrance has been reset. */
.is-section-scrolling .section:not(#accueil) > * {
    visibility: hidden !important;
    opacity: 0 !important;
    transition: none !important;
}

.section__header {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.6fr);
    gap: 1rem 4rem;
    align-items: end;
    margin-bottom: clamp(3rem, 7vw, 6rem);
}

.section__header .section-label {
    grid-column: 1 / -1;
}

.section__header h2,
.section__header p {
    margin-bottom: 0;
}


/* Local wisps cross the plate edges; the transparent centre protects reading. */
.mist-edge {
    position: absolute;
    z-index: 1;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    border-radius: inherit;
    mask-image:
        linear-gradient(to right, #000, transparent 1.2rem, transparent calc(100% - 1.2rem), #000),
        linear-gradient(to bottom, #000, transparent 1rem, transparent calc(100% - 1rem), #000);
}

.mist-edge::before,
.mist-edge::after {
    position: absolute;
    inset: -18%;
    content: "";
    background:
        radial-gradient(ellipse at 14% 32%, rgb(174 192 204 / 34%), transparent 34%),
        radial-gradient(ellipse at 80% 76%, rgb(155 180 198 / 28%), transparent 38%),
        radial-gradient(ellipse at 45% 92%, rgb(255 200 120 / 16%), transparent 30%);
    animation: mist-edge-current 13s ease-in-out infinite alternate;
    animation-play-state: paused;
}

.mist-edge::after {
    animation-duration: 19s;
    animation-delay: -7s;
    animation-direction: alternate-reverse;
    background:
        radial-gradient(ellipse at 90% 24%, rgb(110 179 214 / 28%), transparent 35%),
        radial-gradient(ellipse at 24% 80%, rgb(186 201 206 / 30%), transparent 32%);
}

.mist-edge.is-mist-visible::before,
.mist-edge.is-mist-visible::after {
    animation-play-state: running;
}

.profile__portrait-glass > .mist-edge {
    z-index: 5;
}

@keyframes mist-edge-current {
    from { transform: translate(-5%, 3%) scale(0.96); opacity: 0.38; }
    50% { opacity: 0.8; }
    to { transform: translate(6%, -4%) scale(1.06); opacity: 0.52; }
}

@media (prefers-reduced-motion: reduce) {
    .mist-edge::before,
    .mist-edge::after {
        animation: none;
        opacity: 0.4;
    }
}

/*
 * First-visit loader (sceneReveal.ts): a dark screen where the logo's sun
 * lights up with the loading progress (--scene-load, 0 to 1).
 */
.scene-loader {
    --scene-load: 0.08;
    position: fixed;
    z-index: 2147483646;
    display: grid;
    inset: 0;
    place-items: center;
    background: var(--color-background);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition:
        opacity 600ms ease,
        visibility 0s linear 600ms;
}

html.is-scene-pending {
    overflow: hidden;
}

html.is-scene-pending .scene-loader {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition: none;
}

.scene-loader__sun {
    width: 5.5rem;
    height: 5.5rem;
    opacity: calc(0.16 + var(--scene-load) * 0.84);
    filter:
        grayscale(calc(1 - var(--scene-load)))
        brightness(calc(0.4 + var(--scene-load) * 0.75))
        drop-shadow(0 0 calc(var(--scene-load) * 1.8rem) rgb(255 170 63 / calc(var(--scene-load) * 65%)));
    transition:
        opacity 500ms ease,
        filter 500ms ease;
    animation: scene-loader-breath 2.4s ease-in-out infinite alternate;
}

@keyframes scene-loader-breath {
    from {
        transform: scale(0.96);
    }

    to {
        transform: scale(1.04);
    }
}

@media (prefers-reduced-motion: reduce) {
    .scene-loader__sun {
        animation: none;
    }
}

.projects__detail-content > [hidden] {
    display: none;
}

.projects__scroll-track {
    display: none;
}

.projects__media,
.projects__detail-body {
    display: contents;
}

.projects {
    display: grid;
    min-height: calc(100svh - var(--header-height));
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(1.25rem, 2.4vh, 2rem);
    overflow: hidden;
    padding-block: clamp(1.75rem, 3.2vh, 3rem);
}

.projects__intro {
    position: relative;
    z-index: 2;
    display: grid;
    width: min(39rem, 52%);
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
}

.projects__intro .section-label {
    margin-bottom: 0.25rem;
    font-weight: 400;
    letter-spacing: 0.09em;
}

.projects__headline {
    margin-bottom: 0;
    color: var(--color-text);
    font-family: Sora, Inter, system-ui, sans-serif;
    font-size: clamp(1.9rem, 3vw, 3.35rem);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 1.08;
    text-wrap: balance;
}

.projects__intro > p:last-child {
    max-width: 48ch;
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: clamp(0.88rem, 0.9vw, 1rem);
}

.projects__stage {
    position: relative;
    z-index: 2;
    display: grid;
    min-height: 0;
    grid-template-columns: minmax(22rem, 0.86fr) minmax(30rem, 1.14fr);
    gap: clamp(3rem, 8vw, 8rem);
    align-items: stretch;
    max-height: 34rem;
}

.projects__detail {
    --plate-shape: polygon(
        1.15rem 0,
        calc(100% - 1.15rem) 0,
        100% 1.15rem,
        100% calc(100% - 1.15rem),
        calc(100% - 1.15rem) 100%,
        1.15rem 100%,
        0 calc(100% - 1.15rem),
        0 1.15rem
    );
    position: relative;
    isolation: isolate;
    align-self: center;
    min-height: clamp(17rem, 38vh, 27rem);
    overflow: hidden;
    padding: clamp(1.75rem, 3vw, 3rem);
    border: 0;
    background:
        radial-gradient(circle at 2% 58%, rgb(77 187 255 / 14%), transparent 18%),
        radial-gradient(circle at 98% 45%, rgb(255 170 63 / 15%), transparent 20%),
        linear-gradient(108deg, rgb(151 193 255 / 25%), rgb(255 255 255 / 5%) 24% 72%, rgb(255 213 175 / 21%));
    clip-path: var(--plate-shape);
    filter:
        drop-shadow(-0.18rem 0.18rem 0.3rem rgb(0 0 0 / 68%))
        drop-shadow(0 0 0.6rem rgb(77 187 255 / 5%));
    opacity: 0.68;
    transform: translateY(0.2rem);
    transition:
        filter 420ms ease,
        opacity 360ms ease,
        transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.projects__detail.is-energy-arrived {
    transition-duration: 0s;
    filter:
        drop-shadow(-0.22rem 0 0.75rem rgb(255 170 63 / 14%))
        drop-shadow(0.28rem 0 0.9rem rgb(77 187 255 / 18%));
    opacity: 0.96;
    transform: translateY(0);
}

.projects__detail::before {
    position: absolute;
    z-index: -2;
    inset: 2px 3px 4px;
    background:
        linear-gradient(164deg, rgb(255 255 255 / 8%) 0 5%, transparent 16%),
        linear-gradient(112deg, rgb(18 24 34 / 96%), rgb(5 10 18 / 98%) 48%, rgb(11 17 31 / 96%));
    clip-path: var(--plate-shape);
    box-shadow:
        inset 1rem 0 1.8rem rgb(77 187 255 / 7%),
        inset -1.2rem 0 2rem rgb(255 170 63 / 5%),
        inset 0 -0.5rem 1rem rgb(0 0 0 / 68%);
    content: "";
}

.projects__detail::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        radial-gradient(ellipse 20% 68% at 1% 52%, rgb(77 187 255 / 17%), transparent 72%),
        radial-gradient(ellipse 22% 68% at 99% 48%, rgb(255 170 63 / 16%), transparent 74%),
        linear-gradient(112deg, transparent 25%, rgb(255 255 255 / 3%) 50%, transparent 72%);
    content: "";
    opacity: 0.28;
}

.projects__detail-content {
    position: relative;
    z-index: 2;
    display: flex;
    height: 100%;
    max-width: 30rem;
    flex-direction: column;
    justify-content: flex-end;
}

.projects__detail-kicker,
.project-node {
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.projects__detail-kicker {
    margin-bottom: 0.8rem;
    color: var(--color-blue);
    font-size: 0.7rem;
}

.projects__detail h3 {
    margin-bottom: 1rem;
}

.projects__detail p:last-child {
    margin-bottom: 0;
    color: var(--color-muted);
}

.projects__network {
    position: relative;
    min-height: clamp(20rem, 43vh, 31rem);
}

.projects__branch-space {
    position: absolute;
    width: 42%;
    inset-block: 0;
    left: 12%;
}

.projects__main-connector {
    position: absolute;
    top: 7%;
    left: 50%;
    width: 1px;
    height: 1px;
}

.projects__nodes {
    --project-node-width: clamp(9rem, 12vw, 12rem);
    --project-node-height: 3.6rem;
    --project-node-padding-block: 0.65rem;
    --project-node-padding-inline: 0.9rem;
    --project-node-index-column: 2.3rem;
    --project-node-index-size: 0.68rem;
    --project-node-label-size: 0.72rem;
    position: absolute;
    display: flex;
    inset: -18% 1% 40% 34%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
}

.projects__nodes[data-project-density="medium"] {
    --project-node-width: clamp(8.25rem, 10.5vw, 10.5rem);
    --project-node-height: 3.05rem;
    --project-node-padding-block: 0.52rem;
    --project-node-padding-inline: 0.78rem;
    --project-node-index-column: 2.05rem;
    --project-node-index-size: 0.64rem;
    --project-node-label-size: 0.68rem;
}

.projects__nodes[data-project-density="compact"] {
    --project-node-width: clamp(7.5rem, 9vw, 9.25rem);
    --project-node-height: 2.65rem;
    --project-node-padding-block: 0.42rem;
    --project-node-padding-inline: 0.65rem;
    --project-node-index-column: 1.8rem;
    --project-node-index-size: 0.6rem;
    --project-node-label-size: 0.63rem;
}

.project-node {
    --node-offset: 0rem;
    --plate-shape: polygon(
        0.55rem 0,
        calc(100% - 0.55rem) 0,
        100% 0.55rem,
        100% calc(100% - 0.55rem),
        calc(100% - 0.55rem) 100%,
        0.55rem 100%,
        0 calc(100% - 0.55rem),
        0 0.55rem
    );
    position: relative;
    isolation: isolate;
    display: grid;
    width: var(--project-node-width);
    min-height: var(--project-node-height);
    grid-template-columns: var(--project-node-index-column) 1fr;
    align-items: center;
    padding: var(--project-node-padding-block) var(--project-node-padding-inline);
    border: 0;
    background:
        radial-gradient(circle at 4% 48%, rgb(255 170 63 / 22%), transparent 21%),
        radial-gradient(circle at 96% 52%, rgb(77 187 255 / 20%), transparent 23%),
        linear-gradient(102deg, rgb(255 213 175 / 27%), rgb(255 255 255 / 6%) 24% 70%, rgb(151 193 255 / 31%));
    clip-path: var(--plate-shape);
    color: var(--color-muted);
    cursor: pointer;
    filter:
        drop-shadow(-0.12rem 0.13rem 0.18rem rgb(0 0 0 / 72%))
        drop-shadow(0 0 0.45rem rgb(77 187 255 / 7%));
    text-align: left;
    transition:
        color 240ms ease,
        filter 320ms ease,
        transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
    margin-inline-start: min(
        var(--node-offset),
        calc(100% - var(--project-node-width))
    );
}

.project-node::before {
    position: absolute;
    z-index: -2;
    inset: 2px 3px 4px;
    background:
        linear-gradient(164deg, rgb(255 255 255 / 10%) 0 7%, transparent 18%),
        linear-gradient(112deg, rgb(18 24 34 / 98%), rgb(5 10 18) 48%, rgb(11 17 31 / 98%));
    clip-path: var(--plate-shape);
    box-shadow:
        inset 0.55rem 0 0.9rem rgb(255 170 63 / 7%),
        inset -0.65rem 0 1rem rgb(77 187 255 / 9%),
        inset 0 -0.35rem 0.65rem rgb(0 0 0 / 72%);
    content: "";
}

.project-node::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        radial-gradient(ellipse 24% 82% at 2% 50%, rgb(255 170 63 / 24%), transparent 72%),
        radial-gradient(ellipse 25% 82% at 98% 50%, rgb(77 187 255 / 25%), transparent 74%);
    content: "";
    opacity: 0.3;
    transform: scaleX(0.94);
    transition: opacity 320ms ease, transform 460ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.project-node__index {
    position: relative;
    z-index: 2;
    color: var(--color-amber);
    font-size: var(--project-node-index-size);
}

.project-node__label {
    position: relative;
    z-index: 2;
    overflow: hidden;
    font-size: var(--project-node-label-size);
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.project-node__connector,
.projects__detail-connector {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 0.46rem;
    height: 0.46rem;
    border: 1px solid rgb(255 226 163 / 82%);
    border-radius: 50%;
    background: rgb(255 170 63 / 54%);
    box-shadow:
        0 0 0.3rem rgb(255 170 63 / 72%),
        0 0 0.7rem rgb(255 226 163 / 30%);
    opacity: 0;
    translate: 0 -50%;
}

.project-node__connector {
    left: 0.22rem;
}

.projects__detail-connector {
    right: 0.35rem;
}

.projects__detail-energy,
.project-node__energy {
    position: absolute;
    z-index: 1;
    inset: 0;
    pointer-events: none;
}

.projects__detail-energy::before,
.project-node__energy::before {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent, rgb(255 170 63 / 68%), transparent) 10% 2px / 36% 1px no-repeat,
        linear-gradient(90deg, transparent, rgb(77 187 255 / 72%), transparent) 90% calc(100% - 3px) / 40% 1px no-repeat,
        linear-gradient(180deg, transparent, rgb(255 170 63 / 62%), transparent) 2px 50% / 1px 48% no-repeat,
        linear-gradient(180deg, transparent, rgb(77 187 255 / 66%), transparent) calc(100% - 3px) 50% / 1px 46% no-repeat;
    content: "";
    opacity: 0.22;
}

.projects__detail.is-energy-arrived .projects__detail-energy::before {
    opacity: 0.82;
    animation:
        project-detail-entry-impact 760ms ease-out both,
        button-perimeter-pulse 1.8s ease-in-out 760ms infinite alternate;
}

.projects__detail.is-energy-arrived .projects__detail-energy::after {
    opacity: 0.9;
    animation: button-node-pulse 1.35s ease-in-out infinite alternate;
}

.projects__detail-energy::after,
.project-node__energy::after {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 4% 8%, rgb(255 170 63 / 92%) 0 1.5px, transparent 2.6px),
        radial-gradient(circle at 2% 76%, rgb(255 170 63 / 68%) 0 1px, transparent 2.3px),
        radial-gradient(circle at 11% 98%, rgb(255 200 87 / 58%) 0 1.1px, transparent 2.3px),
        radial-gradient(circle at 90% 2%, rgb(77 187 255 / 72%) 0 1.1px, transparent 2.4px),
        radial-gradient(circle at 98% 30%, rgb(77 187 255 / 88%) 0 1.5px, transparent 2.7px),
        radial-gradient(circle at 94% 96%, rgb(77 187 255 / 68%) 0 1px, transparent 2.3px);
    content: "";
    opacity: 0.34;
    transition:
        filter 300ms ease,
        opacity 300ms ease;
}

/* The plate receives warm energy on its right edge and cools toward the left. */
.projects__detail-energy::before {
    background:
        linear-gradient(90deg, transparent, rgb(77 187 255 / 72%), transparent) 10% 2px / 36% 1px no-repeat,
        linear-gradient(90deg, transparent, rgb(255 170 63 / 68%), transparent) 90% calc(100% - 3px) / 40% 1px no-repeat,
        linear-gradient(180deg, transparent, rgb(77 187 255 / 66%), transparent) 2px 50% / 1px 48% no-repeat,
        linear-gradient(180deg, transparent, rgb(255 170 63 / 62%), transparent) calc(100% - 3px) 50% / 1px 46% no-repeat;
}

.projects__detail-energy::after {
    background:
        radial-gradient(circle at 4% 8%, rgb(77 187 255 / 72%) 0 1.1px, transparent 2.4px),
        radial-gradient(circle at 2% 76%, rgb(77 187 255 / 88%) 0 1.5px, transparent 2.7px),
        radial-gradient(circle at 11% 98%, rgb(77 187 255 / 68%) 0 1px, transparent 2.3px),
        radial-gradient(circle at 90% 2%, rgb(255 200 87 / 58%) 0 1.1px, transparent 2.3px),
        radial-gradient(circle at 98% 30%, rgb(255 170 63 / 92%) 0 1.5px, transparent 2.6px),
        radial-gradient(circle at 94% 96%, rgb(255 170 63 / 68%) 0 1px, transparent 2.3px);
}

.project-node:is(:hover, :focus-visible, .is-active) {
    color: var(--color-text);
    filter:
        drop-shadow(-0.18rem 0 0.55rem rgb(255 170 63 / 23%))
        drop-shadow(0.22rem 0 0.7rem rgb(77 187 255 / 30%));
    transform: translateY(0);
}

.project-node:is(:hover, :focus-visible, .is-active)::after {
    opacity: 0.92;
    transform: scaleX(1);
}

.project-node:is(:hover, :focus-visible, .is-active) .project-node__energy::before {
    opacity: 0.92;
    animation: button-perimeter-pulse 1.45s ease-in-out infinite alternate;
}

.project-node:is(:hover, :focus-visible, .is-active) .project-node__energy::after {
    opacity: 1;
    animation: button-node-pulse 1.1s ease-in-out infinite alternate;
}

/* The Three.js pulse briefly charges the exact edge where it reaches a node. */
.project-node.is-energy-impact {
    filter:
        drop-shadow(-0.16rem 0 0.42rem rgb(255 170 63 / 18%))
        drop-shadow(0.1rem 0 0.3rem rgb(77 187 255 / 8%));
}

.project-node.is-energy-impact .project-node__connector {
    /* The anchor guides Three.js but must never become the visual impact. */
    opacity: 0;
}

.project-node.is-energy-impact .project-node__energy::before {
    animation: project-node-perimeter-impact 720ms ease-out both;
}

.project-node.is-energy-impact::after {
    animation: project-node-surface-impact 680ms ease-out both;
}

.projects__detail.is-energy-arrived .projects__detail-connector {
    /* This anchor only aligns the Three.js route with the panel edge. */
    opacity: 0;
    animation: none;
}

@media (min-width: 20rem) {
    .projects {
        grid-template-rows: auto clamp(27rem, 55vh, 31rem);
        align-content: center;
    }

    .projects__intro .section-label {
        font-size: clamp(0.9rem, 0.9vw, 1rem);
        font-weight: 500;
    }

    .projects__headline {
        font-size: clamp(1.9rem, 2.4vw, 2.35rem);
        line-height: 1.2;
        letter-spacing: -0.03em;
    }

    .projects__intro > p:last-child {
        font-size: 1rem;
    }

    .projects__detail {
        height: 100%;
        min-height: 0;
        min-width: 0;
        padding: 2px 3px 4px;
        transform: none;
    }

    .projects__detail-content {
        display: grid;
        z-index: auto;
        max-width: none;
        min-height: 0;
        grid-template-rows: minmax(0, 1fr) auto;
        gap: 0.8rem;
    }

    .projects__media {
        display: block;
        position: absolute;
        z-index: -1;
        inset: 0;
        min-width: 0;
        overflow: hidden;
        clip-path: var(--plate-shape);
        pointer-events: none;
    }

    .projects__detail::after {
        z-index: 0;
        pointer-events: none;
    }

    .projects__detail-body,
    .projects__detail-content > .button {
        position: relative;
        z-index: 2;
    }

    .projects__media::after {
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgb(5 9 14 / 74%), rgb(5 9 14 / 90%) 55%, rgb(5 9 14 / 97%));
        content: "";
    }

    .projects__media .projects__cover {
        display: block;
        width: 100%;
        height: 100%;
        max-height: none;
        margin: 0;
        border-radius: 0;
        object-fit: cover;
    }

    .projects__media .projects__cover[hidden] {
        display: none;
    }

    .projects__detail-body {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 0;
        padding: 1.5rem 1.5rem 0;
        font-size: 0.9rem;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .projects__detail-body p,
    .projects__detail-body h3 {
        margin-bottom: 0.8rem;
    }

    .projects__detail-body > [data-projects-network-target="summary"],
    .projects__detail-body > [data-projects-network-target="technologies"] {
        color: var(--color-muted);
    }

    .projects__detail-content > .button {
        justify-self: center;
        min-width: 0;
        max-width: calc(100% - 3rem);
        margin: 0 1.5rem 1.25rem;
    }

    .projects__detail-content > .button:not(:hover, :focus-visible) {
        color: var(--color-text);
    }

    .projects__detail:not(.is-active) .projects__detail-content {
        display: flex;
        justify-content: center;
    }

    .projects__detail:not(.is-active) .projects__detail-body {
        align-items: center;
        padding: 1.5rem;
        text-align: center;
    }

    .projects__detail:not(.is-active) .projects__detail-body > :last-child {
        margin: 0;
    }

    .projects__detail:not(.is-active) .projects__media,
    .projects__detail:not(.is-active) .projects__detail-kicker {
        display: none;
    }

    .projects__detail.is-energy-arrived {
        transition-duration: 0s;
    }
}

@keyframes project-destination-impact {
    0% {
        opacity: 0;
        scale: 0.45;
    }

    22% {
        opacity: 1;
        scale: 1.85;
    }

    55% {
        opacity: 0.82;
        scale: 1.12;
    }

    100% {
        opacity: 0.28;
        scale: 0.72;
    }
}

@keyframes project-node-surface-impact {
    0% {
        opacity: 0.3;
        transform: scaleX(0.94);
    }

    18% {
        opacity: 0.62;
        filter: brightness(1.24) saturate(1.06);
        transform: scaleX(1.005);
    }

    48% {
        opacity: 0.48;
        filter: brightness(1.12) saturate(1.03);
        transform: scaleX(1);
    }

    100% {
        opacity: 0.3;
        filter: brightness(1) saturate(1);
        transform: scaleX(0.94);
    }
}

@keyframes project-node-perimeter-impact {
    0% {
        opacity: 0.22;
        filter: none;
    }

    16% {
        opacity: 0.58;
        filter:
            brightness(1.34)
            drop-shadow(-0.05rem 0 0.22rem rgb(255 170 63 / 38%));
    }

    55% {
        opacity: 0.42;
        filter:
            brightness(1.14)
            drop-shadow(0 0 0.12rem rgb(255 200 87 / 22%));
    }

    100% {
        opacity: 0.22;
        filter: none;
    }
}

@keyframes project-detail-entry-impact {
    0% {
        opacity: 1;
        clip-path: inset(0 0 0 98%);
        filter: brightness(2.25);
    }

    20% {
        opacity: 1;
        clip-path: inset(0 0 0 76%);
        filter:
            brightness(2.25)
            drop-shadow(0.12rem 0 0.5rem rgb(255 170 63 / 82%));
    }

    62% {
        opacity: 0.94;
        clip-path: inset(0 0 0 28%);
        filter:
            brightness(1.45)
            drop-shadow(0 0 0.28rem rgb(255 200 87 / 45%));
    }

    100% {
        opacity: 0.82;
        clip-path: inset(0);
        filter: none;
    }
}


.project-page {
    display: grid;
    padding-block: clamp(1.5rem, 5vw, 4rem) clamp(3rem, 7vw, 6rem);
    gap: clamp(1.5rem, 3.5vw, 2.5rem);
    overflow-wrap: anywhere;
}

.project-page > *,
.project-page__gallery > * {
    min-width: 0;
}

.project-page h1 {
    max-width: 28ch;
    margin-bottom: 1.25rem;
    font-size: clamp(1.9rem, 2.4vw, 2.35rem);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.project-page__header .section-label {
    margin-bottom: 0.95rem;
    font-size: clamp(0.9rem, 0.9vw, 1rem);
    font-weight: 500;
}

.project-page__summary {
    margin-bottom: 1.75rem;
    color: var(--color-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.project-page__technologies,
.project-page__links {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    list-style: none;
}

.project-page__technologies {
    margin: 0;
    gap: 0.65rem;
}

.project-page__technologies li {
    max-width: 100%;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgb(77 187 255 / 22%);
    border-left-color: rgb(255 200 87 / 42%);
    background: rgb(77 187 255 / 4%);
    color: var(--color-text);
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.75rem;
    line-height: 1.6;
}

.project-page__links {
    margin-top: 2rem;
    gap: 0.85rem;
}

.project-page .button {
    max-width: 100%;
    min-width: 0;
}

.project-page .button:focus-visible {
    outline-offset: -6px;
}

.project-page figure {
    margin: 0;
}

.project-page__image-frame {
    padding: clamp(0.4rem, 1.2vw, 0.75rem);
    border: 1px solid var(--color-line);
    border-top-color: rgb(255 200 87 / 30%);
    border-bottom-color: rgb(77 187 255 / 30%);
    background: var(--color-graphite);
    box-shadow: inset 0 0 1.5rem rgb(77 187 255 / 4%);
}

.project-page img {
    display: block;
    width: 100%;
    height: auto;
}

.project-page figcaption {
    margin-top: 0.85rem;
    padding-inline: 0.5rem;
    color: var(--color-muted);
    font-size: 0.85rem;
    line-height: 1.7;
}

.project-page__description {
    color: var(--color-muted);
    font-size: clamp(0.9rem, 0.9vw, 1rem);
    line-height: 1.65;
}

.project-page__description > :last-child {
    margin-bottom: 0;
}

.project-page__description :is(h1, h2, h3, h4, h5, h6, strong) {
    color: var(--color-text);
}

.project-page__description :is(h1, h2) {
    max-width: none;
    margin: 2rem 0 1rem;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.25;
}

.project-page__description h3 {
    margin: 1.75rem 0 0.85rem;
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    line-height: 1.35;
}

.project-page__description > :first-child {
    margin-top: 0;
}

.project-page__description a {
    color: var(--color-blue);
    text-underline-offset: 0.2em;
    text-decoration-thickness: 1px;
}

.project-page__description a:hover {
    color: var(--color-amber);
}

.project-page__description :is(ul, ol) {
    padding-left: 1.4rem;
}

.project-page__description li + li {
    margin-top: 0.5rem;
}

.project-page__description li::marker {
    color: var(--color-amber);
}

.project-page__description blockquote {
    margin: 1.5rem 0;
    padding: 0.75rem 1.25rem;
    border-left: 2px solid var(--color-amber);
    background: rgb(255 200 87 / 4%);
}

.project-page__description code {
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.875em;
    color: var(--color-text);
}

.project-page__description pre {
    max-width: 100%;
    padding: 1rem;
    border: 1px solid var(--color-line);
    background: var(--color-background);
    white-space: pre-wrap;
}

.project-page__description table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.project-page__description :is(th, td) {
    padding: 0.7rem 1rem;
    border: 1px solid var(--color-line);
    text-align: left;
}

.project-page__description th {
    color: var(--color-text);
    background: rgb(77 187 255 / 5%);
}

.project-page__gallery {
    display: grid;
    gap: clamp(1.5rem, 3.5vw, 2.5rem);
}

@media (min-width: 56.001rem) and (orientation: landscape) and (max-width: 90rem),
       (min-width: 56.001rem) and (orientation: landscape) and (max-height: 53.125rem) {
    .project-page__header h1 {
        font-size: clamp(1.5rem, min(2.5vw, 4.3svh), 2rem);
    }

    .project-page__summary {
        font-size: 0.9rem;
    }
}

@media (max-width: 38rem) {
    .project-page {
        padding-top: calc(5rem + env(safe-area-inset-top, 0px));
        text-align: center;
    }

    .project-page > nav {
        text-align: left;
    }

    .project-page h1,
    .project-page p {
        margin-inline: auto;
    }

    .project-page__technologies {
        justify-content: center;
    }

    .project-page__links {
        flex-direction: column;
        align-items: center;
    }

    .project-page__description :is(ul, ol) {
        padding-left: 0;
        list-style-position: inside;
    }

    .project-page__description :is(th, td) {
        text-align: center;
    }
}

/* Existing home project previews. */
.projects__cover { width: 100%; max-height: 11rem; object-fit: contain; border-radius: .5rem; }
.projects__detail-content a { color: var(--color-blue); }
.projects__stage { max-height: none; }
.projects__detail-content { overflow-wrap: anywhere; }
.projects__cover { flex-shrink: 0; margin-bottom: .75rem; }
.projects__detail-content a:focus-visible { outline: 2px solid var(--color-blue); outline-offset: 4px; }

.profile {
    isolation: isolate;
    display: grid;
    min-height: calc(100svh - var(--header-height));
    grid-template-columns: minmax(24rem, 1.15fr) minmax(21rem, 0.85fr);
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: clamp(3rem, 8vw, 8rem);
    row-gap: clamp(1.25rem, 2.4vh, 2rem);
    overflow: clip;
    padding-block: clamp(1.75rem, 3.2vh, 3rem);
}

.profile__intro {
    position: relative;
    z-index: 2;
    display: grid;
    width: 100%;
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
}

.profile__intro .section-label {
    margin-bottom: 0.25rem;
    font-weight: 400;
    letter-spacing: 0.09em;
}

.profile__headline {
    margin-bottom: 0;
    color: var(--color-text);
    font-family: Sora, Inter, system-ui, sans-serif;
    font-size: clamp(1.9rem, 3vw, 3.35rem);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 1.08;
    text-wrap: balance;
}

.profile__stage {
    display: contents;
}

.profile__content {
    position: relative;
    z-index: 2;
    width: min(100%, 38rem);
    max-width: 38rem;
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    padding-top: clamp(0.2rem, 0.8vh, 0.6rem);
}

.profile__story {
    display: grid;
    max-width: 38rem;
    gap: clamp(0.55rem, 1vh, 0.85rem);
}

.profile__story p {
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: clamp(0.84rem, 0.88vw, 0.96rem);
    line-height: 1.56;
}

.profile__positioning {
    position: relative;
    display: grid;
    max-width: 36.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem clamp(1.5rem, 4vw, 3.5rem);
    margin-top: clamp(1.15rem, 2.2vh, 1.8rem);
    padding-block: clamp(0.95rem, 1.8vh, 1.35rem);
    border-block: 1px solid var(--color-line);
}

.profile__role,
.profile__availability,
.profile__languages {
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    text-transform: uppercase;
}

.profile__role {
    margin-bottom: 0;
    color: var(--color-text);
    font-size: clamp(0.76rem, 0.82vw, 0.88rem);
    letter-spacing: 0.08em;
}

.profile__availability {
    grid-column: 1;
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 0.72rem;
    letter-spacing: 0.055em;
    line-height: 1.65;
}

.profile__languages {
    display: flex;
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
    align-items: center;
    gap: clamp(0.8rem, 1.8vw, 1.4rem);
}

.profile__languages div {
    position: relative;
    display: grid;
    gap: 0.18rem;
}

.profile__languages div + div {
    padding-left: clamp(0.8rem, 1.5vw, 1.2rem);
}

.profile__languages div + div::before {
    position: absolute;
    width: 1px;
    inset-block: 0.1rem;
    left: 0;
    background: var(--color-line);
    content: "";
}

.profile__languages dt {
    color: var(--color-amber);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
}

.profile__languages dd {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.66rem;
    letter-spacing: 0.055em;
}

.profile__actions {
    margin-top: clamp(0.75rem, 1.4vh, 1.1rem);
}

.profile__portrait {
    --profile-portrait-shape: polygon(
        14% 2%,
        82% 0,
        98% 11%,
        100% 82%,
        88% 97%,
        27% 100%,
        4% 88%,
        0 21%
    );

    position: relative;
    z-index: 2;
    width: min(
        100%,
        clamp(
            18rem,
            calc((100svh - var(--header-height) - 15rem) * 0.72),
            24rem
        )
    );
    margin: 0;
    margin-top: clamp(1.85rem, 2.3vw, 2.15rem);
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    justify-self: end;
}

.profile__portrait-glass,
.profile__portrait-surface {
    clip-path: var(--profile-portrait-shape);
}

.profile__portrait-glass {
    position: relative;
    isolation: isolate;
    aspect-ratio: 0.72;
    padding: 2px 3px 4px;
    background:
        radial-gradient(circle at 2% 58%, rgb(255 170 63 / 22%), transparent 20%),
        radial-gradient(circle at 98% 45%, rgb(77 187 255 / 18%), transparent 18%),
        linear-gradient(108deg, rgb(255 213 175 / 34%), rgb(255 255 255 / 7%) 24% 72%, rgb(151 193 255 / 30%));
    filter:
        drop-shadow(-0.18rem 0.18rem 0.3rem rgb(0 0 0 / 68%));
}

.profile__portrait-surface {
    position: relative;
    display: grid;
    height: 100%;
    overflow: hidden;
    background:
        linear-gradient(164deg, rgb(255 255 255 / 8%) 0 5%, transparent 16%),
        linear-gradient(112deg, rgb(18 24 34 / 96%), rgb(5 10 18 / 98%) 48%, rgb(11 17 31 / 96%));
    box-shadow:
        inset 1rem 0 1.8rem rgb(255 170 63 / 9%),
        inset -1.2rem 0 2rem rgb(77 187 255 / 7%),
        inset 0 -0.5rem 1rem rgb(0 0 0 / 68%);
}

.profile__portrait-surface::before,
.profile__portrait-surface::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.profile__portrait-surface::before {
    z-index: 2;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgb(3 7 12 / 19%) 0%,
            rgb(3 7 12 / 10%) 42%,
            rgb(3 7 12 / 39%) 100%
        ),
        radial-gradient(ellipse 22% 68% at 1% 52%, rgb(255 170 63 / 22%), transparent 74%),
        radial-gradient(ellipse 20% 68% at 99% 48%, rgb(77 187 255 / 17%), transparent 72%),
        linear-gradient(
            112deg,
            rgb(74 43 12 / 22%) 0%,
            transparent 28%,
            rgb(255 255 255 / 5%) 50%,
            transparent 72%,
            rgb(8 25 42 / 18%) 100%
        );
}

.profile__portrait-surface::after {
    z-index: 3;
    width: 1px;
    height: 54%;
    top: 6%;
    right: 23%;
    rotate: 31deg;
    background: linear-gradient(
        180deg,
        transparent,
        rgb(242 243 238 / 13%) 26%,
        rgb(77 187 255 / 16%) 72%,
        transparent
    );
    box-shadow: 1.1rem 2rem 0 rgb(242 243 238 / 5%);
}

.profile__portrait-energy {
    position: absolute;
    z-index: 4;
    inset: 0;
    clip-path: var(--profile-portrait-shape);
    pointer-events: none;
}

.profile__portrait-energy::before,
.profile__portrait-energy::after {
    position: absolute;
    inset: 0;
    content: "";
}

.profile__portrait-energy::before {
    background:
        linear-gradient(90deg, transparent, rgb(255 170 63 / 72%), transparent) 10% 2px / 36% 1px no-repeat,
        linear-gradient(90deg, transparent, rgb(77 187 255 / 68%), transparent) 90% calc(100% - 3px) / 40% 1px no-repeat,
        linear-gradient(180deg, transparent, rgb(255 170 63 / 70%), transparent) 2px 50% / 1px 48% no-repeat,
        linear-gradient(180deg, transparent, rgb(77 187 255 / 62%), transparent) calc(100% - 3px) 50% / 1px 46% no-repeat;
    opacity: 0.46;
}

.profile__portrait-energy::after {
    background:
        radial-gradient(circle at 4% 8%, rgb(255 200 87 / 72%) 0 1.1px, transparent 2.4px),
        radial-gradient(circle at 2% 76%, rgb(255 170 63 / 88%) 0 1.5px, transparent 2.7px),
        radial-gradient(circle at 11% 98%, rgb(255 170 63 / 68%) 0 1px, transparent 2.3px),
        radial-gradient(circle at 90% 2%, rgb(77 187 255 / 58%) 0 1.1px, transparent 2.3px),
        radial-gradient(circle at 98% 30%, rgb(77 187 255 / 92%) 0 1.5px, transparent 2.6px),
        radial-gradient(circle at 94% 96%, rgb(77 187 255 / 68%) 0 1px, transparent 2.3px);
    opacity: 0.5;
}

.profile__portrait-facet {
    position: absolute;
    z-index: 3;
    width: 32%;
    height: 28%;
    right: 0;
    bottom: 0;
    border-top: 1px solid rgb(255 200 87 / 22%);
    border-left: 1px solid rgb(242 243 238 / 10%);
    background: linear-gradient(145deg, rgb(255 200 87 / 4%), rgb(2 7 12 / 20%));
    clip-path: polygon(38% 0, 100% 6%, 100% 100%, 0 100%);
    pointer-events: none;
}

.profile__portrait-energy-anchor {
    position: absolute;
    z-index: 4;
    width: clamp(1.2rem, 1.5vw, 1.6rem);
    height: 67%;
    top: 54.5%;
    left: 2%;
    border-radius: 48%;
    background:
        radial-gradient(circle at 48% 24%, rgb(255 246 185 / 94%) 0 1px, rgb(255 184 61 / 76%) 1.8px, transparent 3.4px),
        radial-gradient(circle at 52% 76%, rgb(255 246 185 / 92%) 0 1px, rgb(255 170 63 / 72%) 1.8px, transparent 3.4px),
        linear-gradient(
            180deg,
            transparent 3%,
            rgb(255 170 63 / 14%) 14%,
            rgb(255 239 154 / 82%) 24%,
            rgb(255 170 63 / 32%) 42% 58%,
            rgb(255 239 154 / 78%) 76%,
            rgb(255 170 63 / 12%) 88%,
            transparent 97%
        ) center / 2px 100% no-repeat;
    filter:
        drop-shadow(0 0 0.18rem rgb(255 229 118 / 64%))
        drop-shadow(0 0 0.48rem rgb(255 170 63 / 38%));
    mix-blend-mode: screen;
    opacity: 0.86;
    pointer-events: none;
    transform: translate(-50%, -50%) rotate(-3.4deg);
    animation: profile-entry-energy 2.4s ease-in-out infinite alternate;
}

.profile__portrait-energy-anchor::before {
    position: absolute;
    width: 3.6rem;
    height: 100%;
    top: 0;
    left: 30%;
    background: radial-gradient(
        ellipse at left center,
        rgb(255 222 132 / 34%),
        rgb(255 174 67 / 16%) 34%,
        rgb(255 170 63 / 6%) 56%,
        transparent 72%
    );
    content: "";
    filter: blur(0.22rem);
}

.profile__portrait-energy-anchor::after {
    position: absolute;
    z-index: 2;
    width: 3px;
    height: 100%;
    top: 0;
    left: 50%;
    border-radius: 999px;
    background:
        linear-gradient(
            180deg,
            transparent,
            rgb(255 250 199 / 100%) 42%,
            rgb(255 180 57 / 94%) 58%,
            transparent
        ) center -25% / 100% 20% no-repeat,
        linear-gradient(
            180deg,
            transparent,
            rgb(255 207 93 / 60%) 8%,
            rgb(255 244 174 / 88%) 24%,
            rgb(255 180 57 / 72%) 50%,
            rgb(255 244 174 / 86%) 76%,
            rgb(255 207 93 / 58%) 92%,
            transparent
        ) center / 100% 100% no-repeat;
    box-shadow:
        0 0 0.18rem rgb(255 246 185 / 90%),
        0 0 0.46rem rgb(255 170 63 / 72%);
    content: "";
    transform: translateX(-50%);
    animation: profile-edge-flow 2.2s linear infinite;
}

@keyframes profile-edge-flow {
    from {
        background-position: center -25%, center;
    }

    to {
        background-position: center 125%, center;
    }
}

/*
 * Pulse by opacity only: animating the drop-shadow re-rasterized its blur
 * every frame; opacity is composited. The glow keeps its static filter.
 */
@keyframes profile-entry-energy {
    from {
        opacity: 0.66;
    }

    to {
        opacity: 0.96;
    }
}

.profile__portrait-image {
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    inset: 0;
    filter: saturate(0.64) contrast(1.1) brightness(0.68);
    object-fit: cover;
    object-position: 50% 43%;
}

@media (min-width: 56.001rem) {
    .profile {
        grid-template-rows: auto auto;
        align-content: center;
    }

    .profile__intro .section-label {
        font-size: clamp(0.9rem, 0.9vw, 1rem);
        font-weight: 500;
    }

    .profile__headline {
        font-size: clamp(1.9rem, 2.4vw, 2.35rem);
        line-height: 1.2;
        letter-spacing: -0.03em;
    }

    .profile__story p {
        max-width: 60ch;
        font-size: clamp(0.9rem, 0.9vw, 1rem);
        line-height: 1.6;
    }

    .profile__positioning {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.7rem;
    }

    .profile__role {
        font-weight: 500;
    }

    .profile__seniority {
        display: block;
        margin-top: 0.18rem;
        color: var(--color-muted);
        font-size: 0.76rem;
        font-weight: 400;
    }

    .profile__languages {
        grid-column: 1;
        grid-row: auto;
        align-items: start;
    }

    .profile__languages dt,
    .profile__languages dd {
        font-size: 0.72rem;
    }
}

/* Keep the complete composition inside short desktop viewports used by laptops. */
@media (min-width: 56.01rem) and (max-height: 50rem) {
    .profile {
        row-gap: clamp(0.65rem, 1.4vh, 1rem);
        padding-block: clamp(1rem, 2.2vh, 1.35rem);
    }

    .profile__intro {
        gap: 0.42rem;
    }

    .profile__intro .section-label {
        margin-bottom: 0.1rem;
    }

    .profile__headline {
        font-size: clamp(1.75rem, 2.4vw, 2.35rem);
    }

    .profile__content {
        padding-top: 0;
    }

    .profile__story {
        gap: clamp(0.35rem, 0.7vh, 0.55rem);
    }

    .profile__positioning {
        margin-top: clamp(0.7rem, 1.25vh, 1rem);
        padding-block: clamp(0.65rem, 1.15vh, 0.85rem);
    }

    .profile__actions {
        margin-top: clamp(0.5rem, 0.9vh, 0.7rem);
    }

    .profile__portrait {
        margin-top: clamp(1.1rem, 1.8vw, 1.55rem);
    }
}

.skills {
    min-height: calc(100svh - var(--header-height));
    overflow: hidden;
    padding-block: clamp(1.75rem, 3.2vh, 3rem) 0;
}

.skills__intro {
    position: relative;
    z-index: 3;
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
}

.skills__intro .section-label {
    margin-bottom: 0.25rem;
    font-weight: 400;
    letter-spacing: 0.09em;
}

.skills__headline {
    margin-bottom: 0;
    color: var(--color-text);
    font-family: Sora, Inter, system-ui, sans-serif;
    font-size: clamp(1.9rem, 3vw, 3.35rem);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 1.08;
    white-space: nowrap;
}

.skills__intro > p:last-child {
    max-width: none;
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: clamp(0.82rem, 0.82vw, 0.95rem);
    white-space: nowrap;
}

@media (min-width: 56.001rem) {
    .skills {
        --skills-intro-offset: clamp(0rem, calc((100svh - 56rem) * 0.15), 4rem);
    }

    .skills__intro {
        margin-top: var(--skills-intro-offset);
    }

    .skills__intro .section-label {
        font-size: clamp(0.9rem, 0.9vw, 1rem);
        font-weight: 500;
    }

    .skills__headline {
        font-size: clamp(1.9rem, 2.4vw, 2.35rem);
        line-height: 1.2;
        letter-spacing: -0.03em;
        white-space: normal;
    }

    .skills__intro > p:last-child {
        max-width: none;
        font-size: 1rem;
        line-height: 1.6;
        white-space: normal;
    }

    .skills .skills__branch {
        top: max(23%, calc(clamp(11rem, 20svh, 14rem) + var(--skills-intro-offset)));
    }

    .skills .skills__branch-title {
        font-size: clamp(0.9rem, 1vw, 1.05rem);
        letter-spacing: 0.09em;
    }

    .skills .skills__nodes {
        top: 4%;
    }
}

.skills__network {
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
}

.skills__origin-anchor {
    position: absolute;
    bottom: 7.5%;
    left: 50%;
    width: 1px;
    height: 1px;
}

.skills__branch {
    position: absolute;
    top: 23%;
    bottom: 10%;
    width: 38%;
}

.skills__branch--blue {
    --skills-energy-color: var(--color-blue);
    left: 4%;
    color: var(--color-blue);
}

.skills__branch--amber {
    --skills-energy-color: var(--color-amber);
    right: 4%;
    color: var(--color-amber);
}

.skills__branch-title {
    position: absolute;
    top: 0;
    margin: 0;
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    font-size: clamp(0.85rem, 1vw, 1.05rem);
    font-weight: 500;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.skills__branch--blue .skills__branch-title {
    left: 17%;
}

.skills__branch--amber .skills__branch-title {
    right: 17%;
}

.skills__branch-anchor {
    position: absolute;
    top: 51%;
    width: 1px;
    height: 1px;
}

.skills__branch--blue .skills__branch-anchor {
    right: 0;
}

.skills__branch--amber .skills__branch-anchor {
    left: 0;
}

.skills__nodes {
    position: absolute;
    display: grid;
    grid-auto-rows: minmax(2.15rem, 1fr);
    inset: 11% 0 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.skills__node {
    position: relative;
    display: flex;
    min-height: 2rem;
    align-items: center;
    align-self: center;
    gap: 0.75rem;
    color: var(--color-text);
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    font-size: clamp(0.68rem, 0.72vw, 0.78rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.skills__branch--blue .skills__node {
    flex-direction: row-reverse;
}

.skills__branch--blue .skills__node:nth-child(odd) {
    justify-self: start;
    margin-left: 7%;
}

.skills__branch--blue .skills__node:nth-child(even) {
    justify-self: start;
    margin-left: 17%;
}

.skills__branch--amber .skills__node:nth-child(odd) {
    justify-self: end;
    margin-right: 7%;
}

.skills__branch--amber .skills__node:nth-child(even) {
    justify-self: end;
    margin-right: 17%;
}

.skills__branch.is-dense .skills__nodes {
    grid-auto-rows: minmax(1.7rem, 1fr);
}

.skills__branch.is-dense .skills__node {
    font-size: clamp(0.62rem, 0.66vw, 0.72rem);
}

.skills__node-anchor {
    position: relative;
    display: block;
    width: 0.72rem;
    height: 0.72rem;
    flex: 0 0 auto;
    border: 1px solid var(--skills-energy-color);
    background:
        radial-gradient(
            circle at 50% 50%,
            color-mix(in srgb, var(--skills-energy-color) 92%, white) 0 17%,
            var(--skills-energy-color) 20% 31%,
            transparent 35%
        ),
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--skills-energy-color) 72%, white),
            transparent 42%
        ),
        rgb(8 15 22 / 78%);
    box-shadow:
        0 0 0.32rem var(--skills-energy-color),
        0 0 0.9rem color-mix(in srgb, var(--skills-energy-color) 34%, transparent);
    clip-path: polygon(50% 0, 93% 25%, 100% 70%, 62% 100%, 14% 86%, 0 38%);
    rotate: 14deg;
}

.skills__node-anchor::after {
    position: absolute;
    width: 0.18rem;
    height: 0.18rem;
    border-radius: 50%;
    background: var(--skills-energy-color);
    box-shadow: 0 0 0.55rem var(--skills-energy-color);
    content: "";
    inset: 50% auto auto 50%;
    translate: -50% -50%;
}

.skills__node.is-energy-impact .skills__node-anchor {
    animation: skills-node-impact 520ms cubic-bezier(0.2, 0.8, 0.25, 1);
}

.skills__node.is-energy-impact .skills__node-label {
    color: color-mix(in srgb, var(--skills-energy-color) 42%, white);
    text-shadow: 0 0 0.7rem color-mix(in srgb, var(--skills-energy-color) 55%, transparent);
}

@keyframes skills-node-impact {
    0% {
        filter: brightness(0.86);
        scale: 1;
    }

    34% {
        filter:
            brightness(1.9)
            drop-shadow(0 0 0.48rem var(--skills-energy-color));
        scale: 1.48;
    }

    100% {
        filter: brightness(1);
        scale: 1;
    }
}

.skills__node-label {
    position: relative;
    white-space: nowrap;
}

.journey__controls {
    display: none;
}

.journey {
    display: grid;
    min-height: calc(100svh - var(--header-height));
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(1.75rem, 3.6vh, 3rem);
    overflow: hidden;
    padding-block: clamp(1.75rem, 3.2vh, 3rem);
}

.journey__intro {
    position: relative;
    z-index: 3;
    display: grid;
    width: min(42rem, 58%);
    gap: 0.7rem;
}

.journey__intro .section-label {
    margin-bottom: 0.25rem;
    font-weight: 400;
    letter-spacing: 0.09em;
}

.journey__headline {
    margin-bottom: 0;
    color: var(--color-text);
    font-family: Sora, Inter, system-ui, sans-serif;
    font-size: clamp(1.9rem, 3vw, 3.35rem);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 1.08;
    text-wrap: balance;
}

.journey__intro > p:last-child {
    max-width: 48ch;
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: clamp(0.88rem, 0.9vw, 1rem);
}

.journey__stage {
    position: relative;
    z-index: 2;
    display: grid;
    min-height: 0;
    max-height: 35rem;
    grid-template-columns: minmax(22rem, 0.88fr) minmax(30rem, 1.12fr);
    align-items: stretch;
    gap: clamp(2.5rem, 6vw, 6rem);
}

.journey__network {
    position: relative;
    align-self: end;
    height: calc(100% + clamp(4rem, 11vh, 6rem));
    grid-column: 2;
    grid-row: 1;
    min-height: clamp(22rem, 49vh, 34rem);
}

.journey__origin-anchor {
    position: absolute;
    right: 2%;
    bottom: 0;
    width: 1px;
    height: 1px;
}

.journey__nodes {
    position: absolute;
    margin: 0;
    padding: 0;
    inset: 0;
    list-style: none;
}

.journey__node-item {
    position: absolute;
}

.journey__node-item:nth-child(1) {
    right: auto;
    bottom: 27%;
    left: 11%;
}

.journey__node-item:nth-child(2) {
    right: auto;
    bottom: 43%;
    left: 14%;
}

.journey__node-item:nth-child(3) {
    right: auto;
    bottom: 57%;
    left: 20%;
}

.journey__node-item:nth-child(4) {
    right: auto;
    bottom: 68%;
    left: 29%;
}

.journey__node-item:nth-child(5) {
    right: auto;
    bottom: 77%;
    left: 40%;
}

.journey__node-item:nth-child(6) {
    right: auto;
    bottom: 88%;
    left: 53%;
}

.journey-node {
    position: relative;
    display: inline-flex;
    min-height: 2.8rem;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.2rem 0.55rem 0.7rem;
    border: 0;
    background: transparent;
    color: var(--color-muted);
    cursor: pointer;
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    font-size: clamp(0.68rem, 0.76vw, 0.78rem);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    transition:
        color 240ms ease,
        filter 320ms ease,
        transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.journey-node::after {
    display: none;
    position: absolute;
    right: 1.35rem;
    bottom: 0.38rem;
    left: 0.7rem;
    height: 1px;
    background: linear-gradient(90deg, currentcolor, transparent 92%);
    content: "";
    opacity: 0.34;
    transform-origin: left;
    transition: opacity 260ms ease, transform 320ms ease;
}

.journey-node__label {
    white-space: nowrap;
}

.journey-node__anchor {
    position: relative;
    order: -1;
    flex: 0 0 auto;
    width: 0.52rem;
    height: 0.52rem;
    border: 1px solid rgb(255 226 163 / 76%);
    border-radius: 50%;
    background: rgb(255 170 63 / 26%);
    box-shadow:
        0 0 0.34rem rgb(255 170 63 / 42%),
        0 0 0.9rem rgb(255 226 163 / 12%);
    transition:
        background 260ms ease,
        box-shadow 320ms ease,
        scale 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.journey-node:is(:hover, :focus-visible, .is-active) {
    color: var(--color-text);
    filter: drop-shadow(0 0 0.52rem rgb(255 200 87 / 24%));
    transform: translateY(-0.08rem);
}

.journey-node:focus-visible {
    outline: 0;
}

.journey-node:is(:hover, :focus-visible, .is-active)::after {
    opacity: 0.74;
    transform: scaleX(1.08);
}

.journey-node:is(:hover, :focus-visible, .is-active) .journey-node__anchor {
    background: rgb(255 200 87 / 88%);
    box-shadow:
        0 0 0.4rem rgb(255 200 87 / 84%),
        0 0 1.1rem rgb(255 170 63 / 42%);
    scale: 1.16;
}

.journey-node.is-energy-impact {
    color: var(--color-text);
    filter: drop-shadow(0 0 0.7rem rgb(255 200 87 / 34%));
}

.journey-node.is-energy-impact .journey-node__anchor {
    animation: journey-node-anchor-impact 620ms ease-out both;
}

@keyframes journey-node-anchor-impact {
    0% {
        background: rgb(255 170 63 / 28%);
        box-shadow: 0 0 0.3rem rgb(255 170 63 / 32%);
        scale: 1;
    }

    42% {
        background: rgb(255 236 190 / 100%);
        box-shadow:
            0 0 0.5rem rgb(255 200 87 / 100%),
            0 0 1.35rem rgb(255 170 63 / 68%);
        scale: 1.42;
    }

    100% {
        background: rgb(255 200 87 / 72%);
        box-shadow: 0 0 0.7rem rgb(255 170 63 / 42%);
        scale: 1.08;
    }
}

.journey__detail {
    --journey-plate-shape: polygon(
        19% 0,
        72% 2%,
        100% 23%,
        94% 57%,
        79% 100%,
        51% 92%,
        22% 100%,
        0 73%,
        7% 38%
    );
    position: relative;
    isolation: isolate;
    align-self: center;
    width: 100%;
    height: clamp(19rem, 42vh, 28rem);
    grid-column: 1;
    grid-row: 1;
    overflow: hidden;
    padding: clamp(1.65rem, 2.75vw, 2.35rem) clamp(2rem, 3.5vw, 3.25rem);
    border: 0;
    background:
        radial-gradient(circle at 3% 58%, rgb(77 187 255 / 13%), transparent 20%),
        radial-gradient(circle at 96% 43%, rgb(255 170 63 / 18%), transparent 22%),
        linear-gradient(112deg, rgb(151 193 255 / 24%), rgb(255 255 255 / 5%) 26% 70%, rgb(255 213 175 / 24%));
    clip-path: var(--journey-plate-shape);
    filter:
        drop-shadow(-0.2rem 0.18rem 0.36rem rgb(0 0 0 / 70%))
        drop-shadow(0.2rem 0 0.72rem rgb(255 170 63 / 9%));
    opacity: 0.76;
    transition:
        filter 420ms ease,
        opacity 360ms ease;
}

@media (min-width: 56.001rem) {
    .journey {
        grid-template-rows: auto clamp(22rem, 49vh, 34rem);
        align-content: center;
        gap: clamp(1.25rem, 2.4vh, 2rem);
    }

    .journey__intro {
        width: min(39rem, 52%);
        text-align: left;
    }

    .journey__intro .section-label {
        font-size: clamp(0.9rem, 0.9vw, 1rem);
        font-weight: 500;
    }

    .journey__headline {
        font-size: clamp(1.9rem, 2.4vw, 2.35rem);
        line-height: 1.2;
        letter-spacing: -0.03em;
    }

    .journey__intro > p:last-child {
        font-size: 1rem;
        line-height: 1.6;
    }

    .journey__detail {
        background:
            radial-gradient(circle at 2% 58%, rgb(77 187 255 / 14%), transparent 18%),
            radial-gradient(circle at 98% 45%, rgb(255 170 63 / 15%), transparent 20%),
            linear-gradient(108deg, rgb(151 193 255 / 52%), rgb(255 255 255 / 18%) 24% 72%, rgb(255 213 175 / 48%));
    }

    .journey .journey__detail-energy::before {
        opacity: 0.6;
    }

    .journey .journey__detail-energy::after {
        background:
            radial-gradient(circle at 20% 1.5%, var(--color-blue) 0 1.4px, transparent 3px),
            radial-gradient(circle at 71% 3%, var(--color-amber) 0 1.4px, transparent 3px),
            radial-gradient(circle at 98% 23%, var(--color-amber) 0 1.4px, transparent 3px),
            radial-gradient(circle at 78% 98%, var(--color-amber) 0 1.4px, transparent 3px),
            radial-gradient(circle at 23% 98%, var(--color-blue) 0 1.4px, transparent 3px),
            radial-gradient(circle at 2% 72%, var(--color-blue) 0 1.4px, transparent 3px);
        opacity: 0.8;
        filter: drop-shadow(0 0 0.2rem rgb(77 187 255 / 35%));
    }
}

.journey__detail.is-active {
    filter:
        drop-shadow(-0.2rem 0 0.72rem rgb(77 187 255 / 12%))
        drop-shadow(0.3rem 0 0.92rem rgb(255 170 63 / 18%));
    opacity: 0.98;
}

.journey__detail.is-energy-arrived {
    filter:
        drop-shadow(-0.2rem 0 0.78rem rgb(77 187 255 / 16%))
        drop-shadow(0.32rem 0 1rem rgb(255 170 63 / 24%));
    opacity: 1;
}

.journey__detail::before {
    position: absolute;
    z-index: -2;
    background:
        linear-gradient(158deg, rgb(255 255 255 / 9%) 0 5%, transparent 17%),
        linear-gradient(112deg, rgb(18 24 34 / 97%), rgb(5 10 18 / 98%) 48%, rgb(11 17 31 / 96%));
    clip-path: var(--journey-plate-shape);
    box-shadow:
        inset 1rem 0 1.8rem rgb(77 187 255 / 6%),
        inset -1.2rem 0 2rem rgb(255 170 63 / 6%),
        inset 0 -0.5rem 1rem rgb(0 0 0 / 70%);
    content: "";
    inset: 2px 3px 4px;
}

.journey__detail::after {
    position: absolute;
    z-index: -1;
    background:
        radial-gradient(ellipse 24% 70% at 2% 54%, rgb(77 187 255 / 15%), transparent 74%),
        radial-gradient(ellipse 26% 72% at 98% 46%, rgb(255 170 63 / 18%), transparent 76%),
        linear-gradient(118deg, transparent 24%, rgb(255 255 255 / 3%) 49%, transparent 73%);
    content: "";
    inset: 0;
    opacity: 0.32;
}

.journey__detail-content {
    position: relative;
    z-index: 2;
    display: flex;
    width: min(76%, 24rem);
    height: 100%;
    margin-inline: auto;
    flex-direction: column;
    justify-content: center;
}

.journey__detail-kicker,
.journey__detail-takeaway span,
.journey__detail-takeaway p {
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.journey__detail-kicker {
    margin-bottom: 0.5rem;
    color: var(--color-amber);
    font-size: 0.68rem;
}

.journey__detail h3 {
    max-width: 20ch;
    margin-bottom: 0.7rem;
    font-size: clamp(1.05rem, 1.35vw, 1.35rem);
    line-height: 1.16;
}

.journey__detail-content > p:not(.journey__detail-kicker) {
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: clamp(0.78rem, 0.82vw, 0.9rem);
    line-height: 1.5;
}

.journey__detail-takeaway {
    margin-top: clamp(0.85rem, 1.6vh, 1.15rem);
    padding-top: 0.7rem;
    border-top: 1px solid var(--color-line);
}

.journey__detail-takeaway span {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--color-blue);
    font-size: 0.62rem;
}

.journey__detail-takeaway p {
    margin-bottom: 0;
    color: var(--color-text);
    font-size: 0.68rem;
    line-height: 1.6;
}

.journey__detail-energy {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    inset: 0;
}

.journey__detail-energy::before {
    position: absolute;
    background:
        linear-gradient(90deg, transparent, rgb(77 187 255 / 68%), transparent) 12% 2px / 34% 1px no-repeat,
        linear-gradient(90deg, transparent, rgb(255 170 63 / 72%), transparent) 86% calc(100% - 3px) / 38% 1px no-repeat,
        linear-gradient(180deg, transparent, rgb(255 170 63 / 64%), transparent) calc(100% - 3px) 48% / 1px 52% no-repeat;
    content: "";
    inset: 0;
    opacity: 0.22;
}

.journey__detail-energy::after {
    position: absolute;
    background:
        radial-gradient(circle at 8% 3%, rgb(77 187 255 / 64%) 0 1px, transparent 2.4px),
        radial-gradient(circle at 97% 27%, rgb(255 170 63 / 88%) 0 1.4px, transparent 2.7px),
        radial-gradient(circle at 83% 98%, rgb(255 200 87 / 62%) 0 1px, transparent 2.3px),
        radial-gradient(circle at 20% 97%, rgb(77 187 255 / 58%) 0 1px, transparent 2.3px);
    content: "";
    inset: 0;
    opacity: 0.34;
}

.journey__detail.is-energy-arrived .journey__detail-energy::before {
    opacity: 0.84;
    animation:
        project-detail-entry-impact 760ms ease-out both,
        button-perimeter-pulse 1.8s ease-in-out 760ms infinite alternate;
}

.journey__detail.is-energy-arrived .journey__detail-energy::after {
    opacity: 0.92;
    animation: button-node-pulse 1.35s ease-in-out infinite alternate;
}

.journey__detail-anchor {
    position: absolute;
    top: 54%;
    left: 0.4rem;
    width: 1px;
    height: 1px;
}


.contact {
    display: grid;
    min-height: calc(100svh - var(--header-height));
    grid-template-columns: minmax(20rem, 0.9fr) minmax(27rem, 1.1fr);
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: clamp(2.5rem, 6vw, 6rem);
    row-gap: clamp(1.25rem, 2.4vh, 2rem);
    overflow: clip;
    overflow-clip-margin: 1.25rem;
    padding-block: clamp(1.75rem, 3.2vh, 3rem);
}

.contact__intro {
    position: relative;
    z-index: 3;
    display: grid;
    width: 100%;
    grid-column: 1;
    grid-row: 1;
    gap: 0.7rem;
}

.contact__intro .section-label {
    margin-bottom: 0.25rem;
    font-weight: 400;
    letter-spacing: 0.09em;
}

.contact__headline {
    margin-bottom: 0;
    color: var(--color-text);
    font-size: clamp(1.9rem, 3vw, 3.35rem);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 1.08;
    text-wrap: balance;
}

.contact__intro > p:last-child {
    max-width: 48ch;
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: clamp(0.88rem, 0.9vw, 1rem);
}

.contact__stage {
    display: contents;
}

.contact__channels {
    position: relative;
    z-index: 2;
    width: 100%;
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    margin-top: clamp(0.45rem, 1vh, 0.85rem);
}

.contact__channel-list {
    display: flex;
    margin: 0;
    align-items: stretch;
    gap: clamp(0.85rem, 2vw, 1.5rem);
    padding-block: clamp(0.95rem, 1.8vh, 1.3rem);
    border-block: 1px solid transparent;
}

.contact__channel-line {
    position: absolute;
    inset-inline: 0;
    height: 1px;
    background: var(--color-line);
    pointer-events: none;
    transform-origin: left center;
}

.contact__channel-line--top { top: 0; }
.contact__channel-line--bottom { bottom: 0; transform-origin: right center; }

.contact-channel {
    position: relative;
    display: grid;
    min-width: 0;
    flex: 1 1 0;
    gap: 0.18rem;
}

.contact-channel:first-child {
    flex-grow: 1.35;
}

.contact-channel + .contact-channel {
    padding-left: clamp(0.85rem, 1.7vw, 1.3rem);
}

.contact-channel + .contact-channel::before {
    position: absolute;
    width: 1px;
    inset-block: 0.1rem;
    left: 0;
    background: var(--color-line);
    content: "";
}

.contact-channel dt,
.contact-channel dd {
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    text-transform: uppercase;
}

.contact-channel dt {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    color: var(--color-amber);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
}

.contact-channel dd {
    margin: 0;
    text-transform: none;
    color: var(--color-muted);
    font-size: clamp(0.6rem, 0.66vw, 0.68rem);
    letter-spacing: 0.045em;
    white-space: nowrap;
}

.contact-channel__icon {
    display: inline-grid;
    width: 1rem;
    height: 1rem;
    place-items: center;
    color: var(--color-blue);
}

.contact-channel__icon svg {
    width: 0.88rem;
    height: 0.88rem;
    stroke-width: 1.4;
}

.contact-channel a {
    color: inherit;
    text-decoration: none;
    transition: color 240ms ease;
}

.contact-channel a:is(:hover, :focus-visible) {
    color: var(--color-text);
    outline: 0;
}

.contact-channel.is-pending dd {
    opacity: 0.58;
}

.contact__form {
    --contact-corner-inset: 1.35rem;
    --contact-plate-shape: polygon(
        var(--contact-corner-inset) 0,
        calc(100% - var(--contact-corner-inset)) 0,
        100% var(--contact-corner-inset),
        100% calc(100% - var(--contact-corner-inset)),
        calc(100% - var(--contact-corner-inset)) 100%,
        var(--contact-corner-inset) 100%,
        0 calc(100% - var(--contact-corner-inset)),
        0 var(--contact-corner-inset)
    );
    position: relative;
    width: min(100%, clamp(27rem, 42vw, 34rem));
    height: clamp(24rem, 55vh, 30rem);
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    justify-self: end;
    overflow: visible;
    margin: clamp(1.85rem, 2.3vw, 2.15rem) 0 0;
    border: 0;
}

.contact__form-plate {
    --contact-panel-x: 0px;
    --contact-panel-y: 0px;

    position: absolute;
    isolation: isolate;
    overflow: hidden;
    padding: 2px;
    background:
        linear-gradient(90deg, rgb(255 200 87 / 44%), rgb(255 255 255 / 8%) 32% 68%, rgb(77 187 255 / 38%));
    clip-path: var(--contact-plate-shape);
    cursor: grab;
    filter:
        drop-shadow(-0.2rem 0 0.72rem rgb(255 170 63 / 12%))
        drop-shadow(0.3rem 0 0.9rem rgb(77 187 255 / 10%));
    inset: 0;
    transform: translate3d(
        var(--contact-panel-x),
        var(--contact-panel-y),
        0
    );
    will-change: transform;
}

.contact__form.is-panel-grabbed .contact__form-plate {
    cursor: grabbing;
    user-select: none;
}

.contact__form-plate :is(input, textarea) {
    cursor: text;
}

.contact__form-plate :is(button, a) {
    cursor: pointer;
}

.contact__form-plate::before {
    position: absolute;
    z-index: -2;
    background:
        linear-gradient(158deg, rgb(255 255 255 / 8%) 0 5%, transparent 17%),
        linear-gradient(112deg, rgb(18 24 34 / 98%), rgb(5 10 18 / 99%) 48%, rgb(11 17 31 / 97%));
    clip-path: var(--contact-plate-shape);
    box-shadow:
        inset 1rem 0 1.8rem rgb(255 170 63 / 6%),
        inset -1.2rem 0 2rem rgb(77 187 255 / 5%),
        inset 0 -0.5rem 1rem rgb(0 0 0 / 66%);
    content: "";
    inset: 2px;
}

.contact__form-plate::after {
    position: absolute;
    z-index: -1;
    background:
        radial-gradient(ellipse 22% 62% at 0 50%, rgb(255 170 63 / 14%), transparent 76%),
        radial-gradient(ellipse 24% 64% at 100% 48%, rgb(77 187 255 / 13%), transparent 78%),
        linear-gradient(118deg, transparent 25%, rgb(255 255 255 / 3%) 49%, transparent 72%);
    content: "";
    inset: 0;
    opacity: 0.42;
}

.contact__form-content {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-blue) transparent;
    position: relative;
    z-index: 2;
    display: flex;
    height: 100%;
    padding: clamp(1.55rem, 2.6vw, 2.35rem) clamp(1.75rem, 3.3vw, 3rem);
    flex-direction: column;
}

.contact__form-header {
    margin-bottom: clamp(1.1rem, 2vh, 1.6rem);
    text-align: center;
}

.contact__form-header h3 {
    margin: 0;
    font-size: clamp(1.05rem, 1.55vw, 1.45rem);
    font-weight: 500;
    letter-spacing: -0.025em;
}

.contact__field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.8rem, 1.6vw, 1.35rem);
}

.contact-field {
    display: grid;
    gap: 0.42rem;
}

.contact-field > span {
    color: var(--color-muted);
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.contact-field :is(input, textarea) {
    width: 100%;
    border: 1px solid rgb(242 243 238 / 16%);
    border-radius: 0;
    outline: 0;
    background: rgb(3 8 14 / 58%);
    color: var(--color-text);
    font: inherit;
    transition:
        border-color 240ms ease,
        background 240ms ease,
        box-shadow 300ms ease;
}

.contact-field input {
    height: 2.8rem;
    padding-inline: 0.85rem;
}

.contact-field textarea {
    height: clamp(6.5rem, 13vh, 7.5rem);
    min-height: clamp(6.5rem, 14vh, 8rem);
    padding: 0.75rem 0.85rem;
    resize: vertical;
}

.contact-field :is(input, textarea):focus {
    border-color: rgb(255 200 87 / 56%);
    background: rgb(5 10 18 / 82%);
    box-shadow:
        inset 0 0 1.3rem rgb(255 170 63 / 4%),
        0 0 0.85rem rgb(255 170 63 / 8%);
}

.contact-field--message {
    margin-top: clamp(0.8rem, 1.6vh, 1.15rem);
}

.contact__privacy {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.68rem;
    line-height: 1.5;
}

.contact__privacy a { color: var(--color-blue); text-underline-offset: 0.2em; }
.contact__verification { width: 100%; min-width: 0; }

.contact__form-footer {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 0.6rem;
    margin-top: auto;
    align-items: center;
    justify-content: center;
    padding-top: clamp(1.15rem, 2.2vh, 1.6rem);
}

.contact__submit {
    min-width: clamp(14rem, 19vw, 16rem);
    flex: 0 0 auto;
    justify-content: center;
    margin-inline: auto;
}

.contact__form-facet {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.contact__form-facet {
    top: 2px;
    right: 2px;
    width: 29%;
    height: 35%;
    background: linear-gradient(142deg, rgb(77 187 255 / 8%), transparent 72%);
    clip-path: polygon(26% 0, 100% 0, 100% 100%);
    opacity: 0.54;
}

@media (min-width: 56.001rem) {
    .contact {
        grid-template-rows: 1fr auto auto 1fr;
        row-gap: 0;
    }

    .contact__intro {
        grid-row: 2;
        align-content: start;
    }

    .contact__channels {
        grid-row: 3;
        margin-top: clamp(1.15rem, 2.2vh, 1.8rem);
    }

    .contact__intro .section-label {
        font-size: clamp(0.9rem, 0.9vw, 1rem);
        font-weight: 500;
    }

    .contact__headline {
        font-size: clamp(1.9rem, 2.4vw, 2.35rem);
        line-height: 1.2;
        letter-spacing: -0.03em;
    }

    .contact__intro > p:last-child {
        font-size: 1rem;
        line-height: 1.6;
    }

    .contact-channel dd {
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.6;
    }

    .contact__form {
        grid-row: 1 / -1;
        align-self: center;
        height: auto;
        margin-top: 0;
        top: calc(-1 * min(
            clamp(0rem, calc((56rem - 100svh) * 0.75), 6rem),
            max(0rem, calc((100svh - var(--header-height) - 30rem) / 2 - 1.75rem))
        ));
    }

    .contact__form-plate {
        position: relative;
    }

    .contact__form-content {
        min-height: clamp(24rem, 55vh, 30rem);
        height: auto;
        gap: 1rem;
        padding: clamp(1.5rem, 2.6vw, 2rem);
    }

    .contact__form-header,
    .contact-field--message {
        margin: 0;
    }

    .contact-field--message {
        flex: 1;
        grid-template-rows: auto minmax(6.5rem, 1fr);
    }

    .contact-field textarea {
        height: 100%;
        min-height: 6.5rem;
    }

    .contact__form-footer {
        flex-direction: column;
        gap: 0.7rem;
        padding-top: 0.25rem;
    }

    .contact__form-footer > p {
        margin: 0;
        font-size: 0.9rem;
        text-align: center;
    }

    .contact__form-footer > p:empty {
        display: none;
    }
}

.site-footer {
    display: flex;
    min-height: 6rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--color-line);
    color: var(--color-muted);
    font-size: 0.85rem;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 56rem) {
    .site-header__inner {
        padding-block: 0;
        align-items: center;
    }

    .hero {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .section__header,
    .profile__stage {
        grid-template-columns: 1fr;
    }

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

    .projects {
        overflow: visible;
    }

    .projects__intro {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .projects__intro .section-label {
        grid-column: auto;
    }

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

    .projects__detail {
        min-height: 22rem;
    }

    .projects__network {
        min-height: 30rem;
    }

    .profile__intro {
        width: 100%;
    }

    .profile__stage {
        display: grid;
        min-height: auto;
        max-height: none;
        gap: clamp(2.5rem, 7vw, 4rem);
    }

    .profile__content {
        max-width: none;
        grid-column: auto;
        grid-row: auto;
    }

    .profile__portrait {
        width: min(100%, 26rem);
        margin-top: 0;
        grid-column: auto;
        grid-row: auto;
        justify-self: center;
    }

    .skills {
        min-height: auto;
        overflow: visible;
        padding-block: clamp(4rem, 10vw, 7rem);
    }

    .skills__intro {
        width: 100%;
    }

    .skills__headline,
    .skills__intro > p:last-child {
        white-space: normal;
    }

    .skills__network {
        position: relative;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        margin-top: 3rem;
    }

    .skills__origin-anchor {
        display: none;
    }

    .skills__branch {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: auto;
        min-height: 24rem;
        padding: 1.25rem;
        border: 1px solid var(--color-line);
        background: rgb(5 9 14 / 42%);
    }

    .skills__branch-title,
    .skills__branch--blue .skills__branch-title,
    .skills__branch--amber .skills__branch-title {
        position: static;
    }

    .skills__branch-anchor {
        display: none;
    }

    .skills__nodes {
        position: static;
        display: grid;
        gap: 1.15rem;
        margin-top: 2rem;
    }

    .skills__node,
    .skills__branch--blue .skills__node:nth-child(n),
    .skills__branch--amber .skills__node:nth-child(n) {
        position: static;
        flex-direction: row;
        justify-self: stretch;
        margin: 0;
    }

    .journey {
        min-height: auto;
        overflow: visible;
        padding-block: clamp(4rem, 10vw, 7rem);
    }

    .journey__intro {
        width: 100%;
    }

    .journey__stage {
        max-height: none;
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .journey__network {
        align-self: stretch;
        height: auto;
        grid-column: 1;
        grid-row: auto;
        min-height: auto;
    }

    .journey__origin-anchor {
        display: none;
    }

    .journey__nodes {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.8rem 1.5rem;
    }

    .journey__node-item:nth-child(n) {
        position: static;
        transform: none;
    }

    .journey-node {
        width: 100%;
        justify-content: space-between;
        border-bottom: 1px solid var(--color-line);
    }

    .journey__detail {
        width: min(100%, 31rem);
        height: auto;
        min-height: 22rem;
        grid-column: 1;
        grid-row: auto;
        justify-self: center;
    }

    .contact {
        min-height: auto;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: clamp(2rem, 6vw, 3rem);
        overflow: visible;
        padding-block: clamp(4rem, 10vw, 7rem);
    }

    .contact__intro {
        grid-row: 1;
        grid-template-columns: 1fr;
    }

    .contact__intro .section-label {
        grid-column: auto;
    }

    .contact__channels {
        width: min(100%, 36rem);
        grid-column: 1;
        grid-row: 2;
        margin-top: 0;
    }

    .contact__form {
        width: min(100%, 42rem);
        grid-column: 1;
        grid-row: 3;
        margin-top: 0;
        justify-self: center;
    }
}

/* Stacked contact: intro, form, then contact channels above the seed. */
@media (max-width: 38rem), (max-width: 85.375rem) and (orientation: portrait) {
    .section.contact {
        min-height: max(48rem, calc(100svh - var(--header-height)));
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto minmax(6rem, 1fr);
        align-content: start;
        gap: clamp(1rem, 2svh, 1.75rem);
        padding-block: clamp(1.5rem, 3svh, 2.5rem) 1rem;
        overflow: visible;
    }

    .contact__intro {
        grid-column: 1;
        grid-row: 1;
        width: min(100%, 42rem);
        justify-self: center;
        justify-items: center;
        text-align: center;
        gap: 0.7rem;
    }

    .contact__headline {
        font-size: clamp(1.8rem, 3.7vw, 2.5rem);
        line-height: 1.2;
    }

    .contact__intro > p:last-child {
        max-width: 60ch;
        font-size: clamp(0.88rem, 1.5vw, 1rem);
        line-height: 1.5;
    }

    .contact__form {
        grid-column: 1;
        grid-row: 2;
        width: min(80%, 33rem);
        height: auto;
        top: auto;
        margin: 0.75rem 0 0;
        align-self: start;
        justify-self: center;
    }

    .contact__form-plate {
        position: relative;
    }

    .contact__form-content {
        height: auto;
        min-height: clamp(20rem, 32svh, 23rem);
        padding: clamp(1.2rem, 2vw, 1.6rem);
        gap: 0.7rem;
    }

    .contact__form-header,
    .contact-field--message {
        margin: 0;
    }

    .contact-field--message {
        flex: 1;
        grid-template-rows: auto minmax(5rem, 1fr);
    }

    .contact-field textarea {
        height: 100%;
        min-height: 5rem;
    }

    .contact__form-footer {
        padding-top: 0.5rem;
    }

    .contact__channels {
        grid-column: 1;
        grid-row: 3;
        width: min(88%, 38rem);
        justify-self: center;
        margin: clamp(0.75rem, 1.5svh, 1.25rem) 0 0;
        background: rgb(5 10 18 / 88%);
    }

    .contact-channel {
        justify-items: center;
        text-align: center;
        align-content: start;
    }

    .contact-channel dt {
        justify-content: center;
    }

    .contact-channel dd {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

/* Responsive journey: retain the plate and the ascending energy timeline. */
@media (max-width: 38rem), (max-width: 85.375rem) and (orientation: portrait) {
    .journey {
        height: calc(100svh - var(--header-height));
        min-height: 46rem;
        grid-template-rows: auto minmax(0, 1fr);
        align-content: stretch;
        gap: 1.5rem;
        padding-block: clamp(1.5rem, 3svh, 2.5rem) clamp(6rem, 11svh, 8rem);
        overflow: visible;
    }

    .journey__intro {
        width: min(100%, 40rem);
        justify-self: center;
        justify-items: center;
        text-align: center;
        gap: 0.55rem;
    }

    .journey__headline {
        font-size: clamp(1.8rem, 3.7vw, 2.6rem);
        line-height: 1.2;
    }

    .journey__intro > p:last-child {
        max-width: 56ch;
        font-size: clamp(0.88rem, 1.5vw, 1rem);
        line-height: 1.5;
    }

    .journey__stage {
        max-height: none;
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
        gap: clamp(1rem, 3vw, 2rem);
    }

    .journey__detail {
        width: min(100%, 38rem);
        height: min(100%, clamp(22rem, 46svh, 31rem));
        min-height: 0;
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
        padding: 2.5rem 1.75rem;
    }

    .journey__detail-content {
        height: 100%;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        touch-action: pan-y pinch-zoom;
        scrollbar-width: thin;
        scrollbar-color: var(--color-blue) rgb(77 187 255 / 12%);
        text-align: center;
    }

    .journey__detail h3 {
        font-size: clamp(1.35rem, 2.7vw, 1.8rem);
    }

    .journey__network {
        height: 100%;
        min-height: 0;
        grid-column: 2;
        grid-row: 1;
        align-self: stretch;
    }

    .journey__origin-anchor {
        display: block;
    }

    .journey__nodes {
        position: absolute;
        display: block;
        inset: 0;
    }

    .journey .journey__node-item:nth-child(n) {
        position: absolute;
        right: auto;
        max-width: 65%;
        transform: none;
    }

    /* Leave the seed's departure clear and preserve the original rising arc. */
    .journey .journey__node-item:nth-child(1) { left: 5%; bottom: 27%; }
    .journey .journey__node-item:nth-child(2) { left: 7%; bottom: 39%; }
    .journey .journey__node-item:nth-child(3) { left: 11%; bottom: 50%; }
    .journey .journey__node-item:nth-child(4) { left: 17%; bottom: 60%; }
    .journey .journey__node-item:nth-child(5) { left: 24%; bottom: 69%; }
    .journey .journey__node-item:nth-child(6) { left: 33%; bottom: 78%; }

    .journey-node {
        width: max-content;
        max-width: 100%;
        min-height: 2.75rem;
        justify-content: flex-start;
        border: 0;
        font-size: clamp(0.7rem, 1.35vw, 0.82rem);
    }

}

/* Stacked skills: two open technology trees around a shared energy trunk. */
@media (max-width: 38rem), (max-width: 85.375rem) and (orientation: portrait) {
    .skills {
        display: grid;
        height: calc(100svh - var(--header-height));
        min-height: 44rem;
        grid-template-rows: auto minmax(0, 1fr);
        gap: clamp(2rem, 4svh, 3rem);
        padding-block: clamp(1.5rem, 3svh, 2.5rem) clamp(6rem, 12svh, 9rem);
        overflow: visible;
    }

    .skills__intro {
        width: min(100%, 40rem);
        margin: 0;
        justify-self: center;
        justify-items: center;
        text-align: center;
        gap: 0.55rem;
    }

    .skills__headline {
        font-size: clamp(1.8rem, 3.7vw, 2.6rem);
        line-height: 1.2;
        white-space: normal;
    }

    .skills__intro > p:last-child {
        max-width: 52ch;
        font-size: clamp(0.9rem, 1.5vw, 1rem);
        white-space: normal;
    }

    .skills__network {
        position: relative;
        inset: auto;
        display: grid;
        min-height: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(4rem, 10vw, 8rem);
        margin: 0;
    }

    .skills .skills__branch {
        position: relative;
        inset: auto;
        display: grid;
        width: auto;
        min-height: 0;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 1.5rem;
        padding: 0;
        border: 0;
        background: none;
    }

    .skills .skills__branch-title {
        position: static;
        font-size: clamp(0.85rem, 1.7vw, 1rem);
        text-align: center;
    }

    .skills__origin-anchor,
    .skills__branch-anchor {
        display: block;
    }

    .skills .skills__nodes {
        position: relative;
        inset: auto;
        display: grid;
        min-height: 0;
        grid-auto-rows: minmax(2.5rem, 1fr);
        gap: 0.5rem;
        margin: 0;
    }

    .skills .skills__branch--blue .skills__node:nth-child(n) {
        position: relative;
        flex-direction: row-reverse;
        justify-self: start;
        margin: 0;
    }

    .skills .skills__branch--amber .skills__node:nth-child(n) {
        position: relative;
        flex-direction: row;
        justify-self: end;
        margin: 0;
    }

    .skills .skills__branch--blue .skills__node:nth-child(even) {
        margin-left: 12%;
    }

    .skills .skills__branch--amber .skills__node:nth-child(even) {
        margin-right: 12%;
    }

    .skills .skills__node {
        max-width: 100%;
        gap: 0.5rem;
        font-size: clamp(0.7rem, 1.3vw, 0.82rem);
        letter-spacing: 0.04em;
    }

    .skills__node-label {
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

/* Portrait iPads: elevated portrait and a clear energy route beside the text. */
@media (min-width: 38.001rem) and (max-width: 85.375rem) and (orientation: portrait) {
    .profile {
        height: calc(100svh - var(--header-height));
        min-height: 44rem;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        align-content: stretch;
        gap: clamp(1rem, 2svh, 1.75rem);
        padding-block: clamp(1.5rem, 3svh, 2.5rem) clamp(5.5rem, 10svh, 8rem);
        overflow: visible;
    }

    .profile__intro {
        width: min(100%, 40rem);
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
        justify-items: center;
        text-align: center;
        gap: 0.5rem;
    }

    .profile__headline {
        font-size: clamp(1.8rem, 3.7vw, 2.6rem);
        line-height: 1.2;
    }

    .profile__stage {
        display: grid;
        width: 100%;
        min-height: 0;
        max-height: none;
        grid-column: 1;
        grid-row: 2;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1.05fr) minmax(0, 1.05fr);
        gap: clamp(1rem, 2svh, 1.75rem);
        justify-items: center;
    }

    .profile__content {
        display: flex;
        flex-direction: column;
        width: min(55%, 36rem);
        max-width: 40rem;
        min-height: 0;
        height: 100%;
        grid-column: 1;
        grid-row: 1 / span 2;
        justify-self: start;
        padding: 0;
        text-align: left;
    }

    .profile__story {
        flex: 0 1 auto;
        align-content: start;
        min-height: 0;
        max-width: none;
        gap: 0.4rem;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        touch-action: pan-y pinch-zoom;
        scrollbar-width: thin;
        scrollbar-color: var(--color-blue) rgb(77 187 255 / 12%);
        padding-inline: 0.75rem;
    }

    .profile__story p {
        max-width: none;
        font-size: clamp(0.88rem, 1.45vw, 1rem);
        line-height: 1.55;
    }

    .profile__positioning {
        flex-shrink: 0;
        width: 100%;
        max-width: none;
        grid-template-columns: minmax(0, 1fr);
        margin-top: 0.5rem;
        padding-block: 0.5rem;
        gap: 0.3rem 1.5rem;
    }

    .profile__languages {
        grid-column: 1;
        grid-row: auto;
        align-items: center;
        margin: 0;
    }

    .profile__seniority {
        display: inline;
        margin-left: 0.4rem;
        color: var(--color-muted);
        font-size: 0.75rem;
    }

    .profile__actions {
        flex-shrink: 0;
        justify-content: flex-start;
        margin-top: 0.5rem;
    }

    .profile__portrait {
        grid-column: 1;
        grid-row: 1;
        width: auto;
        height: 100%;
        max-height: min(26rem, calc((100vw - var(--page-gutter) * 2) * 0.38 / 0.72));
        aspect-ratio: 0.72;
        margin: 0 4% 0 0;
        align-self: center;
        justify-self: end;
    }

    .profile__portrait-glass {
        height: 100%;
    }

    .profile__portrait-energy-anchor {
        top: 98.5%;
        left: 57.5%;
        height: 60%;
        transform: translate(-50%, -50%) rotate(87deg);
    }
}

/* Stacked projects: centred preview and selectors around a clear energy lane. */
@media (max-width: 38rem), (max-width: 85.375rem) and (orientation: portrait) {
    .projects {
        height: calc(100svh - var(--header-height));
        min-height: 42rem;
        grid-template-rows: auto minmax(0, 1fr);
        align-content: stretch;
        gap: clamp(1rem, 2svh, 1.75rem);
        padding-block: clamp(1.5rem, 3svh, 2.5rem) clamp(6rem, 12svh, 9rem);
        overflow: visible;
    }

    .projects__intro {
        width: min(100%, 38rem);
        justify-self: center;
        justify-items: center;
        text-align: center;
        gap: 0.55rem;
    }

    .projects__intro .section-label {
        grid-column: auto;
    }

    .projects__headline {
        font-size: clamp(1.8rem, 3.7vw, 2.6rem);
        line-height: 1.2;
    }

    .projects__intro > p:last-child {
        max-width: 52ch;
        font-size: clamp(0.9rem, 1.5vw, 1rem);
    }

    .projects__stage {
        width: 100%;
        max-height: none;
        justify-self: center;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, clamp(16rem, 30svh, 22rem)) minmax(0, 1fr);
        gap: clamp(1.25rem, 2.5svh, 2rem);
    }

    .projects__detail {
        width: min(100%, 38rem);
        justify-self: center;
        min-height: 0;
        height: 100%;
        align-self: stretch;
    }

    .projects__detail-body {
        overflow-y: auto;
        touch-action: pan-y pinch-zoom;
        scrollbar-width: none;
        overscroll-behavior-y: contain;
        justify-content: safe center;
        align-items: center;
        text-align: center;
        padding: 1.25rem 1.75rem 0;
    }

    .projects__detail-body::-webkit-scrollbar {
        display: none;
    }

    .projects__scroll-track:not([hidden]) {
        display: block;
        position: absolute;
        z-index: 4;
        top: 1.25rem;
        bottom: 5.5rem;
        right: 0.65rem;
        width: 3px;
        border-radius: 999px;
        background: rgb(77 187 255 / 16%);
        pointer-events: none;
    }

    .projects__scroll-thumb {
        position: absolute;
        width: 100%;
        border-radius: inherit;
        background: linear-gradient(var(--color-blue), var(--color-amber));
        box-shadow: 0 0 0.45rem rgb(77 187 255 / 50%);
    }

    .projects__detail h3 {
        font-size: clamp(1.4rem, 2.8vw, 2rem);
    }

    .projects__network {
        min-height: 0;
        display: grid;
        align-items: center;
    }

    .projects__nodes {
        position: relative;
        inset: auto;
        display: grid;
        height: 100%;
        grid-template-columns: minmax(0, 1fr) clamp(6rem, 12vw, 10rem) minmax(0, 1fr);
        grid-template-rows: repeat(calc(var(--project-network-count) + 1), minmax(1.75rem, 1fr));
        gap: 0.25rem 1.5rem;
        max-height: 100%;
        overflow-y: auto;
        overscroll-behavior-y: contain;
    }

    .projects__nodes .project-node {
        width: max-content;
        max-width: 100%;
        flex: 0 0 auto;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 0.75rem;
        padding-inline: 1rem;
        grid-row: var(--project-slot) / span 2;
        grid-column: 1;
        justify-self: start;
        align-self: center;
        min-height: 3rem;
        margin-inline-start: 0;
        --project-node-label-size: 0.75rem;
        --project-node-index-size: 0.7rem;
    }

    .projects__nodes .project-node:nth-child(even) {
        grid-column: 3;
        justify-self: end;
    }

    .projects__nodes .project-node:nth-child(3n) {
        justify-self: center;
    }

    .projects__nodes .project-node:nth-child(5n) {
        justify-self: end;
    }

    .projects__nodes .project-node:nth-child(odd) .project-node__connector {
        left: auto;
        right: 0.22rem;
    }

    .projects__branch-space {
        width: 100%;
        left: 0;
    }
}

/* Stacked hero: reserve an actual second row for the shared 3D seed. */
@media (max-width: 38rem), (max-width: 85.375rem) and (orientation: portrait) {
    .hero {
        min-height: calc(100svh - var(--header-height));
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(16rem, 1fr);
        align-items: start;
        gap: clamp(1.5rem, 3svh, 2.5rem);
        padding-block: clamp(2rem, 4svh, 3.5rem) 1.5rem;
    }

    .hero__content {
        width: 100%;
        max-width: 38rem;
        justify-self: center;
        text-align: center;
    }

    .hero .section-label {
        margin-inline: auto;
    }

    .hero h1 {
        font-size: clamp(4rem, 8vw, 6rem);
        white-space: normal;
    }

    .hero__statement {
        max-width: none;
        font-size: clamp(1.5rem, 3vw, 2rem);
        line-height: 1.25;
    }

    .hero__statement > span {
        display: block;
    }

    .hero__summary {
        max-width: 55ch;
        margin-inline: auto;
        margin-bottom: 1.5rem;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__seed-space {
        display: block;
        width: 100%;
        height: 100%;
        min-height: 16rem;
        grid-column: 1;
        grid-row: 2;
    }
}

@media (max-width: 38rem) {
    .section.profile {
        height: auto;
        min-height: 100svh;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 1.5rem;
        padding-block: calc(4rem + env(safe-area-inset-top, 0px)) 5rem;
        overflow: visible;
    }

    .profile__intro {
        width: 100%;
        justify-items: center;
        text-align: center;
    }

    .profile__headline {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .profile__stage {
        display: flex;
        flex-direction: column;
        gap: 1.75rem;
        min-height: 0;
        max-height: none;
    }

    .profile__portrait {
        order: -1;
        width: min(68%, 16rem);
        height: auto;
        margin: 0;
        align-self: center;
    }

    .profile__portrait-energy-anchor {
        top: 98.5%;
        left: 57.5%;
        height: 60%;
        transform: translate(-50%, -50%) rotate(87deg);
    }

    .profile__content {
        width: 100%;
        max-width: none;
        height: auto;
        padding: 0;
    }

    .profile__story {
        overflow: visible;
        max-height: none;
        gap: 0.65rem;
    }

    .profile__story p {
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .profile__positioning {
        margin-top: 1rem;
    }

    :root {
        --header-height: 0rem;
    }

    .site-header {
        position: fixed;
        top: calc(0.75rem + env(safe-area-inset-top, 0px));
        right: calc(0.75rem + env(safe-area-inset-right, 0px));
        width: auto;
        border: 0;
        background: transparent;
        backdrop-filter: none;
    }

    .site-header__inner {
        width: auto;
        min-height: 0;
        margin: 0;
        gap: 0;
    }

    .site-header__brand {
        display: none;
    }

    .hero {
        grid-template-rows: auto minmax(10rem, 1fr);
        gap: 1rem;
        padding-block: calc(4.25rem + env(safe-area-inset-top, 0px)) 1rem;
    }

    .hero .section-label {
        margin-bottom: 0.75rem;
        font-size: clamp(0.65rem, 2.6vw, 0.78rem);
        letter-spacing: 0.075em;
    }

    .hero h1 {
        margin-bottom: 0.8rem;
        font-size: clamp(2.75rem, 12vw, 4.5rem);
    }

    .hero__statement {
        margin-bottom: 1rem;
        font-size: clamp(1.1rem, 4.7vw, 1.65rem);
    }

    .hero__summary {
        margin-bottom: 1rem;
        font-size: 0.875rem;
        line-height: 1.55;
    }

    .hero__actions {
        gap: 0.6rem;
    }

    .hero__actions .button {
        flex: 1 1 8rem;
        max-width: 13rem;
        min-height: 2.75rem;
        gap: 0.4rem;
        padding: 0.7rem;
        font-size: 0.65rem;
        letter-spacing: 0.045em;
    }

    .hero__seed-space {
        min-height: 10rem;
    }

    .section.projects {
        min-height: max(100svh, 46rem);
        gap: 1rem;
        padding-block: calc(4rem + env(safe-area-inset-top, 0px)) 6rem;
    }

    .projects__intro {
        gap: 0.4rem;
    }

    .projects__headline {
        font-size: clamp(1.4rem, 5.5vw, 1.9rem);
    }

    .projects__intro > p:last-child {
        font-size: 0.82rem;
        line-height: 1.5;
    }

    .projects__stage {
        grid-template-rows: minmax(0, clamp(13rem, 28svh, 16rem)) minmax(0, 1fr);
        gap: 1rem;
    }

    .projects__detail-body {
        padding: 1rem 1rem 0;
        font-size: 0.8rem;
        line-height: 1.45;
    }

    .projects__detail h3 {
        font-size: 1.25rem;
    }

    .projects__detail-body p,
    .projects__detail-body h3 {
        margin-bottom: 0.6rem;
    }

    .projects__detail-content > .button {
        min-height: 2.75rem;
        margin: 0 1rem 0.8rem;
        padding: 0.65rem 1rem;
        font-size: 0.68rem;
    }

    .projects__nodes {
        grid-template-columns: minmax(0, 1fr) clamp(2rem, 9vw, 3.5rem) minmax(0, 1fr);
        grid-template-rows: repeat(calc(var(--project-network-count) + 1), minmax(1.8rem, 1fr));
        column-gap: 0.35rem;
    }

    .projects__nodes .project-node {
        min-height: 2.75rem;
        padding: 0.55rem;
        column-gap: 0.35rem;
        letter-spacing: 0.025em;
        --project-node-label-size: 0.65rem;
        --project-node-index-size: 0.6rem;
    }

    .projects__nodes .project-node__label {
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.35;
    }

    h1 {
        font-size: clamp(3rem, 20vw, 5rem);
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 0.5rem);
        right: calc(-0.75rem - env(safe-area-inset-right, 0px));
        left: auto;
        width: 100vw;
        display: none;
        max-width: none;
        max-height: calc(100svh - 5rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        padding: 1rem max(1.5rem, env(safe-area-inset-right, 0px)) 1.25rem;
        border: 0;
        border-radius: 0;
        isolation: isolate;
        clip-path: polygon(1rem 0, calc(100% - 1rem) 0, 100% 1rem, 100% calc(100% - 1rem), calc(100% - 1rem) 100%, 1rem 100%, 0 calc(100% - 1rem), 0 1rem);
        background: linear-gradient(110deg, rgb(255 170 63 / 55%), rgb(77 187 255 / 55%));
        flex-direction: column;
        align-items: flex-end;
        gap: 0.25rem;
    }

    .site-nav::before {
        content: "";
        position: absolute;
        inset: 2px;
        z-index: -1;
        clip-path: inherit;
        background: linear-gradient(110deg, #141820, #050a12 50%, #101e2a);
        pointer-events: none;
    }

    .site-nav .site-nav__home { display: inline-flex; }

    .site-header[data-menu-open] .site-nav {
        display: flex;
    }

    .site-nav a {
        min-height: 2.75rem;
        justify-content: flex-end;
        text-align: right;
        gap: 0.75rem;
        padding-inline: 0.5rem;
    }

    .site-nav a::after {
        content: "";
        width: 0.3rem;
        height: 0.3rem;
        border-radius: 50%;
        background: var(--color-blue);
        opacity: 0;
    }

    .site-nav a[aria-current="location"] {
        color: var(--color-text);
    }

    .site-nav a[aria-current="location"]::after {
        opacity: 1;
        box-shadow: 0 0 0.55rem var(--color-blue);
    }

    .site-header__toggle.button {
        display: flex;
        width: 2.75rem;
        height: 2.75rem;
        padding: 0.65rem;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        min-height: 2.75rem;
        border-radius: 0;
        color: var(--color-text);
        cursor: pointer;
    }

    .site-header__toggle:focus-visible,
    .site-nav a:focus-visible {
        outline: 2px solid var(--color-blue);
        outline-offset: -4px;
    }

    .site-header__toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background: currentColor;
    }

    .site-header__toggle[aria-expanded="true"] span:first-child {
        transform: translateY(7px) rotate(45deg);
    }

    .site-header__toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .site-header__toggle[aria-expanded="true"] span:last-child {
        transform: translateY(-7px) rotate(-45deg);
    }

    .section {
        min-height: auto;
    }

    .scene-background::before {
        background:
            radial-gradient(ellipse 78% 46% at 54% 29%, rgb(77 48 105 / 14%) 0%, transparent 72%),
            radial-gradient(ellipse 82% 52% at 52% 62%, rgb(13 72 78 / 13%) 0%, transparent 72%),
            linear-gradient(180deg, #03070c 0%, #050910 100%);
    }

    .scene-background::after {
        background:
            linear-gradient(180deg, rgb(3 7 12 / 58%), rgb(3 7 12 / 36%) 42%, rgb(3 7 12 / 64%)),
            radial-gradient(ellipse 92% 82% at 50% 48%, transparent 22%, rgb(2 5 9 / 48%) 100%);
    }

    .section.skills {
        min-height: max(100svh, 44rem);
        gap: 1.5rem;
        padding-block: calc(4rem + env(safe-area-inset-top, 0px)) 6rem;
    }

    .skills__headline {
        font-size: clamp(1.4rem, 5.5vw, 1.9rem);
    }

    .skills__intro > p:last-child {
        font-size: 0.82rem;
        line-height: 1.5;
    }

    .skills__network {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(2rem, 9vw, 3rem);
    }

    .skills .skills__branch {
        gap: 1rem;
    }

    .skills .skills__branch-title {
        font-size: 0.75rem;
        letter-spacing: 0.055em;
    }

    .skills .skills__nodes {
        grid-auto-rows: minmax(2rem, 1fr);
        gap: 0.35rem;
    }

    .skills .skills__branch .skills__node {
        font-size: clamp(0.63rem, 2.5vw, 0.75rem);
        gap: 0.35rem;
        letter-spacing: 0.02em;
    }

    .skills .skills__branch--blue .skills__node:nth-child(even) {
        margin-left: 5%;
    }

    .skills .skills__branch--amber .skills__node:nth-child(even) {
        margin-right: 5%;
    }

    .skills__node-anchor {
        width: 0.6rem;
        height: 0.6rem;
    }

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

    .profile__languages {
        grid-column: 1;
        grid-row: auto;
        margin-top: 1rem;
    }

    .section.journey {
        height: 100svh;
        min-height: 36rem;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 1rem;
        padding-block: calc(3.75rem + env(safe-area-inset-top, 0px)) 0.75rem;
    }

    .journey__headline {
        font-size: clamp(1.4rem, 5.5vw, 1.9rem);
    }

    .journey__intro > p:last-child {
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .journey__stage {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(10rem, 1fr) clamp(6rem, 15svh, 8rem);
        gap: 0.75rem;
    }

    .journey__network {
        grid-column: 1;
        grid-row: 1;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto;
        align-content: start;
        gap: 0.65rem;
    }

    .journey__controls {
        display: flex;
        grid-column: 1;
        grid-row: 1;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        font-family: "IBM Plex Mono", monospace;
        font-size: 0.7rem;
        color: var(--color-amber);
    }

    .journey .journey__nodes {
        position: relative;
        grid-column: 2;
        grid-row: 1;
        display: flex;
        min-width: 0;
        gap: 0.75rem;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        touch-action: pan-x;
        scrollbar-width: none;
        padding-bottom: 0.4rem;
    }

    .journey__nodes::-webkit-scrollbar { display: none; }

    .journey__nodes::before,
    .journey__nodes::after {
        content: "";
        flex: 0 0 max(0px, calc(50% - var(--first-node-width, 0px) / 2 - 0.75rem));
    }

    .journey__nodes::after {
        flex-basis: max(0px, calc(50% - var(--last-node-width, 0px) / 2 - 0.75rem));
    }

    .journey .journey__node-item:nth-child(n) {
        position: relative;
        inset: auto;
        max-width: none;
        flex: 0 0 auto;
        min-width: 0;
        text-align: center;
        scroll-snap-align: center;
        scroll-snap-stop: always;
        opacity: 0.35;
    }

    .journey .journey__node-item.is-current { opacity: 1; }

    .journey .journey-node {
        max-width: none;
        justify-content: center;
        padding-inline: 0.1rem;
    }

    .journey .journey-node__label {
        white-space: nowrap;
    }

    .journey__detail::before {
        background:
            linear-gradient(158deg, rgb(255 255 255 / 5%) 0 5%, transparent 17%),
            linear-gradient(112deg, rgb(18 24 34 / 65%), rgb(5 10 18 / 70%) 48%, rgb(11 17 31 / 65%));
    }

    .journey__detail > .projects__scroll-track:not([hidden]) {
        top: 1.5rem;
        bottom: 1.5rem;
    }

    .journey-node__anchor {
        position: absolute;
        bottom: 0;
        left: 50%;
        translate: -50% 0;
    }

    .journey-node {
        font-size: clamp(0.62rem, 2.5vw, 0.75rem);
        letter-spacing: 0.02em;
        gap: 0.5rem;
    }

    .journey__detail h3 {
        font-size: 1.25rem;
    }

    .journey__detail-content {
        width: 100%;
        justify-content: safe center;
        font-size: 0.85rem;
        line-height: 1.5;
        overscroll-behavior-y: contain;
        scrollbar-width: none;
    }

    .journey__detail-content::-webkit-scrollbar { display: none; }

    .journey__detail {
        grid-row: 2;
        --journey-plate-shape: polygon(
            1rem 0,
            calc(100% - 1rem) 0,
            100% 1rem,
            100% calc(100% - 1rem),
            calc(100% - 1rem) 100%,
            1rem 100%,
            0 calc(100% - 1rem),
            0 1rem
        );
        height: 100%;
        min-height: 0;
        padding: 1.5rem;
    }

    .section.contact {
        min-height: 100svh;
        grid-template-rows: auto auto auto minmax(8rem, 1fr);
        gap: 1.25rem;
        padding-block: calc(4.5rem + env(safe-area-inset-top, 0px)) 1rem;
    }

    .contact__headline {
        font-size: clamp(1.5rem, 6vw, 1.9rem);
    }

    .contact__intro > p:last-child {
        font-size: 0.85rem;
    }

    .contact__field-row {
        grid-template-columns: 1fr;
    }

    .contact__form {
        --contact-corner-inset: 1rem;
        --contact-plate-shape: polygon(
            var(--contact-corner-inset) 0,
            calc(100% - var(--contact-corner-inset)) 0,
            100% var(--contact-corner-inset),
            100% calc(100% - var(--contact-corner-inset)),
            calc(100% - var(--contact-corner-inset)) 100%,
            var(--contact-corner-inset) 100%,
            0 calc(100% - var(--contact-corner-inset)),
            0 var(--contact-corner-inset)
        );
        height: auto;
        min-height: 0;
        width: calc(100% - 2rem);
    }

    .contact__form-content {
        min-height: 0;
        padding: 1.25rem;
        gap: 1rem;
    }

    .contact-field :is(input, textarea) {
        font-size: 1rem;
    }

    .contact-field textarea {
        height: 7rem;
        min-height: 7rem;
    }

    .contact__channels {
        width: 100%;
    }

    .contact__channel-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.85rem;
    }

    .contact-channel:first-child {
        flex: 1 0 100%;
    }

    .contact-channel + .contact-channel {
        padding-left: 0;
    }

    .contact-channel:nth-child(2)::before {
        display: none;
    }

    .contact__form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .contact__submit {
        align-self: center;
        min-width: 0;
        width: 100%;
    }

    .site-footer {
        padding-block: 1.5rem;
    }
}

/* Keep text and its scroll area inside the irregular desktop plate. */
@media (min-width: 56.001rem) and (orientation: landscape) {
    .journey__detail-content {
        position: absolute;
        inset: 12% 18% 13% 16%;
        width: auto;
        height: auto;
        min-height: 0;
        margin: 0;
        overflow-y: auto;
        justify-content: safe center;
        scrollbar-width: thin;
        scrollbar-color: var(--color-blue) rgb(77 187 255 / 12%);
    }

    .journey__detail-content > * {
        flex-shrink: 0;
    }
}

/* Keep the desktop composition within narrower or shorter landscape screens. */
@media (min-width: 56.001rem) and (orientation: landscape) and (max-width: 90rem),
       (min-width: 56.001rem) and (orientation: landscape) and (max-height: 53.125rem) {
    :root {
        --header-height: 4rem;
    }

    .hero,
    .section:is(.projects, .profile, .skills, .journey, .contact) {
        padding-block: clamp(1rem, 2.5svh, 1.75rem);
        column-gap: clamp(1.25rem, 3vw, 3rem);
        row-gap: clamp(0.75rem, 1.8svh, 1.25rem);
    }

    .hero {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .hero h1 {
        font-size: clamp(2.5rem, min(5vw, 8svh), 4.5rem);
    }

    .hero__statement {
        font-size: clamp(1.25rem, min(2.3vw, 3.7svh), 1.85rem);
        margin-bottom: 1rem;
    }

    .hero__summary {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .hero__actions {
        gap: 0.65rem;
    }

    .hero__actions .button {
        min-width: 0;
        padding-inline: 1rem;
    }

    .projects__headline, .profile__headline, .skills__headline,
    .journey__headline, .contact__headline {
        font-size: clamp(1.5rem, min(2.5vw, 4.3svh), 2rem);
        line-height: 1.2;
    }

    .projects__intro, .profile__intro, .skills__intro,
    .journey__intro, .contact__intro {
        gap: 0.45rem;
    }

    .projects__intro > p:last-child, .skills__intro > p:last-child,
    .journey__intro > p:last-child, .contact__intro > p:last-child {
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .projects, .journey {
        grid-template-rows: auto minmax(0, min(52svh, 27rem));
    }

    .projects__stage, .journey__stage {
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
        gap: clamp(1.25rem, 3vw, 3rem);
        min-width: 0;
        min-height: 0;
    }

    .projects__network, .journey__network {
        min-height: 0;
    }

    .projects__detail-body {
        padding: 1rem 1.25rem 0;
        font-size: 0.85rem;
    }

    .projects__detail-content > .button {
        margin-bottom: 0.75rem;
    }

    .profile {
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
    }

    .profile__content {
        min-height: 0;
        padding-top: 0;
    }

    .profile__story {
        max-height: none;
        overflow: visible;
        justify-content: stretch;
        margin: 0;
        gap: clamp(0.25rem, 0.7svh, 0.4rem);
    }

    .profile__story p {
        font-size: clamp(0.8rem, 1.9svh, 0.9rem);
        line-height: 1.4;
    }

    .profile__positioning {
        grid-template-columns: minmax(0, 1fr) auto;
        margin-top: 0.6rem;
        padding-block: 0.5rem;
        gap: 0.3rem 1rem;
    }

    .profile__languages {
        grid-column: 2;
        grid-row: 1 / span 2;
        gap: 0.65rem;
    }

    .profile__actions {
        margin-top: 0.5rem;
    }

    .profile__portrait {
        width: min(100%, 34svh, 21rem);
    }

    .skills {
        --skills-intro-offset: 0rem;
    }

    .skills .skills__branch {
        top: max(25%, 9rem);
    }

    .skills__nodes {
        grid-auto-rows: minmax(1.75rem, 1fr);
    }

    .skills__node {
        min-height: 1.75rem;
        gap: 0.5rem;
    }

    .journey__detail {
        height: 100%;
        min-height: 0;
    }

    .journey__detail h3 {
        max-width: none;
        font-size: clamp(1rem, 2.5svh, 1.25rem);
        margin-bottom: 0.5rem;
    }

    .journey__detail-takeaway {
        margin-top: 0.6rem;
        padding-top: 0.5rem;
    }

    .journey-node {
        font-size: 0.65rem;
        letter-spacing: 0.04em;
        gap: 0.45rem;
    }

    .section.contact {
        /* Grow only when both the column width and viewport height allow it. */
        --contact-room: clamp(0rem, min(calc((100vw - 72rem) * 0.25), calc((100svh - 44rem) * 0.5)), 5rem);
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
        /* Centre both columns above the ground, leaving the seed its own space. */
        padding-bottom: clamp(6rem, 18svh, 10rem);
    }

    .contact__form {
        width: min(100%, calc(29rem + var(--contact-room)), 72svh);
        top: 0;
        align-self: center;
        justify-self: center;
        margin-top: 0;
    }

    .contact__form-content {
        min-height: 0;
        padding: calc(clamp(0.85rem, 2svh, 1.25rem) + var(--contact-room) * 0.1);
        gap: calc(clamp(0.45rem, 1.2svh, 0.7rem) + var(--contact-room) * 0.04);
    }

    .contact-field--message {
        grid-template-rows: auto auto;
    }

    .contact-field textarea {
        height: calc(clamp(4rem, 12svh, 6rem) + var(--contact-room) * 0.3);
        min-height: 4rem;
    }

    .contact-field input {
        height: clamp(2.25rem, 5svh, 2.8rem);
    }

    .contact__form-header h3 {
        font-size: clamp(1rem, 2.5svh, 1.2rem);
    }

    .contact__submit {
        min-width: 0;
        min-height: 2.5rem;
        padding-block: 0.65rem;
    }

    .contact__form-footer {
        padding-top: 0.5rem;
    }

    .projects__detail-body, .journey__detail-content {
        overflow-y: auto;
        overscroll-behavior-y: contain;
        justify-content: safe center;
        scrollbar-width: thin;
        scrollbar-color: var(--color-blue) rgb(77 187 255 / 12%);
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
/* Only keyboard focus bypasses opacity/blur used by entrance animations.
   Normal pointer navigation keeps the existing scene presentation. */
html[data-keyboard-navigation] .portfolio .section:has(:focus-visible),
html[data-keyboard-navigation] .portfolio .section:focus-visible,
html[data-keyboard-navigation] .portfolio .section :has(:focus-visible),
html[data-keyboard-navigation] .portfolio .section :focus-visible {
    opacity: 1 !important;
    filter: none !important;
}

main[tabindex="-1"]:focus,
.section[tabindex="-1"]:focus {
    outline: none;
}

/* A scrollable panel must not pass its remaining momentum to the page. */
.projects__detail-body,
.profile__story,
.journey__detail-content,
.contact__form-content,
.site-nav {
    overscroll-behavior-y: contain;
}



