/* =========================================================
   Mark Vincent Plaza — portfolio
   Tokens first, then layout, then components.
   ========================================================= */

/* Fonts are served from this site (variable files, latin + latin-ext) */
@font-face {
    font-family: "Bricolage Grotesque";
    font-style: normal;
    font-weight: 500 800;
    font-display: swap;
    src: url("assets/fonts/bricolage-grotesque-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: "Bricolage Grotesque";
    font-style: normal;
    font-weight: 500 800;
    font-display: swap;
    src: url("assets/fonts/bricolage-grotesque-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: "Geist";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("assets/fonts/geist-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: "Geist";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("assets/fonts/geist-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: "Geist Mono";
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url("assets/fonts/geist-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: "Geist Mono";
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url("assets/fonts/geist-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 {
    /* Type */
    --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
    --font-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

    --fs-display: clamp(2.5rem, 1.3rem + 4vw, 4.6rem);
    --fs-h2: clamp(2rem, 1.3rem + 2.8vw, 3.4rem);
    --fs-h3: clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem);
    --fs-lead: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
    --fs-body: 1rem;
    --fs-small: 0.875rem;
    --fs-mono: 0.78rem;

    /* Space */
    --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
    --section-y: clamp(4.5rem, 3rem + 5vw, 7.5rem);
    --max: 1200px;

    /* Radius — varies by role */
    --r-xs: 6px;      /* small controls */
    --r-sm: 10px;     /* thumbnails, rows */
    --r-md: 16px;     /* cards */
    --r-lg: 28px;     /* hero media, feature */
    --r-pill: 999px;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --nav-h: 72px;
}

/* Dark is the default theme */
:root,
[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b0d0b;
    --bg-alt: #101310;
    --surface: #151915;
    --surface-2: #1c211c;
    --line: #262b25;
    --line-strong: #394036;
    --text: #eef0ea;
    --text-2: #b6bcb1;
    --muted: #8c9388;
    --accent: #c6f24e;
    --accent-ink: #0b0d0b;
    --accent-text: #c6f24e;
    --accent-soft: rgba(198, 242, 78, 0.12);
    --glow: rgba(198, 242, 78, 0.10);
    --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
    --nav-bg: rgba(11, 13, 11, 0.72);
    --img-dim: 0.92;
    --danger: #ff9d8f;
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f4ee;
    --bg-alt: #ebebe3;
    --surface: #ffffff;
    --surface-2: #f6f6f1;
    --line: #dcddd3;
    --line-strong: #c3c6b8;
    --text: #12150f;
    --text-2: #3c4238;
    --muted: #5d6358;
    --accent: #c6f24e;
    --accent-ink: #12150f;
    --accent-text: #456400;
    --accent-soft: rgba(110, 150, 0, 0.12);
    --glow: rgba(140, 190, 0, 0.14);
    --shadow-lg: 0 30px 70px -35px rgba(40, 50, 20, 0.35);
    --nav-bg: rgba(244, 244, 238, 0.78);
    --img-dim: 1;
    --danger: #b3261e;
}

/* ---------- Base ---------- */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 12px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

/* Subtle film grain so large dark areas don't band */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    opacity: 0.035;
    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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

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

.ic {
    width: 1.1em;
    height: 1.1em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.container {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 200;
    padding: 0.75rem 1rem;
    background: var(--accent);
    color: var(--accent-ink);
    border-radius: var(--r-xs);
    font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ---------- Scroll progress ---------- */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 60;
    background: var(--accent);
    transform-origin: 0 50%;
    transform: scaleX(var(--progress, 0));
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 48px;
    padding: 0.8rem 1.35rem;
    border-radius: var(--r-pill);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.005em;
    border: 1px solid transparent;
    transition: transform 0.3s var(--ease), background-color 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.3s;
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn--accent {
    background: var(--accent);
    color: var(--accent-ink);
}
.btn--accent:hover {
    box-shadow: 0 10px 30px -10px var(--accent);
    transform: translateY(-2px);
}
.btn--accent .ic { transition: transform 0.3s var(--ease); }
.btn--accent:hover .ic { transform: translateX(3px); }

.btn--ghost {
    border-color: var(--line-strong);
    color: var(--text);
}
.btn--ghost:hover {
    border-color: var(--text);
    background: var(--surface);
}

.btn--small {
    min-height: 44px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    color: var(--text);
    transition: border-color 0.25s, background-color 0.25s;
}
.icon-btn:hover { border-color: var(--line-strong); background: var(--surface); }
.icon-btn .ic { width: 18px; height: 18px; }

.inline-link {
    color: var(--text);
    background-image: linear-gradient(var(--accent), var(--accent));
    background-size: 100% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    padding-bottom: 1px;
    transition: background-size 0.35s var(--ease), color 0.25s;
}
.inline-link:hover {
    background-size: 100% 100%;
    color: var(--accent-ink);
}
.inline-link .ic { display: inline; vertical-align: -0.15em; width: 0.95em; height: 0.95em; }

/* ---------- Nav ---------- */

.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    height: var(--nav-h);
    transition: transform 0.45s var(--ease), background-color 0.3s, border-color 0.3s;
    border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
    background: var(--nav-bg);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom-color: var(--line);
}
.nav.is-hidden { transform: translateY(-100%); }

.nav__inner {
    height: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: var(--gutter);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    min-width: 44px;
    min-height: 44px;
}
.brand__mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
    background: var(--text);
    color: var(--bg);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: -0.02em;
    transition: background-color 0.3s, transform 0.4s var(--ease);
}
.brand:hover .brand__mark { background: var(--accent); color: var(--accent-ink); transform: rotate(-6deg); }

.nav__links {
    margin-left: auto;
    display: flex;
    gap: 0.25rem;
    padding: 0.3rem;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.nav__links a {
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: var(--r-pill);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-2);
    transition: color 0.2s, background-color 0.25s;
}
.nav__links a:hover { color: var(--text); }
.nav__links a.is-active {
    color: var(--text);
    background: var(--surface-2);
    box-shadow: inset 0 0 0 1px var(--line-strong);
}

.nav__actions { display: flex; align-items: center; gap: 0.6rem; }

[data-theme="dark"] .ic--moon,
[data-theme="light"] .ic--sun { display: none; }

.menu-btn { display: none; gap: 5px; align-content: center; }
.menu-btn__bar {
    display: block;
    width: 18px;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.35s var(--ease);
}
.menu-btn[aria-expanded="true"] .menu-btn__bar:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bar:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 45;
    padding: calc(var(--nav-h) + 2rem) var(--gutter) 2rem;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.35s var(--ease);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.is-open { opacity: 1; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: clamp(2rem, 9vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    transform: translateY(16px);
    opacity: 0;
    transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), color 0.2s;
}
.mobile-menu.is-open nav a { transform: none; opacity: 1; }
.mobile-menu.is-open nav a:nth-child(2) { transition-delay: 0.05s; }
.mobile-menu.is-open nav a:nth-child(3) { transition-delay: 0.1s; }
.mobile-menu.is-open nav a:nth-child(4) { transition-delay: 0.15s; }
.mobile-menu.is-open nav a:nth-child(5) { transition-delay: 0.2s; }
.mobile-menu nav a span { font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--muted); font-weight: 400; letter-spacing: 0; }
.mobile-menu nav a:hover { color: var(--accent-text); }
.mobile-menu__mail { color: var(--text-2); font-family: var(--font-mono); font-size: 0.9rem; padding: 0.75rem 0; }

/* ---------- Shared section bits ---------- */

.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-2);
}
.eyebrow span {
    color: var(--accent-text);
}
.eyebrow::after {
    content: "";
    width: 48px;
    height: 1px;
    background: var(--line-strong);
}

.section__head { max-width: 720px; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.section__title {
    margin-top: 1rem;
    font-family: var(--font-display);
    font-size: var(--fs-h2);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.035em;
    text-wrap: balance;
}
.section__sub {
    margin-top: 1.1rem;
    max-width: 58ch;
    color: var(--text-2);
    font-size: var(--fs-lead);
}

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags li {
    padding: 0.3rem 0.7rem;
    border-radius: var(--r-pill);
    border: 1px solid var(--line-strong);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-2);
}
.tags--quiet li { border-color: var(--line); padding: 0.2rem 0.6rem; font-size: 0.75rem; }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow-x: clip;
    padding-top: calc(var(--nav-h) + clamp(2rem, 1rem + 3.5vw, 4.5rem));
    padding-bottom: clamp(3rem, 2rem + 4vw, 5rem);
    isolation: isolate;
}
/* soft accent glow + grid, quiet enough to stay behind the type */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(60% 50% at 78% 30%, var(--glow), transparent 70%),
        linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 64px 64px,
        linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 64px 64px;
    mask-image: radial-gradient(80% 70% at 50% 35%, #000 30%, transparent 85%);
    -webkit-mask-image: radial-gradient(80% 70% at 50% 35%, #000 30%, transparent 85%);
    opacity: 0.55;
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
    gap: clamp(2rem, 1rem + 4vw, 5rem);
    align-items: center;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.9rem 0.4rem 0.75rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    font-size: var(--fs-small);
    font-weight: 500;
    color: var(--text-2);
}
.status__dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3ddc84;
}
.status__dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px solid #3ddc84;
    animation: ping 2.2s var(--ease) infinite;
}
@keyframes ping {
    0% { transform: scale(0.6); opacity: 0.9; }
    100% { transform: scale(1.8); opacity: 0; }
}

.hero__title {
    margin-top: 1.6rem;
    font-family: var(--font-display);
    font-size: var(--fs-display);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.045em;
}
.hero__hello {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--muted);
    font-weight: 500;
    font-size: 0.42em;
    letter-spacing: -0.02em;
}
.hero__tail { display: block; color: var(--text-2); font-weight: 500; }

.rotator {
    position: relative;
    display: inline-grid;
    vertical-align: bottom;
    color: var(--accent-text);
}
.rotator__word {
    grid-area: 1 / 1;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(0.45em);
    filter: blur(6px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), filter 0.6s var(--ease);
}
.rotator__word.is-active { opacity: 1; transform: none; filter: none; }
.rotator__word.is-leaving { opacity: 0; transform: translateY(-0.45em); filter: blur(6px); }

.hero__lead {
    margin-top: 1.75rem;
    max-width: 54ch;
    color: var(--text-2);
    font-size: var(--fs-lead);
    line-height: 1.65;
}

.hero__ctas { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Portrait viewfinder: brackets lock on, a scan line reveals the portrait,
   then the name types out */
.stage {
    position: relative;
    justify-self: end;
    width: min(100%, 420px);
    aspect-ratio: 4 / 5;
    margin: 0;
    --vf-top: 2%;
    --vf-bottom: 10%;
    --bracket-inset: 14px;
}

.viewfinder {
    position: absolute;
    inset: var(--vf-top) 0 var(--vf-bottom);
    overflow: hidden;
    border-radius: var(--r-lg);
    background:
        radial-gradient(circle at 50% 115%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
        linear-gradient(180deg, var(--surface-2), var(--surface));
    box-shadow: var(--shadow-lg);
}
/* hairline border drawn on top so the photo never covers it */
.viewfinder::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px var(--line-strong);
    pointer-events: none;
}
.viewfinder__reveal { position: absolute; inset: 0; }
/* a head-and-shoulders crop: wider than the frame so the cut-off suit edges stay hidden */
.viewfinder__reveal img {
    position: absolute;
    left: -4%;
    bottom: -4%;
    width: 108%;
    max-width: none;
    height: auto;
}

/* Full-height carrier so translateY(100%) travels the whole frame without triggering layout */
.viewfinder__scan {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}
.viewfinder__scan::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: var(--accent-text);
    box-shadow: 0 0 14px 2px var(--accent-text);
}
.viewfinder__scan::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -64px;
    height: 64px;
    background: linear-gradient(to top, color-mix(in srgb, var(--accent-text) 22%, transparent), transparent);
}

[data-theme="light"] .viewfinder__scan::before { opacity: 0.45; }

.viewfinder__hud {
    position: absolute;
    top: calc(var(--bracket-inset) - 2px);
    left: calc(var(--bracket-inset) + 34px);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.65rem;
    border-radius: var(--r-pill);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid var(--line-strong);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--text);
    white-space: nowrap;
}
.viewfinder__hud i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-text);
}

.bracket {
    position: absolute;
    width: 26px;
    height: 26px;
    border: 2px solid var(--accent-text);
    pointer-events: none;
}
.bracket--tl { top: calc(var(--vf-top) + var(--bracket-inset)); left: var(--bracket-inset); border-right: 0; border-bottom: 0; border-top-left-radius: 8px; --x: -14px; --y: -14px; }
.bracket--tr { top: calc(var(--vf-top) + var(--bracket-inset)); right: var(--bracket-inset); border-left: 0; border-bottom: 0; border-top-right-radius: 8px; --x: 14px; --y: -14px; }
.bracket--bl { bottom: calc(var(--vf-bottom) + var(--bracket-inset)); left: var(--bracket-inset); border-right: 0; border-top: 0; border-bottom-left-radius: 8px; --x: -14px; --y: 14px; }
.bracket--br { bottom: calc(var(--vf-bottom) + var(--bracket-inset)); right: var(--bracket-inset); border-left: 0; border-top: 0; border-bottom-right-radius: 8px; --x: 14px; --y: 14px; }

.viewfinder__label {
    position: absolute;
    left: 50%;
    bottom: 0;
    translate: -50% 0;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.9rem;
    border-radius: var(--r-pill);
    background: var(--bg);
    border: 1px solid var(--line-strong);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
}
.viewfinder__name { display: inline-block; overflow: hidden; vertical-align: bottom; }
.viewfinder__label i {
    display: inline-block;
    width: 7px;
    height: 13px;
    margin-left: 3px;
    background: var(--accent-text);
    animation: blink 1s steps(1) 2.3s 5;
}

/* Hidden until the portrait has loaded; the animations below fill to their end state */
.js .viewfinder { opacity: 0; }
.js .viewfinder__reveal { clip-path: inset(0 0 100% 0); }
.js .bracket, .js .viewfinder__hud, .js .viewfinder__label { opacity: 0; }
.js .viewfinder__name { width: 0; }

.stage.is-ready .viewfinder { animation: vf-in 0.7s var(--ease) both; }
.stage.is-ready .bracket { animation: vf-lock 0.7s var(--ease) 0.2s both; }
.stage.is-ready .viewfinder__reveal { animation: vf-reveal 1.6s cubic-bezier(0.45, 0, 0.25, 1) 0.6s both; }
.stage.is-ready .viewfinder__scan { animation: vf-scan 1.6s cubic-bezier(0.45, 0, 0.25, 1) 0.6s both; }
.stage.is-ready .viewfinder__hud { animation: vf-fade 0.5s var(--ease) 1.2s both; }
.stage.is-ready .viewfinder__label { animation: vf-fade 0.4s var(--ease) 2.1s both; }
.stage.is-ready .viewfinder__name { animation: vf-type 1.1s steps(18) 2.3s both; }

@keyframes vf-in { from { opacity: 0; scale: 0.96; } to { opacity: 1; scale: 1; } }
@keyframes vf-lock { from { opacity: 0; translate: var(--x) var(--y); } to { opacity: 1; translate: 0 0; } }
@keyframes vf-reveal { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes vf-scan { 0% { transform: translateY(0); opacity: 1; } 95% { opacity: 1; } 100% { transform: translateY(100%); opacity: 0; } }
@keyframes vf-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vf-type { from { width: 0; } to { width: calc(18ch + 1.5em); } }
@keyframes blink { 50% { opacity: 0; } }

.hero__facts {
    margin-top: clamp(3rem, 2rem + 3vw, 4.5rem);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
}
.hero__facts > div {
    padding: 1.25rem 1.25rem 0 0;
}
.hero__facts > div + div { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.hero__facts dt {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}
.hero__facts dd { margin-top: 0.35rem; font-weight: 500; }

/* ---------- Marquee ---------- */

.marquee {
    overflow: hidden;
    border-block: 1px solid var(--line);
    background: var(--bg-alt);
    padding-block: 1.3rem;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
    display: flex;
    width: max-content;
    animation: marquee 38s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee ul { display: flex; flex: none; }
.marquee li {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    padding-right: 2.5rem;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text-2);
    white-space: nowrap;
}
.marquee li::after {
    content: "";
    width: 7px;
    height: 7px;
    background: var(--accent);
    transform: rotate(45deg);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Spotlight hover (cursor-following glow) ---------- */

.spotlight { position: relative; }
.spotlight::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 60%);
}
.spotlight:hover::before { opacity: 1; }

/* ---------- Project grid ---------- */

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

/* ---------- Compact stats inside a project card ---------- */

.project__stats {
    margin-top: 1.1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-block: 1px solid var(--line);
}
.project__stats li { padding: 0.75rem 0.75rem 0.75rem 0; }
.project__stats li + li { padding-left: 0.85rem; border-left: 1px solid var(--line); }
.project__stats b {
    display: block;
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--accent-text);
}
.project__stats span { display: block; margin-top: 0.2rem; font-size: 0.8rem; color: var(--text-2); }

/* ---------- Case study page ---------- */

.case { padding-top: calc(var(--nav-h) + clamp(1.5rem, 1rem + 2vw, 3rem)); }
.case__back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 44px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-2);
    transition: color 0.2s;
}
.case__back:hover { color: var(--accent-text); }
.case__intro {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
    align-items: center;
}
.case__title {
    margin-top: 0.9rem;
    font-family: var(--font-display);
    font-size: var(--fs-display);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 0.95;
}
.case__lead { margin-top: 1.1rem; max-width: 52ch; font-size: var(--fs-lead); color: var(--text-2); }
.case__copy .tags { margin-top: 1.25rem; }
.case__copy .project__links { padding-top: 0.75rem; }
.case__media {
    margin: 0;
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface-2);
    box-shadow: var(--shadow-lg);
}
.case__media img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; filter: brightness(var(--img-dim)); }

/* ---------- ChickDetect model case study ---------- */

.model {
    margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
    padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
}
.model:target { border-color: var(--accent-text); box-shadow: 0 0 0 4px var(--accent-soft); }
.model__kicker {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-text);
}
.model__title {
    margin-top: 0.5rem;
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
}
.model__sub { margin-top: 0.6rem; max-width: 62ch; color: var(--text-2); }

.model__steps {
    counter-reset: step;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem clamp(1.5rem, 1rem + 3vw, 3.5rem);
}
.model__steps li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    grid-template-rows: 2.5rem auto;
    column-gap: 0.85rem;
    align-content: start;
}
.model__steps li::before {
    content: counter(step, decimal-leading-zero);
    grid-row: 1;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--r-sm);
    background: var(--accent-soft);
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}
.model__step {
    grid-row: 1;
    align-self: center;
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-2);
}
.model__steps p { grid-column: 2; margin-top: 0.15rem; color: var(--text-2); }
.model__steps b { color: var(--text); font-weight: 600; }

.model__stats { margin-top: 1.75rem; display: grid; grid-template-columns: repeat(2, minmax(0, 16rem)); gap: 1rem; }
.model__stats div {
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg);
}
.model__stats b {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2rem, 1.5rem + 1.5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--accent-text);
}
.model__stats span { display: block; margin-top: 0.4rem; font-size: var(--fs-small); color: var(--text-2); }

.model__foot {
    margin-top: 1.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
}

/* ---------- Other projects (smaller rows under the main two) ---------- */

.others { margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.others__title {
    margin-bottom: 1rem;
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-2);
}
.other {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 1.5rem 0.75rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    transition: border-color 0.3s;
}
.other:hover { border-color: var(--line-strong); }
.other:target { border-color: var(--accent-text); box-shadow: 0 0 0 4px var(--accent-soft); }
.other__media { display: block; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); }
.other__media img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; object-position: top; filter: brightness(var(--img-dim)); }
.other__body { position: relative; z-index: 3; }
.other .project__top { justify-content: flex-start; }
.other__name {
    margin: 0.4rem 0 0;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.other__body p { margin-top: 0.3rem; color: var(--text-2); }
.other__links { position: relative; z-index: 3; margin-top: 0; padding-top: 0; }

.project {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    overflow: hidden;
    transition: border-color 0.3s, transform 0.5s var(--ease);
}
.project:hover { border-color: var(--line-strong); transform: translateY(-4px); }
/* Arriving from a skill link: mark the card that was asked for */
.project:target { border-color: var(--accent-text); box-shadow: 0 0 0 4px var(--accent-soft); }

/* The first project takes two columns: screenshot on the left, details on the right */
@media (min-width: 641px) {
    .project--feature { grid-column: span 2; flex-direction: row; }
    .project--feature .project__media {
        flex: 1.2 1 0;
        display: flex;
        flex-direction: column;
        margin: 0.75rem 0 0.75rem 0.75rem;
    }
    .project--feature .project__media img { flex: 1 1 0; height: 0; min-height: 240px; aspect-ratio: auto; }
    .project--feature .project__body { flex: 1 1 0; padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem); }
    /* Second big card mirrors the first: photo on the right */
    .project--flip { flex-direction: row-reverse; }
    .project--flip .project__media { margin: 0.75rem 0.75rem 0.75rem 0; }
    .project--feature .project__title { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.4rem); line-height: 1.08; }
    .project--feature .project__body p { margin-top: 0.9rem; font-size: 1.05rem; }
}

.project__media {
    position: relative;
    display: block;
    margin: 0.75rem 0.75rem 0;
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--line);
}
.browser-bar {
    display: flex;
    gap: 6px;
    padding: 0.6rem 0.75rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
}
.browser-bar i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--line-strong);
}
.project__media img {
    aspect-ratio: 16 / 10;
    width: 100%;
    object-fit: cover;
    object-position: top;
    filter: brightness(var(--img-dim));
    transition: transform 0.9s var(--ease);
}
.project:hover .project__media img { transform: scale(1.04); }

.project__body {
    position: relative;
    z-index: 3;
    padding: 1.5rem 1.5rem 1.6rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.project__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.project__num {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    color: var(--accent-text);
}
.project__title {
    margin-top: 0.9rem;
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
}
.project__body p { margin-top: 0.6rem; color: var(--text-2); font-size: 1rem; }
.project__body .project__role { margin-top: 1rem; font-size: 0.95rem; color: var(--text); }
.project__role span {
    margin-right: 0.5rem;
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-text);
}
.project__links {
    margin-top: auto;
    padding-top: 0.9rem;
    display: flex;
    gap: 1.5rem;
}
.project__links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.project__links a:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 5px; }
.project__links a .ic { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }
.project__links a:hover .ic { transform: translate(2px, -2px); }

.more { margin-top: 2.5rem; color: var(--text-2); text-align: center; }

/* ---------- About ---------- */

.about {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(2.5rem, 1rem + 5vw, 6rem);
    align-items: center;
}
/* About photo: curtain reveal, slow zoom, light scroll parallax */
.about__media { width: 100%; max-width: 460px; position: relative; }
/* offset outline frame behind the photo */
.about__media::before {
    content: "";
    position: absolute;
    inset: 1.25rem -1.25rem -1.25rem 1.25rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-lg);
    transition: inset 1.2s var(--ease) 0.4s, opacity 1.2s var(--ease) 0.4s;
}
.js .about__media.reveal::before { inset: 0; opacity: 0; }
.js .about__media.reveal.is-visible::before { inset: 1.25rem -1.25rem -1.25rem 1.25rem; opacity: 1; }

.photo {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}
.photo img {
    width: 100%;
    height: 118%;
    margin-top: -9%;
    object-fit: cover;
    object-position: 72% 40%;
    filter: saturate(0.9) contrast(1.05) brightness(var(--img-dim));
    translate: 0 var(--shift, 0px);
}
.js .about__media.reveal .photo { clip-path: inset(100% 0 0 0 round var(--r-lg)); transition: clip-path 1.3s var(--ease) 0.1s; }
.js .about__media.reveal.is-visible .photo { clip-path: inset(0 0 0 0 round var(--r-lg)); }

.about .section__head { margin-bottom: 1.75rem; }
.prose { display: grid; gap: 1.1rem; color: var(--text-2); font-size: 1.05rem; max-width: 56ch; }

.now {
    margin-top: 2.25rem;
    border-top: 1px solid var(--line);
}
.now li {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 1rem;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--line);
}
.now__k {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    padding-top: 0.2rem;
}
.now__v { font-weight: 500; }

/* ---------- Awards ---------- */

.award {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    overflow: hidden;
}
.award__media {
    position: relative;
    display: block;
    min-height: 100%;
    overflow: hidden;
    background: var(--surface-2);
}
.award__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 60%;
    filter: brightness(var(--img-dim));
    transition: transform 0.9s var(--ease);
}
.award:hover .award__media img { transform: scale(1.03); }

.award__body {
    position: relative;
    z-index: 3;
    padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.award__badge {
    align-self: flex-start;
    padding: 0.35rem 0.8rem;
    border-radius: var(--r-pill);
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.award__title {
    margin-top: 1.1rem;
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-wrap: balance;
}
.award__team {
    margin-top: 0.35rem;
    font-family: var(--font-mono);
    font-size: var(--fs-small);
    color: var(--accent-text);
}
.award__body > p:not(.award__team) { margin-top: 1rem; color: var(--text-2); }
.award__facts { margin-top: 1.5rem; }
.award__facts .now__v { font-size: 0.95rem; }

.award-shots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.award-shot { margin: 0; }
.award-shot--wide { grid-column: 1 / -1; }
.award-shot img {
    width: 100%;
    height: auto;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    filter: brightness(var(--img-dim));
}
.award-shot--paper img {
    padding: clamp(0.75rem, 0.5rem + 1vw, 1.5rem);
    background: #ecebe4;
    filter: none;
}
.award-shot figcaption {
    display: grid;
    gap: 0.2rem;
    margin-top: 0.85rem;
    font-size: var(--fs-small);
    color: var(--text-2);
}
.award-shot figcaption b { color: var(--text); font-weight: 600; font-size: 1rem; }

/* ---------- Skills ---------- */

.skills {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.5rem;
}
.skill {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.5rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    transition: border-color 0.3s;
}
.skill:hover { border-color: var(--line-strong); }
.skill--wide { grid-column: span 4; }

.skill__head { position: relative; z-index: 3; display: flex; align-items: center; gap: 0.85rem; }
.skill__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--r-sm);
    background: var(--accent-soft);
    color: var(--accent-text);
}
.skill__icon .ic { width: 20px; height: 20px; }
.skill h3 {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-2);
}

.skill ul { position: relative; z-index: 3; flex: 1; margin-top: 1.1rem; display: grid; }
/* Wide tiles hold two rows of two, stretched to the tile's height with larger type */
.skill--wide ul { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; column-gap: 2rem; }
.skill.skill--wide li { font-size: clamp(1.25rem, 1rem + 0.9vw, 1.6rem); }
.skill li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 52px;
    border-top: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

/* Project numbers: a 44px tap area around a small chip */
.skill__used { display: flex; flex: none; margin-right: -0.4rem; }
.skill__used a { display: grid; place-items: center; min-width: 40px; height: 44px; }
.skill__used span {
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--text-2);
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.skill__used a:hover span,
.skill__used a:focus-visible span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- Contact ---------- */

.contact { overflow: hidden; isolation: isolate; }
.contact::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -40%;
    width: min(1100px, 140vw);
    aspect-ratio: 1;
    transform: translateX(-50%);
    z-index: -1;
    background: radial-gradient(closest-side, var(--glow), transparent);
}
.contact__title {
    margin-top: 1.25rem;
    max-width: 16ch;
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 1.2rem + 5vw, 5.25rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.045em;
    text-wrap: balance;
}
.contact__title em { font-style: normal; color: var(--accent-text); }

.contact__mail {
    margin-top: 2.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
}
.contact__email {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 1rem + 2vw, 2.25rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    border-bottom: 2px solid var(--line-strong);
    padding-block: 0.2rem 0.15rem;
    transition: border-color 0.25s, color 0.25s;
    overflow-wrap: anywhere;
}
.contact__email:hover { border-color: var(--accent); color: var(--accent-text); }

.copy-btn .ic--check { display: none; }
.copy-btn.is-copied { border-color: var(--accent); color: var(--accent-text); }
.copy-btn.is-copied .ic--copy { display: none; }
.copy-btn.is-copied .ic--check { display: block; }

.contact__list {
    margin-top: 3.5rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.contact__list a {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 84px;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: color-mix(in srgb, var(--surface) 80%, transparent);
    transition: border-color 0.25s, background-color 0.25s, transform 0.4s var(--ease);
}
.contact__list a:hover { border-color: var(--line-strong); background: var(--surface); transform: translateY(-3px); }
.contact__list .ic { width: 20px; height: 20px; color: var(--text-2); }
.contact__list span { display: flex; flex-direction: column; font-weight: 500; line-height: 1.35; }
.contact__list small {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}
.contact__arrow { margin-left: auto; transition: transform 0.3s var(--ease), color 0.2s; }
.contact__list a:hover .contact__arrow { transform: translate(2px, -2px); color: var(--accent-text); }

.contact__grid {
    margin-top: 2.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 1rem + 4vw, 4.5rem);
    align-items: start;
}
.contact__grid .contact__mail { margin-top: 0; }
.contact__grid .contact__list { margin-top: 2rem; grid-template-columns: 1fr; }

.contact-form {
    display: grid;
    gap: 1.1rem;
    padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: color-mix(in srgb, var(--surface) 86%, transparent);
}
.contact-form__title {
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.field { display: grid; gap: 0.45rem; }
.field label {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-2);
}
.field input,
.field textarea {
    width: 100%;
    padding: 0.8rem 0.9rem;
    font: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input:hover,
.field textarea:hover { border-color: var(--muted); }
.field input:focus-visible,
.field textarea:focus-visible {
    outline: none;
    border-color: var(--accent-text);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
/* Spam trap: real visitors never see or reach this field */
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-form__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem 1.25rem; }
.contact-form .btn[disabled] { opacity: 0.6; cursor: progress; }
.contact-form__status { flex: 1 1 14rem; font-size: var(--fs-small); color: var(--text-2); }
.contact-form__status.is-ok { color: var(--accent-text); }
.contact-form__status.is-error { color: var(--danger); }
.contact-form__status a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Zoomable photos + viewer ---------- */

.zoom { position: relative; display: block; cursor: zoom-in; }
.award-shot .zoom { border-radius: var(--r-md); }
.zoom__hint {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: var(--r-pill);
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(11, 13, 11, 0.72);
    color: #eef0ea;
    transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.4s var(--ease);
}
.zoom__hint .ic { width: 16px; height: 16px; }
.zoom:hover .zoom__hint,
.zoom:focus-visible .zoom__hint {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
    transform: scale(1.08);
}

.lightbox {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 4rem clamp(0.75rem, 5vw, 5rem) 1.25rem;
    border: 0;
    background: transparent;
    color: var(--text);
    overflow: hidden;
    overscroll-behavior: contain;
}
.lightbox::backdrop { background: color-mix(in srgb, var(--bg) 93%, transparent); }
.lightbox__figure {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    justify-items: center;
    align-items: center;
    gap: 0.9rem;
}
.lightbox__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--r-sm);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    cursor: zoom-in;
}
.lightbox__cap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1rem;
    font-size: var(--fs-small);
    color: var(--text-2);
    text-align: center;
}
.lightbox__count { font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--muted); align-self: center; }

/* Full-size mode: the photo keeps its real size and the frame scrolls */
.lightbox.is-zoomed .lightbox__figure { display: block; overflow: auto; }
.lightbox.is-zoomed .lightbox__img { max-width: none; max-height: none; margin-inline: auto; cursor: zoom-out; }
.lightbox.is-zoomed .lightbox__cap { display: none; }

.lightbox__btn { position: absolute; background: var(--surface); border-color: var(--line-strong); }
.lightbox__close { top: 0.9rem; right: 0.9rem; }
.lightbox__prev { left: 0.9rem; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 0.9rem; top: 50%; translate: 0 -50%; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); padding-block: 1.75rem; font-size: var(--fs-small); color: var(--muted); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer__top {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    color: var(--text-2);
    transition: color 0.2s;
}
.footer__top:hover { color: var(--accent-text); }

/* ---------- Reveal on scroll ---------- */

.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    transition-delay: var(--d, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* The hero animates in with CSS alone, so the first screen never waits for the script */
.js .hero .reveal {
    opacity: 1;
    transform: none;
    transition: none;
    animation: reveal-in 0.9s var(--ease) backwards;
    animation-delay: var(--d, 0s);
}
.hero__copy > .reveal:nth-child(2) { --d: 0.08s; }
.hero__copy > .reveal:nth-child(3) { --d: 0.16s; }
.hero__copy > .reveal:nth-child(4) { --d: 0.24s; }
@keyframes reveal-in { from { opacity: 0; transform: translateY(24px); } }

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

@media (max-width: 1024px) {
    .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .skill, .skill--wide { grid-column: auto; }
    .skill--wide { grid-column: 1 / -1; }
    .skill--wide ul { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
    .skill.skill--wide li { font-size: 1.15rem; }
}

@media (max-width: 900px) {
    :root { --nav-h: 64px; }
    .nav__links, .nav__cta { display: none; }
    .nav__actions { margin-left: auto; }
    .menu-btn { display: grid; }

    .hero__grid { grid-template-columns: 1fr; }
    .hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero__facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
    .hero__facts > div:nth-child(n + 3) { border-top: 1px solid var(--line); margin-top: 1.25rem; }


    .about { grid-template-columns: 1fr; }
    .award { grid-template-columns: 1fr; }
    .award__media img { aspect-ratio: 4 / 3; }
    .about__media { max-width: 400px; width: calc(100% - 1.25rem); }

    .stage { order: -1; justify-self: center; width: min(82%, 320px); margin-bottom: 0.5rem; --bracket-inset: 12px; }

    .contact__list { grid-template-columns: 1fr; }
    .contact__grid { grid-template-columns: 1fr; }
    .model__steps { grid-template-columns: 1fr; }
    .case__intro { grid-template-columns: 1fr; }
    .other { grid-template-columns: 180px minmax(0, 1fr); }
    .other__links { grid-column: 2; }
}

@media (max-width: 640px) {
    .projects { grid-template-columns: 1fr; }
    .skill--wide ul { grid-template-columns: 1fr; }
    .model__stats { grid-template-columns: 1fr 1fr; }
    .other { grid-template-columns: 1fr; gap: 1rem; padding: 0.75rem 0.75rem 1rem; }
    .other__body, .other__links { padding-inline: 0.75rem; }
    .award-shots { grid-template-columns: 1fr; }
    .skills { grid-template-columns: 1fr; }
    .hero__facts { grid-template-columns: 1fr 1fr; }
    .hero__facts dd { font-size: 0.92rem; }
    .now li { grid-template-columns: 6rem 1fr; }
    .hero__ctas .btn { flex: 1; }
    .brand__name { display: none; }
    .lightbox { padding: 3.75rem 0.75rem 4.25rem; }
    .lightbox__prev, .lightbox__next { top: auto; bottom: 0.9rem; translate: none; }
    .lightbox__prev { left: calc(50% - 52px); }
    .lightbox__next { right: calc(50% - 52px); }
}

@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;
    }
    .marquee__track { animation: none; }
    .js .reveal { opacity: 1; transform: none; }
    .photo img { translate: none; }
}
