/* Portfolio — black, white, type, space. */
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/inter-latin-wght-normal.woff2) format("woff2-variations"); 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: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ==========================================================================
   Light, calm, alive. Warm white, ink, one orange.
   ========================================================================== */
@view-transition { navigation: auto; }
:root {
  color-scheme: light;
  --bg: #f6f6f4;
  --surface: #ffffff;
  --ink: #111113;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --dim: #8a8a8f;
  --line: #e4e4e2;
  --line-2: #d4d4d2;
  --accent: #ff5a1f;
  --c-academic: #2f6bff;
  --c-professional: #ff5a1f;
  --c-personal: #12a37a;
  --wrap: 1240px;
  --wrap-wide: 1680px;
  --gut: clamp(20px, 4vw, 40px);
  --hdr: 88px;
  --r: 22px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ff: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 2px rgba(17,17,19,.04), 0 8px 24px rgba(17,17,19,.06);
  --shadow-lg: 0 2px 4px rgba(17,17,19,.04), 0 24px 60px rgba(17,17,19,.12);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 24px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.55 var(--ff); font-feature-settings: "cv11", "ss01", "ss03"; letter-spacing: -.011em; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--ink); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 10px; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.center { text-align: center; margin-top: 3rem; }

/* type bits */
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1.25rem; font-size: 14px; font-weight: 500; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.dot[data-cat="academic"] { background: var(--c-academic); } .dot[data-cat="personal"] { background: var(--c-personal); }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex: none; }
@media (prefers-reduced-motion: no-preference) { .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 2s var(--ease) infinite; } }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3); opacity: 0; } }
.label { margin: 0 0 1rem; font-size: 13px; font-weight: 500; color: var(--dim); }
.sec-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.sec-h { margin: 0; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.02; font-weight: 650; letter-spacing: -.045em; text-wrap: balance; }
.sec-p { margin: 1.25rem 0 0; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 38rem; }
.link { display: inline-flex; align-items: center; gap: .45rem; font-weight: 550; border-bottom: 1.5px solid var(--line-2); padding-bottom: 2px; transition: border-color .2s; }
.link:hover { border-color: var(--ink); }
.ar { width: 15px; height: 15px; flex: none; transition: transform .35s var(--ease); }
a:hover > .ar, a:hover .row-go .ar { transform: translateX(3px); }

/* buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 50px; padding: 0 24px; border-radius: 999px; font-size: 15px; font-weight: 550; transition: transform .35s var(--ease), background .2s, box-shadow .3s, color .2s; will-change: transform; }
.btn-dark { background: var(--ink); color: #fff; box-shadow: 0 6px 20px rgba(17,17,19,.18); }
.btn-dark:hover { background: #000; box-shadow: 0 10px 30px rgba(17,17,19,.25); }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn-inv { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.btn-inv:hover { background: #fff; color: var(--ink); }

/* header — wide floating bar with category dropdowns */
.wrap-wide { width: 100%; max-width: var(--wrap-wide); margin-inline: auto; padding-inline: var(--gut); }
.hdr { position: fixed; top: 12px; left: 0; right: 0; z-index: 50; padding-inline: var(--gut); transition: transform .5s var(--ease); pointer-events: none; }
.hdr.is-hidden { transform: translateY(-140%); }
.hdr-in { pointer-events: auto; max-width: calc(var(--wrap-wide) - 2 * var(--gut)); margin: 0 auto; height: 64px; display: flex; align-items: center; gap: 1rem; padding: 0 10px 0 12px; border-radius: 20px; background: rgba(255,255,255,.74); backdrop-filter: saturate(1.6) blur(20px); -webkit-backdrop-filter: saturate(1.6) blur(20px); box-shadow: 0 0 0 1px rgba(17,17,19,.06), 0 10px 34px rgba(17,17,19,.07); }
.logo { display: flex; align-items: center; gap: .65rem; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; }
.logo-mark { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border-radius: 12px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em; transition: transform .6s var(--ease); }
.logo:hover .logo-mark { transform: rotate(-10deg) scale(1.06); }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; margin-right: auto; }
.nav-a, .nav-btn { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px; border: 0; border-radius: 12px; background: none; font-size: 15px; font-weight: 550; color: #3f3f45; cursor: pointer; transition: color .2s, background .2s; white-space: nowrap; }
.nav-a:hover, .nav-btn:hover, .nav-btn[aria-expanded="true"] { color: var(--ink); background: rgba(17,17,19,.05); }
.nav-a[aria-current="page"], .nav-btn.is-cur { color: var(--ink); background: rgba(17,17,19,.07); }
.chev { width: 12px; height: 12px; transition: transform .35s var(--ease); opacity: .6; }
.nav-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-sep { width: 1px; height: 22px; margin: 0 8px; background: var(--line-2); }
.mm-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--c, var(--accent)); }
[data-cat="academic"] { --c: var(--c-academic); } [data-cat="professional"] { --c: var(--c-professional); } [data-cat="personal"] { --c: var(--c-personal); }
.nav-m-only { display: none; }
.hdr-tools { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 12px; background: none; cursor: pointer; color: #3f3f45; }
.icon-btn:hover { background: rgba(17,17,19,.05); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-cta { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 550; transition: background .2s, transform .3s var(--ease); }
.nav-cta:hover { background: #000; }
/* dropdown panels */
.dd { position: relative; }
.dd-panel { position: absolute; top: calc(100% + 14px); left: 50%; width: 420px; padding: 10px; border-radius: 22px; background: rgba(255,255,255,.97); backdrop-filter: blur(20px); box-shadow: 0 0 0 1px rgba(17,17,19,.06), 0 30px 80px rgba(17,17,19,.16); opacity: 0; visibility: hidden; transform: translate(-50%, -8px) scale(.98); transform-origin: top center; transition: opacity .25s var(--ease), transform .4s var(--ease), visibility 0s .4s; }
.dd-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.dd-wide { width: 680px; }
.dd.open .dd-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); transition: opacity .25s var(--ease), transform .45s var(--ease); }
.dd-head { padding: 14px 14px 12px; margin-bottom: 4px; border-radius: 14px; background: color-mix(in srgb, var(--c) 7%, white); }
.dd-head b { display: block; font-size: 17px; letter-spacing: -.02em; margin-bottom: 2px; }
.dd-head span { display: block; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.dd-cols { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.dd-cols ul { list-style: none; margin: 0; padding: 0; }
.mm-track { margin: 10px 12px 2px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.mm-item { display: block; padding: 10px 12px; border-radius: 12px; transition: background .2s; }
.mm-item:hover, .mm-item[aria-current="page"] { background: #f3f3f1; }
.mm-t { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
.mm-t em { font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: #efefec; color: var(--muted); }
.mm-s { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.dd-all { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 12px 14px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 550; }
.dd-all span { margin-left: auto; opacity: .55; font-variant-numeric: tabular-nums; }
.dd-all:hover .ar { transform: translateX(3px); }
.menu-btn { display: none; position: relative; width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--ink); cursor: pointer; }
.menu-lines, .menu-lines::before { position: absolute; left: 13px; right: 13px; height: 1.5px; background: #fff; transition: transform .35s var(--ease); }
.menu-lines { top: 17px; } .menu-lines::before { content: ""; left: 0; right: 0; top: 7px; }
.menu-btn[aria-expanded="true"] .menu-lines { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-lines::before { transform: translateY(-7px) rotate(-90deg); }
@media (max-width: 1080px) {
  .menu-btn { display: block; }
  .hdr-tools .nav-cta { display: none; }
  .hdr-tools { margin-left: auto; }
  .nav { position: fixed; left: var(--gut); right: var(--gut); top: 84px; max-height: calc(100vh - 100px); max-height: calc(100svh - 100px); overflow-y: auto; flex-direction: column; align-items: stretch; gap: 2px; margin: 0; padding: 10px; border-radius: 22px; background: rgba(255,255,255,.98); box-shadow: 0 0 0 1px rgba(17,17,19,.06), 0 30px 80px rgba(17,17,19,.16); transform-origin: top right; transform: scale(.96) translateY(-8px); opacity: 0; visibility: hidden; transition: transform .35s var(--ease), opacity .25s, visibility 0s .35s; }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; transition: transform .45s var(--ease), opacity .25s; }
  .nav-a, .nav-btn { width: 100%; height: 52px; font-size: 17px; justify-content: flex-start; }
  .nav-btn .chev { margin-left: auto; }
  .nav-sep { width: auto; height: 1px; margin: 6px 12px; }
  .nav-m-only { display: inline-flex; }
  .dd-panel { position: static; width: auto; transform: none; box-shadow: none; background: none; padding: 0 0 6px 8px; display: none; opacity: 1; visibility: visible; }
  .dd.open .dd-panel { display: block; transform: none; }
  .dd-head { display: none; }
  .dd-cols { grid-auto-flow: row; }
  .mm-s { display: none; }
  body.menu-open { overflow: hidden; }
}
@media (max-width: 480px) { .logo-name { display: none; } }

/* hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 120px; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.b1 { width: 46vw; height: 46vw; left: 48%; top: -12%; background: radial-gradient(circle, #ffd8c7, transparent 65%); }
.b2 { width: 38vw; height: 38vw; left: 62%; top: 38%; background: radial-gradient(circle, #d4e2ff, transparent 65%); }
.b3 { width: 30vw; height: 30vw; left: -6%; top: 55%; background: radial-gradient(circle, #e7f6ef, transparent 65%); }
@media (prefers-reduced-motion: no-preference) { .b1 { animation: drift 18s ease-in-out infinite alternate; } .b2 { animation: drift 22s ease-in-out infinite alternate-reverse; } .b3 { animation: drift 26s ease-in-out infinite alternate; } }
@keyframes drift { to { transform: translate(-6vw, 5vh) scale(1.12); } }
.globe-wrap { position: absolute; z-index: 0; right: max(-3vw, -60px); top: 47%; width: min(50vw, 74vh, 900px); width: min(50vw, 74svh, 900px); aspect-ratio: 1; translate: 0 -48%; cursor: grab; touch-action: pan-y; }
.globe-wrap.drag { cursor: grabbing; }
.globe { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-in { position: relative; z-index: 1; pointer-events: none; } .hero-in a, .hero-in .status { pointer-events: auto; }
.sats { position: absolute; inset: 0; pointer-events: none; }
.sat { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; background: rgba(255,255,255,.88); box-shadow: 0 0 0 1px rgba(17,17,19,.06), 0 6px 18px rgba(17,17,19,.1); backdrop-filter: blur(8px); font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: auto; will-change: transform, opacity; transition: opacity .4s, background .2s, color .2s; }
.sat:hover, .sat:focus-visible { background: var(--ink); color: #fff; z-index: 2; }
.sat-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.sat-dot[data-cat="academic"] { background: var(--c-academic); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-academic) 25%, transparent); }
.sat-dot[data-cat="personal"] { background: var(--c-personal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-personal) 25%, transparent); }
.sat.behind { opacity: .25; pointer-events: none; }
html:not(.js) .sats { display: none; }
.globe-hint { position: absolute; left: 50%; bottom: 4%; translate: -50% 0; margin: 0; font-size: 13px; color: var(--dim); white-space: nowrap; pointer-events: none; }
@media (max-width: 900px) { .globe-wrap { width: 115vw; right: -45vw; top: 8%; translate: none; opacity: .55; pointer-events: none; } .sats, .globe-hint { display: none; } }
.status { display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 2rem; padding: 8px 16px 8px 12px; border-radius: 999px; background: rgba(255,255,255,.75); box-shadow: 0 0 0 1px rgba(17,17,19,.06); font-size: 14px; font-weight: 500; backdrop-filter: blur(8px); }
.hero-h { margin: 0 0 1.75rem; font-size: clamp(4.4rem, 12.5vw, 11rem); line-height: .86; font-weight: 700; letter-spacing: -.06em; }
.hl { display: block; overflow: hidden; padding-bottom: .16em; margin-bottom: -.12em; }
.hl-2 { color: #b9b9bd; }
.hl-2 .ch:last-child::after { content: "."; color: var(--accent); }
.ch { display: inline-block; }
.hero-p { margin: 0 0 2.25rem; max-width: 34rem; font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .js .ch { transform: translateY(105%); animation: rise 1s var(--ease) forwards; animation-delay: calc(var(--i) * 45ms + 150ms); }
  .js .fade { opacity: 0; transform: translateY(14px); animation: fadeup 1s var(--ease) forwards; animation-delay: calc(var(--i) * 50ms + 150ms); }
}
@keyframes rise { to { transform: none; } }
@keyframes fadeup { to { opacity: 1; transform: none; } }
.marquee { margin-top: clamp(3rem, 8vh, 5rem); border-block: 1px solid var(--line); overflow: hidden; background: rgba(255,255,255,.4); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.mq-track { display: flex; gap: 2.25rem; align-items: center; width: max-content; padding: 1.15rem 0; font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 550; letter-spacing: -.02em; white-space: nowrap; }
.mq-track i { font-style: normal; color: var(--accent); font-size: .7em; }
@media (prefers-reduced-motion: no-preference) { .mq-track { animation: marquee 32s linear infinite; } .marquee:hover .mq-track { animation-play-state: paused; } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* intro statement — words light up on scroll */
.intro { padding-top: clamp(7rem, 14vw, 11rem); }
.statement { margin: 0 0 clamp(4rem, 8vw, 6rem); max-width: 20em; font-size: clamp(1.9rem, 4.4vw, 3.6rem); line-height: 1.1; font-weight: 650; letter-spacing: -.04em; }
.js .statement .w { color: #c9c9cc; transition: color .4s; }
.js .statement .w.on { color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: .5rem; padding: 1.75rem 1.5rem; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.stat-v { font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1; font-weight: 700; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.stat-l { font-size: 15px; color: var(--muted); line-height: 1.4; }
@media (max-width: 860px) { .stats { grid-template-columns: 1fr 1fr; gap: 12px; } .stat { padding: 1.25rem; } }

/* sections */
.work, .sec { padding-top: clamp(7rem, 14vw, 10rem); }

/* project explorer */
.explorer { position: relative; }
.ex-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tabs { position: relative; display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 5px; border-radius: 999px; background: #ebebe8; }
.tabs a { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .3rem; padding: 10px 20px; border-radius: 999px; font-size: 15px; font-weight: 550; color: var(--muted); transition: color .3s; }
.tabs a sup { font-size: 11px; font-weight: 500; color: var(--dim); top: -.4em; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="true"] { color: var(--ink); }
.tab-ind { position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; background: var(--surface); box-shadow: 0 1px 3px rgba(17,17,19,.1), 0 4px 12px rgba(17,17,19,.06); transition: transform .5s var(--ease), width .5s var(--ease); }
html:not(.js) .tabs a[aria-current="true"] { background: var(--surface); }
.search { display: flex; align-items: center; gap: .6rem; height: 50px; padding: 0 18px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--dim); min-width: min(100%, 280px); transition: box-shadow .2s; }
.search svg { width: 17px; height: 17px; flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font: inherit; font-size: 15px; color: var(--ink); }
.search:focus-within { box-shadow: inset 0 0 0 1.5px var(--ink); }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.row[hidden] { display: none; }
.row a { position: relative; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto 52px; gap: 1.5rem; align-items: center; padding: 1.4rem 1.25rem 1.4rem 1.6rem; border-radius: var(--r); background: var(--surface); box-shadow: 0 0 0 1px rgba(17,17,19,.04); transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.row a:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.row-n { font-size: 14px; color: var(--dim); font-variant-numeric: tabular-nums; }
.row-main { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.row-t { font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 650; letter-spacing: -.035em; line-height: 1.15; }
.row-s { color: var(--muted); font-size: 15px; line-height: 1.45; max-width: 46rem; }
.row-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.row-y { font-size: 14px; color: var(--dim); min-width: 7.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.tag { padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 550; color: var(--c, var(--ink)); background: color-mix(in srgb, var(--c, var(--ink)) 9%, white); }
.tag[data-cat="academic"] { --c: var(--c-academic); } .tag[data-cat="professional"] { --c: #d9420c; } .tag[data-cat="personal"] { --c: #0c8a66; }
.tag-live { --c: #6e6e73; }
.row-th { display: none; }
.row-go { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #f1f1ef; transition: background .3s, color .3s; }
.row a:hover .row-go { background: var(--ink); color: #fff; }
.row-go .ar { width: 18px; height: 18px; }
.empty { color: var(--muted); padding: 2rem 0; text-align: center; }
/* cursor-follow preview (desktop) */
.preview { position: fixed; left: 0; top: 0; z-index: 40; width: 300px; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; pointer-events: none; opacity: 0; transform: translate3d(-50%, -50%, 0) scale(.85) rotate(-4deg); transition: opacity .3s var(--ease), transform .45s var(--ease); box-shadow: var(--shadow-lg); background: #ddd; }
.preview.on { opacity: 1; }
.preview img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: none), (max-width: 900px) { .preview { display: none; } }
@media (max-width: 900px) {
  .row a { grid-template-columns: minmax(0, 1fr) 64px; gap: .9rem 1rem; padding: 1.1rem; align-items: start; }
  .row-n, .row-go { display: none; }
  .row-main { grid-column: 1; }
  .row-meta { grid-column: 1; justify-content: flex-start; } .row-y { min-width: 0; text-align: left; }
  .row-th { display: block; grid-column: 2; grid-row: 1 / span 2; width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }
  .row-th-none { display: grid; place-items: center; background: #f1f1ef; color: var(--dim); font-weight: 700; font-size: 1.4rem; }
  .row-s { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; }
  .tabs { width: 100%; display: grid; grid-template-columns: repeat(4, auto); } .tabs a { justify-content: center; padding: 10px 8px; font-size: 14px; }
  .search { width: 100%; }
}

/* about */
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); gap: clamp(2.5rem, 6vw, 6rem); }
.sticky { position: sticky; top: calc(var(--hdr) + 40px); align-self: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .sticky { position: static; } }
.facts-cards { display: grid; gap: 10px; margin: 2.5rem 0 0; }
.facts-cards div { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: 1rem 1.25rem; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px rgba(17,17,19,.04); }
.facts-cards dt { font-size: 14px; color: var(--dim); padding-top: 2px; }
.facts-cards dd { margin: 0; font-weight: 600; display: flex; flex-direction: column; }
.facts-cards small { font-weight: 400; color: var(--muted); font-size: 14px; }
.about-txt p { margin: 0 0 1.4rem; font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.6; color: var(--muted); }
.about-txt p:first-child { color: var(--ink); font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.45; font-weight: 500; letter-spacing: -.02em; }
.mini-h { margin: 3.5rem 0 1rem; font-size: 14px; font-weight: 600; color: var(--ink); }
.card .mini-h { margin-top: 0; }
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 1.5px; background: var(--line-2); }
.tl li { position: relative; display: grid; grid-template-columns: 10rem 1fr; gap: 1.25rem; padding: .85rem 0 .85rem 2rem; }
.tl li::before { content: ""; position: absolute; left: 0; top: 1.15rem; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--line-2); }
.tl li:first-child::before { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.tl-when { font-size: 14px; color: var(--dim); padding-top: 2px; font-variant-numeric: tabular-nums; }
.tl-what { font-weight: 600; display: flex; flex-direction: column; letter-spacing: -.015em; }
.tl-what small { font-weight: 400; color: var(--muted); font-size: 15px; letter-spacing: 0; }
@media (max-width: 560px) { .tl li { grid-template-columns: 1fr; gap: .15rem; } }
.two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; margin-top: 3rem; }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } }
.card { padding: 1.5rem; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.kv { margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.kv > div:first-child { border-top: 0; padding-top: 0; }
.kv dt { font-weight: 550; display: flex; flex-direction: column; } .kv dt small { font-weight: 400; color: var(--dim); font-size: 13px; }
.kv dd { margin: 0; font-weight: 650; white-space: nowrap; }
.langs { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.langs li { display: grid; grid-template-columns: 1fr auto; gap: .4rem; font-weight: 550; }
.langs .muted { font-weight: 400; font-size: 14px; }
.bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: #efefed; overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--v); border-radius: inherit; background: linear-gradient(90deg, var(--ink), #55555c); transform-origin: left; }
@media (prefers-reduced-motion: no-preference) { .js .card .bar i { transform: scaleX(0); transition: transform 1.4s var(--ease) .2s; } .js .card.in .bar i { transform: none; } }

/* approach */
.ap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ap-card { padding: 1.75rem 1.5rem 2rem; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); transition: transform .5s var(--ease), box-shadow .5s var(--ease); transform-style: preserve-3d; }
.ap-card:hover { box-shadow: var(--shadow-lg); }
.ap-n { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 3rem; border-radius: 12px; background: #f1f1ef; font-size: 14px; font-weight: 600; }
.ap-card h3 { margin: 0 0 .5rem; font-size: 1.2rem; font-weight: 650; letter-spacing: -.025em; }
.ap-card p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 1000px) { .ap { grid-template-columns: 1fr 1fr; } } @media (max-width: 560px) { .ap { grid-template-columns: 1fr; } .ap-n { margin-bottom: 1.5rem; } }

/* contact CTA (about page) */
.cta { position: relative; overflow: hidden; isolation: isolate; margin-top: clamp(5rem, 10vw, 8rem); padding: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 6vw, 5rem); border-radius: 36px; background: var(--ink); color: #fff; }
.cta-globe { position: absolute; z-index: -1; right: -10%; bottom: -45%; width: min(70%, 720px); aspect-ratio: 1; opacity: .9; }
.eyebrow-inv { color: rgba(255,255,255,.7); }
.cta-h { margin: 0 0 2.5rem; font-size: clamp(2.4rem, 6.5vw, 5.5rem); line-height: .98; font-weight: 700; letter-spacing: -.055em; max-width: 11em; }
.cta-mail { display: inline-flex; align-items: center; gap: .75rem; margin-bottom: 2.25rem; padding: 18px 26px; border-radius: 999px; background: #fff; color: var(--ink); font-size: clamp(1rem, 2vw, 1.35rem); font-weight: 600; letter-spacing: -.02em; max-width: 100%; transition: transform .35s var(--ease); }
.cta-mail span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* footer */
.ftr { margin-top: clamp(5rem, 10vw, 8rem); border-top: 1px solid var(--line); }
.is-home .ftr { margin-top: 0; }
.ftr-in { display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; flex-wrap: wrap; padding-block: 1.5rem; font-size: 14px; color: var(--muted); }
.ftr-left { display: flex; align-items: center; gap: .75rem; }
.ftr-left .logo-mark { width: 30px; height: 30px; border-radius: 9px; font-size: 10px; }
.ftr-in nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.ftr-in nav a:hover { color: var(--ink); }

/* page head */
.ph { padding-top: calc(var(--hdr) + clamp(4rem, 9vw, 7rem)); padding-bottom: clamp(2rem, 4vw, 3rem); }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; font-size: 14px; color: var(--dim); }
.crumbs a:hover { color: var(--ink); } .crumbs [aria-current] { color: var(--muted); }
.ph-h { margin: 0 0 1.25rem; font-size: clamp(2.8rem, 8vw, 6.5rem); line-height: .95; font-weight: 700; letter-spacing: -.055em; text-wrap: balance; }
.ph-p { margin: 0; max-width: 40rem; color: var(--muted); font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; }
.idx { padding-top: 1rem; }
.empty-state { padding: 3rem; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); display: grid; gap: 1rem; justify-items: start; color: var(--muted); }
.empty-state p { margin: 0; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 2rem; }
.seg a { padding: 10px 18px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 550; font-size: 15px; transition: box-shadow .2s; }
.seg a:hover { box-shadow: inset 0 0 0 1px var(--ink); }

/* project page */
.progress { position: fixed; top: 0; left: 0; z-index: 60; height: 3px; width: 100%; background: linear-gradient(90deg, var(--accent), #ff9a62); transform-origin: 0 50%; transform: scaleX(0); }
.proj-head { padding-top: calc(var(--hdr) + clamp(4rem, 9vw, 7rem)); }
.proj-h { margin: 0 0 1.5rem; font-size: clamp(2.8rem, 8vw, 7rem); line-height: .95; font-weight: 700; letter-spacing: -.055em; max-width: 13ch; text-wrap: balance; }
.proj-p { margin: 0 0 clamp(2.5rem, 5vw, 4rem); max-width: 42rem; font-size: clamp(1.15rem, 1.9vw, 1.5rem); line-height: 1.45; color: var(--muted); letter-spacing: -.015em; }
.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; margin: 0; padding: 0 .5rem; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.spec > div { padding: 1.25rem 1.25rem; }
.spec > div + div { border-left: 1px solid var(--line); }
.spec dt { font-size: 13px; color: var(--dim); margin-bottom: .3rem; }
.spec dd { margin: 0; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.spec a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) { .spec { grid-template-columns: 1fr 1fr; } .spec > div + div { border-left: 0; } .spec > div { border-bottom: 1px solid var(--line); } }
.stats-sm { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 12px 0 0; }
.stats-sm > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .35rem; padding: 1.4rem 1.5rem; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.stats-sm dd { margin: 0; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1; font-weight: 700; letter-spacing: -.05em; }
.stats-sm dt { color: var(--muted); font-size: 14px; }
.proj-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); padding-top: clamp(4rem, 8vw, 6rem); }
.proj-body-solo { grid-template-columns: minmax(0, 1fr); }
.toc { position: sticky; top: calc(var(--hdr) + 40px); align-self: start; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1.5px solid var(--line); }
.toc a { display: block; margin-left: -1.5px; padding: .45rem 0 .45rem 1rem; border-left: 1.5px solid transparent; font-size: 14px; line-height: 1.35; color: var(--dim); transition: color .2s, border-color .3s; }
.toc a:hover { color: var(--ink); } .toc a.on { color: var(--ink); border-color: var(--accent); font-weight: 550; }
.toc-tags-h { margin-top: 2.5rem; }
.toc-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.toc-tags li { padding: 5px 10px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; color: var(--muted); }
@media (max-width: 960px) { .proj-body { grid-template-columns: 1fr; } .toc { display: none; } }

/* prose */
.prose { max-width: 860px; min-width: 0; }
.prose > p, .prose > ul, .prose > ol { margin: 0 0 1.5rem; max-width: 690px; font-size: 19px; line-height: 1.7; color: #3a3a3f; }
.prose > p:first-child { font-size: clamp(1.3rem, 2vw, 1.55rem); line-height: 1.5; color: var(--ink); letter-spacing: -.02em; font-weight: 450; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose a:not([class]) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.prose ul { list-style: none; padding: 0; } .prose ul li { position: relative; padding-left: 1.5rem; margin-bottom: .5rem; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.prose h2 { margin: clamp(4.5rem, 8vw, 6rem) 0 1.5rem; font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1.05; font-weight: 700; letter-spacing: -.045em; scroll-margin-top: calc(var(--hdr) + 30px); }
.prose > h2:first-child, .prose > section:first-child h2 { margin-top: 0; }
.prose h3 { margin: 2.5rem 0 .75rem; font-size: 1.35rem; font-weight: 650; letter-spacing: -.025em; }
.prose h4 { margin: 2rem 0 .6rem; font-size: 14px; font-weight: 600; color: var(--muted); }
.chapter-no { display: none; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 2.5rem 0 3rem; }
.facts div { padding: 1.4rem 1.4rem 1.5rem; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.facts dt { margin-bottom: .5rem; font-size: 14px; font-weight: 650; color: var(--ink); }
.facts dd { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.prose .tl { margin: 2.5rem 0 3rem; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 3rem 0; }
.g-1 { grid-template-columns: 1fr; }
.g-3 .g-item:first-child { grid-column: 1 / -1; }
.g-item { margin: 0; min-width: 0; }
.zoom { display: block; width: 100%; padding: 0; border: 0; border-radius: 18px; background: #e9e9e6; cursor: zoom-in; overflow: hidden; }
.g-item .zoom { aspect-ratio: 3 / 2; }
.g-1 .zoom { aspect-ratio: auto; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.g-1 img { object-fit: contain; max-height: 80vh; }
.zoom:hover img { transform: scale(1.04); }
.g-video video { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #000; border-radius: 18px; }
.g-item figcaption, .fig figcaption { padding: .7rem .25rem 0; font-size: 14px; line-height: 1.45; color: var(--dim); }
.g-tag { margin-left: .35rem; padding: 2px 8px; border-radius: 99px; background: #ebebe8; font-size: 12px; color: var(--muted); }
.fig { margin: 3rem 0; }
.files { display: grid; gap: 10px; margin: 2rem 0 3rem; }
.file { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1.5rem; align-items: center; padding: 1.2rem 1.4rem; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.file:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.file-t { font-weight: 600; letter-spacing: -.01em; }
.file-m { grid-column: 1; font-size: 14px; color: var(--dim); }
.file-a { grid-column: 2; grid-row: 1 / span 2; display: inline-flex; align-items: center; gap: .45rem; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 550; }
.refs { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.refs a { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1rem 1.25rem; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px rgba(17,17,19,.05); font-weight: 550; transition: box-shadow .3s; }
.refs a:hover { box-shadow: var(--shadow-lg); }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: clamp(5rem, 9vw, 8rem); }
.pn a { padding: 1.75rem; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.pn a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pn b { display: block; font-size: clamp(1.2rem, 2.2vw, 1.7rem); font-weight: 650; letter-spacing: -.035em; line-height: 1.15; }
.pn .label { margin-bottom: .5rem; }
.pn-next { text-align: right; }

/* skills */
.skills .note { max-width: 46rem; color: var(--muted); margin: 0 0 1rem; }
.sk { padding-top: clamp(4rem, 8vw, 6rem); }
.sk .sec-h { margin-bottom: 1rem; }
.cat-n { margin: 0 0 1rem; font-size: 14px; color: var(--dim); font-variant-numeric: tabular-nums; }
.sk-list { display: grid; gap: 12px; }
.sk-item { padding: 1.75rem; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.sk-item h3 { margin: 0 0 .4rem; font-size: 1.35rem; font-weight: 650; letter-spacing: -.03em; }
.sk-item .label { margin-bottom: .6rem; color: var(--accent); font-weight: 600; }
.sk-goal { margin: 0 0 1rem; font-size: 14px; color: var(--dim); font-style: italic; }
.sk-item > p:not(.label):not(.sk-goal) { color: var(--muted); margin: 0 0 1rem; }
.sk-cav { font-size: 14px; color: var(--dim) !important; padding-left: .8rem; border-left: 2px solid var(--line-2); }
.sk-links { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }

/* search palette */
.cmd { position: fixed; inset: 0; z-index: 150; display: grid; place-items: start center; padding: 14vh var(--gut) 1rem; }
.cmd[hidden] { display: none; }
.cmd-bg { position: absolute; inset: 0; background: rgba(246,246,244,.7); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.cmd-panel { position: relative; width: min(620px, 100%); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.cmd-panel input { width: 100%; padding: 1.25rem 1.5rem; background: none; border: 0; border-bottom: 1px solid var(--line); outline: none; font: inherit; font-size: 1.15rem; }
.cmd-list { list-style: none; margin: 0; padding: .5rem; max-height: 55vh; overflow-y: auto; }
.cmd-list a { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-radius: 12px; font-weight: 500; }
.cmd-list a span:last-child { font-size: 13px; color: var(--dim); white-space: nowrap; font-weight: 400; }
.cmd-list [aria-selected="true"] a { background: #f1f1ef; }
.cmd-list .none { padding: 1rem; color: var(--dim); }

/* lightbox */
.lb { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(246,246,244,.97); color: var(--ink); }
.lb::backdrop { background: rgba(246,246,244,.9); }
.lb[open] { display: grid; place-items: center; animation: fadeup .5s var(--ease); }
.lb-fig { margin: 0; display: grid; gap: 1rem; justify-items: center; padding: 72px; max-width: 100%; }
.lb-fig img { max-width: 100%; max-height: calc(100vh - 190px); width: auto; height: auto; object-fit: contain; border-radius: 14px; box-shadow: var(--shadow-lg); }
.lb-fig figcaption { color: var(--muted); font-size: 15px; text-align: center; }
.lb-btn { position: absolute; width: 48px; height: 48px; display: grid; place-items: center; background: var(--surface); border: 0; border-radius: 50%; box-shadow: var(--shadow); cursor: pointer; }
.lb-btn:hover { background: var(--ink); color: #fff; } .lb-btn svg { width: 18px; height: 18px; }
.lb-close { top: 16px; right: 16px; } .lb-prev { left: 16px; top: 50%; translate: 0 -50%; } .lb-next { right: 16px; top: 50%; translate: 0 -50%; }
.lb-count { position: absolute; top: 30px; left: 28px; font-size: 14px; color: var(--dim); }
@media (max-width: 640px) { .lb-fig { padding: 72px 12px 92px; } .lb-prev, .lb-next { top: auto; bottom: 20px; translate: none; } }

/* scroll reveal */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .rows .row { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
  .js .rows .row.in { opacity: 1; transform: none; }
}

/* homepage doors */
.hero { min-height: 100vh; min-height: 100svh; }
.hero-h { font-size: clamp(4.4rem, 13vw, 13.5rem); }
.doors { padding-block: clamp(5rem, 10vw, 8rem); }
.doors-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem 3rem; flex-wrap: wrap; margin-bottom: 2rem; }
.doors-title { margin: 0; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1; font-weight: 700; letter-spacing: -.05em; }
.doors-head p { margin: 0; max-width: 30rem; color: var(--muted); font-size: 1.05rem; }
.door-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.door { position: relative; display: flex; flex-direction: column; min-height: 440px; padding: 1.75rem; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; isolation: isolate; transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.door::before { content: ""; position: absolute; z-index: -1; right: -30%; top: -40%; width: 90%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 22%, transparent), transparent 65%); transition: transform .9s var(--ease), opacity .6s; opacity: .6; }
.door:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.door:hover::before { transform: scale(1.25) translate(-6%, 6%); opacity: 1; }
.door-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: auto; padding-bottom: 3rem; }
.door-n { font-size: 14px; color: var(--dim); font-variant-numeric: tabular-nums; }
.door-k { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: color-mix(in srgb, var(--c) 9%, white); font-size: 13px; font-weight: 600; color: color-mix(in srgb, var(--c) 75%, black); }
.door-h { margin: 0 0 .4rem; font-size: clamp(2.2rem, 3.6vw, 3.4rem); line-height: 1; font-weight: 700; letter-spacing: -.05em; }
.door-link::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.door-head { margin: 0 0 1.5rem; color: var(--muted); font-size: 1.1rem; }
.door-list { position: relative; z-index: 1; list-style: none; margin: 0 0 1.5rem; padding: 0; border-top: 1px solid var(--line); }
.door-list li { border-bottom: 1px solid var(--line); }
.door-list a { display: block; padding: .65rem 0; font-size: 15px; font-weight: 550; transition: padding .35s var(--ease), color .2s; }
.door-list a:hover { padding-left: .5rem; color: color-mix(in srgb, var(--c) 80%, black); }
.door-list .more { padding: .65rem 0; font-size: 14px; color: var(--dim); }
.door-go { display: inline-flex; align-items: center; gap: .5rem; align-self: flex-start; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 550; transition: background .3s; }
.door:hover .door-go { background: var(--c); }
.door:hover .door-go .ar { transform: translateX(3px); }
@media (max-width: 960px) { .door-grid { grid-template-columns: 1fr; } .door { min-height: 0; } .door-top { padding-bottom: 1.5rem; } }
/* about page */
.stats-about { grid-template-columns: 1fr 1fr; margin-top: 12px; gap: 10px; }
.stats-about .stat { padding: 1.25rem; }
.ap-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .ap-2 { grid-template-columns: 1fr; } }

/* ---------- project library ---------- */
.is-lib .ph { padding-bottom: 2rem; }
.lib { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.lib-side { position: sticky; top: calc(var(--hdr) + 16px); display: grid; gap: 1.25rem; max-height: calc(100vh - var(--hdr) - 32px); max-height: calc(100svh - var(--hdr) - 32px); overflow-y: auto; padding-bottom: 1rem; }
.lib-side .search { min-width: 0; width: 100%; height: 46px; }
.lib-nav { display: grid; gap: 4px; }
.lib-nav a { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 12px; font-size: 15px; color: var(--muted); transition: background .2s, color .2s; }
.lib-nav a:hover { background: rgba(17,17,19,.04); color: var(--ink); }
.lib-nav a[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
.lib-nav .c { margin-left: auto; font-size: 12.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.lib-all { font-weight: 600; color: var(--ink) !important; }
.lib-grp { padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
.lib-cat { font-weight: 650; color: var(--ink) !important; }
.lib-grp ul { list-style: none; margin: 0 0 0 17px; padding: 0 0 0 10px; border-left: 1.5px solid var(--line); }
.lib-grp ul a { padding: 7px 10px; font-size: 14px; }
.lib-status { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 1rem; border-top: 1px solid var(--line); }
.lib-status .label { width: 100%; margin: 0 0 .25rem; }
.lib-status button { padding: 7px 13px; border: 0; border-radius: 99px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; font-weight: 550; color: var(--muted); cursor: pointer; }
.lib-status button[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.lib-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; min-height: 46px; }
.lib-count { margin: 0; color: var(--muted); } .lib-count b { color: var(--ink); font-weight: 650; }
.lib-tools { display: flex; gap: 8px; }
.sel select { height: 42px; padding: 0 36px 0 14px; border: 0; border-radius: 12px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23111' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center / 12px; box-shadow: inset 0 0 0 1px var(--line); font: inherit; font-size: 14px; font-weight: 550; appearance: none; cursor: pointer; }
.view { display: flex; padding: 3px; border-radius: 12px; background: #ebebe8; }
.view button { width: 38px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 9px; background: none; color: var(--dim); cursor: pointer; }
.view button svg { width: 15px; height: 15px; }
.view button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(17,17,19,.12); }
.lib-g { margin-bottom: 2.5rem; }
.lib-g[hidden] { display: none; }
.lib-gh { display: flex; align-items: center; gap: 8px; margin: 0 0 1rem; font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.lib-gh span:not(.mm-dot) { color: var(--line-2); }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 14px; }
.lc[hidden] { display: none; }
.lc-a { display: flex; flex-direction: column; height: 100%; border-radius: 20px; background: var(--surface); box-shadow: 0 0 0 1px rgba(17,17,19,.05); overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.lc-a:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.lc-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: color-mix(in srgb, var(--c) 10%, #f1f1ef); }
.lc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.lc-a:hover .lc-media img { transform: scale(1.05); }
.lc-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.6rem; font-weight: 700; letter-spacing: -.04em; color: color-mix(in srgb, var(--c) 55%, white); background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--c) 18%, white), transparent 70%); }
.lc-live { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 99px; background: rgba(255,255,255,.92); font-size: 12px; font-weight: 600; }
.lc-body { display: flex; flex-direction: column; flex: 1; padding: 1.1rem 1.2rem 1.1rem; }
.lc-k { display: flex; align-items: center; gap: 7px; margin: 0 0 .5rem; font-size: 12.5px; font-weight: 550; color: var(--muted); }
.lc-t { margin: 0 0 .4rem; font-size: 1.2rem; line-height: 1.2; font-weight: 650; letter-spacing: -.03em; }
.lc-s { margin: 0 0 1rem; font-size: 14px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lc-f { display: flex; justify-content: space-between; align-items: center; margin: auto 0 0; padding-top: .8rem; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.lc-go { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-weight: 550; }
.lc-a:hover .lc-go .ar { transform: translateX(3px); }
/* list view */
.lib.is-list .lib-grid { grid-template-columns: 1fr; gap: 8px; }
.lib.is-list .lc-a { flex-direction: row; align-items: center; border-radius: 16px; }
.lib.is-list .lc-media { width: 120px; flex: none; aspect-ratio: 4 / 3; margin: 8px; border-radius: 10px; }
.lib.is-list .lc-ph { font-size: 1.4rem; }
.lib.is-list .lc-live { display: none; }
.lib.is-list .lc-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1.5rem; padding: .9rem 1.2rem .9rem .4rem; }
.lib.is-list .lc-k { grid-column: 1; } .lib.is-list .lc-t { grid-column: 1; margin: 0 0 .2rem; }
.lib.is-list .lc-s { grid-column: 1; margin: 0; -webkit-line-clamp: 1; }
.lib.is-list .lc-f { grid-column: 2; grid-row: 1 / span 3; flex-direction: column; align-items: flex-end; gap: .4rem; border: 0; padding: 0; }
@media (prefers-reduced-motion: no-preference) { .lc.pop { animation: fadeup .55s var(--ease) both; animation-delay: var(--d, 0s); } }
@media (max-width: 900px) {
  .lib { grid-template-columns: 1fr; }
  .lib-side { position: static; max-height: none; overflow: visible; gap: .75rem; }
  .lib-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .lib-nav::-webkit-scrollbar { display: none; }
  .lib-grp { display: contents; }
  .lib-grp ul { display: contents; }
  .lib-nav a { flex: none; padding: 9px 14px; border-radius: 99px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; white-space: nowrap; }
  .lib-grp ul a { padding: 9px 14px; font-size: 14px; }
  .lib-nav a[aria-current="true"] { background: var(--ink); color: #fff !important; box-shadow: none; }
  .lib-nav a[aria-current="true"] .c { color: rgba(255,255,255,.6); }
  .lib-status { border: 0; padding: 0; } .lib-status .label { display: none; }
  .lib.is-list .lc-media { width: 84px; }
  .lib.is-list .lc-body { grid-template-columns: 1fr; } .lib.is-list .lc-f { display: none; }
}

.door-top { margin-bottom: 0; padding-bottom: clamp(2rem, 5vw, 4rem); }
.door-list { margin-bottom: auto; }
.door-go { margin-top: 1.5rem; }

/* single Projects menu */
.dd-panel { width: 720px; padding: 8px; }
.pm { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.pm-col { padding: 10px 8px 6px; }
.pm-h { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 4px; border-radius: 10px; font-weight: 650; font-size: 15px; transition: background .2s; }
.pm-h:hover { background: color-mix(in srgb, var(--c) 8%, white); }
.pm-h .c { margin-left: auto; font-size: 12.5px; font-weight: 500; color: var(--dim); }
.pm-t { margin: 10px 10px 2px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.pm ul { list-style: none; margin: 0; padding: 0; }
.pm li a { display: block; padding: 7px 10px; border-radius: 10px; font-size: 14.5px; color: #3f3f45; transition: background .2s, color .2s; }
.pm li a:hover, .pm li a[aria-current="page"] { background: #f3f3f1; color: var(--ink); }
.pm-all { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px; padding: 12px; border-radius: 14px; background: #f3f3f1; font-size: 14px; font-weight: 600; transition: background .2s, color .2s; }
.pm-all:hover { background: var(--ink); color: #fff; }
.nav { margin-left: auto; margin-right: 0; gap: 4px; }
.hdr-tools { margin-left: 8px; }
@media (max-width: 1080px) { .menu-btn { display: none; } .hdr-tools .nav-cta { display: inline-flex; } .nav { position: static; flex-direction: row; transform: none; opacity: 1; visibility: visible; padding: 0; background: none; box-shadow: none; max-height: none; overflow: visible; } .nav-a, .nav-btn { width: auto; height: 42px; font-size: 15px; } .nav-m-only { display: none; } .dd-panel { position: absolute; display: block; width: min(720px, calc(100vw - 2 * var(--gut))); left: auto; right: -140px; padding: 8px; background: rgba(255,255,255,.98); box-shadow: 0 0 0 1px rgba(17,17,19,.06), 0 30px 80px rgba(17,17,19,.16); opacity: 0; visibility: hidden; transform: translateY(-8px); } .dd.open .dd-panel { display: block; opacity: 1; visibility: visible; transform: none; } }
@media (max-width: 720px) {
  .menu-btn { display: block; } .hdr-tools .nav-cta { display: none; }
  .nav { position: fixed; left: var(--gut); right: var(--gut); top: 84px; max-height: calc(100vh - 100px); max-height: calc(100svh - 100px); overflow-y: auto; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px; border-radius: 22px; background: rgba(255,255,255,.98); box-shadow: 0 0 0 1px rgba(17,17,19,.06), 0 30px 80px rgba(17,17,19,.16); transform: scale(.96) translateY(-8px); opacity: 0; visibility: hidden; transition: transform .35s var(--ease), opacity .25s, visibility 0s .35s; }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; transition: transform .45s var(--ease), opacity .25s; }
  .nav-a, .nav-btn { width: 100%; height: 52px; font-size: 17px; justify-content: flex-start; }
  .nav-btn .chev { margin-left: auto; }
  .nav-m-only { display: inline-flex; }
  .dd-panel, .dd.open .dd-panel { position: static; width: auto; box-shadow: none; background: none; padding: 0 0 8px; transform: none; }
  .dd-panel { display: none; } .dd.open .dd-panel { display: block; }
  .pm { grid-template-columns: 1fr; }
  .pm-col { padding: 4px 0; }
}
@media (min-width: 721px) {
  .hdr-in { position: relative; }
  .dd { position: static; }
  .dd-panel { left: auto !important; right: 150px !important; top: calc(100% + 10px); transform: translateY(-8px) scale(.98); transform-origin: top right; }
  .dd.open .dd-panel { transform: none; }
}
@media (min-width: 721px) and (max-width: 1080px) { .dd-panel { right: 10px !important; } }
@media (max-width: 720px) { .hdr-tools { margin-left: auto; } }

/* =================== iteration 5 =================== */
:root { --wrap-wide: 1920px; --gut: clamp(20px, 3.2vw, 56px); }
.hdr-in { max-width: none; margin-inline: 0; }
/* nav: lighter, sliding hover pill */
.nav { position: relative; gap: 0; }
.nav-a { position: relative; z-index: 1; color: #55555b; background: none !important; }
.nav-a:hover, .nav-a[aria-current="page"], .nav-btn.is-cur, .nav-btn[aria-expanded="true"] { color: var(--ink); }
.nav-a[aria-current="page"]::after, .nav-btn.is-cur::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.nav-pill { position: absolute; z-index: 0; top: 0; left: 0; height: 42px; width: 0; border-radius: 12px; background: rgba(17,17,19,.06); opacity: 0; transition: transform .45s var(--ease), width .45s var(--ease), opacity .25s; pointer-events: none; }
.nav-pill.on { opacity: 1; }
.hdr-in { transition: box-shadow .4s var(--ease), background .4s; }
.hdr.scrolled .hdr-in { background: rgba(255,255,255,.86); box-shadow: 0 0 0 1px rgba(17,17,19,.06), 0 14px 40px rgba(17,17,19,.1); }
/* projects menu with starred column */
.dd-panel { width: min(980px, calc(100vw - 2 * var(--gut))); padding: 10px; }
.pm { display: grid; grid-template-columns: 300px 1fr; gap: 10px; }
.pm-star { padding: 12px; border-radius: 16px; background: linear-gradient(160deg, #fff6f1, #f7f7f5 70%); display: grid; gap: 8px; align-content: start; }
.pm-label { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.pm-label svg { width: 13px; height: 13px; }
.pm-card { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: 14px; background: rgba(255,255,255,.8); box-shadow: 0 0 0 1px rgba(17,17,19,.05); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.pm-card:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.pm-card img, .pm-ph { width: 64px; height: 52px; border-radius: 10px; object-fit: cover; }
.pm-ph { display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, white); color: var(--c); font-weight: 700; }
.pm-card b { display: block; font-size: 14.5px; letter-spacing: -.015em; }
.pm-card small { font-size: 12.5px; color: var(--muted); }
.pm-cols { display: grid; grid-template-columns: repeat(3, 1fr); }
.pm-t { display: block; }
.pm-t:hover { color: var(--ink); }
.dd.open .pm-card, .dd.open .pm li, .dd.open .pm-h, .dd.open .pm-t { animation: fadeup .5s var(--ease) both; }
.dd.open .pm-card:nth-child(3), .dd.open .pm li:nth-child(2) { animation-delay: .04s; } .dd.open .pm-card:nth-child(4), .dd.open .pm li:nth-child(3) { animation-delay: .08s; } .dd.open .pm li:nth-child(n+4) { animation-delay: .12s; }
@media (max-width: 1080px) { .pm { grid-template-columns: 1fr; } .pm-star { grid-template-columns: repeat(3, 1fr); } .pm-label { grid-column: 1 / -1; } .pm-card { grid-template-columns: 1fr; } .pm-card img, .pm-ph { width: 100%; height: 70px; } }
@media (max-width: 720px) { .pm-star { grid-template-columns: 1fr; background: none; padding: 4px 0; } .pm-card { grid-template-columns: 56px 1fr; } .pm-card img, .pm-ph { width: 56px; height: 44px; } .pm-cols { grid-template-columns: 1fr; } .nav-pill { display: none; } }

/* hero: text + portrait in orbit */
.hero-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 4vw, 5rem); padding-top: 1rem; }
.hero-p { max-width: 36rem; font-size: clamp(1.1rem, 1.4vw, 1.3rem); }
.orbit { position: relative; justify-self: center; width: min(100%, 72vh, 760px); width: min(100%, 72svh, 760px); aspect-ratio: 1; cursor: grab; touch-action: pan-y; }
.orbit.drag { cursor: grabbing; }
.orbit .globe { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.orbit-photo { position: absolute; inset: 22%; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 10px rgba(255,255,255,.7), 0 30px 80px rgba(17,17,19,.18); }
.orbit-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
@media (prefers-reduced-motion: no-preference) { .orbit-photo { animation: float 7s ease-in-out infinite; } }
@keyframes float { 50% { transform: translateY(-8px); } }
.orbit .sats { position: absolute; inset: 0; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .orbit { order: -1; width: min(80vw, 380px); margin-top: 1rem; } .orbit .sats { display: none; } }

/* latest */
.latest { padding-block: clamp(5rem, 9vw, 8rem) 2rem; }
.lt-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.feature-a { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); border-radius: 32px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); transition: box-shadow .6s var(--ease), transform .6s var(--ease); }
.feature-a:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.feature-media { position: relative; min-height: 420px; overflow: hidden; background: color-mix(in srgb, var(--c) 10%, #f1f1ef); }
.feature-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.feature-a:hover .feature-media img { transform: scale(1.04); }
.feature-body { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 4vw, 4rem); }
.feature-k { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 1.25rem; font-size: 14px; color: var(--muted); font-weight: 550; }
.star-badge { padding: 5px 11px; border-radius: 99px; background: #fff1e9; color: #c2410c; font-size: 13px; font-weight: 650; }
.feature-t { margin: 0 0 1rem; font-size: clamp(2.2rem, 4.2vw, 4rem); line-height: 1; font-weight: 700; letter-spacing: -.05em; }
.feature-s { margin: 0 0 2rem; font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted); line-height: 1.5; max-width: 34rem; }
.feature-stats { display: flex; gap: 2.5rem; margin: 0 0 2.25rem; }
.feature-stats dd { margin: 0; font-size: 2rem; font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.feature-stats dt { order: 2; font-size: 13px; color: var(--dim); margin-top: .35rem; }
.feature-stats div { display: flex; flex-direction: column-reverse; }
.feature-go { align-self: flex-start; }
@media (max-width: 900px) { .feature-a { grid-template-columns: 1fr; } .feature-media { min-height: 240px; } .feature-stats { gap: 1.5rem; } }
.lt-rail-wrap { margin-top: 16px; }
.lt-rail { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px max(var(--gut), calc((100vw - var(--wrap-wide)) / 2 + var(--gut))) 24px; scroll-padding-inline: max(var(--gut), calc((100vw - var(--wrap-wide)) / 2 + var(--gut))); cursor: grab; }
.lt-rail::-webkit-scrollbar { display: none; }
.lt-rail.drag { cursor: grabbing; scroll-snap-type: none; } .lt-rail.drag a { pointer-events: none; }
.lt-card { flex: none; width: clamp(260px, 24vw, 380px); scroll-snap-align: start; }
.lt-card a { display: flex; flex-direction: column; height: 100%; padding: 10px 10px 20px; border-radius: 24px; background: var(--surface); box-shadow: 0 0 0 1px rgba(17,17,19,.05); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.lt-card a:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: var(--shadow-lg); }
.lt-media { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; margin-bottom: 1rem; background: color-mix(in srgb, var(--c) 10%, #f1f1ef); }
.lt-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.lt-card a:hover .lt-media img { transform: scale(1.06); }
.lt-card .lc-k { padding: 0 8px; }
.lt-t { margin: 0 0 .4rem; padding: 0 8px; font-size: 1.3rem; font-weight: 650; letter-spacing: -.035em; line-height: 1.15; }
.lt-s { margin: 0; padding: 0 8px; font-size: 14.5px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lt-star { position: absolute; right: 10px; top: 10px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--accent); font-size: 14px; box-shadow: var(--shadow); }
.lt-more { flex: none; width: 220px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1rem; padding: 2rem; border-radius: 24px; background: var(--ink); color: #fff; font-size: 1.4rem; font-weight: 650; letter-spacing: -.03em; scroll-snap-align: start; transition: transform .5s var(--ease); }
.lt-more:hover { transform: translateY(-6px); } .lt-more .ar { width: 22px; height: 22px; }
@media (prefers-reduced-motion: no-preference) { .js .lt-rail-wrap.in .lt-card { animation: slidein .9s var(--ease) both; animation-delay: calc(var(--i) * 70ms); } }
@keyframes slidein { from { opacity: 0; transform: translateX(60px); } }
.lt-ctrl { display: flex; align-items: center; gap: 8px; }
.lt-progress { flex: 1; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; margin-right: 1rem; }
.lt-progress i { display: block; height: 100%; width: 30%; border-radius: inherit; background: var(--ink); transition: transform .2s linear, width .2s; transform-origin: left; }
.rbtn { width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background .2s, color .2s; }
.rbtn:hover { background: var(--ink); color: #fff; } .rbtn svg { width: 16px; height: 16px; }

/* library: bubble tabs + chips + full grid */
.lib { display: block; }
.lib-top { position: sticky; top: calc(var(--hdr) - 4px); z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 10px 0; background: linear-gradient(var(--bg) 70%, transparent); }
.lib .tabs a { gap: .45rem; }
.lib .tabs a .mm-dot { width: 7px; height: 7px; }
.lib .tabs a[aria-current="true"] { color: var(--ink); }
.lib .search { min-width: min(100%, 320px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.chips[hidden] { display: none; }
.chips:not([hidden]) a { animation: fadeup .45s var(--ease) both; }
.chips a:nth-child(2) { animation-delay: .04s; } .chips a:nth-child(3) { animation-delay: .08s; } .chips a:nth-child(4) { animation-delay: .12s; }
.chips a { padding: 8px 15px; border-radius: 99px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 550; color: var(--muted); transition: all .25s; }
.chips a sup { font-size: 11px; color: var(--dim); }
.chips a:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.chips a[aria-current="true"] { background: color-mix(in srgb, var(--c) 12%, white); color: color-mix(in srgb, var(--c) 70%, black); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, white); }
.lib-count { margin: 1rem 0 1rem; }
.lib-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.lc .lt-star { z-index: 2; }
@media (max-width: 720px) { .lib-top { position: static; } .lib .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; width: 100%; } .lib .tabs a { flex: none; } }

/* about */
.ab-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 6rem); align-items: center; padding-top: calc(var(--hdr) + clamp(3rem, 6vw, 5rem)); }
.ab-text p { margin: 0 0 1.2rem; font-size: clamp(1.1rem, 1.5vw, 1.35rem); line-height: 1.55; color: var(--muted); max-width: 40rem; }
.ab-text p:first-child { color: var(--ink); font-weight: 500; }
.ab-intro .btns { margin-top: 2rem; }
.ab-photo { position: relative; margin: 0; border-radius: 36px; overflow: hidden; aspect-ratio: 4 / 5; box-shadow: var(--shadow-lg); }
.ab-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.ab-photo figcaption { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; justify-content: space-between; gap: 1rem; padding: 12px 16px; border-radius: 18px; background: rgba(255,255,255,.8); backdrop-filter: blur(12px); font-size: 14px; color: var(--muted); }
.ab-photo b { color: var(--ink); margin-right: .35rem; } .ab-photo time { font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .ab-hero { grid-template-columns: 1fr; } .ab-photo { aspect-ratio: 4 / 3; } }
.ab-sec { padding-top: clamp(5rem, 9vw, 8rem); }
.ab-head { margin-bottom: 2.25rem; }
.what { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.what-card { display: flex; flex-direction: column; padding: 2rem; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.what-card:hover { box-shadow: var(--shadow-lg); }
.what-card:nth-child(1) { --c: var(--c-academic); } .what-card:nth-child(2) { --c: var(--c-professional); } .what-card:nth-child(3) { --c: var(--c-personal); }
.what-ic { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 2.5rem; border-radius: 14px; background: color-mix(in srgb, var(--c) 12%, white); color: var(--c); }
.what-ic svg { width: 22px; height: 22px; }
.what-k { margin: 0 0 .3rem; font-size: 14px; font-weight: 600; color: var(--c); }
.what-card h3 { margin: 0 0 .7rem; font-size: 1.55rem; line-height: 1.15; font-weight: 650; letter-spacing: -.035em; }
.what-card > p:not(.what-k) { margin: 0 0 1.75rem; color: var(--muted); }
.what-go { margin-top: auto; display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; }
.what-card:hover .what-go .ar { transform: translateX(3px); }
@media (max-width: 960px) { .what { grid-template-columns: 1fr; } .what-ic { margin-bottom: 1.25rem; } }
.cv { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cv-col { padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.cv-h { display: flex; align-items: center; gap: 10px; margin: 0 0 1.5rem; font-size: 1.6rem; font-weight: 700; letter-spacing: -.04em; }
.cv-h .mm-dot { width: 11px; height: 11px; }
.cv .tl li:first-child::before { background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 20%, transparent); }
.cv .mini-h { margin-top: 2.5rem; }
.cv .stats-about { grid-template-columns: 1fr 1fr; }
.cv .stat { box-shadow: none; background: #f6f6f4; }
@media (max-width: 960px) { .cv { grid-template-columns: 1fr; } }
.ab-how { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.ab-how .ap { grid-template-columns: 1fr 1fr; }
.ab-how .card .link { margin-top: 1.5rem; }
@media (max-width: 1100px) { .ab-how { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: no-preference) { .tl li { transition: opacity .6s var(--ease), transform .6s var(--ease); } .js .reveal:not(.in) .tl li { opacity: 0; transform: translateX(-12px); } .js .reveal.in .tl li:nth-child(2) { transition-delay: .08s; } .js .reveal.in .tl li:nth-child(3) { transition-delay: .16s; } .js .reveal.in .tl li:nth-child(4) { transition-delay: .24s; } .js .reveal.in .tl li:nth-child(5) { transition-delay: .32s; } }
/* project pages keep a readable column within the wide layout */
.proj-body { grid-template-columns: 240px minmax(0, 1fr) 240px; }
.proj-body-solo { grid-template-columns: minmax(0, 860px); justify-content: center; }
.prose { margin-inline: auto; width: 100%; }
@media (max-width: 1280px) { .proj-body { grid-template-columns: 220px minmax(0, 1fr); } }
@media (max-width: 960px) { .proj-body { grid-template-columns: 1fr; } }
.proj-head .proj-h { max-width: 16ch; }

.lc-ph { color: var(--ink); font-size: 2.2rem; background:
  radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--c) 35%, transparent) 1px, transparent 1.5px) 0 0 / 14px 14px,
  radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, var(--c) 28%, white), color-mix(in srgb, var(--c) 6%, white) 70%); }
.lc-ph::after { content: ""; position: absolute; width: 46%; aspect-ratio: 1; right: -8%; bottom: -14%; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--c) 45%, transparent); box-shadow: 0 0 0 18px color-mix(in srgb, var(--c) 6%, transparent); }
.hero-grid { padding-right: clamp(0px, 3vw, 60px); }
.sat.flip { flex-direction: row-reverse; padding: 6px 8px 6px 12px; }

/* latest: two cards */
.lt-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.duo a { display: flex; flex-direction: column; height: 100%; border-radius: 28px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.duo a:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.duo-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: color-mix(in srgb, var(--c) 10%, #f1f1ef); }
.duo-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.duo a:hover .duo-media img { transform: scale(1.04); }
.duo-body { display: flex; flex-direction: column; flex: 1; padding: clamp(1.5rem, 2.5vw, 2.25rem); }
.duo .lc-k { gap: 10px; margin-bottom: .9rem; font-size: 14px; }
.duo-t { margin: 0 0 .6rem; font-size: clamp(1.8rem, 2.8vw, 2.6rem); line-height: 1.02; font-weight: 700; letter-spacing: -.045em; }
.duo-s { margin: 0 0 1.5rem; color: var(--muted); font-size: 1.05rem; line-height: 1.5; max-width: 36rem; }
.duo-go { margin-top: auto; display: inline-flex; align-items: center; gap: .5rem; align-self: flex-start; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 550; transition: background .3s; }
.duo a:hover .duo-go { background: var(--c); } .duo a:hover .duo-go .ar { transform: translateX(3px); }
@media (max-width: 900px) { .lt-duo { grid-template-columns: 1fr; } }

.pm { grid-template-columns: 1fr; } .dd-panel { width: min(760px, calc(100vw - 2 * var(--gut))); }

/* =================== iteration 6: article pages =================== */
.sp { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--hdr) + 1rem) 0 3.5rem; overflow: hidden; isolation: isolate; }
.sp-bg { position: absolute; inset: 0; z-index: -1; }
.sp-bg .b1 { left: 40%; top: -20%; width: 60vw; height: 60vw; background: radial-gradient(circle, color-mix(in srgb, var(--c) 18%, transparent), transparent 65%); }
.sp-bg .b2 { left: -10%; top: 50%; width: 40vw; height: 40vw; background: radial-gradient(circle, color-mix(in srgb, var(--c) 10%, transparent), transparent 65%); }
.sp-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 6rem); align-items: center; }
.sp-text .crumbs { margin-bottom: 1.5rem; }
.sp-h { margin: 0 0 1.5rem; font-size: clamp(3rem, 7.4vw, 8.5rem); line-height: .92; font-weight: 700; letter-spacing: -.055em; text-wrap: balance; }
.tw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.tw > span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) { .js .tw > span { transform: translateY(105%); animation: rise 1s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms + 200ms); } }
.sp-abs { margin: 0 0 2rem; max-width: 36rem; font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1.5; color: var(--muted); letter-spacing: -.015em; }
.sp-meta { display: flex; flex-wrap: wrap; gap: 1.25rem 2.5rem; margin: 0 0 2.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); max-width: 40rem; }
.sp-meta dt { font-size: 13px; color: var(--dim); margin-bottom: .2rem; }
.sp-meta dd { margin: 0; font-weight: 600; letter-spacing: -.01em; }
.sp-scroll { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; width: 26px; height: 42px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.sp-scroll span { position: absolute; left: 50%; top: 9px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 3px; background: var(--ink); }
@media (prefers-reduced-motion: no-preference) { .sp-scroll span { animation: wheel 1.8s var(--ease) infinite; } }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
/* collage */
.sp-vis { position: relative; height: min(72vh, 760px); height: min(72svh, 760px); }
.sv { position: absolute; inset: 0; }
.sv-t { position: absolute; margin: 0; border-radius: 22px; overflow: hidden; background: #e9e9e6; box-shadow: 0 2px 6px rgba(17,17,19,.06), 0 30px 70px rgba(17,17,19,.18); will-change: transform; transition: transform .8s var(--ease); }
.sv-t img { width: 100%; height: 100%; object-fit: cover; }
.sv-1 .sv-t1 { inset: 4% 2%; }
.sv-2 .sv-t1 { left: 0; top: 6%; width: 72%; height: 70%; } .sv-2 .sv-t2 { right: 0; bottom: 4%; width: 52%; height: 48%; }
.sv-3 .sv-t1, .sv-4 .sv-t1 { left: 8%; top: 12%; width: 64%; height: 62%; z-index: 2; }
.sv-3 .sv-t2, .sv-4 .sv-t2 { right: 0; top: 0; width: 40%; height: 38%; z-index: 1; }
.sv-3 .sv-t3, .sv-4 .sv-t3 { left: 0; bottom: 0; width: 42%; height: 34%; z-index: 3; }
.sv-4 .sv-t4 { right: 4%; bottom: 6%; width: 36%; height: 34%; z-index: 3; }
@media (prefers-reduced-motion: no-preference) {
  .js .sv-t { opacity: 0; animation: tilein 1.1s var(--ease) forwards; }
  .sv-t1 { animation-delay: .25s !important; } .sv-t2 { animation-delay: .4s !important; } .sv-t3 { animation-delay: .55s !important; } .sv-t4 { animation-delay: .7s !important; }
  .sv-t2 { --r: 3deg; } .sv-t3 { --r: -3deg; } .sv-t4 { --r: 2deg; }
}
@keyframes tilein { from { opacity: 0; transform: translateY(40px) scale(.94) rotate(var(--r, 0deg)); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }
.sv-t2 { rotate: 3deg; } .sv-t3 { rotate: -3deg; } .sv-t4 { rotate: 2deg; }
.sv-none svg { width: 100%; height: 100%; }
.sv-none .wave { stroke-dasharray: 1400; stroke-dashoffset: 1400; }
@media (prefers-reduced-motion: no-preference) { .sv-none .w1 { animation: draw 2.4s var(--ease) .3s forwards, sway 6s ease-in-out 2.7s infinite alternate; } .sv-none .w2 { animation: draw 2.4s var(--ease) .6s forwards; } .sv-none .w3 { animation: draw 2s var(--ease) .9s forwards; } }
@media (prefers-reduced-motion: reduce) { .sv-none .wave { stroke-dashoffset: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes sway { to { transform: translateY(14px); } }
@media (max-width: 900px) { .sp-grid { grid-template-columns: 1fr; } .sp-vis { order: -1; height: 38vh; height: 38svh; } .sp-h { font-size: 13vw; } .sp { justify-content: flex-start; } }

/* chapters */
.story { padding-top: clamp(4rem, 8vw, 7rem); }
.stats-sm { margin-top: 0; }
.chap { display: grid; grid-template-columns: minmax(0, 1fr); padding-block: clamp(3rem, 6vw, 5.5rem); border-top: 1px solid var(--line); }
.chap:first-child { border-top: 0; padding-top: 0; }
.chap.has-media { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 6rem); align-items: start; }
.chap.flip .ch-text { order: 2; } .chap.flip .ch-media { order: 1; }
.chap:not(.has-media) .ch-text { max-width: 860px; }
.ch-text > p, .ch-text > ul, .ch-text > ol { margin: 0 0 1.4rem; max-width: 680px; font-size: 18.5px; line-height: 1.7; color: #3a3a3f; }
.ch-intro .ch-text > p:first-child { font-size: clamp(1.35rem, 2.1vw, 1.75rem); line-height: 1.45; color: var(--ink); letter-spacing: -.02em; font-weight: 500; max-width: 900px; }
.ch-text h2 { margin: 0 0 1.5rem; font-size: clamp(2rem, 3.6vw, 3.2rem); line-height: 1.02; font-weight: 700; letter-spacing: -.05em; scroll-margin-top: calc(var(--hdr) + 30px); }
.ch-text h3 { margin: 2rem 0 .7rem; font-size: 1.3rem; font-weight: 650; letter-spacing: -.025em; }
.ch-text strong { color: var(--ink); font-weight: 650; }
.ch-text ul { list-style: none; padding: 0; } .ch-text ul li { position: relative; padding-left: 1.4rem; margin-bottom: .5rem; }
.ch-text ul li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--accent)); }
.ch-text a:not([class]) { text-decoration: underline; text-decoration-color: var(--c, var(--accent)); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.ch-text .facts { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.ch-media-in { position: sticky; top: calc(var(--hdr) + 28px); display: grid; gap: 14px; }
.ch-media .gallery { margin: 0; grid-template-columns: 1fr 1fr; gap: 12px; }
.ch-media .g-item:first-child { grid-column: 1 / -1; }
.ch-media .g-2 .g-item { grid-column: auto; }
.ch-media .g-item:first-child .zoom { aspect-ratio: 16 / 10; }
.ch-media .g-2 .g-item .zoom { aspect-ratio: 4 / 5; }
.ch-media .zoom { border-radius: 20px; }
.ch-media .g-item figcaption { font-size: 13px; }
.g-item.is-extra { display: none; }
.more-photos { justify-self: start; display: inline-flex; align-items: center; gap: .45rem; padding: 9px 16px; border: 0; border-radius: 99px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 550; cursor: pointer; }
.more-photos:hover { box-shadow: inset 0 0 0 1px var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .js .chap .g-item, .js .chap .fig { clip-path: inset(18% 0 0 0 round 20px); opacity: 0; transform: translateY(30px); transition: clip-path 1.1s var(--ease), opacity .8s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--k, 0) * 90ms); }
  .js .chap .g-item.in, .js .chap .fig.in { clip-path: inset(0 0 0 0 round 20px); opacity: 1; transform: none; }
  .js .ch-text > * { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .js .ch-text > .in { opacity: 1; transform: none; }
}
@media (max-width: 960px) { .chap.has-media { grid-template-columns: 1fr; } .chap.flip .ch-text, .chap.flip .ch-media { order: 0; } .ch-media-in { position: static; } }
.res { padding-block: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.res h2 { margin: 0 0 1.5rem; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 700; letter-spacing: -.045em; }
.res .files { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.res .refs { margin-top: 1rem; }
/* chapter dots */
.dots { position: fixed; right: clamp(10px, 1.6vw, 28px); top: 50%; translate: 0 -50%; z-index: 30; display: grid; gap: 14px; opacity: 0; pointer-events: none; transition: opacity .4s; }
.dots.on { opacity: 1; pointer-events: auto; }
.dots a { position: relative; display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); transition: background .3s, transform .3s var(--ease); }
.dots a.on { background: var(--c, var(--accent)); transform: scale(1.4); }
.dots a span { position: absolute; right: 22px; top: 50%; translate: 0 -50%; padding: 6px 12px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 13px; white-space: nowrap; opacity: 0; transform: translateX(6px); pointer-events: none; transition: opacity .25s, transform .35s var(--ease); }
.dots a:hover span, .dots a:focus-visible span { opacity: 1; transform: none; }
@media (max-width: 960px) { .dots { display: none; } }
.proj { --c: var(--c-academic); } .proj[data-cat="professional"] { --c: var(--c-professional); } .proj[data-cat="personal"] { --c: var(--c-personal); }
/* next project */
.next { position: relative; display: block; margin-top: clamp(4rem, 8vw, 6rem); overflow: hidden; isolation: isolate; background: var(--ink); color: #fff; }
.next-in { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 2rem; padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.next .eyebrow { color: rgba(255,255,255,.65); }
.next-t { margin: 0 0 .75rem; font-size: clamp(2.6rem, 6.5vw, 6.5rem); line-height: .95; font-weight: 700; letter-spacing: -.055em; transition: transform .7s var(--ease); }
.next-s { margin: 0; max-width: 38rem; color: rgba(255,255,255,.65); font-size: 1.1rem; }
.next-go { flex: none; width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--ink); transition: transform .5s var(--ease); }
.next-go .ar { width: 26px; height: 26px; }
.next:hover .next-go { transform: scale(1.1) rotate(-45deg); }
.next:hover .next-t { transform: translateX(10px); }
.next-img { position: absolute; z-index: 0; right: 0; top: 0; bottom: 0; width: 45%; opacity: .28; -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%); transition: opacity .6s, transform 1.2s var(--ease); }
.next-img img { width: 100%; height: 100%; object-fit: cover; }
.next:hover .next-img { opacity: .45; transform: scale(1.04); }
.is-proj .ftr { margin-top: clamp(3rem, 6vw, 5rem); }

/* =================== about =================== */
.ab-hero { min-height: 100vh; min-height: 100svh; padding-top: calc(var(--hdr) + 1.5rem); padding-bottom: 2rem; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; }
.ab-hero .ph-h { font-size: clamp(2.8rem, 6.4vw, 6.5rem); }
.ab-text p { font-size: clamp(1.05rem, 1.3vw, 1.25rem); }
.ab-photo { aspect-ratio: auto; height: min(calc(100vh - var(--hdr) - 4rem), 820px); height: min(calc(100svh - var(--hdr) - 4rem), 820px); max-width: 640px; justify-self: end; width: 100%; }
@media (max-width: 900px) { .ab-hero { min-height: 0; } .ab-photo { height: auto; aspect-ratio: 1; justify-self: stretch; max-width: none; } }
/* trees */
.trees { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tree { --c: var(--c-academic); padding: clamp(1.75rem, 3vw, 2.75rem); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.tree[data-cat="professional"] { --c: var(--c-professional); }
.tree-h { display: flex; align-items: center; gap: 10px; margin: 0 0 2rem; font-size: 1.7rem; font-weight: 700; letter-spacing: -.04em; }
.tree-h .mm-dot { width: 12px; height: 12px; background: var(--c); }
.tree ol { position: relative; list-style: none; margin: 0; padding: 0 0 0 34px; }
.tree ol::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: linear-gradient(var(--c), color-mix(in srgb, var(--c) 15%, white)); transform-origin: top; }
.tree li { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: 0 0 1.9rem; }
.tree li:last-child { padding-bottom: 0; }
.tree li::before { content: ""; position: absolute; left: -34px; top: 2px; width: 19px; height: 19px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 4px var(--c); }
.tree li:first-child::before { background: var(--c); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 20%, transparent); }
.tree-when { align-self: flex-start; padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--c) 10%, white); color: color-mix(in srgb, var(--c) 75%, black); font-size: 13px; font-weight: 600; margin-bottom: .35rem; }
.tree-what { font-size: 1.15rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.3; }
.tree-where { color: var(--muted); font-size: 15px; line-height: 1.45; }
@media (prefers-reduced-motion: no-preference) {
  .js .tree ol::before { transform: scaleY(0); transition: transform 1.4s var(--ease) .2s; } .js .tree.in ol::before { transform: none; }
  .js .tree li { opacity: 0; transform: translateX(-14px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--k) * 120ms + .3s); }
  .js .tree.in li { opacity: 1; transform: none; }
}
@media (max-width: 900px) { .trees { grid-template-columns: 1fr; } }
/* toolbox */
.tb { display: grid; grid-template-columns: 1.5fr 1fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.tb-card { padding: clamp(1.5rem, 2.5vw, 2.25rem); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.tb-h { margin: 0 0 1.25rem; font-size: 14px; font-weight: 650; color: var(--muted); }
.tb-tools { grid-row: span 2; }
.tools { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tools li { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: #f6f6f4; transition: transform .4s var(--ease), background .3s; }
.tools li:hover { transform: translateY(-3px); background: #efefec; }
.tool-ic { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: -.02em; }
.tools li:nth-child(3n+2) .tool-ic { background: var(--c-academic); } .tools li:nth-child(3n) .tool-ic { background: var(--accent); }
.tools b { display: block; font-size: 1.05rem; letter-spacing: -.02em; } .tools small { color: var(--muted); font-size: 13.5px; }
.lang2 { list-style: none; margin: 0; padding: 0; }
.lang2 li { display: grid; grid-template-columns: 1fr auto; padding: .7rem 0; border-top: 1px solid var(--line); }
.lang2 li:first-child { border-top: 0; padding-top: 0; }
.lang-n { font-weight: 600; } .lang-l { padding: 2px 10px; border-radius: 99px; background: #f1f1ef; font-size: 13px; font-weight: 600; }
.lang2 small { grid-column: 1 / -1; color: var(--dim); font-size: 13px; }
.tb-dom { grid-column: 2 / 4; }
.tb-lang { grid-column: 2; grid-row: 2; } .tb-cert { grid-column: 3; grid-row: 2; }
.tb-dom { grid-row: 1; }
.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills li { padding: 10px 16px; border-radius: 99px; background: #f6f6f4; font-weight: 600; font-size: 15px; }
.certs { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.certs li { position: relative; padding-left: 1.6rem; font-weight: 500; line-height: 1.4; }
.certs li::before { content: "✓"; position: absolute; left: 0; color: var(--c-personal); font-weight: 700; }
.soft { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 2rem; }
.soft span { padding: 9px 16px; border-radius: 99px; background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14.5px; color: var(--muted); font-weight: 500; }
@media (prefers-reduced-motion: no-preference) { .js .soft span { opacity: 0; transform: translateY(10px) scale(.95); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i) * 70ms); } .js .soft.in span { opacity: 1; transform: none; } .soft span:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); } }
@media (max-width: 1100px) { .tb { grid-template-columns: 1fr 1fr; } .tb-tools { grid-column: 1 / -1; grid-row: auto; } .tb-dom { grid-column: 1 / -1; grid-row: auto; } .tb-lang, .tb-cert { grid-column: auto; grid-row: auto; } }
@media (max-width: 640px) { .tb { grid-template-columns: 1fr; } .tools { grid-template-columns: 1fr; } }

/* =================== contact popup =================== */
.cdlg { width: min(1180px, calc(100vw - 2 * var(--gut))); max-width: none; max-height: calc(100vh - 48px); max-height: calc(100svh - 48px); padding: 0; border: 0; border-radius: 36px; background: none; overflow: visible; }
.cdlg::backdrop { background: rgba(246,246,244,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.cdlg .cta-dlg { margin: 0; min-height: min(640px, calc(100vh - 48px)); min-height: min(640px, calc(100svh - 48px)); display: flex; flex-direction: column; justify-content: center; box-shadow: 0 40px 120px rgba(17,17,19,.35); }
.cdlg[open] .cta-dlg { animation: pop .7s var(--ease); }
.cdlg[open]::backdrop { animation: fadein .4s ease; }
.cdlg.closing .cta-dlg { animation: popout .35s var(--ease) forwards; }
@keyframes pop { from { opacity: 0; transform: translateY(40px) scale(.92); border-radius: 80px; } }
@keyframes popout { to { opacity: 0; transform: translateY(20px) scale(.96); } }
@keyframes fadein { from { opacity: 0; } }
.cdlg[open] .cta-h, .cdlg[open] .cta-mail, .cdlg[open] .btns, .cdlg[open] .eyebrow { animation: fadeup .8s var(--ease) both; }
.cdlg[open] .cta-h { animation-delay: .12s; } .cdlg[open] .cta-mail { animation-delay: .2s; } .cdlg[open] .btns { animation-delay: .28s; }
.cdlg-x { position: absolute; top: 20px; right: 20px; z-index: 2; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; transition: background .2s, transform .4s var(--ease); }
.cdlg-x:hover { background: #fff; color: var(--ink); transform: rotate(90deg); }
.cdlg-x svg { width: 16px; height: 16px; }
.cdlg .cta-dlg { align-items: flex-start; }
.sp-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
/* text-only chapters: heading left, text right */
.ch-split { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 6rem); align-items: start; }
.ch-split .ch-head { position: sticky; top: calc(var(--hdr) + 28px); }
.ch-split .ch-head h2 { margin: 0; font-size: clamp(2.2rem, 4vw, 3.6rem); line-height: 1; font-weight: 700; letter-spacing: -.05em; scroll-margin-top: calc(var(--hdr) + 30px); }
.ch-split .ch-text { padding-top: .6rem; }
@media (max-width: 960px) { .ch-split { grid-template-columns: 1fr; gap: 1.25rem; } .ch-split .ch-head { position: static; } .ch-split .ch-head h2 { font-size: clamp(2rem, 8vw, 2.6rem); } }

/* about sections fill one screen each */
.ab-screen { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-block: calc(var(--hdr) + 1rem) 2rem; scroll-margin-top: 0; }
.ab-screen .ab-head { margin-bottom: clamp(1.25rem, 3vh, 2.25rem); }
/* toolbox bento: tools | fields+languages | soft+certs */
.tb { grid-template-columns: 1.4fr 1fr 1fr; grid-template-rows: auto auto; }
.tb-tools { grid-column: 1; grid-row: 1 / span 2; }
.tb-dom { grid-column: 2; grid-row: 1; } .tb-soft { grid-column: 3; grid-row: 1; }
.tb-lang { grid-column: 2; grid-row: 2; } .tb-cert { grid-column: 3; grid-row: 2; }
.tb-tools .tools { height: calc(100% - 2.6rem); grid-auto-rows: 1fr; }
.tb-soft .soft { justify-content: flex-start; margin-top: 0; gap: 8px; }
.tb-soft .soft span { padding: 8px 14px; font-size: 14px; }
.tb-card { padding: clamp(1.25rem, 2vw, 2rem); }
.lang2 li { padding: .5rem 0; }
@media (max-width: 1100px) { .tb { grid-template-columns: 1fr 1fr; } .tb-tools { grid-column: 1 / -1; grid-row: auto; } .tb-dom, .tb-soft, .tb-lang, .tb-cert { grid-column: auto; grid-row: auto; } .ab-screen { min-height: 0; } }
@media (max-width: 640px) { .tb { grid-template-columns: 1fr; } }
@media (max-height: 760px) { .ab-screen { min-height: 0; } }
/* article splash: scale with window height so everything fits with breathing room */
@media (min-width: 901px) {
  .sp { padding: calc(var(--hdr) + 2vh) 0 clamp(4rem, 9vh, 6.5rem); }
  .sp-text .crumbs { margin-bottom: 2vh; }
  .sp .eyebrow { margin-bottom: 1.5vh; }
  .sp-h { font-size: min(7.4vw, 11.5vh, 8.5rem); margin-bottom: 2.5vh; }
  .sp-abs { font-size: min(1.6vw, 2.4vh, 1.45rem); margin-bottom: 3vh; }
  .sp-meta { gap: 1.2vh 2rem; margin-bottom: 3.5vh; padding-top: 2vh; }
  .sp-meta dt { margin-bottom: .1rem; }
  .sp .btn { min-height: min(50px, 6vh); }
  .sp-vis { height: min(68vh, 760px); height: min(68svh, 760px); }
}
@media (min-width: 901px) {
  .sp-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(2rem, 4vw, 5rem); }
  .sp-h { font-size: min(6.6vw, 10vh, 8rem); }
  .sp-meta { display: flex; flex-wrap: nowrap; gap: 2.5rem; max-width: none; }
  .sp-meta > div { min-width: 0; max-width: 14rem; }
  .sp-meta dd { font-size: 15px; line-height: 1.35; }
  .sp-abs { max-width: 40rem; }
  .sp-vis { height: min(62vh, 720px); height: min(62svh, 720px); }
}

/* =================== media viewer =================== */
.lb { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: hidden; }
.lb::backdrop { background: rgba(246,246,244,.84); backdrop-filter: blur(26px) saturate(1.3); -webkit-backdrop-filter: blur(26px) saturate(1.3); }
.lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; place-items: stretch; animation: none; }
.lb[open]::backdrop { animation: fadein .45s ease; }
.lb.closing::backdrop { opacity: 0; transition: opacity .4s; }
.lb.closing .lb-top, .lb.closing .lb-bottom, .lb.closing .lb-prev, .lb.closing .lb-next { opacity: 0; transition: opacity .25s; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; }
.lb[open] .lb-top, .lb[open] .lb-bottom { animation: fadeup .6s var(--ease) both .15s; }
.lb-count { position: static; padding: 8px 14px; border-radius: 99px; background: var(--surface); box-shadow: var(--shadow); font-size: 13px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 4px 104px 14px; }
.lb-stage > .lb-media { grid-area: 1 / 1; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 22px; box-shadow: 0 2px 6px rgba(17,17,19,.06), 0 50px 120px rgba(17,17,19,.28); will-change: transform; }
.lb-stage > video.lb-media { background: #000; min-width: min(70vw, 900px); }
.lb-bottom { display: grid; justify-items: center; gap: 12px; padding: 14px 22px 22px; min-width: 0; }
.lb-cap { margin: 0; max-width: 60ch; text-align: center; font-size: 15px; font-weight: 550; color: var(--ink); letter-spacing: -.01em; }
.lb-strip { display: flex; gap: 8px; max-width: 100%; overflow-x: auto; padding: 8px; border-radius: 20px; background: rgba(255,255,255,.75); box-shadow: 0 0 0 1px rgba(17,17,19,.05), var(--shadow); scrollbar-width: none; }
.lb-strip::-webkit-scrollbar { display: none; }
.lb-strip[hidden] { display: none; }
.lb-strip button { flex: none; width: 66px; height: 48px; padding: 0; border: 0; border-radius: 11px; overflow: hidden; background: var(--ink); color: #fff; cursor: pointer; opacity: .45; outline: 2px solid transparent; outline-offset: 2px; transition: opacity .3s, transform .45s var(--ease), outline-color .3s; }
.lb-strip button:hover { opacity: .8; transform: translateY(-2px); }
.lb-strip button[aria-current="true"] { opacity: 1; transform: translateY(-4px) scale(1.06); outline-color: var(--ink); }
.lb-strip img { width: 100%; height: 100%; object-fit: cover; }
.lb-tv { font-size: 14px; }
.lb-btn { position: absolute; width: 54px; height: 54px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px rgba(17,17,19,.05), var(--shadow); cursor: pointer; transition: background .25s, color .25s, transform .45s var(--ease); }
.lb-btn svg { width: 18px; height: 18px; }
.lb-btn:hover { background: var(--ink); color: #fff; transform: scale(1.08); }
.lb-close { position: static; }
.lb-close:hover { transform: rotate(90deg) scale(1.05); }
.lb-prev { left: 28px; top: 50%; translate: 0 -50%; } .lb-next { right: 28px; left: auto; top: 50%; translate: 0 -50%; }
.lb.single .lb-prev, .lb.single .lb-next { display: none; }
@media (max-width: 720px) { .lb-stage { padding: 0 10px; } .lb-prev, .lb-next { top: auto; bottom: 92px; translate: none; width: 46px; height: 46px; } .lb-prev { left: 14px; } .lb-next { right: 14px; } .lb-strip button { width: 52px; height: 40px; } }
/* video tiles */
.zoom-v { position: relative; }
.zoom-v video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; display: block; background: #111; border-radius: 0; }
.play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .45s var(--ease), background .25s, color .25s; }
.play svg { width: 22px; height: 22px; margin-left: 3px; }
.zoom-v:hover .play { transform: scale(1.12); background: var(--ink); color: #fff; }
.g-video .zoom { aspect-ratio: 3 / 2; border-radius: 20px; }
/* splash tiles clickable */
.sv-t .zoom { width: 100%; height: 100%; border-radius: 0; aspect-ratio: auto; background: none; cursor: zoom-in; }
.sv-t .zoom img { transition: transform 1s var(--ease); }
.sv-t:hover { z-index: 5; }
.sv-t:hover .zoom img { transform: scale(1.05); }
.ch-media .g-1 .zoom { aspect-ratio: 4 / 3; } .ch-media .g-1 img { object-fit: cover; max-height: none; }
/* viewer: hard-cap media to the visible stage */
.lb-stage { overflow: visible; }
.lb-stage > .lb-media { max-width: calc(100vw - 220px); max-height: calc(100vh - 230px); max-height: calc(100svh - 230px); }
.lb.single .lb-stage > .lb-media { max-height: calc(100vh - 170px); max-height: calc(100svh - 170px); }
@media (max-width: 720px) { .lb-stage > .lb-media { max-width: calc(100vw - 20px); max-height: calc(100vh - 260px); max-height: calc(100svh - 260px); } }
.lb-stage > video.lb-media { min-width: 0; width: min(calc(100vw - 220px), calc((100vh - 230px) * 16 / 9)); width: min(calc(100vw - 220px), calc((100svh - 230px) * 16 / 9)); }
/* viewer: every item gets the same centred frame */
.lb-stage { place-items: center; justify-content: center; align-content: center; }
.lb-stage > .lb-media, .lb-stage > video.lb-media {
  width: calc(100vw - 220px); height: calc(100vh - 230px); height: calc(100svh - 230px); max-width: none; max-height: none; min-width: 0;
  object-fit: contain; object-position: center; justify-self: center; align-self: center;
  background: #ebebe8; border-radius: 24px;
}
.lb-stage > video.lb-media { background: #0b0b0c; }
.lb.single .lb-stage > .lb-media { height: calc(100vh - 170px); height: calc(100svh - 170px); }
@media (max-width: 720px) { .lb-stage > .lb-media, .lb-stage > video.lb-media { width: calc(100vw - 20px); height: calc(100vh - 260px); height: calc(100svh - 260px); } }
/* viewer frame: vh fallback (older browsers ignore svh and the image grew unbounded) */
.lb { height: 100vh; }
.lb-stage { position: relative; min-height: 0; overflow: hidden; }
.lb-stage > .lb-media, .lb-stage > video.lb-media { width: calc(100vw - 220px); height: calc(100vh - 230px); }
.lb.single .lb-stage > .lb-media { height: calc(100vh - 170px); }
@media (max-width: 720px) { .lb-stage > .lb-media, .lb-stage > video.lb-media { width: calc(100vw - 20px); height: calc(100vh - 260px); } }
@supports (height: 100svh) {
  .lb { height: 100vh; height: 100svh; }
  .lb-stage > .lb-media, .lb-stage > video.lb-media { height: calc(100vh - 230px); height: calc(100svh - 230px); }
  .lb.single .lb-stage > .lb-media { height: calc(100vh - 170px); height: calc(100svh - 170px); }
  @media (max-width: 720px) { .lb-stage > .lb-media, .lb-stage > video.lb-media { height: calc(100vh - 260px); height: calc(100svh - 260px); } }
}
.lb-stage > .lb-media, .lb-stage > video.lb-media { max-width: none; max-height: none; background: transparent; object-fit: cover; }
.lc-f { justify-content: flex-end; }
.tw { padding-bottom: .24em; margin-bottom: -.24em; padding-right: .04em; margin-right: -.04em; }
@media (prefers-reduced-motion: no-preference) { .js .tb-soft.in .soft span { opacity: 1; transform: none; } }
.ph-box { display: grid; place-items: center; gap: 12px; aspect-ratio: 16 / 10; padding: 2rem; border-radius: 20px; border: 2px dashed var(--line-2); background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(17,17,19,.025) 14px 28px); color: var(--dim); text-align: center; font-size: 15px; font-weight: 550; }
.ph-box svg { width: 34px; height: 34px; }
.sp-h { line-height: 1.02; } .tw { padding-top: .06em; margin-top: -.06em; }
.silly { font-family: "Comic Sans MS", "Chalkboard SE", "Comic Neue", cursive; font-style: italic; letter-spacing: 0; }

/* =================== iteration 7: phone layout =================== */
@keyframes navin { from { opacity: 0; transform: translateY(10px); } }
/* sp-scroll never collides with the splash content */
.sp { padding-bottom: max(5.5rem, var(--sp-pb, 0px)); }
@media (min-width: 901px) { .sp { --sp-pb: clamp(4rem, 9vh, 6.5rem); padding-bottom: max(5.5rem, var(--sp-pb)); } }

@media (max-width: 720px) {
  /* menu: a sheet hanging from the header bar */
  .hdr-in { position: relative; }
  .hdr::before { content: ""; position: fixed; inset: 0; z-index: -1; background: rgba(246,246,244,.62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s .3s; pointer-events: auto; }
  body.menu-open .hdr::before { opacity: 1; visibility: visible; transition: opacity .3s ease; }
  .nav { position: absolute; top: calc(100% + 10px); left: 0; right: 0; margin: 0; display: flex; flex-direction: column; align-items: stretch; gap: 2px; max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 8px; border-radius: 24px; background: rgba(255,255,255,.98); box-shadow: 0 0 0 1px rgba(17,17,19,.06), 0 30px 80px rgba(17,17,19,.18); opacity: 0; visibility: hidden; transform: translateY(-10px) scale(.97); transform-origin: top right; transition: opacity .2s ease, transform .35s var(--ease), visibility 0s .35s; }
  .nav::-webkit-scrollbar { display: none; }
  .nav > * { flex: none; }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .55s var(--ease); }
  .nav.is-open > .dd, .nav.is-open > .nav-a { animation: navin .55s var(--ease) both; }
  .nav.is-open > .nav-a { animation-delay: .06s; } .nav.is-open > .nav-a:last-child { animation-delay: .11s; }
  .nav-a, .nav-btn { width: 100%; height: 56px; padding: 0 16px; border-radius: 16px; font-size: 19px; font-weight: 600; letter-spacing: -.025em; color: var(--ink); justify-content: flex-start; transition: background .2s; }
  .nav-a:active, .nav-btn:active { background: rgba(17,17,19,.05) !important; }
  .nav-a[aria-current="page"]::after, .nav-btn.is-cur::after { left: auto; right: 18px; bottom: auto; top: 50%; margin: -3px 0 0; width: 6px; height: 6px; }
  .nav-btn.is-cur::after { right: 46px; }
  .nav-btn .chev { margin-left: auto; width: 14px; height: 14px; opacity: .5; }
  .nav-btn[aria-expanded="true"] { background: #f3f3f1 !important; }
  /* projects accordion: animates its height open */
  .dd, .dd.open { position: static; }
  .dd-panel, .dd.open .dd-panel { position: static; display: grid; grid-template-rows: 0fr; width: auto; margin: 0; padding: 0; border-radius: 0; background: none; box-shadow: none; opacity: 1; transform: none; backdrop-filter: none; }
  .dd-panel { visibility: hidden; transition: grid-template-rows .5s var(--ease), visibility 0s .5s; }
  .dd.open .dd-panel { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .55s var(--ease); }
  .dd-panel::before { display: none; }
  .dd-in { min-height: 0; overflow: hidden; }
  .pm { display: block; padding: 6px 0 0; }
  .pm-cols { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .pm-col { padding: 4px 6px 6px; border-radius: 18px; background: #f4f4f2; }
  .dd.open .pm-col { animation: navin .55s var(--ease) both; }
  .dd.open .pm-col:nth-child(2) { animation-delay: .05s; } .dd.open .pm-col:nth-child(3) { animation-delay: .1s; }
  .dd.open .pm li, .dd.open .pm-h, .dd.open .pm-t { animation: none; }
  .pm-h { padding: 10px 10px 8px; margin: 0; gap: 8px; border-radius: 12px; font-size: 12.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); background: none !important; }
  .pm-h .c { font-size: 12.5px; letter-spacing: 0; }
  .pm-t { margin: 10px 10px 6px; font-size: 11px; color: var(--dim); }
  .pm ul { overflow: hidden; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px rgba(17,17,19,.04); }
  .pm li + li { box-shadow: inset 0 1px #ededeb; }
  .pm li a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 11px 14px; border-radius: 0; font-size: 16px; font-weight: 500; line-height: 1.3; letter-spacing: -.015em; color: var(--ink); }
  .pm li a::after { content: ""; flex: none; width: 7px; height: 7px; margin-left: auto; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); opacity: .3; }
  .pm li a:active { background: #f3f3f1; }
  .pm li a[aria-current="page"] { background: color-mix(in srgb, var(--c) 9%, white); font-weight: 600; }
  .pm li a[aria-current="page"]::after { border: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--c); transform: none; opacity: 1; }
  .pm-all { margin: 8px 0 6px; min-height: 52px; border-radius: 16px; background: var(--ink); color: #fff; font-size: 15px; }
  .dd.open .pm-all { animation: navin .55s var(--ease) .15s both; }
}
@media (max-width: 380px) { .nav-a, .nav-btn { font-size: 18px; height: 52px; } }

@media (max-width: 900px) {
  /* home: hero fills exactly one screen, marquee pinned to the bottom */
  .is-home .hero { justify-content: flex-start; padding-top: calc(var(--hdr) + 4px); }
  .is-home .hero-in { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-block: 3vh 4vh; padding-block: 3svh 4svh; }
  .is-home .hero-in > * { align-self: flex-start; max-width: 100%; }
  .is-home .hero .marquee { margin-top: 0; }

  /* about: heading, portrait, text, buttons — in that order */
  .ab-hero { grid-template-columns: 1fr; gap: 0; min-height: 0; align-items: start; padding-top: calc(var(--hdr) + 2rem); padding-bottom: 1rem; }
  .ab-intro { display: contents; }
  .ab-intro > .eyebrow { order: 1; justify-self: start; }
  .ab-intro > .ph-h { order: 2; margin-bottom: 1.5rem; }
  .ab-photo { order: 3; width: 100%; max-width: none; height: auto; aspect-ratio: 5 / 4; justify-self: stretch; margin: 0 0 2rem; border-radius: 28px; }
  .ab-photo img { object-position: 50% 30%; }
  .ab-photo figcaption { left: 12px; right: 12px; bottom: 12px; padding: 10px 14px; }
  .ab-photo figcaption span { display: flex; flex-direction: column; line-height: 1.3; }
  .ab-photo figcaption span:last-child { text-align: right; }
  .ab-intro > .ab-text { order: 4; }
  .ab-intro > .btns { order: 5; margin-top: .75rem; }
}

@media (max-width: 720px) {
  /* contact card: big sphere sits behind the text, like the homepage */
  .cta { display: flex; flex-direction: column; justify-content: flex-end; min-height: min(620px, calc(100svh - 120px)); padding: 7.5rem 1.5rem 2rem; border-radius: 30px; }
  .cta-globe { left: 18%; right: auto; top: -14%; bottom: auto; width: 125%; max-width: none; opacity: .9; }
  .cta-h { margin-bottom: 1.75rem; font-size: clamp(2.3rem, 11vw, 3.4rem); }
  .cta-mail { align-self: stretch; justify-content: space-between; margin-bottom: 12px; padding: 17px 22px; font-size: 1rem; }
  .cta .btns { gap: 10px; }
  .cta .btns .btn { flex: 1 1 auto; }
  .cdlg { width: calc(100vw - 20px); max-height: calc(100svh - 20px); border-radius: 30px; }
  .cdlg .cta-dlg { min-height: min(680px, calc(100svh - 20px)); justify-content: flex-end; align-items: stretch; padding-bottom: 1.75rem; }
  .cdlg .cta-dlg .cta-h { align-self: flex-start; }
  .cdlg-x { top: 14px; right: 14px; background: rgba(255,255,255,.14); }

  /* article splash: keep the scroll cue clear of the buttons */
  .sp { padding-bottom: 6rem; }
}
@media (max-width: 380px) { .cta { padding-inline: 1.15rem; } .cta-mail { padding: 16px 18px; font-size: .95rem; } }
.cta-dlg:focus { outline: none; }
/* tablet widths: keep the nav inside the header bar (an old offset pushed it below) */
@media (min-width: 721px) and (max-width: 1080px) { .nav { position: static; top: auto; left: auto; right: auto; } }
.star-badge { white-space: nowrap; }
.sp-abs a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--c, var(--accent)); text-underline-offset: .2em; text-decoration-thickness: 2px; transition: text-decoration-color .2s; white-space: nowrap; }
.sp-abs a:hover { text-decoration-color: var(--ink); }
.sp-abs a .ext { display: inline-block; margin-left: .15em; font-size: .8em; transition: transform .3s var(--ease); }
.sp-abs a:hover .ext { transform: translate(2px, -2px); }

/* =================== cookie consent (only rendered when ga4_id is set) =================== */
.consent { position: fixed; left: var(--gut); bottom: 18px; z-index: 60; width: min(420px, calc(100vw - 2 * var(--gut))); padding: 18px 18px 16px; border-radius: 22px; background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 0 0 1px rgba(17,17,19,.06), 0 24px 60px rgba(17,17,19,.16); opacity: 0; transform: translateY(16px); transition: opacity .35s var(--ease), transform .5s var(--ease); }
.consent.on { opacity: 1; transform: none; }
.consent p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.consent b { display: block; margin-bottom: 2px; color: var(--ink); font-size: 15px; }
.consent-btns { display: flex; gap: 8px; }
.consent-btns .btn { flex: 1; min-height: 44px; padding: 0 16px; font-size: 14px; }
.ftr-cookies { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.ftr-cookies:hover { color: var(--ink); }
@media (max-width: 720px) { .consent { left: 10px; right: 10px; bottom: 10px; width: auto; } }
