/* ==========================================================================
   hsnvusal — portfolio
   1. Tokens  2. Base  3. Header  4. Primitives  5. Home  6. Pages
   7. Footer  8. Motion
   ========================================================================== */

/* 1. Tokens --------------------------------------------------------------- */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('../fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('../fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('../fonts/space-grotesk-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #0d0e10;
    --bg-raised: #131518;
    --surface: #17191d;
    --line: rgba(236, 233, 225, 0.1);
    --line-strong: rgba(236, 233, 225, 0.2);
    --text: #ece9e1;
    --muted: #a5a299;
    --dim: #6f6d67;
    --accent: #ff7a2f;
    --accent-text: #ff8f4f;
    --on-accent: #17100a;
    --ok: #b4ef5a;
    --danger: #ff6b6b;

    --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    --header-h: 68px;
    --container: 1200px;
    --gutter: 24px;
    --radius: 18px;
    --radius-sm: 10px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

    color-scheme: dark;
}

[data-theme='light'] {
    --bg: #f5f3ee;
    --bg-raised: #efece5;
    --surface: #fffdf9;
    --line: rgba(22, 20, 15, 0.12);
    --line-strong: rgba(22, 20, 15, 0.24);
    --text: #16140f;
    --muted: #5b584f;
    --dim: #8b877d;
    --accent: #e25a14;
    --accent-text: #b8440a;
    --on-accent: #fffaf5;
    --ok: #3f8f12;
    --danger: #c22a2a;

    color-scheme: light;
}

/* 2. Base ----------------------------------------------------------------- */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, pre {
    margin: 0;
}

ul, ol {
    padding: 0;
    list-style: none;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button, input, textarea {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

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

.container {
    width: min(100% - var(--gutter) * 2, var(--container));
    margin-inline: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

.icon {
    flex: none;
    width: 1.15em;
    height: 1.15em;
}

/* 3. Header --------------------------------------------------------------- */

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    height: var(--header-h);
    border-bottom: 1px solid transparent;
    transition: background-color 0.3s, border-color 0.3s;
}

.site-header.is-scrolled {
    border-bottom-color: var(--line);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(100% - var(--gutter) * 2, var(--container));
    height: 100%;
    margin-inline: auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-nav__list {
    display: flex;
    gap: 6px;
}

.site-nav__list a {
    display: block;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.9375rem;
    transition: color 0.2s, background-color 0.2s;
}

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

.site-nav__list a[aria-current='page'] {
    background: var(--surface);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--line);
}

.site-nav__tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-link,
.theme-toggle {
    display: grid;
    place-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: none;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.lang-link:hover,
.theme-toggle:hover {
    border-color: var(--line-strong);
    color: var(--text);
}

.theme-toggle__sun,
[data-theme='light'] .theme-toggle__moon {
    display: grid;
}

.theme-toggle__moon,
[data-theme='light'] .theme-toggle__sun {
    display: none;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: none;
    cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before {
    display: block;
    width: 18px;
    height: 2px;
    margin-inline: auto;
    border-radius: 2px;
    background: var(--text);
    transition: transform 0.25s var(--ease);
}

.nav-toggle__bars {
    transform: translateY(-3px);
}

.nav-toggle__bars::before {
    content: '';
    transform: translateY(6px);
}

.nav-toggle[aria-expanded='true'] .nav-toggle__bars {
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded='true'] .nav-toggle__bars::before {
    transform: rotate(-90deg);
}

@media (max-width: 760px) {
    .nav-toggle {
        display: block;
    }

    .brand__name {
        font-size: 0.9375rem;
    }

    .site-nav {
        position: fixed;
        inset: var(--header-h) 0 auto;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 16px var(--gutter) 24px;
        border-bottom: 1px solid var(--line);
        background: var(--bg);
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity 0.2s, transform 0.2s var(--ease), visibility 0.2s;
    }

    .site-nav.is-open {
        visibility: visible;
        opacity: 1;
        transform: none;
    }

    .site-nav__list {
        flex-direction: column;
    }

    .site-nav__list a {
        padding: 12px 14px;
        font-size: 1.0625rem;
    }
}

/* 4. Primitives ----------------------------------------------------------- */

.eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.eyebrow__num {
    color: var(--accent-text);
}

.eyebrow__sep {
    color: var(--dim);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn .icon {
    transition: transform 0.25s var(--ease);
}

.btn:hover .icon-arrow-right {
    transform: translateX(4px);
}

.btn--primary {
    background: var(--accent);
    color: var(--on-accent);
}

.btn--primary:hover {
    background: color-mix(in srgb, var(--accent) 86%, var(--text));
}

.btn--ghost {
    border-color: var(--line-strong);
}

.btn--ghost:hover {
    border-color: var(--text);
}

.btn--icon {
    width: 50px;
    padding: 0;
    border-color: var(--line-strong);
}

.btn--icon:hover {
    border-color: var(--text);
}

.btn--sm {
    min-height: 44px;
    padding: 0 20px;
    font-size: 0.9375rem;
}

.btn[disabled] {
    opacity: 0.6;
    cursor: progress;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-block: 4px;
    border-bottom: 1px solid var(--line-strong);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: border-color 0.2s, color 0.2s;
}

.link-arrow:hover {
    border-color: var(--accent);
    color: var(--accent-text);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chips li {
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.chips--lg li {
    padding: 8px 16px;
    color: var(--text);
    font-size: 0.875rem;
}

.section {
    padding-block: clamp(72px, 10vw, 136px);
}

.section--tight {
    padding-top: 0;
}

.section-head {
    display: grid;
    gap: 18px;
    max-width: 720px;
    margin-bottom: clamp(40px, 6vw, 72px);
}

.section-title {
    font-size: clamp(2rem, 4.4vw, 3.25rem);
}

.section-intro {
    color: var(--muted);
    font-size: 1.125rem;
}

/* 5. Home ----------------------------------------------------------------- */

.hero {
    position: relative;
    display: grid;
    align-items: center;
    min-height: 100svh;
    padding-block: calc(var(--header-h) + 48px) 96px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(60% 50% at 78% 30%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%),
        linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 72px,
        linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 72px 100%;
    -webkit-mask-image: linear-gradient(#000 40%, transparent);
    mask-image: linear-gradient(#000 40%, transparent);
    opacity: 0.7;
}

.hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
}

.hero__copy {
    display: grid;
    justify-items: start;
    gap: 28px;
}

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.hero__title em {
    color: var(--accent-text);
    font-style: normal;
}

.hero__lead {
    max-width: 34em;
    color: var(--muted);
    font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero__scroll {
    position: absolute;
    bottom: 28px;
    left: 50%;
    display: grid;
    justify-items: center;
    gap: 10px;
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    transform: translateX(-50%);
}

.hero__scroll-line {
    width: 1px;
    height: 36px;
    background: linear-gradient(var(--accent), transparent);
    animation: scroll-cue 2.2s var(--ease) infinite;
    transform-origin: top;
}

@keyframes scroll-cue {
    0% { transform: scaleY(0); opacity: 1; }
    60% { transform: scaleY(1); opacity: 1; }
    100% { transform: scaleY(1); opacity: 0; }
}

/* Request lifecycle diagram */

.diagram {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.diagram__wires use {
    fill: none;
    stroke: var(--line-strong);
    stroke-width: 1.5;
    stroke-dasharray: 4 6;
}

.diagram__packets circle {
    fill: var(--accent);
}

.diagram__packets .is-alt {
    fill: var(--ok);
}

.diagram__node rect {
    fill: var(--surface);
    stroke: var(--line-strong);
    stroke-width: 1;
}

.diagram__node.is-main rect {
    stroke: var(--accent);
}

.diagram__name {
    fill: var(--text);
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
}

.diagram__meta,
.diagram__log text {
    fill: var(--muted);
    font-family: var(--font-mono);
    font-size: 11px;
}

.diagram__log .is-ok {
    fill: var(--ok);
}

/* Section index */

.spine {
    position: fixed;
    top: 50%;
    left: max(20px, calc((100vw - var(--container)) / 2 - 150px));
    z-index: 20;
    display: none;
    transform: translateY(-50%);
}

@media (min-width: 1500px) {
    .spine {
        display: block;
    }
}

.spine__track {
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 3px;
    width: 1px;
    background: var(--line-strong);
}

.spine__fill {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: top;
}

.spine__list {
    display: grid;
    gap: 26px;
}

.spine__list a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 20px;
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s;
}

.spine__list a::before {
    content: '';
    position: absolute;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--bg);
    box-shadow: 0 0 0 1px var(--line-strong);
    transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.spine__label {
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s, transform 0.2s;
}

.spine__list a:hover,
.spine__list a.is-active {
    color: var(--text);
}

.spine__list a:hover .spine__label,
.spine__list a.is-active .spine__label {
    opacity: 1;
    transform: none;
}

.spine__list a.is-active::before {
    background: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
    transform: scale(1.15);
}

/* Case study cards */

.cases {
    display: grid;
    gap: 28px;
}

.case {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    padding: clamp(24px, 3.4vw, 48px);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 6px);
    background: var(--surface);
    transform-origin: 50% 0;
}

@media (min-width: 960px) and (min-height: 720px) {
    .cases:not(.cases--static) .case {
        position: sticky;
        top: calc(var(--header-h) + 24px + var(--i) * 18px);
    }
}

.case__body {
    display: grid;
    justify-items: start;
    gap: 20px;
}

.case__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.case__meta span:first-child {
    color: var(--accent-text);
}

.case__title {
    font-size: clamp(1.75rem, 3.4vw, 2.75rem);
}

.case__title a {
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
    transition: background-size 0.35s var(--ease);
}

.case__title a:hover {
    background-size: 100% 2px;
}

.case__summary {
    color: var(--muted);
}

.case__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
    margin-top: 6px;
}

.case__visual {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
}

.case__visual img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
    transition: transform 0.8s var(--ease);
}

.case:hover .case__visual img {
    transform: scale(1.03);
}

.specs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    padding-block: 18px;
    border-block: 1px solid var(--line);
}

.specs__item {
    display: grid;
    gap: 4px;
}

.specs dd {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.specs small {
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
}

.specs dt {
    color: var(--muted);
    font-size: 0.8125rem;
    line-height: 1.3;
}

.manifest {
    min-height: 100%;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.manifest__bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.manifest__bar span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--line-strong);
}

.manifest__bar b {
    margin-left: 10px;
    font-weight: 400;
}

.manifest__code {
    padding: 20px 20px 24px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--muted);
    font-family: inherit;
    line-height: 1.9;
}

.manifest__code .k {
    color: var(--accent-text);
}

.manifest__code .v {
    color: var(--text);
}

.more-work {
    display: grid;
    justify-items: start;
    gap: 24px;
    margin-top: clamp(56px, 8vw, 96px);
}

.more-work__title,
.list-title {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.list-title {
    margin-block: clamp(48px, 7vw, 80px) 24px;
}

.list-title:first-child {
    margin-top: 0;
}

.rows {
    width: 100%;
    border-top: 1px solid var(--line);
}

.row__link {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) minmax(0, 0.6fr) 24px;
    align-items: center;
    gap: 20px;
    padding: 22px 8px;
    border-bottom: 1px solid var(--line);
    transition: background-color 0.25s, padding 0.25s var(--ease);
}

a.row__link:hover {
    padding-inline: 18px;
    background: var(--surface);
}

.row__year,
.row__stack {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.row__main {
    display: grid;
    gap: 4px;
}

.row__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
}

.row__summary {
    color: var(--muted);
    font-size: 0.9375rem;
}

.row__arrow {
    display: grid;
    color: var(--dim);
    transition: color 0.2s, transform 0.25s var(--ease);
}

a.row__link:hover .row__arrow {
    color: var(--accent-text);
    transform: translateX(3px);
}

/* Sliding words */

.band {
    display: grid;
    gap: 6px;
    padding-block: clamp(24px, 4vw, 56px);
    overflow: hidden;
    border-block: 1px solid var(--line);
    background: var(--bg-raised);
}

.band__row {
    width: max-content;
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 7vw, 5.5rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.03em;
    white-space: nowrap;
    will-change: transform;
}

.band__row i {
    margin-inline: 0.25em;
    color: var(--accent);
    font-style: normal;
    font-weight: 500;
}

.band__row--outline {
    margin-left: -18vw;
    color: transparent;
    -webkit-text-stroke: 1px var(--line-strong);
}

.band__row--outline i {
    -webkit-text-stroke: 0;
}

/* Process */

.process__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(32px, 6vw, 96px);
}

.process__head {
    position: sticky;
    top: calc(var(--header-h) + 48px);
    margin-bottom: 0;
}

.steps {
    position: relative;
}

.steps__rail {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 19px;
    width: 1px;
    background: var(--line-strong);
}

.steps__fill {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--accent);
    transform-origin: top;
}

.steps__list {
    display: grid;
    gap: clamp(40px, 6vw, 72px);
}

.step {
    position: relative;
    display: grid;
    gap: 10px;
    padding-left: 72px;
    transition: opacity 0.4s;
}

.step__num {
    position: absolute;
    top: -4px;
    left: 0;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--bg);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    transition: border-color 0.3s, color 0.3s, background-color 0.3s;
}

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

.step__text {
    max-width: 32em;
    color: var(--muted);
}

/* Stack */

.stack-list {
    border-top: 1px solid var(--line);
}

.stack-list__row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    padding-block: 26px;
    border-bottom: 1px solid var(--line);
}

.stack-list dt {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Call to action */

.cta__panel {
    position: relative;
    display: grid;
    justify-items: start;
    gap: 22px;
    padding: clamp(32px, 6vw, 80px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 6px);
    background:
        radial-gradient(70% 120% at 100% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 62%),
        var(--surface);
}

.cta__title {
    max-width: 14em;
    font-size: clamp(2rem, 5vw, 3.75rem);
}

.cta__text {
    max-width: 34em;
    color: var(--muted);
    font-size: 1.125rem;
}

.cta__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    margin-top: 8px;
}

/* 6. Pages ---------------------------------------------------------------- */

.page-head {
    padding-block: calc(var(--header-h) + clamp(56px, 9vw, 112px)) clamp(40px, 6vw, 72px);
}

.page-head .container {
    display: grid;
    justify-items: start;
    gap: 20px;
}

.page-title {
    font-size: clamp(2.75rem, 8vw, 5.5rem);
    letter-spacing: -0.04em;
}

.page-lead {
    max-width: 38em;
    color: var(--muted);
    font-size: clamp(1.125rem, 1.8vw, 1.375rem);
}

/* Case study */

.crumbs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    transition: color 0.2s;
}

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

.facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    margin-top: 20px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.facts dt {
    margin-bottom: 6px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.facts__links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

.project__visual {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 6px);
    background: var(--surface);
}

.project__visual img {
    width: 100%;
}

.project__visual .manifest {
    max-width: 640px;
    padding: clamp(8px, 2vw, 24px);
}

.specs--wide {
    margin-top: 40px;
    padding-block: 28px;
}

.project__grid {
    display: grid;
    gap: clamp(48px, 7vw, 88px);
    max-width: 860px;
    margin-block: clamp(56px, 8vw, 104px);
}

.project__block {
    display: grid;
    gap: 24px;
}

.project__block h2 {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.project__problem {
    font-family: var(--font-display);
    font-size: clamp(1.375rem, 2.6vw, 1.875rem);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.015em;
}

.built {
    display: grid;
    border-top: 1px solid var(--line);
}

.built__item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 16px;
    padding-block: 26px;
    border-bottom: 1px solid var(--line);
}

.built__num {
    padding-top: 4px;
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.built__item h3 {
    margin-bottom: 8px;
    font-size: 1.375rem;
}

.built__item p {
    color: var(--muted);
}

.ticks {
    display: grid;
    gap: 12px;
}

.ticks li {
    position: relative;
    padding-left: 28px;
    color: var(--muted);
}

.ticks li::before {
    content: '';
    position: absolute;
    top: 0.7em;
    left: 2px;
    width: 12px;
    height: 1px;
    background: var(--accent);
}

.next-project {
    display: grid;
    gap: 14px;
    padding-block: clamp(32px, 5vw, 56px);
    border-top: 1px solid var(--line);
}

.next-project__title {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    transition: color 0.25s;
}

.next-project__title .icon {
    transition: transform 0.35s var(--ease);
}

.next-project:hover .next-project__title {
    color: var(--accent-text);
}

.next-project:hover .icon {
    transform: translateX(10px);
}

/* About */

.about {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(32px, 6vw, 88px);
}

.about__bio {
    display: grid;
    gap: 22px;
    color: var(--muted);
    font-size: 1.125rem;
}

.about__first {
    color: var(--text);
    font-family: var(--font-display);
    font-size: clamp(1.375rem, 2.4vw, 1.75rem);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.015em;
}

.about__now {
    display: grid;
    gap: 18px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.about__now h2 {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.about__now ul {
    display: grid;
    gap: 14px;
}

.about__now li {
    position: relative;
    padding-left: 22px;
    font-size: 1rem;
}

.about__now li::before {
    content: '';
    position: absolute;
    top: 0.65em;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.about__now a {
    border-bottom: 1px solid var(--accent);
}

.principles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.principle {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.principle__num {
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.principle h3 {
    font-size: 1.375rem;
}

.principle p {
    color: var(--muted);
}

/* Contact */

.contact {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
    gap: clamp(32px, 6vw, 88px);
}

.contact--single {
    grid-template-columns: minmax(0, 720px);
}

.contact h2 {
    margin-bottom: 20px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.channels {
    border-top: 1px solid var(--line);
}

.channels a,
.channels div {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 8px;
    border-bottom: 1px solid var(--line);
    transition: background-color 0.25s, padding 0.25s var(--ease);
}

.channels a:hover {
    padding-inline: 18px;
    background: var(--surface);
}

.channels .icon {
    width: 22px;
    height: 22px;
    color: var(--accent-text);
}

.channels span {
    display: grid;
    overflow-wrap: anywhere;
}

.channels b {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.form {
    display: grid;
    gap: 20px;
    padding: clamp(24px, 4vw, 40px);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 6px);
    background: var(--surface);
}

.form h2 {
    margin-bottom: 0;
}

.form__trap {
    position: absolute;
    left: -9999px;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    font-size: 0.9375rem;
    font-weight: 500;
}

.field input,
.field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
    min-height: 150px;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.field ::placeholder {
    color: var(--dim);
}

.field.is-invalid input,
.field.is-invalid textarea {
    border-color: var(--danger);
}

.field__error {
    color: var(--danger);
    font-size: 0.875rem;
}

.field__error:empty,
.form__status:empty {
    display: none;
}

.form .btn {
    justify-self: start;
}

.form__status {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    font-size: 0.9375rem;
}

.form__status.is-ok {
    box-shadow: inset 3px 0 0 var(--ok);
}

.form__status.is-error {
    box-shadow: inset 3px 0 0 var(--danger);
}

/* Not found */

.notfound {
    display: grid;
    align-items: center;
    min-height: 100svh;
    padding-block: calc(var(--header-h) + 48px) 72px;
}

.notfound .container {
    display: grid;
    justify-items: start;
    gap: 22px;
}

.notfound__code {
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.1em;
}

.notfound__log {
    max-width: 100%;
    padding: 18px 22px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
}

.notfound__log .k {
    color: var(--ok);
}

.notfound__log b {
    color: var(--danger);
    font-weight: 500;
}

.notfound__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* 7. Footer --------------------------------------------------------------- */

.site-footer {
    padding-block: 56px 32px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9375rem;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) auto auto;
    align-items: start;
    gap: 32px clamp(32px, 8vw, 120px);
}

.site-footer__brand {
    display: grid;
    justify-items: start;
    gap: 14px;
}

.site-footer .brand {
    color: var(--text);
}

.site-footer__links,
.site-footer__social {
    display: grid;
    gap: 10px;
}

.site-footer__social a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.site-footer a {
    transition: color 0.2s;
}

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

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

/* Responsive */

@media (max-width: 960px) {
    .hero {
        min-height: 0;
        padding-bottom: 72px;
    }

    .hero__inner,
    .case,
    .process__inner,
    .about,
    .contact {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero__diagram {
        max-width: 520px;
    }

    .hero__scroll {
        display: none;
    }

    .case__visual {
        order: -1;
    }

    .process__head {
        position: static;
    }

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

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

@media (max-width: 640px) {
    :root {
        --gutter: 18px;
    }

    .specs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 22px;
    }

    .row__link {
        grid-template-columns: minmax(0, 1fr) 24px;
        gap: 8px 16px;
    }

    .row__year {
        grid-column: 1 / -1;
    }

    .row__stack {
        grid-column: 1;
        grid-row: 3;
    }

    .row__arrow {
        grid-column: 2;
        grid-row: 2;
    }

    .stack-list__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .step {
        padding-left: 60px;
    }

    /* GitHub is linked again in the call to action and the footer. */
    .hero__actions .btn--icon {
        display: none;
    }

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

    .site-footer__brand {
        grid-column: 1 / -1;
    }
}

/* 8. Motion --------------------------------------------------------------- */

/* The hero intro is pure CSS so the headline never waits for JavaScript. */
@media (prefers-reduced-motion: no-preference) {
    .hero__copy > * {
        animation: rise 0.8s var(--ease) both;
    }

    .hero__copy > :nth-child(2) { animation-name: rise-solid; animation-delay: 0.06s; }
    .hero__copy > :nth-child(3) { animation-delay: 0.16s; }
    .hero__copy > :nth-child(4) { animation-delay: 0.26s; }

    .diagram__node {
        animation: fade 0.6s var(--ease) both;
        animation-delay: calc(0.3s + var(--n) * 0.09s);
    }

    .diagram__wires,
    .diagram__packets,
    .diagram__log {
        animation: fade 0.8s var(--ease) 0.9s both;
    }

    /* app.js adds .has-motion once GSAP is ready, so nothing stays hidden without it. */
    .has-motion [data-reveal] {
        opacity: 0;
        transform: translateY(28px);
    }

    .has-motion .step:not(.is-active) {
        opacity: 0.38;
    }

    .has-motion .step.is-active .step__num {
        border-color: var(--accent);
        background: var(--accent);
        color: var(--on-accent);
    }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
}

/* Same movement without the fade: the headline is the LCP element. */
@keyframes rise-solid {
    from { transform: translateY(22px); }
}

@keyframes fade {
    from { opacity: 0; }
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
