/* ============ Fonts ============ */
:root {
    --font-display: "Bricolage Grotesque", "Switzer", system-ui, sans-serif;
    --font-sans: "Switzer", "Inter", system-ui, -apple-system, sans-serif;
    --font-serif: "Fraunces", Georgia, serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ============ Tokens: mono · dark (default) ============ */
:root {
    color-scheme: dark;
    --background: #000000;
    --surface: #0d0d0d;
    --surface-raised: #171717;
    --border: #2a2a2a;
    --text: #dcdcdc;
    --ink-2: #c6c6c6;
    --muted: #8f8f8f;
    --accent: #dcdcdc;
    --accent-2: #b4b4b4;
    --ghost: #1a1a1a;
    --body-image: none;
    --body-size: auto;
    --h1-glow: none;
    --card-cover-tint: #111;
}

/* ============ Tokens: mono · light ============ */
:root[data-theme="light"] {
    color-scheme: light;
    --background: #ffffff;
    --surface: #fafafa;
    --surface-raised: #f2f2f2;
    --border: #e2e2e2;
    --text: #111111;
    --ink-2: #3d3d3d;
    --muted: #6b6b6b;
    --accent: #111111;
    --accent-2: #4d4d4d;
    --ghost: #f4f4f4;
    --card-cover-tint: #f2f3f5;
}

/* ============ Tokens: terra · dark ============ */
:root[data-palette="terra"] {
    color-scheme: dark;
    --background: #0e0b08;
    --surface: #181410;
    --surface-raised: #221b15;
    --border: #4b3b26;
    --text: #ebdcc9;
    --ink-2: #d1bfa8;
    --muted: #a89a84;
    --accent: #8a4638;
    --accent-2: #ac7a66;
    --ghost: #1d1611;
    --h1-glow: 0 1px 22px rgba(235, 220, 201, .07);
    --card-cover-tint: #181410;
}

/* ============ Tokens: terra · light ============ */
:root[data-palette="terra"][data-theme="light"] {
    color-scheme: light;
    --background: #ebdcc9;
    --surface: #dcccb7;
    --surface-raised: #d1b4a1;
    --border: #9a8a76;
    --text: #3a2b17;
    --ink-2: #55452f;
    --muted: #6b5d4c;
    --accent: #8a4638;
    --accent-2: #7d392f;
    --ghost: #ddcab2;
    --card-cover-tint: #dcccb7;
    --body-image:
        linear-gradient(30deg, rgba(75, 59, 38, .07) 1px, transparent 1px),
        linear-gradient(120deg, rgba(75, 59, 38, .07) 1px, transparent 1px);
    --body-size: 52px 90px, 52px 90px;
}

/* ============ Base ============ */
* { box-sizing: border-box; }

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

body,
a,
button,
.card,
.work-card {
    transition: background-color .45s ease, color .45s ease, border-color .45s ease, box-shadow .45s ease;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background-color: var(--background);
    background-image: var(--body-image);
    background-size: var(--body-size);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.66;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection { background: color-mix(in srgb, var(--accent) 42%, transparent); color: var(--text); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -.025em;
    margin: 0;
}

h1 { text-shadow: var(--h1-glow); }
strong { color: var(--accent-2); font-weight: 600; }

em.serif, .serif {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    color: var(--accent-2);
    letter-spacing: -.01em;
}

a {
    color: var(--text);
    text-decoration-thickness: 1px;
    text-decoration-color: color-mix(in srgb, var(--text) 30%, transparent);
    text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--text); }
:root[data-palette="terra"] a { color: var(--accent-2); }
:root[data-palette="terra"] a:hover { color: var(--text); }

p { margin: .75em 0; }
.muted { color: var(--muted); }

::placeholder { color: var(--muted); }

svg { display: block; }

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

/* ============ Layout ============ */
.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 38px 28px 0;
}

/* ============ Nav ============ */
.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 6.5rem;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: .76rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.brand {
    display: inline-flex;
    align-items: baseline;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--text);
    text-decoration: none;
}
.brand-dot { color: var(--accent); }

.nav-links { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.nav-links a {
    position: relative;
    padding-bottom: 4px;
    color: inherit;
    text-decoration: none;
}
.nav-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent-2);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }
.nav-links a.is-active { color: var(--text); }

/* ============ Hero ============ */
.hero { max-width: 820px; padding-bottom: 4.2rem; }

.eyebrow {
    margin: 0 0 1.3rem;
    color: var(--accent-2);
    font-family: var(--font-mono);
    font-size: .74rem;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.hero-title {
    margin: 0;
    font-size: clamp(2.75rem, 8.5vw, 5.6rem);
    line-height: .93;
    letter-spacing: -.05em;
    font-weight: 500;
    animation: hero-rise .8s cubic-bezier(.22, .61, .36, 1) both;
    will-change: transform;
}
@keyframes hero-rise {
    from { transform: translateY(1.6rem); }
    to { transform: none; }
}
.hero-title .serif { font-weight: 500; }

.lede {
    max-width: 42rem;
    margin: 1.9rem 0 2.1rem;
    color: var(--ink-2);
    font-size: 1.1rem;
    line-height: 1.7;
}
.lede em { color: var(--text); font-style: normal; text-decoration-line: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-decoration-thickness: 2px; text-underline-offset: 4px; }

.hero-links { display: flex; flex-wrap: wrap; gap: 14px 30px; }

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: .82rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text);
    padding-bottom: 3px;
    border-bottom: 1px solid color-mix(in srgb, var(--text) 25%, transparent);
}
.text-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.text-link:last-child { border-bottom-style: dashed; }
.text-link:hover { color: var(--accent-2); border-bottom-color: var(--accent); }
.text-link:hover svg { transform: translate(2px, -2px); }

/* ============ Marquee ============ */
.marquee {
    position: relative;
    overflow: hidden;
    padding: 1.15rem 0;
    margin-bottom: 1rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    user-select: none;
}
.marquee-track {
    display: flex;
    align-items: center;
    gap: 0;
    width: max-content;
    white-space: nowrap;
    animation: marquee 40s linear infinite;
    will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 1rem;
}
.marquee-track i {
    width: 6px;
    height: 6px;
    border: 1px solid var(--accent);
    transform: rotate(45deg);
    opacity: .7;
    flex: none;
}

@keyframes marquee {
    to { transform: translateX(-50%); }
}

/* ============ Sections ============ */
.section { margin-top: 5.8rem; }

.section-head {
    display: block;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--border);
}
.section-head .index {
    display: block;
    margin-bottom: .55rem;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: .76rem;
    letter-spacing: .16em;
}
.section-head h2 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); letter-spacing: -.03em; }

.section-intro {
    max-width: 40rem;
    margin: 1.15rem 0 2.2rem;
    color: var(--muted);
    font-size: .98rem;
}

/* ============ Work grid ============ */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.work-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 3px 18px 3px 3px;
    background: var(--surface);
    transition: border-color .22s ease, transform .3s ease;
}
.work-card:hover { border-color: var(--accent); transform: translateY(-3px); }
:root[data-palette="terra"] .work-card { color: var(--text); }
:root[data-palette="terra"] .work-card:hover { color: var(--text); }

.work-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--card-cover-tint);
    background-image: var(--cover, linear-gradient(135deg, #333, #111));
    border-bottom: 1px solid var(--border);
}
.work-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform .7s cubic-bezier(.22, 1, .36, 1);
}
.work-card:hover .work-img { transform: scale(1.06); }
.work-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, color-mix(in srgb, var(--background) 45%, transparent));
}
.work-index {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    padding: 3px 13px 4px;
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
    letter-spacing: -.02em;
    color: var(--text);
    background: color-mix(in srgb, var(--background) 55%, transparent);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    border-radius: 9px;
    transition: transform .3s ease;
}
.work-card:hover .work-index { transform: translateY(-2px); }
.work-orb {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 2;
    width: 52px;
    height: 52px;
    border: 1.5px solid color-mix(in srgb, var(--text) 55%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--background) 25%, transparent);
    transition: transform .4s ease;
}
.work-card:hover .work-orb { transform: scale(1.18) rotate(12deg); }

.work-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.work-type {
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.work-type::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    flex: none;
}
.work-title {
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, color .2s ease;
}
.work-title:hover { border-bottom-color: var(--accent); }
.work-body h3 { margin: .7rem 0 .45rem; font-size: 1.28rem; font-weight: 600; }
.work-body p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.6; }

.work-meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 1.1rem;
}
.work-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.pill {
    padding: 3px 10px;
    border: 1px solid color-mix(in srgb, var(--muted) 40%, transparent);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: .66rem;
    letter-spacing: .05em;
    color: var(--ink-2);
    background: var(--ghost);
}
.work-links { display: flex; gap: 14px; padding-bottom: 2px; }
.work-links a {
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink-2);
    border-bottom: 1px solid color-mix(in srgb, var(--text) 25%, transparent);
}
.work-links a:hover { color: var(--accent-2); border-bottom-color: var(--accent); }

/* more row */
.more-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 3.2rem; }
.more-label { color: var(--muted); font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.more-list { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; gap: 6px 0; }
.more-list li { display: flex; align-items: center; }
.more-list li:not(:last-child)::after { content: "·"; margin: 0 12px; color: var(--accent); opacity: .6; }
.more-list a { font-size: .92rem; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--text) 25%, transparent); }

/* ============ Skills ============ */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 1.6rem;
}

.card--plain {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 26px 24px 24px;
    min-height: 190px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 3px 14px 3px 3px;
    background: var(--surface);
    transition: border-color .2s ease, transform .25s ease;
}
.card--plain:hover { border-color: var(--accent); transform: translateY(-2px); }
.card--plain::before {
    content: "";
    position: absolute;
    top: -24px;
    right: -24px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    opacity: .4;
    transition: transform .35s ease, opacity .35s ease;
}
.card--plain:hover::before { transform: scale(2); opacity: .9; }

.card-tag {
    font-family: var(--font-mono);
    font-size: .66rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 1rem;
}
.card--plain h3 { font-size: 1.14rem; font-weight: 600; }
.card--plain p { margin: .45rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.6; }

/* ============ About ============ */
.about-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 48px;
    margin-top: 1.8rem;
    align-items: start;
}

.about-copy p { font-size: 1.02rem; color: var(--ink-2); line-height: 1.75; }
.about-copy p em {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--text);
}

.trait-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.7rem; }
.trait-row span {
    padding: 7px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .82rem;
    color: var(--ink-2);
    background: var(--surface);
}

/* timeline */
.timeline-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 1.5rem; }
.timeline-title .muted { font-size: .85rem; font-family: var(--font-mono); font-weight: 400; text-transform: lowercase; }

.cv-timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 26px; }
.cv-timeline::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 4px;
    width: 1px;
    background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--border) 60%, transparent));
}
.cv-entry { position: relative; padding-bottom: 1.5rem; }
.cv-entry::before {
    content: "";
    position: absolute;
    top: .5rem;
    left: -26px;
    width: 9px;
    height: 9px;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    background: var(--background);
}
.cv-entry .date {
    font-family: var(--font-mono);
    font-size: .7rem;
    letter-spacing: .12em;
    color: var(--muted);
    text-transform: uppercase;
}
.cv-entry h4 { margin: .3rem 0 .25rem; font-size: 1rem; font-weight: 600; }
.cv-where {
    margin: 0 0 .35rem;
    color: var(--accent-2);
    font-size: .86rem;
    font-weight: 600;
}
.cv-entry--now::before { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.cv-entry p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.6; }

/* ============ Closing / contact ============ */
.section--closing { padding: 3.4rem 0 3.4rem; border-top: 1px solid var(--border); }

.closing-title {
    font-size: clamp(2rem, 6vw, 3.1rem);
    line-height: 1.08;
    letter-spacing: -.04em;
    font-weight: 500;
}
.closing-sub { max-width: 34rem; color: var(--muted); font-size: 1.02rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }

a.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 26px;
    border-radius: 999px;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: var(--text);
    background-image: none;
    color: var(--background);
    border: 1px solid var(--text);
    white-space: nowrap;
    transition: transform .25s ease, background-color .3s ease, color .3s ease, border-color .3s ease;
}
a.btn:hover {
    transform: translateY(-2px);
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--background);
    box-shadow: none;
}
a.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
a.btn:hover svg { transform: translate(2px, -2px); }

a.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); box-shadow: none; }
a.btn--ghost:hover { color: var(--accent-2); border-color: var(--accent); box-shadow: none; }

/* ============ Footer ============ */
.footer { margin-top: 1rem; }

.footer-marquee {
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: .9rem 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    user-select: none;
}
.footer-marquee-track {
    display: flex;
    width: max-content;
    white-space: nowrap;
    animation: marquee 46s linear infinite;
    will-change: transform;
}
.footer-marquee-track span {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--accent-2);
    padding: 0 .4rem;
    white-space: nowrap;
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 1.6rem 0 2rem;
}
.footer-meta { margin: 0; color: var(--muted); font-size: .82rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--muted); font-size: .84rem; text-decoration: none; border-bottom: 1px solid transparent; }
.footer-links a:hover { color: var(--text); border-bottom-color: var(--accent); }

/* ============ Floating controls ============ */
.toggle {
    position: fixed;
    right: calc(18px + env(safe-area-inset-right, 0px));
    z-index: 80;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: var(--text);
    background: color-mix(in srgb, var(--background) 78%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    opacity: .85;
    transition: border-color .2s ease, opacity .25s ease, background-color .45s ease, color .45s ease;
}
.toggle:hover { opacity: 1; border-color: var(--accent); }

.palette-toggle { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
.theme-toggle { bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
.to-top {
    bottom: calc(118px + env(safe-area-inset-bottom, 0px));
    z-index: 70;
    visibility: hidden;
    opacity: 0;
    transform: translateY(6px);
}
.to-top.is-shown { visibility: visible; opacity: .85; transform: none; }

.palette-toggle svg { width: 22px; height: 22px; }
.swatch-a { fill: var(--text); transition: fill .45s ease; }
.swatch-b { fill: color-mix(in srgb, var(--text) 40%, transparent); transition: fill .45s ease; }
:root[data-palette="terra"] .swatch-a { fill: var(--accent); }
:root[data-palette="terra"] .swatch-b { fill: var(--text); }

.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.to-top svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ============ Progress + grain ============ */
.progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width .1s linear;
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] .grain { opacity: .07; }

/* Screenshot / OG mode: hide floating UI so the banner stays clean */
.og-shot .toggle, .og-shot .to-top, .og-shot .progress { display: none; }

/* ============ Reveal ============ */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .65s ease, transform .65s cubic-bezier(.22, 1, .36, 1);
    transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 860px) {
    .site-nav { margin-bottom: 4.5rem; }
    .skill-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; gap: 36px; }
    .work-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .wrap { padding: 26px 18px 0; }
    .site-nav { align-items: flex-start; margin-bottom: 3.5rem; }
    .nav-links { justify-content: flex-end; gap: 6px 16px; }
    .skill-grid { grid-template-columns: 1fr; }
    .hero { padding-bottom: 3.2rem; }
    .lede { font-size: 1rem; }
    .section { margin-top: 4.4rem; }
    .footer-row { flex-direction: column; align-items: flex-start; }
    .cv-timeline { padding-left: 22px; }
    .cv-entry::before { left: -22px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .marquee-track, .footer-marquee-track, .hero-title { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .work-card:hover, .card--plain:hover, a.btn:hover { transform: none; }
    .reveal { transition: opacity .01s ease; }
}