/* Self-hosted fonts (Unbounded, DM Sans, JetBrains Mono) — no requests to Google. */
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(assets/fonts/DMSans-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(assets/fonts/DMSans-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(assets/fonts/JetBrainsMono-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(assets/fonts/JetBrainsMono-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 500 700; font-display: swap; src: url(assets/fonts/Unbounded-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 500 700; font-display: swap; src: url(assets/fonts/Unbounded-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  --bg: #f5f4ef;
  --fg: #141412;
  --mu: #5f5e58;
  --ln: rgba(0, 0, 0, .11);
  --cd: #ffffff;
  --ac: oklch(0.82 0.15 300);
  --shadow-card: 0 10px 28px rgba(0, 0, 0, .08);
  --f-display: 'Unbounded', sans-serif;
  --f-body: 'DM Sans', sans-serif;
  --f-mono: 'JetBrains Mono', monospace;
}
:root[data-theme="dark"] {
  --bg: #0f0f0d;
  --fg: #f3f2ee;
  --mu: #a3a199;
  --ln: rgba(255, 255, 255, .13);
  --cd: #1b1b18;
  --shadow-card: 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  min-height: 100vh;
  transition: background-color .3s, color .3s;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: .7; }
button { font-family: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 4px; }
.contact :focus-visible { outline-color: var(--bg); }
[hidden] { display: none !important; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; }
.skip:focus { top: 12px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.sec { padding-top: 120px; padding-bottom: 120px; border-top: 1px solid var(--ln); }
.ac { color: var(--ac); }
.mb56 { margin-bottom: 56px !important; }
.mb64 { margin-bottom: 64px !important; }

.eyebrow { font: 12px var(--f-mono); color: var(--mu); letter-spacing: .06em; }
.mono-up { font: 12px var(--f-mono); color: var(--mu); letter-spacing: .06em; text-transform: uppercase; }
h2 { margin-top: 14px; font: 600 44px/1.05 var(--f-display); letter-spacing: -0.04em; text-wrap: balance; }

/* ---------- Buttons ---------- */
.pill-btn { font: 500 13px var(--f-body); background: transparent; border: 1px solid var(--ln); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.pill-btn:hover { border-color: var(--fg); }
.pill-ac { display: inline-block; background: var(--ac); color: #121210; border-radius: 999px; padding: 9px 16px; font-size: 13px; font-weight: 700; }
.pill-lg { padding: 14px 22px; font-size: 16px; }
.pill-line { display: inline-block; border: 1px solid currentColor; border-radius: 999px; padding: 14px 22px; font-size: 16px; font-weight: 500; }
.btn-outline { display: inline-block; background: transparent; border: 1px solid var(--fg); border-radius: 999px; padding: 11px 20px; font: 500 14px var(--f-body); cursor: pointer; }
.btn-lg { padding: 13px 24px; font-size: 15px; }
.btn-ghost { padding: 11px 4px; font-size: 14px; color: var(--mu); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--ln); transition: background-color .3s, box-shadow .4s; }
.nav.scrolled { box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .35); }
.nav-in { max-width: 1200px; margin: 0 auto; padding: 18px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.brand { font: 700 15px var(--f-display); }
.nav-links { display: flex; flex-wrap: wrap; gap: 24px; font-size: 14px; color: var(--mu); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-burger { display: none; font: 500 13px var(--f-body); background: transparent; border: 1px solid var(--ln); border-radius: 999px; padding: 8px 14px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 40px; min-height: 720px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.ring { width: 176px; height: 176px; border-radius: 50%; padding: 6px; border: 2px dashed var(--ac); margin-bottom: 32px; }
h1 { margin-top: 20px; font: 700 clamp(48px, 7.5vw, 96px)/0.98 var(--f-display); letter-spacing: -0.05em; }
.hero-sub { margin-top: 28px; max-width: 440px; font-size: 19px; line-height: 1.55; color: var(--mu); text-wrap: pretty; }
.hero-btns { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-links { display: flex; gap: 24px; margin-top: 28px; flex-wrap: wrap; font-size: 15px; }
.hero-links a { display: flex; align-items: center; gap: 8px; }
.mk { width: 8px; height: 8px; flex: none; background: var(--ac); }
.mk-dot { border-radius: 50%; }
.mk-sq { border-radius: 2px; }
.mk-ring { border-radius: 50%; background: none; border: 1.5px solid var(--ac); }

.board { position: relative; height: 600px; border-left: 1px solid var(--ln); user-select: none; -webkit-user-select: none; overflow: hidden; }
.board-hint { position: absolute; bottom: 0; right: 0; font: 11px var(--f-mono); color: var(--mu); padding: 0 4px 2px; }
.hcard { position: absolute; touch-action: none; cursor: grab; box-shadow: var(--shadow-card); }
.hcard.dragging { cursor: grabbing; }
.hcard-ac { background: var(--ac); color: #121210; padding: 18px; border-radius: 8px; }
.hcard-card { background: var(--cd); color: var(--fg); border: 1px solid var(--ln); padding: 18px; border-radius: 12px; }
.hcard-photo { background: #fbfaf6; padding: 10px 10px 12px; border-radius: 3px; }
.hcard-photo .crop { aspect-ratio: 1; width: 100%; }
.hcard-photo .cap { font: 500 13px var(--f-body); color: #333; padding: 12px 2px 2px; }
.hcard-tag { font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; opacity: .65; }
.hcard-title { font: 600 17px/1.3 var(--f-display); letter-spacing: -0.02em; margin-top: 8px; }
.hcard img { pointer-events: none; -webkit-user-drag: none; }

/* ---------- Image crops (zoom + offset from center) ---------- */
.crop { position: relative; overflow: hidden; background: var(--ln); }
.crop, .lb img { -webkit-user-select: none; user-select: none; }
.crop img, .lb img { -webkit-user-drag: none; -webkit-touch-callout: none; }
.crop img { pointer-events: none; position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.js .crop img { opacity: 0; transition: opacity .7s var(--ease), scale .8s var(--ease); }
.js .crop img.ld { opacity: 1; }
.crop-circle { width: 160px; height: 160px; border-radius: 50%; }
.r16 { border-radius: 16px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; }
.about-body { display: flex; flex-direction: column; gap: 22px; max-width: 680px; }
.about-text { display: flex; flex-direction: column; gap: 22px; font-size: 22px; line-height: 1.55; text-wrap: pretty; }
.about-text p:nth-child(2) { color: var(--mu); }
.mosaic { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-rows: 200px 200px; gap: 14px; margin-top: 20px; }
.mosaic .tall { grid-row: span 2; }

/* ---------- Journey ---------- */
.timeline { --dw: 160px; --dot: 40px; position: relative; display: flex; flex-direction: column; }
.timeline::before { content: ''; position: absolute; left: calc(var(--dw) + var(--dot) / 2); top: 8px; bottom: 8px; width: 1px; background: var(--ln); }
.tl-row { display: grid; grid-template-columns: var(--dw) var(--dot) minmax(0, 1fr); padding-bottom: 48px; }
.tl-when { font: 500 13px var(--f-mono); color: var(--mu); padding-top: 4px; }
.tl-dotcol { display: flex; justify-content: center; padding-top: 6px; }
.tl-dot { position: relative; width: 13px; height: 13px; border-radius: 50%; background: var(--ac); box-shadow: 0 0 0 6px var(--bg); transition: box-shadow .3s; }
.tl-dot.next { background: transparent; border: 2px dashed var(--ac); }
.tl-body { padding-left: 24px; max-width: 640px; }
.tl-role { font: 600 22px/1.25 var(--f-display); letter-spacing: -0.03em; }
.tl-org { font-size: 15px; color: var(--mu); margin-top: 6px; }
.tl-note { margin-top: 12px; font-size: 17px; line-height: 1.55; text-wrap: pretty; }

/* ---------- Cards (skills / leadership / awards) ---------- */
.grid-skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 20px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.card { background: var(--cd); border: 1px solid var(--ln); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 22px; position: relative; overflow: hidden; transition: background-color .3s; }
.card-sm { gap: 14px; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.mono-label { font: 500 12px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mu); }
.card-name { font: 600 26px/1.15 var(--f-display); letter-spacing: -0.03em; margin-top: 10px; }
.card-line { font-size: 15px; color: var(--mu); margin-top: 8px; max-width: 260px; }
.sub-label { font: 500 12px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mu); margin-bottom: 16px; }
.sub-label-2 { margin-top: 48px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 20px; border-top: 1px dashed var(--ln); }
.pills li { display: flex; align-items: center; gap: 8px; border: 1px solid var(--ln); border-radius: 999px; padding: 7px 13px 7px 9px; font-size: 14px; }
.pills li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ac); flex: none; }

.gfx { position: relative; flex: none; }
.gfx-120 { width: 120px; height: 120px; }
.gfx > * { position: absolute; }
.gfx-row { height: 120px; margin-bottom: 10px; }
.l-title { font: 600 21px/1.25 var(--f-display); letter-spacing: -0.03em; }
.l-sub { font-size: 16px; line-height: 1.5; color: var(--mu); }
.l-desc { font-size: 15px; line-height: 1.55; color: var(--fg); padding-top: 14px; border-top: 1px dashed var(--ln); margin-top: auto; text-wrap: pretty; }
.l-when { font: 500 12px var(--f-mono); color: var(--mu); }

.medal-wrap { height: 120px; margin-bottom: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ribbons { display: flex; gap: 6px; height: 26px; padding-left: 22px; }
.ribbons span { width: 14px; height: 28px; background: var(--ac); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); }
.disc { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.disc-silver { background: radial-gradient(circle at 32% 28%, #f4f5f7, #9aa0a8); }
.disc-bronze { background: radial-gradient(circle at 32% 28%, #f1c79a, #a8683a); }
.disc > div { width: 62px; height: 62px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .55); display: grid; place-items: center; font: 700 13px var(--f-display); color: #1a1408; }

/* ---------- Education ---------- */
.edu { display: flex; flex-direction: column; }
.edu-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; padding: 36px 0; border-top: 1px solid var(--ln); }
.edu-row:last-child { border-bottom: 1px solid var(--ln); }
.edu-school { font: 600 26px/1.2 var(--f-display); letter-spacing: -0.03em; }
.edu-place { font-size: 15px; color: var(--mu); margin-top: 8px; }
.edu-line { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.edu-deg { font-size: 19px; font-weight: 500; }
.edu-dates { font: 13px var(--f-mono); color: var(--mu); }
.course-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.course-pills li { border: 1px solid var(--ln); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.course-pills li.hl { background: var(--ac); color: #121210; border-color: transparent; }

/* ---------- Projects ---------- */
.proj-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin: 14px 0 40px; }
.proj-head h2 { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { font: 500 14px var(--f-body); cursor: pointer; border-radius: 999px; padding: 9px 16px; border: 1px solid var(--ln); background: transparent; color: var(--fg); }
.filter span { opacity: .55; font-size: 12px; margin-left: 2px; }
.filter[aria-pressed="true"] { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.filter[aria-pressed="false"]:hover { border-color: var(--fg); }

.grid-proj { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 36px 28px; }
.proj { display: flex; flex-direction: column; gap: 14px; }
.cover { display: block; width: 100%; padding: 0; aspect-ratio: 16/10; position: relative; border-radius: 16px; border: 1px solid var(--ln); background-color: var(--cd); background-image: radial-gradient(var(--ln) 1px, transparent 1px); background-size: 18px 18px; overflow: hidden; cursor: pointer; transition: transform .25s, border-color .25s, background-color .3s; }
.cover:hover { transform: translateY(-4px); border-color: var(--fg); }
.cover-art { position: absolute; left: 50%; top: 50%; width: 220px; height: 130px; transform: translate(-50%, -50%); pointer-events: none; }
.cover-num { position: absolute; left: 16px; bottom: 14px; font: 500 11px var(--f-mono); color: var(--mu); }
.proj-type { display: flex; gap: 10px; align-items: center; font: 500 12px var(--f-mono); color: var(--mu); }
.proj-type::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ac); flex: none; }
.proj-name { font: 600 21px/1.25 var(--f-display); letter-spacing: -0.03em; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.proj-blurb { font-size: 16px; line-height: 1.55; color: var(--mu); text-wrap: pretty; }
.proj-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 14px; font-weight: 500; margin-top: auto; }
.proj-actions button { font: 500 14px var(--f-body); background: var(--fg); color: var(--bg); border: 0; border-radius: 999px; padding: 9px 16px; cursor: pointer; }
.proj-actions a { border-bottom: 1px solid var(--fg); padding-bottom: 2px; }
.more-wrap { display: flex; justify-content: center; margin-top: 56px; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 500; background: rgba(10, 10, 8, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { background: var(--bg); color: var(--fg); border: 1px solid var(--ln); border-radius: 24px; max-width: 720px; width: 100%; max-height: 86vh; overflow: auto; padding: 40px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.modal:focus { outline: none; }
.modal-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.modal-title { margin-top: 20px; font: 600 32px/1.15 var(--f-display); letter-spacing: -0.03em; }
.modal-part { margin-top: 24px; }
.modal-part .mono-label { margin-bottom: 8px; }
.modal-part p { font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.modal-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--ln); }
.modal-links a { background: var(--ac); color: #121210; border-radius: 999px; padding: 11px 18px; font-size: 14px; font-weight: 700; }

/* ---------- Photography ---------- */
.photo-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 56px; }
.photo-cap { font-size: 16px; color: var(--mu); text-align: right; max-width: 340px; }
.masonry { columns: 3 280px; column-gap: 20px; }
@media (min-width: 944px) { .ph.col-start { break-before: column; } }
.ph { display: block; width: 100%; padding: 0; border: 0; margin: 0 0 20px; break-inside: avoid; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--ln); position: relative; }
.ph .crop { position: absolute; inset: 0; border-radius: 0; }

/* ---------- Lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 600; background: rgba(10, 10, 8, .94); display: flex; align-items: center; justify-content: center; padding: 56px 72px; }
.lb:focus { outline: none; }
.lb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb-btn { position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); color: #f3f2ee; font-size: 18px; cursor: pointer; display: grid; place-items: center; }
.lb-btn:hover { background: rgba(255, 255, 255, .2); }
.lb :focus-visible { outline-color: #f3f2ee; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font: 12px var(--f-mono); color: rgba(243, 242, 238, .7); }

/* ---------- Contact ---------- */
.contact { background: var(--fg); color: var(--bg); transition: background-color .3s, color .3s; }
.contact-in { padding-top: 120px; padding-bottom: 48px; }
.contact .eyebrow { color: inherit; opacity: .6; }
.contact-h { margin-top: 18px; font: 700 clamp(40px, 8vw, 80px)/1 var(--f-display); letter-spacing: -0.05em; max-width: 900px; }
.contact-p { margin-top: 28px; font-size: 19px; line-height: 1.55; opacity: .7; max-width: 520px; }
.contact-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.contact .pill-ac { color: #121210; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 120px; padding-top: 24px; border-top: 1px solid rgba(128, 128, 128, .35); font: 12px var(--f-mono); opacity: .7; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; gap: 28px; }
  .edu-row { grid-template-columns: 1fr; gap: 16px; }
  .photo-cap { text-align: left; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 64px; }
  .wrap { padding-left: 20px; padding-right: 20px; }
  .nav-in { padding: 12px 20px; gap: 12px; }
  .nav-burger { display: inline-block; order: 2; }
  .nav-actions { order: 3; }
  .nav-links { display: none; order: 4; flex-basis: 100%; flex-direction: column; gap: 0; padding-top: 4px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-top: 1px solid var(--ln); font-size: 16px; }
  .nav-actions .pill-ac { display: none; }
  .sec { padding-top: 80px; padding-bottom: 80px; }
  .contact-in { padding-top: 80px; }
  h2 { font-size: 32px; }
  .hero { min-height: 0; padding-top: 40px; gap: 24px; }
  .board { border-left: 0; border-top: 1px solid var(--ln); height: 560px; }
  .mosaic { grid-template-rows: 150px 150px; }
  .about-text { font-size: 19px; }
  .timeline { --dw: 84px; --dot: 28px; }
  .tl-body { padding-left: 14px; }
  .tl-role { font-size: 18px; }
  .card { padding: 22px; }
  .card-top { flex-direction: column-reverse; }
  .modal { padding: 24px; border-radius: 20px; }
  .modal-title { font-size: 24px; }
  .lb { padding: 64px 12px; }
  .foot { margin-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .cover:hover { transform: none; }
}

/* ---------- Motion ---------- */
:root { --ease: cubic-bezier(.2, .7, .2, 1); --ease-io: cubic-bezier(.65, 0, .35, 1); }

@keyframes rise { from { opacity: 0; translate: 0 28px; } }
@keyframes pop { from { opacity: 0; translate: 0 36px; scale: .92; } }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet { from { opacity: 0; translate: 0 24px; scale: .96; } }
@keyframes dotpop { from { scale: 0; } }
@keyframes spin-in { from { opacity: 0; scale: .8; rotate: -20deg; } }

/* scroll progress */
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--ac); transform: scaleX(0); transform-origin: left; pointer-events: none; }

/* scroll reveal: elements start hidden only when JS is running */
.js [data-reveal]:not(.in) { opacity: 0; }
.js [data-reveal].in { animation: rise .9s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal].in.seen { animation: none; }

/* timeline line draws itself; dots pop */
.js .timeline::before { transform: scaleY(0); transform-origin: top; transition: transform 1.6s var(--ease-io); }
.js .timeline.in::before { transform: scaleY(1); }
.js .tl-row.in .tl-dot { animation: dotpop .6s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 90ms + 250ms); }

/* hero entrance */
.js .hero-l > * { animation: rise 1s var(--ease) backwards; animation-delay: calc(var(--h, 0) * 90ms + 80ms); }
.js .hero-l > .ring { animation-name: spin-in; }
.js .hero-l > :nth-child(1) { --h: 0; } .js .hero-l > :nth-child(2) { --h: 1; } .js .hero-l > :nth-child(3) { --h: 2; }
.js .hero-l > :nth-child(4) { --h: 3; } .js .hero-l > :nth-child(5) { --h: 4; } .js .hero-l > :nth-child(6) { --h: 5; }
.js .board .hcard { animation: pop 1.1s var(--ease) backwards; }
.js .board .hcard:nth-of-type(1) { animation-delay: .45s; } .js .board .hcard:nth-of-type(2) { animation-delay: .6s; } .js .board .hcard:nth-of-type(3) { animation-delay: .75s; }
.js .board-hint { animation: fade 1s 1.4s backwards; }
.hcard { transition: box-shadow .3s; }
.hcard:hover, .hcard.dragging { box-shadow: 0 22px 44px rgba(0, 0, 0, .22); }

/* nav links: sliding underline */
.nav-links a { position: relative; transition: color .25s; }
.nav-links a:hover { opacity: 1; color: var(--fg); }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--fg); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav-links a:hover::after { transform: scaleX(1); }

/* buttons & pills: lift + smooth color */
.pill-btn, .pill-ac, .pill-line, .btn-outline, .filter, .proj-actions button, .modal-links a, .lb-btn { transition: transform .3s var(--ease), background-color .25s, color .25s, border-color .25s, box-shadow .3s; }
.pill-ac:hover, .pill-line:hover, .btn-outline:hover, .proj-actions button:hover, .modal-links a:hover { opacity: 1; transform: translateY(-2px); }
.pill-ac:hover, .modal-links a:hover { box-shadow: 0 8px 20px -8px var(--ac); }
.btn-outline:hover { background: var(--fg); color: var(--bg); }
.pill-line:hover { background: var(--bg); color: var(--fg); }
.pill-btn:active, .pill-ac:active, .btn-outline:active, .pill-line:active, .proj-actions button:active { transform: translateY(0) scale(.97); }
.btn-ghost { transition: transform .3s var(--ease), color .25s; }
.btn-ghost:hover { opacity: 1; color: var(--fg); transform: translateY(2px); }
.hero-links a { transition: transform .3s var(--ease), opacity .2s; }
.hero-links a:hover { transform: translateX(3px); }
.proj-actions a { transition: border-color .25s, opacity .2s; }
.proj-actions a:hover { opacity: 1; border-color: var(--ac); }

/* cards */
.card { transition: background-color .3s, transform .5s var(--ease), border-color .3s, box-shadow .5s var(--ease); }
.card:hover { transform: translateY(-4px); border-color: var(--fg); box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .35); }
.gfx > * { transition: transform .7s var(--ease); }
.card:hover .gfx-120 > :nth-child(2) { transform: translateX(8px); }
.card:hover .gfx-120 > :nth-child(3) { transform: translateX(-4px); }
.pills li { transition: background-color .25s, border-color .25s; }
.pills li:hover { border-color: var(--fg); }
.course-pills li { transition: border-color .25s; }
.course-pills li:hover { border-color: var(--fg); }

/* project covers: graphic eases up on hover */
.cover-art { transition: transform .6s var(--ease); }
.cover:hover .cover-art { transform: translate(-50%, -50%) scale(1.06); }
.proj-name { background-image: linear-gradient(var(--ac), var(--ac)); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .45s var(--ease); }
.proj:hover .proj-name { background-size: 100% 2px; }

/* photography */
.ph:hover .crop img { scale: 1.05; }
.ph { transition: box-shadow .5s var(--ease); }
.ph:hover { box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .45); }

/* overlays */
.modal-back:not([hidden]) { animation: fade .3s ease backwards; }
.modal-back:not([hidden]) .modal { animation: sheet .5s var(--ease) backwards; }
.lb:not([hidden]) { animation: fade .3s ease backwards; }
.lb img.swap { animation: fade .45s var(--ease); }

/* theme change: the new theme grows from the toggle as a circle (clip-path animated in JS) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; animation-timing-function: ease; }
.vt-theme::view-transition-old(root), .vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.vt-theme::view-transition-old(root) { z-index: 1; }
.vt-theme::view-transition-new(root) { z-index: 2; }
.vt-theme *, .vt-theme *::before, .vt-theme *::after { transition: none !important; }

/* hero headline: each line slides up from behind a mask, the dot lands last */
.mask { display: block; overflow: hidden; padding: 0 1em .12em 0; margin: 0 -1em -.12em 0; }
.rise { display: inline-block; white-space: nowrap; }
.js .rise { animation: maskup 1.1s var(--ease) backwards; }
.js .mask:nth-child(1) .rise { animation-delay: .15s; }
.js .mask:nth-child(2) .rise { animation-delay: .3s; }
.js .dotp { display: inline-block; animation: dotland .7s cubic-bezier(.3, 1.6, .5, 1) 1.1s backwards; }
.js .hero-l > h1 { animation: none; }
@keyframes maskup { from { translate: 0 110%; } }
@keyframes dotland { from { opacity: 0; translate: 0 -.6em; scale: .2; } }

/* timeline: accent line fills with scroll; dots light up once passed */
.timeline::after { content: ''; position: absolute; left: calc(var(--dw) + var(--dot) / 2 - .5px); top: 8px; width: 2px; height: calc((100% - 16px) * var(--p, 0)); background: var(--ac); border-radius: 2px; pointer-events: none; }
.tl-dot:not(.next) { background: var(--cd); border: 2px solid var(--ln); transition: background-color .5s, border-color .5s, box-shadow .5s, scale .5s var(--ease); }
.tl-dot:not(.next).lit { background: var(--ac); border-color: var(--ac); scale: 1.15; box-shadow: 0 0 0 6px var(--bg), 0 0 0 10px color-mix(in oklab, var(--ac) 40%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal]:not(.in) { opacity: 1; }
  .js .timeline::before { transform: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card:hover, .pill-ac:hover, .pill-line:hover, .btn-outline:hover, .proj-actions button:hover, .modal-links a:hover, .hero-links a:hover, .btn-ghost:hover { transform: none; }
  .cover:hover .cover-art { transform: translate(-50%, -50%); }
  .ph:hover .crop img { scale: 1; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
