/*
   FONTS — self-hosted (SIL Open Font License), no external requests.
   Variable fonts: Archivo covers weight 400–900 & width 62–125%.
*/
@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 400 900;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url("../fonts/archivo-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 400 900;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url("../fonts/archivo-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 700;
    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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400 700;
    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;
}

/*
   THEME — colors.
*/
:root {
    /* Base palette */
    --c-ink: #111111;
    --c-paper: #f3efe4;
    --c-white: #ffffff;

    /* Accent palette */
    --c-orange: #ff5b14;
    --c-yellow: #ffd21f;
    --c-violet: #5b21ff;
    --c-blue: #2b4dff;
    --c-pink: #ff6fae;
    --c-green: #19c37d;

    /* Roles */
    --c-highlight: var(--c-orange); /* hero 2nd line, focus ring, logo */
    --c-marquee-bg: var(--c-ink);
    --c-marquee-fg: var(--c-yellow);
    --c-contact-bg: var(--c-orange);

    /* Shape */
    --bw: 3px; /* border width */
    --shadow: 8px; /* hard shadow offset */
    --gap: clamp(12px, 2vw, 24px);
    --pad: clamp(16px, 4vw, 56px);

    /* Type */
    --font-display: "Archivo", "Arial Black", system-ui, sans-serif;
    --font-mono:
        "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas,
        monospace;

    /* Default tone (overridden by .tone-* / .tile--*) */
    --bg: var(--c-paper);
    --fg: var(--c-ink);
}

/* Tones: background + matching readable text color */
.tone-paper,
.tile--paper {
    --bg: var(--c-paper);
    --fg: var(--c-ink);
}
.tone-yellow,
.tile--yellow {
    --bg: var(--c-yellow);
    --fg: var(--c-ink);
}
.tone-orange,
.tile--orange {
    --bg: var(--c-orange);
    --fg: var(--c-ink);
}
.tone-pink,
.tile--pink {
    --bg: var(--c-pink);
    --fg: var(--c-ink);
}
.tone-green,
.tile--green {
    --bg: var(--c-green);
    --fg: var(--c-ink);
}
.tone-violet,
.tile--violet {
    --bg: var(--c-violet);
    --fg: var(--c-white);
}
.tone-blue,
.tile--blue {
    --bg: var(--c-blue);
    --fg: var(--c-white);
}
.tone-ink,
.tile--ink {
    --bg: var(--c-ink);
    --fg: var(--c-paper);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    margin: 0;
    background: var(--c-paper);
    color: var(--c-ink);
    font-family: var(--font-display);
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip; /* the tilted marquee is slightly wider than the viewport */
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}
a {
    color: inherit;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
    margin: 0;
}
ul,
ol {
    padding: 0;
    list-style: none;
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

:focus-visible {
    outline: var(--bw) dashed var(--c-highlight);
    outline-offset: 3px;
}

::selection {
    background: var(--c-ink);
    color: var(--c-yellow);
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 8px;
    z-index: 100;
    background: var(--c-ink);
    color: var(--c-paper);
    padding: 8px 12px;
}
.skip-link:focus {
    left: 8px;
}

/*
   BUTTONS
*/
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.7em 1.1em;
    border: var(--bw) solid var(--fg);
    background: var(--fg);
    color: var(--bg);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s,
        color 0.15s;
}
.btn:hover {
    background: var(--bg);
    color: var(--fg);
    transform: translate(-4px, -4px);
    box-shadow: 4px 4px 0 var(--fg);
}
.btn--ghost {
    background: transparent;
    color: var(--fg);
}
.btn--ghost:hover {
    background: var(--fg);
    color: var(--bg);
}
.btn--ink {
    --fg: var(--c-ink);
    --bg: var(--c-paper);
}
.btn--paper {
    --fg: var(--c-paper);
    --bg: var(--c-ink);
    color: var(--c-ink);
    background: var(--c-paper);
    border-color: var(--c-ink);
}
.btn--paper:hover {
    background: var(--c-ink);
    color: var(--c-paper);
    box-shadow: 4px 4px 0 var(--c-paper);
}
.btn--big {
    font-size: clamp(0.9rem, 0.8rem + 0.6vw, 1.3rem);
    padding: 0.9em 1.3em;
}

/*
   TOP BAR
*/
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    background: var(--c-paper);
    border-bottom: var(--bw) solid var(--c-ink);
}
.topbar__logo {
    display: flex;
    align-items: center;
    padding: 0 18px;
    background: var(--c-ink);
    color: var(--c-highlight);
    font-weight: 900;
    font-stretch: 125%;
    font-size: 1.5rem;
    text-decoration: none;
}
.topbar__logo span {
    font-size: 0.6em;
    align-self: flex-start;
    margin-top: 10px;
    color: var(--c-paper);
}
.topbar__nav {
    display: flex;
}
.topbar__nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 18px clamp(10px, 2vw, 28px);
    border-left: var(--bw) solid var(--c-ink);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    text-decoration: none;
    transition:
        background 0.15s,
        color 0.15s;
}
.topbar__nav a span {
    font-size: 0.65rem;
    opacity: 0.6;
}
.topbar__nav a:hover {
    background: var(--c-yellow);
}
.topbar__nav a.is-active {
    background: var(--c-ink);
    color: var(--c-paper);
}

@media (max-width: 560px) {
    .topbar__nav a span {
        display: none;
    }
    .topbar__nav a {
        padding: 16px 10px;
        font-size: 0.72rem;
    }
    .topbar__logo {
        padding: 0 12px;
        font-size: 1.2rem;
    }
}

/*
   HERO
*/
.hero {
    padding: var(--pad);
    padding-bottom: calc(var(--pad) * 1.2);
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: var(--bw) solid var(--c-ink);
}

.hero__title {
    margin: clamp(12px, 3vw, 40px) 0;
    font-size: clamp(3rem, 13.5vw, 15rem);
    font-weight: 900;
    font-stretch: 125%;
    line-height: 0.82;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}
.hero__title .line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.04em;
}
.hero__title .line > span {
    display: inline-block;
    animation: rise 1s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.hero__title .line:nth-child(2) > span {
    color: var(--c-highlight);
    animation-delay: 0.12s;
}

@keyframes rise {
    from {
        transform: translateY(110%);
    }
    to {
        transform: none;
    }
}

.hero__grid {
    position: relative;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--gap);
}

.tile {
    background: var(--bg);
    color: var(--fg);
    border: var(--bw) solid var(--c-ink);
    padding: clamp(16px, 2vw, 28px);
    box-shadow: var(--shadow) var(--shadow) 0 var(--c-ink);
}

.hero__intro {
    font-size: clamp(1.15rem, 1rem + 1vw, 1.9rem);
    line-height: 1.25;
    font-weight: 500;
}
.hero__intro strong {
    font-weight: 900;
    background: var(--c-yellow);
    padding: 0 0.15em;
}

.stat {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    min-height: 180px;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}
.stat:hover {
    transform: translate(-6px, -6px);
    box-shadow: calc(var(--shadow) + 6px) calc(var(--shadow) + 6px) 0
        var(--c-ink);
}
.stat__num {
    font-size: clamp(2.6rem, 6vw, 5.5rem);
    font-weight: 900;
    font-stretch: 125%;
    line-height: 0.9;
}

.badge {
    position: absolute;
    right: 2%;
    top: clamp(-150px, -11vw, -70px);
    width: clamp(96px, 13vw, 180px);
    animation: spin 16s linear infinite;
    pointer-events: none;
    z-index: 2;
}
.badge circle {
    fill: var(--c-yellow);
    stroke: var(--c-ink);
    stroke-width: 3;
}
/* ~48 chars around a 490-unit circle: 14px mono (8.4) + 1px spacing ≈ 451 units */
.badge text {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1px;
    fill: var(--c-ink);
}
.badge .badge__center {
    font-size: 56px;
    font-family: var(--font-display);
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 900px) {
    .hero__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .hero__intro {
        grid-column: 1 / -1;
    }
    .stat {
        min-height: 130px;
    }
}
@media (max-width: 520px) {
    .stat__label {
        font-size: 0.62rem;
    }
    .stat {
        padding: 12px;
    }
}

/*
   MARQUEE
*/
.marquee {
    overflow: hidden;
    background: var(--c-marquee-bg);
    color: var(--c-marquee-fg);
    border-block: var(--bw) solid var(--c-ink);
    transform: rotate(-1.2deg) scale(1.02);
    margin: 10px 0 40px;
}
.marquee__track {
    display: flex;
    width: max-content;
    animation: marquee 40s linear infinite;
}
.marquee__track span {
    padding: 14px 0;
    font-size: clamp(1.4rem, 3.5vw, 3rem);
    font-weight: 900;
    font-stretch: 125%;
    text-transform: uppercase;
    white-space: nowrap;
}
.marquee__track span::after {
    content: "✦";
    margin: 0 0.6em;
    color: var(--c-highlight);
}
@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}

/*
   SECTIONS
*/
.section {
    padding: var(--pad);
}
.section--ink {
    --bg: var(--c-ink);
    --fg: var(--c-paper);
    background: var(--bg);
    color: var(--fg);
}

.section__head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: end;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: clamp(24px, 4vw, 56px);
    border-bottom: var(--bw) solid currentColor;
}
.section__index {
    display: inline-block;
    align-self: start;
    padding: 4px 8px;
    border: var(--bw) solid currentColor;
    font-weight: 700;
}
.section__title {
    font-size: clamp(2.6rem, 9vw, 9rem);
    font-weight: 900;
    font-stretch: 125%;
    line-height: 0.85;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}
@media (max-width: 700px) {
    .section__head {
        grid-template-columns: auto 1fr;
    }
    .section__head .btn {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

/*
   APPS
*/
.app {
    background: var(--bg);
    color: var(--fg);
    border: var(--bw) solid var(--c-ink);
    box-shadow: calc(var(--shadow) * 1.5) calc(var(--shadow) * 1.5) 0
        var(--c-ink);
    padding: clamp(18px, 3vw, 44px);
    margin-bottom: clamp(40px, 6vw, 80px);
}

.app__head {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2vw, 28px);
    padding-bottom: clamp(16px, 2vw, 24px);
    margin-bottom: clamp(18px, 3vw, 36px);
    border-bottom: var(--bw) solid currentColor;
}
.app__icon {
    width: clamp(64px, 9vw, 120px);
    height: auto;
    border: var(--bw) solid var(--c-ink);
    border-radius: 22%;
    box-shadow: 5px 5px 0 var(--c-ink);
    transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.app:hover .app__icon {
    transform: rotate(-8deg) scale(1.05);
}
.app__kicker {
    display: block;
    opacity: 0.8;
    margin-bottom: 6px;
}
.app__name {
    font-size: clamp(2rem, 6vw, 6.5rem);
    font-weight: 900;
    font-stretch: 125%;
    line-height: 0.85;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.app__body {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(20px, 4vw, 56px);
    align-items: start;
}
.app__text {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
}
.app__tagline {
    font-size: clamp(1.6rem, 1.2rem + 2vw, 3rem);
    font-weight: 900;
    font-stretch: 110%;
    line-height: 1;
}

.app__features {
    counter-reset: f;
    width: 100%;
}
.app__features li {
    counter-increment: f;
    display: grid;
    grid-template-columns: 2.6em 1fr;
    padding: 8px 0;
    border-top: 2px solid currentColor;
    font-weight: 600;
}
.app__features li:last-child {
    border-bottom: 2px solid currentColor;
}
.app__features li::before {
    content: counter(f, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding-top: 0.2em;
    opacity: 0.75;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tags li {
    padding: 3px 8px;
    border: 2px solid currentColor;
    font-weight: 700;
    font-size: 0.72rem;
}
.tags li:has(a) {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
}
.tags a {
    text-decoration: none;
}
.app__text p a {
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    font-weight: 700;
}

.frame {
    border: var(--bw) solid var(--c-ink);
    background: var(--c-ink);
    box-shadow: var(--shadow) var(--shadow) 0 var(--c-ink);
    overflow: hidden;
}
.frame img {
    width: 100%;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.frame:hover img {
    transform: scale(1.04);
}

/* Screenshot strip */
.shots {
    display: flex;
    gap: var(--gap);
    margin-top: clamp(24px, 4vw, 48px);
    padding: 4px 4px 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--c-ink) transparent;
}
.shots__item {
    flex: 0 0 clamp(130px, 16vw, 210px);
    scroll-snap-align: start;
    padding: 0;
    border: var(--bw) solid var(--c-ink);
    background: var(--c-ink);
    cursor: zoom-in;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}
.shots__item:hover {
    transform: translate(-4px, -4px) rotate(-1.5deg);
    box-shadow: 6px 6px 0 var(--c-ink);
}
.shots__item img {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
}

@media (max-width: 860px) {
    .app__body {
        grid-template-columns: 1fr;
    }
    .app__feature {
        order: -1;
    }
}
@media (max-width: 600px) {
    .app__head {
        flex-direction: column;
        align-items: flex-start;
    }
    .app__name {
        font-size: 9vw;
        font-stretch: 100%;
    }
}

/*
   APIS
*/
.section--ink .tile {
    border-color: var(--c-paper);
    box-shadow: var(--shadow) var(--shadow) 0 var(--c-paper);
}

.apis-intro {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: clamp(20px, 4vw, 56px);
    align-items: end;
    margin-bottom: clamp(40px, 6vw, 80px);
}
.apis-intro__lead {
    font-size: clamp(1.4rem, 1rem + 2vw, 2.8rem);
    font-weight: 600;
    line-height: 1.15;
}
.apis-intro__lead strong {
    font-weight: 900;
    color: var(--c-yellow);
}
.apis-intro__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
}
.apis-intro__stats li {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* API changelog */
.versions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 36px;
    margin-bottom: clamp(48px, 7vw, 96px);
}
.versions li {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: var(--bw) solid var(--c-paper);
}
.versions li:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--c-highlight);
}
.versions__tag {
    font-weight: 700;
    color: var(--c-highlight);
}
.versions li strong {
    font-size: 1.1rem;
    font-weight: 900;
    font-stretch: 110%;
    line-height: 1.15;
}
.versions li p {
    font-size: 0.95rem;
    opacity: 0.85;
}
.versions li:not(.is-current) strong {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
}
.versions li.is-current {
    background: var(--c-highlight);
    color: var(--c-ink);
    border-color: var(--c-highlight);
    box-shadow: var(--shadow) var(--shadow) 0 var(--c-paper);
}
.versions li.is-current .versions__tag {
    color: var(--c-ink);
}
.versions li.is-current p {
    opacity: 1;
}

@media (max-width: 1000px) {
    .apis-intro {
        grid-template-columns: 1fr;
    }
    .versions {
        grid-template-columns: 1fr 1fr;
    }
    .versions li:nth-child(2)::after {
        content: none;
    }
}
@media (max-width: 600px) {
    .versions {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .versions li:not(:last-child)::after {
        content: "↓";
        right: auto;
        left: 50%;
        top: auto;
        bottom: -30px;
        transform: translateX(-50%);
    }
    .versions li:nth-child(2)::after {
        content: "↓";
    }
}

.apis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: clamp(16px, 2.5vw, 32px);
}
.api {
    --hover: var(--c-yellow);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    background: var(--c-paper);
    color: var(--c-ink);
    border: var(--bw) solid var(--c-paper);
    text-decoration: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s;
}
.api:nth-child(6n + 2) {
    --hover: var(--c-orange);
}
.api:nth-child(6n + 3) {
    --hover: var(--c-pink);
}
.api:nth-child(6n + 4) {
    --hover: var(--c-green);
}
.api:nth-child(6n + 5) {
    --hover: var(--c-blue);
}
.api:nth-child(6n + 6) {
    --hover: var(--c-violet);
}
.api:hover {
    background: var(--hover);
    transform: translate(-6px, -6px);
    box-shadow: 10px 10px 0 var(--c-paper);
}
.api img {
    width: 96px;
    border: var(--bw) solid var(--c-ink);
    transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.api:hover img {
    transform: rotate(6deg) scale(1.08);
}
.api__index {
    position: absolute;
    top: 18px;
    right: 18px;
    font-weight: 700;
}
.api h3 {
    font-size: clamp(1.5rem, 2.4vw, 2.1rem);
    font-weight: 900;
    font-stretch: 115%;
    line-height: 1;
    text-transform: uppercase;
    margin-top: 8px;
}
.api p {
    flex: 1;
}
.api__link {
    font-weight: 700;
    padding-top: 10px;
    border-top: 2px solid currentColor;
}

/*
   WORK
*/
.work {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: start;
}
.label {
    display: block;
    font-weight: 700;
    margin-bottom: 14px;
}

.timeline > li {
    display: grid;
    grid-template-columns: 11em 1fr;
    gap: 16px;
    padding: 20px 0;
    border-top: var(--bw) solid var(--c-ink);
}
.timeline > li:last-child {
    border-bottom: var(--bw) solid var(--c-ink);
}
.timeline__date {
    font-weight: 700;
    padding-top: 0.35em;
}
.timeline h4 {
    font-size: clamp(1.2rem, 1rem + 1vw, 1.8rem);
    font-weight: 900;
    font-stretch: 110%;
    line-height: 1.1;
}
.timeline h4 em {
    font-style: normal;
    font-weight: 500;
    color: var(--c-ink);
    background: var(--c-yellow);
    padding: 0 0.2em;
    white-space: nowrap;
}
.timeline ul:not(.ladder) {
    margin-top: 10px;
}
.timeline ul:not(.ladder) li {
    position: relative;
    padding-left: 1.3em;
    margin-top: 6px;
}
.timeline ul:not(.ladder) li::before {
    content: "→";
    position: absolute;
    left: 0;
    font-weight: 900;
}

.ladder {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}
.ladder li {
    border: 2px solid var(--c-ink);
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 700;
}
.ladder li span {
    opacity: 0.6;
    margin-left: 4px;
}
.ladder li:first-child {
    background: var(--c-ink);
    color: var(--c-paper);
}

.work__side {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 3vw, 32px);
}
.work__side .btn {
    margin-top: 16px;
}
.plain li {
    padding: 8px 0;
    border-top: 2px solid currentColor;
    font-weight: 500;
}
.plain a {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-decoration: none;
}
.plain a:hover {
    text-decoration: underline;
}
.timeline a {
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    font-weight: 700;
}
.edu li {
    display: grid;
    grid-template-columns: 5.5em 1fr;
    gap: 8px;
    padding: 8px 0;
    border-top: 2px solid currentColor;
    font-weight: 700;
    line-height: 1.3;
}
.edu li em {
    grid-column: 2;
    font-style: normal;
    font-weight: 400;
    font-size: 0.9em;
}

@media (max-width: 900px) {
    .work {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 560px) {
    .timeline > li {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

/*
   CONTACT & FOOTER
*/
.contact {
    background: var(--c-contact-bg);
    color: var(--c-ink);
    padding: var(--pad);
    padding-block: clamp(48px, 8vw, 120px);
    border-top: var(--bw) solid var(--c-ink);
}
.contact .section__index {
    margin-bottom: 20px;
}
.contact__title {
    font-size: clamp(4rem, 18vw, 18rem);
    font-weight: 900;
    font-stretch: 125%;
    line-height: 0.78;
    text-transform: uppercase;
    letter-spacing: -0.04em;
}
.contact__text {
    max-width: 40ch;
    margin: 28px 0;
    font-size: clamp(1.1rem, 1rem + 0.8vw, 1.6rem);
    font-weight: 600;
    line-height: 1.25;
}
.contact__links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    --fg: var(--c-ink);
    --bg: var(--c-contact-bg);
}
.contact__links .btn:first-child {
    overflow-wrap: anywhere;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    padding: 18px var(--pad);
    background: var(--c-ink);
    color: var(--c-paper);
}
.footer a {
    text-decoration: none;
}
.footer a:hover {
    color: var(--c-yellow);
}

/*
   LIGHTBOX
*/
.lightbox {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--c-paper);
}
.lightbox[open] {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    justify-items: center;
}
.lightbox::backdrop {
    background: rgb(17 17 17 / 0.92);
}
.lightbox figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.lightbox img {
    max-height: 82dvh;
    width: auto;
    border: var(--bw) solid var(--c-paper);
    box-shadow: var(--shadow) var(--shadow) 0 var(--c-highlight);
    animation: pop 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes pop {
    from {
        transform: scale(0.92);
        opacity: 0;
    }
}
.lightbox button {
    width: 52px;
    height: 52px;
    margin: 12px;
    border: var(--bw) solid var(--c-paper);
    background: var(--c-ink);
    color: var(--c-paper);
    font-size: 1.4rem;
    font-weight: 900;
    cursor: pointer;
}
.lightbox button:hover {
    background: var(--c-yellow);
    color: var(--c-ink);
}
.lightbox__close {
    position: absolute;
    top: 8px;
    right: 8px;
}
@media (max-width: 600px) {
    .lightbox button {
        width: 42px;
        height: 42px;
        margin: 4px;
    }
    .lightbox img {
        max-width: 72vw;
    }
}

/*
   SCROLL REVEAL (only when JS is running)
*/
.js [data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.7s ease,
        transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
    html {
        scroll-behavior: auto;
    }
    .js [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
