/* ============================================================
   motion.css — light editorial portfolio
   Bone background · Instrument Serif display · Switzer body
   Swap --accent to rebrand.
   ============================================================ */

:root {
    /* Surface — warm bone */
    --bone: #f2f0ec;
    --bone-2: #ebe8e2;
    --bone-3: #e3dfd7;
    --bone-4: #d9d4ca;

    /* Ink */
    --ink: #131211;
    --ink-soft: #4c4944;
    --ink-faint: #8b8780;

    /* Lines */
    --line: rgba(19, 18, 17, 0.13);
    --line-strong: rgba(19, 18, 17, 0.32);

    /* The single accent — change this one value to rebrand */
    --accent: #3d6dff;
    --accent-soft: rgba(61, 109, 255, 0.13);

    /* Type */
    --font-display: 'Instrument Serif', 'Times New Roman', Georgia, serif;
    --font-body: 'Switzer', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

    --shell: 1440px;
    --pad: clamp(20px, 4vw, 72px);
    --nav-h: 76px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

html.lenis-on { scroll-behavior: auto; }
html:not(.lenis-on) { scroll-behavior: smooth; }

body {
    background: var(--bone);
    color: var(--ink-soft);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.is-locked {
    overflow: hidden;
    height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

.shell {
    width: 100%;
    max-width: var(--shell);
    margin: 0 auto;
    padding: 0 var(--pad);
    position: relative;
    z-index: 1;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px; top: 0;
    z-index: 9999;
    background: var(--accent);
    color: #fff;
    padding: 12px 20px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.skip-link:focus { left: 12px; top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ============ SHARED TYPE ============ */
h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--ink);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

/* Instrument Serif italic is the accent voice throughout */
h1 em, h2 em, h3 em {
    font-style: italic;
    color: var(--accent);
}

.kicker {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.big-statement {
    font-size: clamp(2.4rem, 6vw, 5.4rem);
    line-height: 0.98;
    letter-spacing: -0.02em;
    margin-top: 16px;
}

.sec-head { padding-top: clamp(70px, 10vw, 150px); }

.sec-head.split {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 40px;
    align-items: end;
}

.sec-note {
    font-size: 0.95rem;
    max-width: 42ch;
    color: var(--ink-soft);
}

/* Oversized ghost words drifting behind sections */
.ghost {
    position: absolute;
    left: 0;
    top: clamp(40px, 7vw, 110px);
    font-family: var(--font-display);
    font-size: clamp(7rem, 22vw, 20rem);
    line-height: 0.8;
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(19, 18, 17, 0.09);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    will-change: transform;
}

/* ============ PRELOADER ============ */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: var(--bone);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--pad);
    will-change: transform;
}

.preloader.is-done {
    transform: translateY(-101%);
    transition: transform 1.05s var(--ease-io);
    pointer-events: none;
}

.pre-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 20px;
}

.pre-name {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.pre-count {
    font-family: var(--font-display);
    font-size: clamp(4.5rem, 18vw, 14rem);
    line-height: 0.78;
    color: var(--ink);
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.pre-bar { height: 1px; background: var(--line); overflow: hidden; }
.pre-bar i { display: block; height: 100%; width: 0%; background: var(--accent); }

/* ============ MOTION NOTICE ============ */
.motion-notice {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 8800;
    max-width: min(430px, calc(100vw - 32px));
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px 13px 18px;
    background: var(--ink);
    color: #f4f2ee;
    border-radius: 100px;
    box-shadow: 0 14px 40px rgba(19, 18, 17, 0.24);
    font-size: 0.8rem;
    line-height: 1.35;
}

.motion-notice[hidden] { display: none; }

.motion-notice button {
    flex: none;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--accent);
    color: #fff;
    border-radius: 100px;
    padding: 9px 15px;
    transition: filter 0.25s;
}

.motion-notice button:hover { filter: brightness(1.15); }

.motion-notice .mn-close {
    background: none;
    color: rgba(244, 242, 238, 0.55);
    font-size: 1.15rem;
    padding: 0 6px;
    letter-spacing: 0;
}

.motion-notice .mn-close:hover { color: #fff; }

/* ============ GRAIN + CURSOR + PROGRESS ============ */
.grain {
    position: fixed;
    inset: -150%;
    z-index: 8000;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grainShift 0.62s steps(3) infinite;
    mix-blend-mode: multiply;
}

@keyframes grainShift {
    0% { transform: translate(0, 0); }
    33% { transform: translate(-2%, 1.5%); }
    66% { transform: translate(1.5%, -2%); }
    100% { transform: translate(0, 0); }
}

.cursor, .cursor-ring {
    position: fixed;
    top: 0; left: 0;
    z-index: 8500;
    pointer-events: none;
    border-radius: 50%;
    opacity: 0;
    will-change: transform;
}

.cursor {
    width: 7px; height: 7px;
    margin: -3.5px 0 0 -3.5px;
    background: #fff;
    mix-blend-mode: difference;
}

.cursor-ring {
    width: 40px; height: 40px;
    margin: -20px 0 0 -20px;
    border: 1px solid var(--line-strong);
    display: grid;
    place-items: center;
    transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out),
        margin 0.35s var(--ease-out), background-color 0.35s var(--ease-out),
        border-color 0.35s var(--ease-out);
}

.cursor-ring span {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    color: #fff;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.25s, transform 0.25s;
}

body.cursor-on .cursor,
body.cursor-on .cursor-ring { opacity: 1; }

body.cursor-hover .cursor-ring {
    width: 60px; height: 60px;
    margin: -30px 0 0 -30px;
    border-color: var(--accent);
    background: var(--accent-soft);
}

body.cursor-view .cursor-ring {
    width: 90px; height: 90px;
    margin: -45px 0 0 -45px;
    background: var(--accent);
    border-color: var(--accent);
}

body.cursor-view .cursor-ring span { opacity: 1; transform: scale(1); }
body.cursor-view .cursor { opacity: 0; }

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

/* ============ NAV ============ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 7000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 var(--pad);
    transition: background-color 0.4s, backdrop-filter 0.4s, border-color 0.4s, height 0.4s;
    border-bottom: 1px solid transparent;
}

body.scrolled .nav {
    height: 62px;
    background: rgba(242, 240, 236, 0.78);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    border-bottom-color: var(--line);
}

.nav-logo img { height: 28px; width: auto; }

.nav-links { display: flex; gap: 30px; list-style: none; }

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ink-soft);
    position: relative;
    padding: 6px 0;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    height: 1px; width: 100%;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: 100% 50%;
    transition: transform 0.45s var(--ease-out);
}

.nav-links a:hover, .nav-links a.is-active { color: var(--ink); }

.nav-links a:hover::after,
.nav-links a.is-active::after {
    transform: scaleX(1);
    transform-origin: 0 50%;
}

.nav-right { display: flex; align-items: center; gap: 18px; }

.nav-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.nav-status i {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #1ea55f;
    box-shadow: 0 0 0 0 rgba(30, 165, 95, 0.5);
    animation: pulseDot 2.4s infinite;
}

@keyframes pulseDot {
    70% { box-shadow: 0 0 0 8px rgba(30, 165, 95, 0); }
    100% { box-shadow: 0 0 0 0 rgba(30, 165, 95, 0); }
}

.nav-cta {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: 100px;
    padding: 9px 18px;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.nav-cta:hover { background: var(--ink); border-color: var(--ink); color: var(--bone); }

/* ---- Resume language menu ---- */
.nav-resume { position: relative; }

.nav-resume .nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.nav-resume .nav-cta i {
    font-size: 0.6em;
    transition: transform 0.35s var(--ease-out);
}

.nav-resume .nav-cta[aria-expanded="true"] i { transform: rotate(180deg); }

.resume-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 190px;
    background: var(--bone);
    border: 1px solid var(--line-strong);
    box-shadow: 0 18px 44px rgba(19, 18, 17, 0.16);
    padding: 6px;
    display: grid;
    gap: 2px;
    opacity: 0;
    visibility: hidden;          /* keeps it out of the a11y tree when closed */
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.28s var(--ease-out), transform 0.34s var(--ease-out), visibility 0.28s;
}

/* Without JS, hover and keyboard focus open the menu so it still works.
   Once JS is wired (html.js-nav) the click toggle takes sole control —
   otherwise :focus-within would re-open it the moment Escape returns
   focus to the button, making Escape useless. */
.resume-menu.is-open,
html:not(.js-nav) .nav-resume:hover .resume-menu,
html:not(.js-nav) .nav-resume:focus-within .resume-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* invisible bridge so the pointer can travel button -> menu */
.resume-menu::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: -12px;
    height: 12px;
}

.resume-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 13px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    transition: background-color 0.25s, color 0.25s;
}

.resume-menu a em {
    font-style: normal;
    font-size: 0.62rem;
    color: var(--ink-faint);
    transition: color 0.25s;
}

.resume-menu a:hover { background: var(--ink); color: var(--bone); }
.resume-menu a:hover em { color: var(--accent); }

/* ---- Resume block inside the mobile sheet ---- */
.sheet-resume { display: grid; gap: 12px; }

.sheet-resume-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.sheet-resume > div { display: flex; flex-wrap: wrap; gap: 10px; }

.sheet-resume a {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: 100px;
    padding: 11px 22px;
}

.sheet-resume a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.nav-toggle {
    display: none;
    width: 40px; height: 40px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.nav-toggle span {
    display: block;
    width: 22px; height: 1.5px;
    background: var(--ink);
    transition: transform 0.35s var(--ease-out);
}

.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.nav-sheet {
    position: fixed;
    inset: 0;
    z-index: 6900;
    background: var(--bone);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    padding: var(--nav-h) var(--pad) var(--pad);
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.7s var(--ease-io);
    pointer-events: none;
}

.nav-sheet.is-open { clip-path: inset(0 0 0 0); pointer-events: auto; }
.nav-sheet ul { list-style: none; }

.nav-sheet li a {
    display: flex;
    align-items: baseline;
    gap: 16px;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 12vw, 4.2rem);
    line-height: 1.15;
    color: var(--ink);
    letter-spacing: -0.02em;
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}

.nav-sheet li a em {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    color: var(--ink-faint);
}

.sheet-cta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

/* ============ REVEAL PRIMITIVES ============
   Default = visible. Hidden only under html.js-anim, which JS adds
   once GSAP is confirmed loaded — a blocked CDN degrades to a plain
   static page rather than a blank one.
   ======================================== */
.mask { display: inline-block; }

html.js-anim .reveal-line { display: block; overflow: hidden; }
html.js-anim .reveal-line > span { display: inline-block; transform: translateY(115%); }
html.js-anim .reveal-fade { opacity: 0; transform: translateY(30px); }

/* parallax owns `y` on these, so they must not start offset */
html.js-anim .reveal-fade[data-parallax] { transform: none; }
html.js-anim .reveal-words .w-line { display: block; overflow: hidden; }
html.js-anim .reveal-words .w { display: inline-block; transform: translateY(115%); }

/* per-character masks */
.ch-mask { display: inline-block; overflow: hidden; vertical-align: bottom; }
.ch { display: inline-block; }
html.js-anim .ch { transform: translateY(105%); }

html.js-anim .reveal-clip { clip-path: inset(0 0 100% 0); }

/* ============ HERO ============ */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--nav-h) + 40px) var(--pad) 40px;
    overflow: hidden;
}

/* faint vertical rules, the editorial grid */
.hero-rules {
    position: absolute;
    inset: 0 var(--pad);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    pointer-events: none;
}

.hero-rules i {
    border-left: 1px solid rgba(19, 18, 17, 0.055);
}

.hero-inner {
    position: relative;
    width: 100%;
    max-width: var(--shell);
    margin: 0 auto;
    z-index: 1;
}

.hero-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    padding-bottom: 15px;
    margin-bottom: clamp(24px, 4vw, 44px);
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.hero-title { letter-spacing: -0.025em; color: var(--ink); }
.hero-title .line { display: block; }

.hero-title .sm {
    font-size: clamp(1.9rem, 6vw, 5rem);
    line-height: 1;
    color: var(--ink-faint);
}

.hero-title .lg {
    font-size: clamp(3.6rem, 15vw, 13.5rem);
    line-height: 0.85;
    margin-top: 0.02em;
}

.hero-title i { color: var(--accent); font-style: normal; }

.hero-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
    align-items: end;
    margin-top: clamp(28px, 4vw, 52px);
}

.hero-lede {
    max-width: 52ch;
    font-size: clamp(0.95rem, 1.15vw, 1.08rem);
    color: var(--ink-soft);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 100px;
    padding: 14px 30px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    border: 1px solid transparent;
    transition: background-color 0.35s, color 0.35s, border-color 0.35s;
    white-space: nowrap;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--ink); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--bone); }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border-top: 1px solid var(--line);
    margin-top: clamp(36px, 5vw, 62px);
    will-change: transform;
}

.hero-stats .stat {
    background: var(--bone);
    padding: 20px 20px 6px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hero-stats strong {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.hero-stats span {
    font-size: 0.77rem;
    color: var(--ink-faint);
    line-height: 1.45;
    max-width: 24ch;
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-faint);
    z-index: 1;
}

.scroll-cue i {
    display: block;
    width: 1px; height: 42px;
    background: linear-gradient(to bottom, var(--line-strong), transparent);
    position: relative;
    overflow: hidden;
}

.scroll-cue i::after {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 1px; height: 14px;
    background: var(--accent);
    animation: cueRun 2s var(--ease-io) infinite;
}

@keyframes cueRun {
    0% { transform: translateY(-16px); }
    100% { transform: translateY(46px); }
}

/* ============ MARQUEE ============ */
.marquee {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    padding: 18px 0;
    background: var(--bone-2);
}

.marquee-track {
    display: flex;
    width: max-content;
    will-change: transform;
    animation: mq 45s linear infinite;
}

/* JS drives the marquee once it is running, so it can respond to
   scroll velocity — the keyframes are only the no-JS fallback. */
html.js-anim .marquee-track { animation: none; }

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

.mq-set {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    padding-right: 24px;
    white-space: nowrap;
}

.mq-set b {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.4vw, 2.1rem);
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.mq-set b em { font-style: italic; color: var(--accent); }
.mq-set i { color: var(--ink-faint); font-style: normal; font-size: 0.8rem; }

/* ============ ABOUT ============ */
.about { position: relative; }

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(32px, 6vw, 90px);
    padding: clamp(30px, 4vw, 56px) 0 clamp(70px, 10vw, 130px);
}

.about-sticky {
    position: sticky;
    top: calc(var(--nav-h) + 40px);
    align-self: start;
}

.about-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }

.about-tags span {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: 6px 13px;
}

.about-body p { margin-bottom: 18px; font-size: 1rem; }

.about-body .lead {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.1vw, 1.8rem);
    line-height: 1.28;
    color: var(--ink);
    letter-spacing: -0.01em;
}

/* Languages strip */
.langs {
    display: grid;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.langs-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.langs > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; }

.langs b {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.2rem;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.langs em {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-right: 8px;
}

.fit-list { margin-top: 40px; border-top: 1px solid var(--line); will-change: transform; }

.fit {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.fit strong {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 500;
}

.fit span { font-size: 0.92rem; }

/* ============ PORTRAIT ============ */
.portrait { padding: 0 var(--pad) clamp(70px, 10vw, 130px); }

.portrait-frame {
    position: relative;
    width: 58%;
    max-width: var(--shell);
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    will-change: width, clip-path;
}

/* The portrait is already a duotone print, so no grayscale filter —
   it would kill the one blue accent mark in the image. Parallax is a
   scale-down rather than a Y shift so the head can never clip. */
.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    /* Anchored to the top so the parallax scale only ever crops the
       bottom of the frame — the head can never be clipped. */
    transform-origin: 50% 0%;
    will-change: transform;
}

/* Caption sits in the image's own empty bone area, in ink — no dark
   scrim, which would look like a bruise on a light background. */
.portrait-cap {
    position: absolute;
    left: clamp(20px, 3vw, 44px);
    bottom: clamp(20px, 3vw, 40px);
    max-width: 45%;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    z-index: 1;
}

.portrait-cap .pc-name { color: var(--ink); }
.portrait-cap .pc-meta { color: var(--ink-faint); letter-spacing: 0.08em; }

/* ============ SKILLS (sticky pin) ============ */
.skills {
    position: relative;
    background: var(--bone-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.skills-stage {
    display: flex;
    align-items: center;
    padding: clamp(60px, 9vw, 110px) 0;
}

/* pin only in enhanced mode, else it's a plain stacked list */
/* ~86svh of scroll per panel — keep in step with the panel count */
html.js-anim .skills { height: 600svh; }

html.js-anim .skills-stage {
    position: sticky;
    top: 0;
    height: 100svh;
    padding: 0;
    overflow: hidden;
}

.skills-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
    gap: clamp(32px, 6vw, 90px);
    align-items: center;
}

.skills-counter {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 14px;
    font-family: var(--font-display);
    color: var(--ink);
    letter-spacing: -0.02em;
}

.skills-counter span {
    font-size: clamp(4rem, 10vw, 8.5rem);
    line-height: 0.82;
    font-variant-numeric: tabular-nums;
}

.skills-counter i {
    font-style: normal;
    font-size: 0.9rem;
    color: var(--ink-faint);
    font-family: var(--font-mono);
}

.skills-rail { display: flex; gap: 6px; margin-top: 28px; }

.skills-rail b {
    display: block;
    width: 28px; height: 2px;
    background: var(--line-strong);
    transition: background-color 0.4s, width 0.4s var(--ease-out);
}

.skills-rail b.on { background: var(--accent); width: 52px; }

.skills-panels { position: relative; }
html.js-anim .skills-panels { min-height: 330px; }

.sk-panel {
    border-top: 1px solid var(--line);
    padding-top: 20px;
    margin-bottom: 20px;
}

.sk-panel h3 { font-size: clamp(2rem, 4.6vw, 3.8rem); line-height: 1; }

.sk-panel ul { list-style: none; margin-top: 20px; display: grid; gap: 9px; }

.sk-panel li {
    font-size: 0.95rem;
    color: var(--ink-soft);
    padding-left: 22px;
    position: relative;
}

.sk-panel li::before {
    content: '';
    position: absolute;
    left: 0; top: 0.62em;
    width: 10px; height: 1px;
    background: var(--accent);
}

html.js-anim .skills-panels .sk-panel {
    position: absolute;
    inset: 0 0 auto 0;
    margin: 0;
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
    transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out);
}

html.js-anim .skills-panels .sk-panel.on {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

/* ============ WORK ============ */
.work { position: relative; padding-bottom: clamp(70px, 10vw, 130px); }

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: clamp(34px, 5vw, 58px) 0 8px;
}

.f-btn {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: 9px 18px;
    transition: color 0.3s, border-color 0.3s, background-color 0.3s;
}

.f-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.f-btn.is-active { background: var(--ink); border-color: var(--ink); color: var(--bone); }

.work-list { margin-top: 24px; border-top: 1px solid var(--line); will-change: transform; }

.wrow { border-bottom: 1px solid var(--line); position: relative; }
.wrow.is-hidden { display: none; }

.wrow-head {
    width: 100%;
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) minmax(0, 0.44fr) auto 40px;
    gap: 18px;
    align-items: center;
    padding: clamp(20px, 2.7vw, 34px) 0;
    text-align: left;
    position: relative;
    z-index: 1;
}

/* accent wipe that sweeps in from the left on hover */
.wrow-head::before {
    content: '';
    position: absolute;
    inset: 0 calc(var(--pad) * -0.5);
    background: var(--bone-3);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 0.55s var(--ease-out);
    z-index: -1;
}

.wrow:hover .wrow-head::before,
.wrow.is-open .wrow-head::before { transform: scaleX(1); }

.wr-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--ink-faint);
    letter-spacing: 0.1em;
    transition: color 0.35s;
}

.wrow:hover .wr-num { color: var(--accent); }

.wr-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3.1vw, 2.7rem);
    line-height: 1.08;
    letter-spacing: -0.015em;
    color: var(--ink);
    transition: transform 0.55s var(--ease-out);
}

.wrow:hover .wr-title { transform: translateX(16px); }

.wr-cat {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.wr-plus { justify-self: end; width: 24px; height: 24px; position: relative; flex: none; }

.wr-plus::before, .wr-plus::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    background: var(--ink-soft);
    transform: translate(-50%, -50%);
    transition: transform 0.45s var(--ease-out), background-color 0.3s;
}

.wr-plus::before { width: 15px; height: 1.5px; }
.wr-plus::after { width: 1.5px; height: 15px; }

.wrow.is-open .wr-plus::before,
.wrow.is-open .wr-plus::after { background: var(--accent); }
.wrow.is-open .wr-plus::after { transform: translate(-50%, -50%) rotate(90deg); }

.wrow-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.6s var(--ease-io);
}

.wrow.is-open .wrow-body { grid-template-rows: 1fr; }
.wrow-inner { overflow: hidden; min-height: 0; }
.wrow.is-open .wrow-inner { padding-bottom: 34px; }
.wrow-inner > * { max-width: 68ch; margin-left: 78px; }

.wr-tech {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 14px;
}

.wrow-inner p { font-size: 0.95rem; margin-bottom: 16px; }

.wr-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-bottom: 16px; }
.wr-meta span { font-size: 0.82rem; color: var(--ink-soft); }

.wr-meta b {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-faint);
    font-weight: 500;
    display: block;
}

/* Detailed achievement bullets inside an expanded row */
.wr-points { list-style: none; margin: 0 0 18px; display: grid; gap: 12px; }

.wr-points li {
    position: relative;
    padding-left: 22px;
    font-size: 0.92rem;
    color: var(--ink-soft);
    line-height: 1.55;
}

.wr-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.68em;
    width: 11px;
    height: 1px;
    background: var(--accent);
}

.wr-points b { color: var(--ink); font-weight: 500; }

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

.wr-impact span {
    font-size: 0.78rem;
    color: var(--ink);
    background: var(--bone);
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: 7px 15px;
}

.wr-note {
    font-size: 0.78rem !important;
    color: var(--ink-faint);
    font-style: italic;
    margin-top: 14px;
}

.wr-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.wr-links a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: 100px;
    padding: 10px 20px;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.wr-links a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Explore / Close label that slides in on hover */
.wr-action {
    justify-self: end;
    position: relative;
    display: grid;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-14px);
    transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-out);
}

.wr-action em { grid-area: 1 / 1; font-style: normal; transition: opacity 0.3s; }
.wr-action .a-close { opacity: 0; }

.wrow:hover .wr-action,
.wrow:focus-within .wr-action { opacity: 1; transform: translateX(0); }

.wrow.is-open .wr-action .a-open { opacity: 0; }
.wrow.is-open .wr-action .a-close { opacity: 1; }

/* ============ PROOF ============ */
.proof {
    padding: clamp(60px, 9vw, 110px) 0 clamp(80px, 12vw, 150px);
    border-top: 1px solid var(--line);
}

.proof-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 28px);
    margin-top: 34px;
    align-items: start;
}

.proof-card {
    background: var(--bone-2);
    border: 1px solid var(--line);
    padding: 32px 26px 34px;
    transition: background-color 0.4s, transform 0.5s var(--ease-out);
    will-change: transform;
}

.proof-card:hover { background: var(--bone-3); }

.pc-num {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--accent);
    letter-spacing: 0.14em;
}

.proof-card h3 { font-size: clamp(1.5rem, 2.3vw, 2rem); margin: 16px 0 12px; }
.proof-card p { font-size: 0.9rem; }

/* ============ JOURNEY ============ */
.journey { position: relative; padding-bottom: clamp(70px, 10vw, 130px); }

.timeline {
    position: relative;
    margin-top: clamp(40px, 6vw, 70px);
    padding-left: 34px;
    will-change: transform;
}

.tl-line { position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-line i { display: block; width: 100%; height: 0%; background: var(--accent); }

.tl-item { position: relative; padding: 0 0 40px 0; }

.tl-item::before {
    content: '';
    position: absolute;
    left: -38px; top: 10px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--bone);
    border: 1px solid var(--line-strong);
    transition: background-color 0.3s, border-color 0.3s;
}

.tl-item:hover::before { background: var(--accent); border-color: var(--accent); }

.tl-date {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.tl-item h3 { font-size: clamp(1.3rem, 2.3vw, 1.85rem); margin: 8px 0 10px; }
.tl-item p { font-size: 0.93rem; max-width: 72ch; }

/* ============ CONTACT ============ */
.contact {
    padding: clamp(70px, 10vw, 130px) 0 clamp(50px, 7vw, 90px);
    border-top: 1px solid var(--line);
    background: var(--bone-2);
    position: relative;
    overflow: hidden;
}

.contact-huge {
    display: block;
    margin: 18px 0 30px;
    font-family: var(--font-display);
    font-size: clamp(4rem, 19vw, 17rem);
    line-height: 0.82;
    letter-spacing: -0.03em;
    color: var(--ink);
    transition: color 0.4s;
}

.contact-huge .line { display: block; }
.contact-huge i { color: var(--accent); font-style: normal; }
.contact-huge:hover { color: var(--accent); }

.contact-lede { max-width: 54ch; font-size: 1rem; }

.contact-rows { margin-top: clamp(40px, 6vw, 66px); border-top: 1px solid var(--line); will-change: transform; }

.crow {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) 32px;
    gap: 18px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
    position: relative;
}

.crow > span {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.crow b {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.4vw, 1.9rem);
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.01em;
    transition: transform 0.5s var(--ease-out);
    display: inline-block;
    word-break: break-word;
}

.crow i {
    justify-self: end;
    color: var(--ink-faint);
    transition: transform 0.45s var(--ease-out), color 0.3s;
}

.crow:hover b { transform: translateX(14px); }
.crow:hover i { color: var(--accent); transform: translateX(6px); }

/* Resume row carries two languages instead of one link */
.crow-choice { grid-template-columns: 130px minmax(0, 1fr); }

.crow-langs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 40px;
}

.crow-langs a { display: inline-flex; align-items: center; gap: 14px; }
.crow-choice:hover b { transform: none; }
.crow-choice:hover i { color: var(--ink-faint); transform: none; }
.crow-langs a:hover b { transform: translateX(10px); }
.crow-langs a:hover i { color: var(--accent); transform: translateX(4px); }

/* ============ FOOTER ============ */
.foot { border-top: 1px solid var(--line); padding: 26px 0; background: var(--bone-2); }

.foot-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.foot-inner a:hover { color: var(--accent); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .nav-status { display: none; }
    /* the slide-out sheet carries the CV links here */
    .nav-resume { display: none; }

    .skills-shell { grid-template-columns: 1fr; gap: 24px; }
    html.js-anim .skills-panels { min-height: 350px; }
    .about-grid { grid-template-columns: 1fr; }
    .about-sticky { position: static; }
    .sec-head.split { grid-template-columns: 1fr; align-items: start; }
    .portrait-frame { width: 80%; }
    .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .proof-grid { grid-template-columns: 1fr; }
    .proof-card { transform: none !important; }
    .hero-rules { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
    .hero-bottom { grid-template-columns: 1fr; }
    .hero-stats { grid-template-columns: 1fr; }
    .hero-stats .stat { padding: 16px 0 10px; }
    .portrait-frame { width: 100%; aspect-ratio: 4 / 3; }
    .ghost { font-size: 26vw; }

    .wrow-head { grid-template-columns: 38px minmax(0, 1fr) 28px; gap: 12px; row-gap: 6px; }
    .wr-cat { grid-column: 2 / 3; }
    .wr-action { display: none; }   /* no hover on touch */
    .wrow-inner > * { margin-left: 50px; }
    .wrow:hover .wr-title { transform: none; }

    .fit { grid-template-columns: 1fr; gap: 6px; }
    .crow { grid-template-columns: 1fr auto; }
    .crow > span { grid-column: 1 / -1; }

    .scroll-cue { display: none; }

    /* no room to pin on phones */
    html.js-anim .skills { height: auto; }
    html.js-anim .skills-stage { height: auto; position: static; padding: 60px 0; }
    html.js-anim .skills-panels { min-height: 0; }
    html.js-anim .skills-panels .sk-panel {
        position: static;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        border-top: 1px solid var(--line);
        padding-top: 20px;
        margin-bottom: 20px;
    }
    .skills-counter, .skills-rail { display: none; }
}

@media (hover: none), (pointer: coarse) {
    .cursor, .cursor-ring { display: none !important; }
}

/* ============ REDUCED MOTION ============
   Scoped with :not(.force-motion) so the in-page "turn motion on"
   control can override an OS-level setting for the visit. Without
   that class this behaves as a normal reduced-motion block, including
   when JS never runs at all.
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    html:not(.force-motion):not(.lenis-on) { scroll-behavior: auto; }

    html:not(.force-motion) .grain,
    html:not(.force-motion) .marquee-track,
    html:not(.force-motion) .scroll-cue i::after,
    html:not(.force-motion) .nav-status i { animation: none; }

    html.js-anim:not(.force-motion) .reveal-line > span,
    html.js-anim:not(.force-motion) .reveal-words .w,
    html.js-anim:not(.force-motion) .ch { transform: none !important; }

    html.js-anim:not(.force-motion) .reveal-fade {
        opacity: 1 !important;
        transform: none !important;
    }

    html.js-anim:not(.force-motion) .reveal-clip { clip-path: none !important; }

    html:not(.force-motion) .preloader { display: none; }

    html:not(.force-motion) .cursor,
    html:not(.force-motion) .cursor-ring { display: none !important; }

    html.js-anim:not(.force-motion) .skills { height: auto; }
    html.js-anim:not(.force-motion) .skills-stage { position: static; height: auto; padding: 60px 0; }
    html.js-anim:not(.force-motion) .skills-panels { min-height: 0; }
    html:not(.force-motion) .skills-counter,
    html:not(.force-motion) .skills-rail { display: none; }

    html.js-anim:not(.force-motion) .skills-panels .sk-panel {
        position: static;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        border-top: 1px solid var(--line);
        padding-top: 20px;
        margin-bottom: 20px;
    }

    html:not(.force-motion) *,
    html:not(.force-motion) *::before,
    html:not(.force-motion) *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
