/* truongson.me: hand-built successor to the original Framer design. */

/* Fonts: DM Sans and Libre Baskerville (SIL Open Font License 1.1), served
   from this site with Google Fonts' subsets so pages need no third-party server. */
/* latin-ext */
@font-face { font-family: "DM Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/dm-sans-italic-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; }
/* latin */
@font-face { font-family: "DM Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/dm-sans-italic-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; }
/* latin-ext */
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/assets/fonts/dm-sans-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; }
/* latin */
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/assets/fonts/dm-sans-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; }
/* latin-ext */
@font-face { font-family: "Libre Baskerville"; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/libre-baskerville-italic-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; }
/* latin */
@font-face { font-family: "Libre Baskerville"; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/libre-baskerville-italic-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; }
/* latin-ext */
@font-face { font-family: "Libre Baskerville"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/libre-baskerville-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; }
/* latin */
@font-face { font-family: "Libre Baskerville"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/libre-baskerville-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f8f6f3;
  --paper-2: #eeebe6;
  --paper-3: #e4e0d9;
  --line: #dfdad2;
  --navy: #001666;
  --navy-2: #172a85;
  --orange: #ff5900;
  --orange-2: #e54f00;
  --sky: #cadcfc;
  --ink: #26292b;
  --body: #4a4d4f;
  --muted: #77736c;
  --panel: #272e31;
  --panel-2: #313a3e;
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1200px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.7, 0, 0.3, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  /* GSAP's elastic.out(1, 0.6), sampled; browsers without linear() keep the overshoot curve. */
  --ease-elastic: cubic-bezier(0.34, 1.4, 0.64, 1);
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* clip (not hidden) so entrance animations can't widen the page and sticky still works. */
html, body { overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
::selection { background: var(--orange); color: #fff; }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  padding: 10px 16px; border-radius: 999px; background: var(--navy); color: #fff;
  text-decoration: none; transform: translateY(-160%); transition: transform .2s;
}
.skip-link:focus { transform: none; }

/* ------------------------------------------------------------------ type */

.section-head { display: grid; justify-items: center; gap: 18px; text-align: center; padding-inline: var(--gutter); }
.section-icon { width: 76px; height: 76px; overflow: visible; }
.section-title {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  color: var(--navy); font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.12; letter-spacing: -0.01em;
  text-wrap: balance;
}
.section-title--xl { font-size: clamp(2.6rem, 7.4vw, 5.4rem); line-height: 1.04; max-width: 17ch; }
.section-lede { color: var(--muted); font-size: clamp(1.02rem, 1.6vw, 1.2rem); max-width: 46ch; text-wrap: pretty; }

.split-line { overflow: clip; padding: 0 0.14em 0.14em; margin: 0 -0.14em -0.14em; }

/* ------------------------------------------------------------------- nav */

.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 80; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--orange); transform-origin: left; transform: scaleX(0); }

.nav-wrap {
  position: fixed; top: 14px; left: 50%; z-index: 70;
  transform: translateX(-50%);
  transition: transform .5s var(--ease-out);
  view-transition-name: site-nav;
}
.nav-wrap.is-hidden { transform: translate(-50%, -140%); }
.nav-wrap.is-hidden:focus-within { transform: translateX(-50%); }
.nav {
  display: flex; align-items: center; gap: clamp(28px, 6vw, 64px);
  padding: 10px 26px; border-radius: 999px;
  border: 1px solid transparent;
  transition: background .4s, border-color .4s, box-shadow .4s, padding .4s;
}
.nav-wrap.is-scrolled .nav {
  background: rgb(248 246 243 / 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border-color: rgb(0 22 102 / 0.08);
  box-shadow: 0 10px 30px -18px rgb(0 22 102 / 0.35);
}
.nav-link {
  position: relative; text-decoration: none; font-size: 0.95rem; color: var(--body);
  padding: 4px 0;
}
.nav-link span { background: linear-gradient(var(--orange), var(--orange)) no-repeat left bottom / 0 1.5px; transition: background-size .35s var(--ease-out), color .2s; padding-bottom: 2px; }
.nav-link:hover span, .nav-link[aria-current="page"] span { background-size: 100% 1.5px; color: var(--navy); }

.logo {
  font-family: var(--serif); font-size: 1.32rem; color: var(--orange); text-decoration: none; letter-spacing: -0.01em;
  display: inline-block; transition: transform .3s var(--ease-out);
}
.logo em { font-style: italic; }
.logo:hover { transform: rotate(-3deg) scale(1.04); }

/* --------------------------------------------------------------- buttons */

.btn {
  --bg: transparent; --fg: var(--navy);
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; border: 1.5px solid var(--navy);
  background: var(--bg); color: var(--fg); text-decoration: none; font-weight: 500; font-size: 1rem;
  overflow: hidden; isolation: isolate; transition: color .3s, border-color .3s, background .3s;
}
.btn small { font-size: 0.75em; opacity: 0.75; font-weight: 400; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--navy); transform: translateY(101%); transition: transform .45s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn--ghost:hover, .btn--ghost:focus-visible { color: #fff; }
.btn--orange { --bg: var(--orange); --fg: #fff; border-color: var(--orange); }
.btn--orange::before { background: var(--navy); }
.btn--orange:hover { border-color: var(--navy); }
.arrow { width: 1em; height: 1em; flex: none; transition: transform .35s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }
.btn:hover .arrow--ext { transform: translate(2px, -2px); }

.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 64px; padding-inline: var(--gutter); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 6px 14px; border-radius: 999px; background: var(--panel); color: #fff;
  font-size: 0.85rem; font-weight: 500; line-height: 1.3;
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative; display: grid; justify-items: center; text-align: center;
  padding: clamp(110px, 16vh, 150px) var(--gutter) 64px;
  max-width: 1180px; margin: 0 auto; min-height: min(100svh, 980px); align-content: center;
}
.hero-icons { position: absolute; inset: 0; pointer-events: none; }
.hero-icon { position: absolute; display: block; pointer-events: auto; width: clamp(84px, 13vw, 168px); aspect-ratio: 1; border-radius: 26%; }
.hero-icon-tilt { display: block; width: 100%; height: 100%; border-radius: inherit; }
.hero-icon--walley .hero-icon-tilt { transform: rotate(-18deg); }
.hero-icon--aware .hero-icon-tilt { transform: rotate(14deg); }
.hero-icon-face {
  display: block; width: 100%; height: 100%; border-radius: inherit; overflow: hidden;
  box-shadow: 0 30px 50px -28px rgb(0 22 102 / 0.55); transition: box-shadow .3s;
}
.hero-icon img { width: 100%; height: 100%; object-fit: cover; }
.hero-icon--walley { top: clamp(84px, 13vh, 120px); left: clamp(0px, 5vw, 70px); }
.hero-icon--aware { top: clamp(100px, 15vh, 140px); right: clamp(0px, 5vw, 70px); }
.hero-icon--aware .hero-icon-face { background: #fff; }
.hero-icon--aware img { object-fit: contain; padding: 14%; }
.hero-icon:hover .hero-icon-face { box-shadow: 0 40px 60px -26px rgb(0 22 102 / 0.65); }

.portrait { position: relative; width: clamp(150px, 17vw, 210px); aspect-ratio: 1; margin-bottom: 34px; }
.portrait img { position: absolute; inset: 7%; width: 86%; height: 86%; border-radius: 50%; object-fit: cover; }
.portrait-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.portrait-ring circle { fill: none; stroke: var(--panel); stroke-width: 4; }

.hero-title {
  font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--navy);
  font-size: clamp(1.85rem, 3.8vw, 3rem); line-height: 1.22; max-width: 21ch; letter-spacing: -0.01em; text-wrap: balance;
}
.hero-title .accent { position: relative; color: var(--orange); }
.nowrap { white-space: nowrap; }
.scribble { position: absolute; left: -2%; right: -2%; bottom: -0.32em; width: 104%; height: 0.42em; overflow: visible; }
.scribble path { fill: none; stroke: var(--orange); stroke-width: 3.2; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: 0.55; }
.hero-sub { margin-top: 18px; color: var(--body); font-size: 1.02rem; }
.hero-sub .heart { display: inline-block; }
.hero-title .w, .hero-sub .c { display: inline-block; }
.hero-sub .cw { display: inline-block; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.scroll-cue {
  display: block; width: 24px; height: 38px; margin-top: 46px; border-radius: 14px;
  border: 1.5px solid rgb(0 22 102 / 0.35); position: relative;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: var(--orange); animation: cue 1.8s var(--ease-in-out) infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 80%, 100% { transform: translateY(14px); opacity: 0; } }

/* Hero intro. Plain CSS, so it plays as soon as the page paints instead of
   waiting for the animation scripts, which matters on slow connections.
   Words and letters are split at build time; "backwards" holds each piece
   hidden until its turn and then hands it back to the normal styles. */
.hero-icon--walley { --n: 0; --spin: -40deg; --float: 3s; --bob: 9%; --sway: -4deg; }
.hero-icon--aware { --n: 1; --spin: 40deg; --float: 4s; --bob: -9%; --sway: 4deg; }

@media (prefers-reduced-motion: no-preference) {
  .hero .portrait img { animation: hero-portrait 1.4s var(--ease-expo) .15s backwards; }
  .portrait-ring circle { stroke-dasharray: 302; animation: hero-ring 1.5s var(--ease-in-out) .15s backwards; }
  .hero-icon-tilt {
    animation:
      hero-icon 1.4s var(--ease-elastic) calc(.7s + var(--n) * .12s) backwards,
      icon-float var(--float) ease-in-out calc(2.1s + var(--n) * .12s) infinite alternate;
  }
  .hero-title .w { animation: hero-word 1.1s var(--ease-expo) calc(.5s + var(--i) * .05s) backwards; }
  .scribble { animation: hero-scribble 1.1s cubic-bezier(0.45, 0, 0.55, 1) 1.25s backwards; }
  .hero-sub .c { animation: hero-char .7s cubic-bezier(0.34, 1.75, 0.64, 1) calc(1.1s + var(--i) * .012s) backwards; }
  .hero-sub .heart { animation: hero-heart .8s cubic-bezier(0.34, 2.2, 0.64, 1) 1.55s backwards, heart-beat 2.5s ease-in-out 2.4s infinite; }
  .hero .scroll-cue { animation: fade-in .8s var(--ease-expo) 1.95s backwards; }
}
@supports (animation-timing-function: linear(0, 1)) {
  :root { --ease-elastic: linear(0, 0.188, 0.388, 0.58, 0.75, 0.891, 1, 1.077, 1.125, 1.149, 1.153, 1.144, 1.125, 1.102, 1.077, 1.053, 1.031, 1.014, 1, 0.99, 0.984, 0.981, 0.981, 0.982, 0.984, 0.987, 0.99, 0.993, 0.996, 0.998, 1, 1.001, 1.002, 1.002, 1.002, 1.002, 1.002, 1.002, 1.001, 1.001, 1); }
}
@keyframes hero-portrait { from { clip-path: circle(0% at 50% 50%); scale: 1.25; } to { clip-path: circle(50% at 50% 50%); scale: 1; } }
@keyframes hero-ring { from { stroke-dashoffset: 302; } to { stroke-dashoffset: 0; } }
@keyframes hero-icon { from { opacity: 0; translate: 0 -160px; scale: 0.6; rotate: var(--spin); } }
@keyframes icon-float { to { translate: 0 var(--bob); rotate: var(--sway); } }
@keyframes hero-word { from { opacity: 0; transform: translateY(34px) rotateX(-50deg); filter: blur(6px); } }
@keyframes hero-scribble { from { clip-path: inset(-60% 102% -60% -2%); } to { clip-path: inset(-60% -2% -60% -2%); } }
@keyframes hero-char { from { opacity: 0; transform: translateY(16px); } }
@keyframes hero-heart { from { transform: scale(0) rotate(-30deg); } }
@keyframes heart-beat { 0%, 36%, 100% { transform: scale(1); } 18% { transform: scale(1.18); } }
@keyframes fade-in { from { opacity: 0; } }

/* Page-top intros on the other pages (project, works, contact, 404): CSS for
   the same reason as the hero, so headings never wait on the motion script. */
.intro-title .w { display: inline-block; }
.motion .intro-head .section-icon { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .intro-title .w { animation: title-word 1.15s var(--ease-expo) calc(.12s + var(--i) * .045s) backwards; }
  .intro { animation: rise 1s var(--ease-expo) var(--delay, .3s) backwards; }
  .intro-head .section-icon { animation: icon-pop 1.2s cubic-bezier(0.34, 2, 0.64, 1) backwards; }
}
@keyframes title-word { from { opacity: 0; transform: translateY(70%) rotate(5deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes icon-pop { from { opacity: 0; transform: translateY(20px) scale(0.4) rotate(-25deg); } }

/* ------------------------------------------------------------ sneak peek */

.peek { padding-top: clamp(60px, 10vh, 110px); }
.marquee {
  /* Extra bottom padding (cancelled by the negative margin) leaves room for the
     lifted card's shadow inside the clipped marquee. */
  margin-top: 40px; margin-bottom: -50px; overflow-x: auto; scrollbar-width: none; padding-block: 34px 84px;
  scroll-snap-type: x proximity;
}
.marquee::-webkit-scrollbar { display: none; }
.motion-ready .marquee.is-live { overflow: hidden; scroll-snap-type: none; }
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-list { display: flex; gap: clamp(14px, 2vw, 24px); padding-right: clamp(14px, 2vw, 24px); }
.marquee:not(.is-live) .marquee-list[aria-hidden] { display: none; }
.marquee:not(.is-live) .marquee-list { padding-left: var(--gutter); }
.peek-card { width: clamp(196px, 21vw, 280px); aspect-ratio: 5 / 7; flex: none; scroll-snap-align: center; }
.peek-link {
  position: relative; display: block; width: 100%; height: 100%; border-radius: 10px; overflow: hidden;
  background: var(--paper-3); box-shadow: 0 24px 40px -30px rgb(0 0 0 / 0.55);
  transform: translateZ(0); transition: transform .6s var(--ease-out), box-shadow .6s;
}
.peek-art, .peek-baked { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.peek-fg {
  position: absolute; left: 50%; top: 50%; height: 80%; width: auto; max-width: none;
  transform: translate(-50%, -50%); filter: drop-shadow(0 18px 18px rgb(0 0 0 / 0.38));
  transition: transform .8s var(--ease-out);
}
.peek-fg--object { height: 88%; filter: drop-shadow(0 22px 16px rgb(0 0 0 / 0.3)); }
.placard {
  position: absolute; left: 10px; right: 10px; bottom: 10px; display: grid; gap: 2px;
  padding: 10px 12px; border-radius: 8px; background: rgb(248 246 243 / 0.94);
  box-shadow: 0 10px 24px -12px rgb(0 0 0 / 0.5); text-align: left;
  transform: translateY(calc(100% + 14px)); transition: transform .6s var(--ease-out);
}
.placard-project { font-weight: 600; font-size: 0.82rem; color: var(--navy); }
.placard-screen { font-size: 0.78rem; color: var(--muted); }
.peek-link:hover, .peek-link:focus-visible { transform: translateY(-8px) rotate(-1deg); box-shadow: 0 36px 50px -30px rgb(0 0 0 / 0.6); }
.peek-link:hover .peek-art, .peek-link:hover .peek-baked, .peek-link:focus-visible .peek-art { transform: scale(1.09); }
.peek-link:hover .peek-fg, .peek-link:focus-visible .peek-fg { transform: translate(-50%, -57%) rotate(-3deg) scale(0.94); }
.peek-link:hover .placard, .peek-link:focus-visible .placard { transform: none; }
@media (hover: none) { .placard { transform: none; } .peek-fg { transform: translate(-50%, -56%) scale(0.92); } }

/* ----------------------------------------------------------------- work */

.work { padding: clamp(110px, 16vh, 170px) 0 0; }
.card-grid { display: grid; gap: clamp(18px, 2.4vw, 28px); max-width: var(--maxw); margin: 64px auto 0; padding-inline: var(--gutter); }
.card-grid--featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid--all { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }

.card { border-radius: 26px; background: var(--paper-2); transition: transform .5s var(--ease-out), background .4s; }
.card-link { display: flex; flex-direction: column; height: 100%; padding: 14px; text-decoration: none; color: inherit; border-radius: inherit; }
.card-cover { border-radius: 16px; overflow: hidden; transform: translateZ(0); }
.card-body { display: grid; gap: 10px; padding: 24px 10px 12px; align-content: start; flex: 1; }
.card-kicker { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
/* Year and kind sit side by side, separated by space and a hairline rule, not a glyph. */
.card-kicker, .eyebrow, .next-kind { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
.card-kicker span + span, .eyebrow span + span, .next-kind span + span { display: inline-flex; align-items: center; gap: 12px; }
.card-kicker span + span::before, .eyebrow span + span::before, .next-kind span + span::before { content: ""; width: 14px; height: 1px; background: currentColor; opacity: 0.5; }
.card-title { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.15; color: var(--ink); letter-spacing: -0.01em; }
.card-grid--all .card-title { font-size: 1.6rem; }
.card-arrow { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--paper); color: var(--navy); transition: transform .45s var(--ease-out), background .3s, color .3s; }
.card-arrow .arrow { width: 16px; height: 16px; }
.card-text { color: var(--muted); font-size: 1rem; max-width: 52ch; }
.card .tags { margin-top: 8px; }
.card:hover { transform: translateY(-6px); background: var(--paper-3); }
.card:hover .card-arrow { background: var(--orange); color: #fff; transform: rotate(-45deg); }
.card:hover .cover-art, .card:hover .cover-img { scale: 1.05; }

/* --------------------------------------------------------------- covers */

.cover {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; container-type: inline-size;
  background: var(--paper-3); isolation: isolate; border-radius: inherit;
}
.cover-art, .cover-img {
  position: absolute; inset: -4%; width: 108%; height: 108%; max-width: none; object-fit: cover;
  transition: scale 1.2s var(--ease-out);
}
/* A ~24px blurred copy (inlined by the templates) fills the frame until the
   full image arrives; the browser's smooth upscaling does the blurring. */
.has-preview { background-size: cover; background-position: center; background-repeat: no-repeat; }
.cover-phones { position: absolute; inset: 0; }
/* Wrappers hold the static position and tilt; motion only moves the inner image. */
.cover-phone { position: absolute; aspect-ratio: 502 / 966; filter: drop-shadow(0 2.4cqw 2cqw rgb(0 0 0 / 0.38)); }
.cover-phone img, .cover-object img { width: 100%; height: 100%; max-width: none; }
.cover-phone--2 { height: 86%; top: 7%; left: 50%; transform: translateX(-50%); z-index: 2; }
.cover-phone--1 { height: 72%; top: 15%; left: 27%; transform: translateX(-50%) rotate(-7deg); }
.cover-phone--3 { height: 72%; top: 15%; left: 73%; transform: translateX(-50%) rotate(7deg); }
.cover-object { position: absolute; height: 92%; top: 4%; left: 50%; transform: translateX(-50%); filter: drop-shadow(0 2cqw 1.6cqw rgb(0 0 0 / 0.28)); }

.cover--browser { display: grid; place-items: center; }

/* Safari window at macOS proportions. --u is one point of the window at its
   native size (the screenshot's width), scaled to the cover. */
.browser {
  --u: calc(80cqw / var(--page-w, 1356) * 1.18);
  position: relative; width: 80%; overflow: hidden; background: #fff;
  border-radius: calc(var(--u) * 12);
  box-shadow: 0 0 0 max(0.5px, calc(var(--u) * 0.5)) rgb(0 0 0 / 0.22), 0 2.4cqw 6cqw -0.6cqw rgb(0 0 0 / 0.38), 0 0.5cqw 1.4cqw rgb(0 0 0 / 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif;
}
.browser img { display: block; width: 100%; height: auto; }
.safari-bar {
  position: relative; display: flex; align-items: center; height: calc(var(--u) * 52);
  padding: 0 calc(var(--u) * 16) 0 calc(var(--u) * 14); background: var(--bar, #f6f5f4);
  border-bottom: max(0.5px, calc(var(--u) * 1)) solid rgb(0 0 0 / 0.1);
}
.traffic { display: inline-flex; gap: calc(var(--u) * 8); margin-right: calc(var(--u) * 26); }
.traffic i { width: calc(var(--u) * 12); height: calc(var(--u) * 12); border-radius: 50%; box-shadow: inset 0 0 0 max(0.5px, calc(var(--u) * 0.5)) rgb(0 0 0 / 0.14); }
.traffic i:nth-child(1) { background: #ff5f57; }
.traffic i:nth-child(2) { background: #febc2e; }
.traffic i:nth-child(3) { background: #28c840; }
.sf { display: inline-flex; align-items: center; gap: calc(var(--u) * 20); color: rgb(0 0 0 / 0.5); }
.sf svg, .safari-url svg { height: calc(var(--u) * 16); width: auto; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sf--sidebar { margin-right: calc(var(--u) * 22); }
.sf--nav svg + svg { opacity: 0.45; }
.sf--right { margin-left: auto; gap: calc(var(--u) * 22); }
.safari-url {
  position: absolute; left: 50%; top: 50%; width: 44%; height: calc(var(--u) * 32); transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center; border-radius: calc(var(--u) * 9);
  background: rgb(0 0 0 / 0.07); color: rgb(0 0 0 / 0.78);
  font-size: calc(var(--u) * 13); font-weight: 500; letter-spacing: -0.01em; white-space: nowrap;
}
.safari-url span { overflow: hidden; text-overflow: ellipsis; }
.safari-url svg { position: absolute; right: calc(var(--u) * 10); height: calc(var(--u) * 12); color: rgb(0 0 0 / 0.45); }
.cover--paper { background: radial-gradient(120% 90% at 20% 0%, #fff 0%, #f3ede4 45%, #f0d9c8 100%); }
.cover--lilac { background: linear-gradient(170deg, #b8bde8 0%, #d9d3ee 45%, #f5e4dc 100%); }
.browser-dots { display: inline-flex; gap: 0.7cqw; }
.browser-dots i { width: 1.1cqw; height: 1.1cqw; min-width: 6px; min-height: 6px; border-radius: 50%; background: #e2ded6; }
.browser-dots i:nth-child(1) { background: #ff5f57; }
.browser-dots i:nth-child(2) { background: #febc2e; }
.browser-dots i:nth-child(3) { background: #28c840; }

/* Tool covers are drawn in HTML/SVG and animated with CSS. */
.cover--tool { font-family: var(--sans); }

.cover--media { background: radial-gradient(120% 120% at 30% 20%, #1d2c7a 0%, #0b1442 60%, #060b26 100%); }
.media-frame {
  position: absolute; left: 6%; top: 10%; width: 54%; height: 80%; border-radius: 2cqw; overflow: hidden;
  background: linear-gradient(180deg, #1a2149, #0e1433); box-shadow: inset 0 0 0 0.15cqw rgb(202 220 252 / 0.14);
}
.media-live { position: absolute; left: 2.4cqw; top: 2cqw; display: inline-flex; align-items: center; gap: 0.8cqw; font-size: 1.7cqw; color: #d9e2ff; text-transform: uppercase; letter-spacing: 0.1em; }
.media-live i { width: 1.2cqw; height: 1.2cqw; border-radius: 50%; background: #ff4d4d; animation: blink 1.4s steps(2) infinite; }
.media-fps { position: absolute; right: 2.4cqw; top: 2cqw; font-family: var(--mono); font-size: 1.6cqw; color: #fff; }
.media-hand { position: absolute; left: 50%; top: 52%; height: 70%; width: auto; translate: -50% -50%; overflow: visible; transform-origin: 50% 90%; animation: hand 9s var(--ease-in-out) infinite; }
.media-hand .bones line { stroke: var(--sky); stroke-width: 3.2; stroke-linecap: round; }
.media-hand .joints circle { fill: var(--orange); }
.media-status { position: absolute; left: 2.4cqw; bottom: 2cqw; font-family: var(--mono); font-size: 2.1cqw; color: #ffe14d; height: 2.6cqw; }
.st { position: absolute; left: 0; bottom: 0; white-space: nowrap; opacity: 0; font-weight: 700; }
.st--next { animation: st-next 9s infinite; }
.st--prev { animation: st-prev 9s infinite; }
.st--play { animation: st-play 9s infinite; }
.media-player {
  position: absolute; right: 6%; top: 50%; translate: 0 -50%; width: 30%; padding: 2cqw; border-radius: 2.2cqw;
  background: #fff; display: grid; gap: 1.6cqw; box-shadow: 0 3cqw 5cqw -2cqw rgb(0 0 0 / 0.5);
}
.mp-art { aspect-ratio: 1; border-radius: 1.4cqw; background: conic-gradient(from 210deg, var(--orange), #ffb26b, var(--sky), var(--navy), var(--orange)); }
.mp-meta { display: grid; line-height: 1.25; }
.mp-meta b { font-size: 2cqw; color: var(--ink); }
.mp-meta i { font-style: normal; font-size: 1.6cqw; color: #1db954; }
.mp-controls { display: flex; justify-content: space-between; }
.mp-controls .c { font-style: normal; display: grid; place-items: center; width: 6.2cqw; height: 6.2cqw; border-radius: 50%; font-size: 2.4cqw; background: var(--paper-2); color: var(--navy); }
.c--next { animation: c-next 9s infinite; }
.c--prev { animation: c-prev 9s infinite; }
.c--play { animation: c-play 9s infinite; }
@keyframes hand {
  0%, 9% { transform: rotate(0) scaleX(1); }
  17%, 30% { transform: rotate(-36deg) scaleX(1); }
  38%, 44% { transform: rotate(0) scaleX(1); }
  52%, 64% { transform: rotate(36deg) scaleX(1); }
  72%, 76% { transform: rotate(0) scaleX(1); }
  83%, 94% { transform: translateY(-9%) rotate(0) scaleX(1); }
  100% { transform: rotate(0) scaleX(1); }
}
@keyframes st-next { 0%, 18% { opacity: 0; } 20%, 34% { opacity: 1; } 37%, 100% { opacity: 0; } }
@keyframes st-prev { 0%, 53% { opacity: 0; } 55%, 68% { opacity: 1; } 71%, 100% { opacity: 0; } }
@keyframes st-play { 0%, 84% { opacity: 0; } 86%, 96% { opacity: 1; } 99%, 100% { opacity: 0; } }
@keyframes c-next { 0%, 18%, 37%, 100% { background: var(--paper-2); color: var(--navy); } 20%, 34% { background: var(--orange); color: #fff; } }
@keyframes c-prev { 0%, 53%, 71%, 100% { background: var(--paper-2); color: var(--navy); } 55%, 68% { background: var(--orange); color: #fff; } }
@keyframes c-play { 0%, 84%, 99%, 100% { background: var(--paper-2); color: var(--navy); } 86%, 96% { background: var(--orange); color: #fff; } }
@keyframes blink { 50% { opacity: 0.2; } }

.cover--blur { background: linear-gradient(160deg, #dfe8fb 0%, #eef2fb 55%, #f7efe7 100%); }
.lms {
  position: absolute; left: 8%; top: 10%; width: 84%; height: 80%; border-radius: 1.8cqw; overflow: hidden; background: #fff;
  box-shadow: 0 3cqw 5cqw -2.6cqw rgb(0 22 102 / 0.4);
}
.lms-head { display: flex; align-items: center; gap: 1.6cqw; height: 8cqw; padding: 0 2.6cqw; border-bottom: 0.12cqw solid #ece8e1; font-size: 2.2cqw; color: var(--ink); }
.lms-logo { width: 3.4cqw; height: 3.4cqw; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #fff 28%, var(--orange) 30%); }
.lms-pill { margin-left: auto; padding: 0.5cqw 1.4cqw; border-radius: 99px; background: var(--paper-2); font-size: 1.6cqw; color: var(--muted); }
.lms-panel { padding: 2.4cqw 2.6cqw; }
.lms-title { font-size: 1.7cqw; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 1.6cqw; }
.lms-row { display: flex; align-items: center; gap: 1.6cqw; height: 8cqw; border-top: 0.12cqw solid #f0ece6; font-size: 2.1cqw; color: var(--ink); }
.lms-check { display: grid; place-items: center; width: 3.4cqw; height: 3.4cqw; border-radius: 50%; background: #e3f5ea; color: #1f8f50; font-size: 1.8cqw; }
.lms-name { flex: 1; }
.lms-grade { font-weight: 700; color: var(--navy); font-size: 2.5cqw; filter: blur(0.75cqw); }
.lms-row--1 .lms-grade { animation: reveal-1 8s infinite; }
.lms-row--2 .lms-grade { animation: reveal-2 8s infinite; }
.lms-row--3 .lms-grade { animation: reveal-3 8s infinite; }
.blur-cursor { position: absolute; width: 4cqw; height: 4cqw; left: 108%; top: 108%; animation: blur-cursor 8s var(--ease-in-out) infinite; filter: drop-shadow(0 0.4cqw 0.4cqw rgb(0 0 0 / 0.25)); }
.blur-spy { position: absolute; left: 1%; bottom: 3%; font-size: 7cqw; transform: translateX(-140%) rotate(12deg); animation: spy 8s var(--ease-in-out) infinite; }
@keyframes blur-cursor {
  0% { left: 104%; top: 100%; }
  14%, 28% { left: 85%; top: 39%; }
  34%, 48% { left: 85%; top: 52%; }
  54%, 68% { left: 85%; top: 65%; }
  80%, 100% { left: 104%; top: 100%; }
}
@keyframes reveal-1 { 0%, 14% { filter: blur(0.75cqw); } 17%, 29% { filter: blur(0); } 32%, 100% { filter: blur(0.75cqw); } }
@keyframes reveal-2 { 0%, 34% { filter: blur(0.75cqw); } 37%, 49% { filter: blur(0); } 52%, 100% { filter: blur(0.75cqw); } }
@keyframes reveal-3 { 0%, 54% { filter: blur(0.75cqw); } 57%, 69% { filter: blur(0); } 72%, 100% { filter: blur(0.75cqw); } }
@keyframes spy { 0%, 72% { transform: translateX(-140%) rotate(12deg); } 80%, 92% { transform: translateX(0) rotate(-6deg); } 100% { transform: translateX(-140%) rotate(12deg); } }

.cover--math { background: radial-gradient(130% 120% at 80% 0%, #24379b 0%, var(--navy) 55%, #000b3a 100%); }
.term {
  position: absolute; left: 7%; top: 9%; width: 86%; height: 82%; border-radius: 1.8cqw; overflow: hidden;
  background: #0b1022; box-shadow: 0 3cqw 6cqw -2cqw rgb(0 0 0 / 0.6), inset 0 0 0 0.12cqw rgb(202 220 252 / 0.12);
}
.term-bar { display: flex; align-items: center; gap: 2cqw; height: 5cqw; padding: 0 2cqw; background: #161c36; font-family: var(--mono); font-size: 1.6cqw; color: #8a95c4; }
.term-body { margin: 0; padding: 2.4cqw 3cqw; font-family: var(--mono); font-size: 2.05cqw; line-height: 1.55; color: #d9e0ff; white-space: pre-wrap; }
.term-body b { color: #fff; }
.t-dim { color: #7b88bd; }
.t-orange { color: var(--orange); }
.t-green { color: #79e3a5; }
.t-caret { display: inline-block; width: 1.1cqw; height: 2.3cqw; margin-left: 0.4cqw; vertical-align: -0.35cqw; background: var(--orange); animation: blink 1s steps(2) infinite; }

.cover--morse { background: radial-gradient(110% 120% at 22% 50%, #1b2f9a 0%, var(--navy) 48%, #000b3a 100%); }
.morse-lamp { position: absolute; left: 10%; top: 50%; width: 22cqw; aspect-ratio: 1; translate: 0 -50%; border-radius: 50%; display: grid; place-items: center; background: rgb(202 220 252 / 0.07); box-shadow: inset 0 0 0 0.3cqw rgb(202 220 252 / 0.15); }
.morse-lamp i { width: 58%; aspect-ratio: 1; border-radius: 50%; background: #1d2a78; box-shadow: inset 0 0 0 0.3cqw rgb(202 220 252 / 0.18); transition: background .06s, box-shadow .06s; animation: lamp-idle 3.2s ease-in-out infinite; }
.cover--morse.is-driven .morse-lamp i { animation: none; }
.cover--morse.is-on .morse-lamp i { background: #ffd18a; box-shadow: 0 0 4cqw 1.6cqw rgb(255 160 60 / 0.75), 0 0 12cqw 4cqw rgb(255 89 0 / 0.35); }
@keyframes lamp-idle { 0%, 100% { background: #1d2a78; box-shadow: inset 0 0 0 0.3cqw rgb(202 220 252 / 0.18); } 50% { background: #ffc477; box-shadow: 0 0 4cqw 1cqw rgb(255 140 40 / 0.5); } }
.morse-tape { position: absolute; left: 41%; right: 6%; top: 50%; translate: 0 -62%; display: flex; justify-content: space-between; gap: 2cqw; }
.m-letter { display: grid; grid-auto-flow: column; align-items: center; gap: 1cqw; position: relative; padding-bottom: 7cqw; }
.m-letter b { position: absolute; left: 50%; bottom: 0; translate: -50% 0; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 5cqw; color: var(--sky); }
.m-dot, .m-dash { display: block; height: 2.6cqw; border-radius: 99px; background: rgb(202 220 252 / 0.28); transition: background .08s, box-shadow .08s; }
.m-dot { width: 2.6cqw; }
.m-dash { width: 7.4cqw; }
.m-dot.is-active, .m-dash.is-active { background: var(--orange); box-shadow: 0 0 2cqw rgb(255 89 0 / 0.8); }
.m-letter.is-active b { color: #fff; }
.morse-code { position: absolute; left: 41%; bottom: 13%; font-family: var(--mono); font-size: 1.8cqw; color: #8ea2e6; white-space: nowrap; }

/* ---------------------------------------------------------------- bench */

.bench { max-width: var(--maxw); margin: clamp(80px, 12vh, 120px) auto 0; padding-inline: var(--gutter); }
.bench-title { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--navy); font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 22px; }
.bench-list { position: relative; border-top: 1px solid var(--line); }
.bench-item { border-bottom: 1px solid var(--line); }
.bench-link {
  display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) minmax(0, 1fr) 4.5rem 2rem; align-items: center; gap: 16px;
  padding: 24px 10px; text-decoration: none; color: inherit;
  transition: padding .45s var(--ease-out), background .3s;
}
.bench-index { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.bench-name { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.9rem); color: var(--navy); transition: color .3s; line-height: 1.2; }
.bench-desc { color: var(--muted); }
.bench-year { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.bench-arrow { display: grid; place-items: center; color: var(--navy); transition: transform .45s var(--ease-out), color .3s; }
.bench-link:hover, .bench-link:focus-visible { padding-left: 26px; background: var(--paper-2); }
.bench-link:hover .bench-name { color: var(--orange); }
.bench-link:hover .bench-arrow { transform: rotate(-45deg); color: var(--orange); }
.bench-preview {
  position: absolute; left: 0; top: 0; width: clamp(240px, 24vw, 320px); border-radius: 16px; overflow: hidden;
  pointer-events: none; opacity: 0; z-index: 5; visibility: hidden;
  box-shadow: 0 30px 50px -24px rgb(0 22 102 / 0.55);
}
.bench-list.has-previews .bench-preview { visibility: visible; }

/* --------------------------------------------------------------- skills */

.skills { padding-top: clamp(120px, 18vh, 190px); }
.pills { position: relative; max-width: 1100px; margin: 40px auto 0; padding-inline: var(--gutter); }
.pill-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pill {
  padding: 12px 22px; border-radius: 999px; background: var(--sky); color: var(--navy);
  font-weight: 500; font-size: clamp(0.92rem, 1.4vw, 1.05rem); white-space: nowrap; user-select: none; -webkit-user-select: none;
}
.pill--navy { background: var(--navy); color: #fff; }
.pill--orange { background: var(--orange); color: #fff; }
.pills.is-physics { height: 340px; padding: 0; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.pills.is-physics .pill-list { position: absolute; inset: 0; display: block; }
.pills.is-physics .pill { position: absolute; left: 0; top: 0; will-change: transform; cursor: grab; }
.pills.is-physics.is-grabbing .pill { cursor: grabbing; }
.pills-hint { display: none; }
.pills.is-physics.can-drag .pills-hint { display: block; position: absolute; right: var(--gutter); top: -8px; font-size: 0.85rem; color: var(--muted); font-family: var(--serif); font-style: italic; }

/* --------------------------------------------------------------- beyond */

.beyond { padding: clamp(120px, 18vh, 180px) clamp(10px, 2.5vw, 40px) 0; }
.beyond-panel {
  position: relative; max-width: 1280px; margin: 0 auto; overflow: hidden; isolation: isolate;
  border-radius: clamp(28px, 4vw, 44px); background: var(--panel); color: #e9eef7;
  padding: clamp(80px, 12vw, 130px) clamp(18px, 6vw, 80px) clamp(160px, 22vw, 260px);
}
.section-head--dark .section-title { color: var(--sky); }
.section-head--dark .section-lede { color: #c4cee3; }
.beyond-grid { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; perspective: 520px; overflow: hidden; z-index: -1; -webkit-mask-image: linear-gradient(transparent, #000 70%); mask-image: linear-gradient(transparent, #000 70%); }
.beyond-floor {
  position: absolute; left: -60%; right: -60%; top: 0; height: 220%; transform-origin: 50% 0; transform: rotateX(64deg);
  background-image: linear-gradient(rgb(202 220 252 / 0.2) 1px, transparent 1px), linear-gradient(90deg, rgb(202 220 252 / 0.2) 1px, transparent 1px);
  background-size: 64px 64px; animation: floor 4s linear infinite;
}
@keyframes floor { to { background-position: 0 64px; } }
.beyond-items { display: grid; gap: clamp(80px, 12vw, 140px); margin-top: clamp(80px, 12vw, 130px); }
.beyond-item { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.beyond-item--flip .beyond-photo { order: 2; }
.beyond-photo { position: relative; border-radius: 20px; overflow: hidden; transform: rotate(calc(var(--tilt, 0) * 1deg)); box-shadow: 0 40px 60px -36px rgb(0 0 0 / 0.8); }
.beyond-photo img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.beyond-photo figcaption {
  position: absolute; left: 14px; bottom: 14px; right: 14px; width: fit-content; padding: 8px 14px; border-radius: 999px;
  background: rgb(20 24 26 / 0.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; font-size: 0.84rem;
}
.beyond-role { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: #ffb185; margin-bottom: 12px; }
.beyond-text p:not(.beyond-role) { font-size: clamp(1.02rem, 1.4vw, 1.14rem); line-height: 1.7; color: #e3e8f2; }
.beyond-text a { color: #e6f3c4; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s; }
.beyond-text a:hover { color: var(--orange); }

/* -------------------------------------------------------------- contact */

.contact { padding: clamp(120px, 18vh, 180px) 0 clamp(70px, 10vh, 110px); }
.contact-list { display: grid; gap: 12px; max-width: 560px; margin: 52px auto 0; padding-inline: var(--gutter); }
.contact-list li { display: flex; gap: 10px; }
.contact-row {
  position: relative; flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 24px; border-radius: 18px; background: var(--paper-2); text-decoration: none; overflow: hidden; isolation: isolate;
  transition: color .35s;
}
.contact-row::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--navy); transform: scaleX(0); transform-origin: left; transition: transform .55s var(--ease-out); }
.contact-row:hover::before, .contact-row:focus-visible::before { transform: none; }
.contact-row:hover, .contact-row:focus-visible { color: #fff; }
.contact-label { color: var(--muted); transition: color .35s; }
.contact-row:hover .contact-label { color: var(--sky); }
.contact-value { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; overflow-wrap: anywhere; text-align: right; }
.contact-row:hover .arrow { transform: translateX(3px); }
.contact-row:hover .arrow--ext { transform: translate(2px, -2px); }
.copy-btn { flex: none; width: 78px; border: 0; border-radius: 18px; background: var(--paper-2); font-size: 0.86rem; color: var(--navy); transition: background .3s, color .3s; }
.copy-btn:hover { background: var(--orange); color: #fff; }
.copy-btn.is-copied { background: #1f8f50; color: #fff; }
.contact-love { text-align: center; margin-top: 30px; color: var(--muted); }
.contact-love a { color: var(--orange); }
.contact-page .contact { padding-top: clamp(140px, 22vh, 220px); }

/* --------------------------------------------------------------- footer */

.footer { display: grid; justify-items: center; gap: 10px; padding: 40px var(--gutter) 56px; color: var(--muted); font-size: 0.92rem; text-align: center; }
.footer .heart { color: #e0245e; }
.to-top { margin-top: 6px; background: none; border: 0; color: var(--navy); font-size: 0.86rem; text-decoration: underline; text-underline-offset: 3px; }

/* ----------------------------------------------------------------- works */

.page-head { display: grid; justify-items: center; gap: 22px; text-align: center; padding: clamp(140px, 20vh, 200px) var(--gutter) 0; }
.page-title { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--navy); font-size: clamp(4rem, 13vw, 9.5rem); line-height: 0.95; letter-spacing: -0.02em; }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.filter { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 0.95rem; color: var(--body); transition: background .3s, color .3s, border-color .3s; }
.filter sup { font-size: 0.7em; color: var(--muted); margin-left: 2px; }
.filter:hover { border-color: var(--navy); color: var(--navy); }
.filter[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter[aria-pressed="true"] sup { color: var(--sky); }
.works { padding-bottom: 20px; }
.card[hidden] { display: none; }
.works-empty { text-align: center; color: var(--muted); margin-top: 40px; }

/* --------------------------------------------------------------- project */

.project-hero { position: relative; display: grid; justify-items: center; gap: 20px; text-align: center; max-width: 980px; margin: 0 auto; padding: clamp(130px, 19vh, 180px) var(--gutter) 0; }
.back-link { justify-self: center; display: inline-flex; gap: 8px; align-items: center; color: var(--muted); text-decoration: none; font-size: 0.92rem; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); transition: color .2s, border-color .2s; }
.back-link:hover { color: var(--navy); border-color: var(--navy); }
.eyebrow { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--orange); font-weight: 600; }
.project-title { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--navy); font-size: clamp(3rem, 10vw, 7.6rem); line-height: 1; letter-spacing: -0.02em; text-wrap: balance; }
.project-tagline { font-size: clamp(1.08rem, 1.9vw, 1.34rem); color: var(--body); max-width: 48ch; text-wrap: pretty; }
.project-hero .tags { justify-content: center; }
.project-cover { max-width: var(--maxw); margin: clamp(44px, 7vh, 72px) auto 0; padding-inline: var(--gutter); }
.project-cover .cover { border-radius: clamp(18px, 2.4vw, 30px); box-shadow: 0 50px 80px -60px rgb(0 22 102 / 0.6); }
.project-body { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); max-width: 1100px; margin: clamp(70px, 11vh, 110px) auto 0; padding-inline: var(--gutter); align-items: start; }
.project-meta { position: sticky; top: 100px; display: grid; gap: 26px; }
.project-meta dl > div { padding: 14px 0; border-top: 1px solid var(--line); }
.project-meta dt { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 4px; }
.project-meta dd { color: var(--ink); }
.project-links { display: grid; gap: 10px; }
.project-links .btn { justify-content: center; }
.project-overview { display: grid; gap: 22px; }
.kicker { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--orange); font-weight: 600; }
.project-overview p { font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.75; color: var(--body); max-width: 62ch; text-wrap: pretty; }
.project-overview p:first-of-type { font-family: var(--serif); font-size: clamp(1.18rem, 1.9vw, 1.42rem); line-height: 1.6; color: var(--ink); }

.highlights { max-width: 1100px; margin: clamp(100px, 15vh, 150px) auto 0; padding-inline: var(--gutter); text-align: center; }
.highlight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; margin-top: 44px; text-align: left; }
.highlight { display: grid; align-content: start; gap: 8px; padding: 28px; border-radius: 22px; background: var(--paper-2); transition: transform .5s var(--ease-out), background .3s; }
.highlight:hover { transform: translateY(-4px); background: var(--paper-3); }
.hl-num { font-family: var(--serif); font-style: italic; color: var(--orange); font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: 1.05; font-variant-numeric: tabular-nums; }
.hl-label { font-weight: 600; color: var(--navy); }
.highlight p { color: var(--muted); font-size: 0.97rem; }

.gallery { margin-top: clamp(100px, 15vh, 150px); }
.gallery-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; max-width: 1100px; margin: 0 auto; padding-inline: var(--gutter); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: clamp(20px, 3vw, 36px) clamp(14px, 2.4vw, 28px); max-width: 1100px; margin: 44px auto 0; padding-inline: var(--gutter); }
.shots:has(> :nth-child(4):last-child) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 220px)); justify-content: center; }
.shot { display: grid; gap: 14px; justify-items: center; align-content: start; }
.shot img { width: 100%; height: auto; filter: drop-shadow(0 26px 24px rgb(0 22 102 / 0.22)); transition: transform .5s var(--ease-out); }
.shot:hover img { transform: translateY(-8px) rotate(-1.5deg); }
.shot-caption { font-size: 0.9rem; color: var(--muted); text-align: center; }
.shot-caption b { font-family: var(--mono); font-weight: 400; color: var(--orange); margin-right: 4px; }

.renders { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 1100px; margin: 40px auto 0; padding-inline: var(--gutter); }
.render { display: grid; grid-template-rows: 1fr auto; justify-items: center; gap: 12px; padding: 24px 16px 18px; border-radius: 22px; background: var(--paper-2); aspect-ratio: 3 / 4; }
.render img { max-height: 100%; width: auto; object-fit: contain; min-height: 0; transition: transform .6s var(--ease-out); }
.render:hover img { transform: translateY(-6px) scale(1.03); }
.render span { font-size: 0.9rem; color: var(--muted); }
.sheet { max-width: 1100px; margin: 20px auto 0; padding-inline: var(--gutter); }
.sheet img { width: 100%; height: auto; border-radius: 22px; background: #f6f8f6; }
.sheet figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--muted); text-align: center; }
.viewer { max-width: 1100px; margin: 20px auto 0; padding-inline: var(--gutter); }
.viewer-poster, .viewer iframe { border-radius: 26px; background: var(--panel); color: #e7ecf5; }
.viewer-poster { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(20px, 4vw, 48px); align-items: center; padding: clamp(24px, 4vw, 48px); }
.viewer-poster img { max-height: 340px; margin: 0 auto; filter: drop-shadow(0 30px 30px rgb(0 0 0 / 0.45)); }
.viewer-copy { display: grid; gap: 14px; }
.viewer-copy h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.7rem, 3vw, 2.3rem); color: var(--sky); }
.viewer-copy p { color: #c8d1e3; }
.viewer-copy b { color: #fff; }
.viewer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.viewer .btn--ghost { border-color: var(--sky); color: var(--sky); }
.viewer .btn--ghost::before { background: var(--sky); }
.viewer .btn--ghost:hover { color: var(--navy); }
.viewer iframe { display: block; width: 100%; height: min(80vh, 760px); border: 0; background: #edf2ee; }

.demo { max-width: 920px; margin: clamp(100px, 15vh, 150px) auto 0; padding-inline: var(--gutter); text-align: center; }
.demo-figure { margin-top: 36px; }
.demo-video {
  display: block; width: 100%; height: auto; border-radius: 12px; background: #1b1f2b;
  box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.25), 0 30px 70px -30px rgb(0 22 102 / 0.55);
}
.demo-figure figcaption { margin: 14px auto 0; max-width: 60ch; font-size: 0.92rem; color: var(--muted); }

/* Real screenshots, each in the frame it was taken in. */
.screens { max-width: 1100px; margin: clamp(100px, 15vh, 150px) auto 0; padding-inline: var(--gutter); }
.screens-head { display: grid; justify-items: center; gap: 14px; text-align: center; }
.screens-grid { --gap: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap) clamp(20px, 3vw, 36px); margin-top: 44px; align-items: start; }
.screens-grid:has(> :only-child) { grid-template-columns: minmax(0, 660px); justify-content: center; }
.screens-grid--device { grid-template-columns: minmax(0, 3.1fr) minmax(0, 1fr); align-items: end; }
.screen--full { grid-column: 1 / -1; }
.screen--center { grid-column: 1 / -1; justify-self: center; width: calc(50% - clamp(10px, 1.5vw, 18px)); }
.screen figure { display: grid; gap: 16px; }
.screen figcaption { font-size: 0.92rem; color: var(--muted); text-align: center; text-wrap: balance; }
.screen figcaption b { font-family: var(--mono); font-weight: 400; color: var(--orange); margin-right: 4px; }
.screen-frame { transition: transform .5s var(--ease-out); }
.screen:hover .screen-frame { transform: translateY(-6px); }
.screen-frame img { display: block; width: 100%; height: auto; }
.screen-frame--terminal img { filter: drop-shadow(0 24px 26px rgb(0 22 102 / 0.26)); }
.screen-frame--browser { container-type: inline-size; }
.screen-frame--browser .browser { --u: calc(100cqw / var(--page-w) * 1.18); width: 100%; }

/* An iPhone running Safari: status bar, the page, and the floating address bar.
   --p is one point of a 393-point-wide screen. */
.phone { padding: 3.4%; border-radius: 15.5% / 7.2%; background: #1b1c1f; box-shadow: inset 0 0 0 1.5px #44464b, inset 0 0 0 4px #0b0b0c, 0 34px 60px -30px rgb(0 22 102 / 0.55); }
.phone-screen { --p: calc(100cqw / 393); position: relative; container-type: inline-size; overflow: hidden; border-radius: 12.6% / 5.8%; background: var(--status); }
.phone-status { position: relative; display: flex; align-items: center; justify-content: space-between; height: calc(var(--p) * 54); padding: calc(var(--p) * 4) calc(var(--p) * 30) 0 calc(var(--p) * 46); color: #000; }
.phone-time { font: 600 calc(var(--p) * 17)/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif; letter-spacing: -0.02em; }
.phone-island { position: absolute; top: calc(var(--p) * 11); left: 50%; width: calc(var(--p) * 125); height: calc(var(--p) * 37); border-radius: 999px; background: #000; transform: translateX(-50%); }
.phone-icons { display: inline-flex; align-items: center; gap: calc(var(--p) * 6); }
.phone-icons svg { height: calc(var(--p) * 12); width: auto; fill: currentColor; }
.phone-icons svg:last-child { height: calc(var(--p) * 13); }
.phone-bar { position: absolute; left: calc(var(--p) * 14); right: calc(var(--p) * 14); bottom: calc(var(--p) * 30); display: flex; align-items: center; gap: calc(var(--p) * 8); }
.phone-btn, .phone-url { display: grid; place-items: center; height: calc(var(--p) * 48); border-radius: 999px; background: rgb(255 255 255 / 0.7); backdrop-filter: blur(10px) saturate(1.6); -webkit-backdrop-filter: blur(10px) saturate(1.6); box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.08), 0 6px 18px rgb(0 0 0 / 0.14); color: rgb(0 0 0 / 0.86); }
.phone-btn { width: calc(var(--p) * 48); flex: none; }
.phone-btn svg { width: calc(var(--p) * 17); height: calc(var(--p) * 17); fill: currentColor; }
.phone-url { flex: 1; font: 500 calc(var(--p) * 15)/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif; letter-spacing: -0.01em; }
.phone-home { position: absolute; left: 50%; bottom: calc(var(--p) * 8); width: calc(var(--p) * 134); height: calc(var(--p) * 5); border-radius: 999px; background: #000; transform: translateX(-50%); }

.code { max-width: 920px; margin: clamp(100px, 15vh, 150px) auto 0; padding-inline: var(--gutter); text-align: center; }
.code-window { margin-top: 36px; border-radius: 20px; overflow: hidden; background: #0d1330; text-align: left; box-shadow: 0 40px 70px -50px rgb(0 22 102 / 0.8); }
.code-window figcaption { display: flex; align-items: center; gap: 14px; padding: 12px 18px; background: #182044; color: #aab4dc; font-family: var(--mono); font-size: 0.82rem; }
.code-window .browser-dots i { width: 10px; height: 10px; }
.code-window pre { margin: 0; padding: 24px 26px; overflow-x: auto; font-family: var(--mono); font-size: clamp(0.78rem, 1.4vw, 0.9rem); line-height: 1.65; color: #e1e7ff; }

.next-project { max-width: 1100px; margin: clamp(110px, 16vh, 160px) auto 0; padding-inline: var(--gutter); }
.next-project a { display: grid; justify-items: center; gap: 8px; padding: clamp(48px, 8vh, 72px) 0; border-block: 1px solid var(--line); text-decoration: none; text-align: center; }
.next-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.next-title { display: inline-flex; align-items: center; gap: 0.3em; font-family: var(--serif); font-style: italic; color: var(--navy); font-size: clamp(2.4rem, 8vw, 6rem); line-height: 1.05; transition: color .3s; }
.next-title .arrow { width: 0.6em; height: 0.6em; }
.next-kind { color: var(--muted); }
.next-project a:hover .next-title { color: var(--orange); }
.next-project a:hover .arrow { transform: translateX(10px); }

.notfound { display: grid; justify-items: center; gap: 20px; text-align: center; padding: clamp(150px, 24vh, 230px) var(--gutter) 40px; }

/* ------------------------------------------------- motion: initial states */

.motion [data-split],
.motion [data-reveal],
.motion [data-reveal-card],
.motion [data-reveal-row],
.motion [data-stagger] > *,
.motion .section-icon,
.motion [data-marquee],
.motion .beyond-photo { opacity: 0; }

/* ------------------------------------------------------ view transitions */

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .42s var(--ease-in-out) both; }
::view-transition-new(root) { animation: vt-in .6s var(--ease-out) .08s both; }
::view-transition-group(*) { animation-duration: .65s; animation-timing-function: var(--ease-out); }
@keyframes vt-out { to { opacity: 0; transform: translateY(-18px) scale(0.99); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(28px); } }

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  .project-body { grid-template-columns: 1fr; }
  .project-meta { position: static; order: 2; }
  .beyond-item, .beyond-item--flip { grid-template-columns: 1fr; }
  .beyond-item--flip .beyond-photo { order: 0; }
  .renders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viewer-poster { grid-template-columns: 1fr; text-align: center; }
  .viewer-actions { justify-content: center; }
  .bench-link { grid-template-columns: 2.6rem minmax(0, 1fr) 3.5rem 1.6rem; }
  .bench-desc { display: none; }
}

@media (max-width: 720px) {
  .card-grid--featured { grid-template-columns: 1fr; }
  .hero-icon--walley { top: 96px; left: -10px; }
  .hero-icon--aware { top: 104px; right: -10px; }
  .gallery-head { flex-direction: column; align-items: center; text-align: center; }
  .nav { gap: 26px; padding: 9px 18px; }
  .screens-grid, .screens-grid--device { grid-template-columns: minmax(0, 1fr); }
  .screen--center { width: 100%; }
  .screen-frame--phone { width: min(64%, 280px); margin: 0 auto; }
}

@media (max-width: 480px) {
  .bench-link { grid-template-columns: 2.2rem minmax(0, 1fr) 1.4rem; padding: 20px 6px; }
  .bench-year { display: none; }
  .contact-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .contact-value { text-align: left; }
  .copy-btn { width: 64px; }
  .renders { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .media-hand { animation: none; }
}
