/* ==========================================================================
   Nathan Chew — Product Design Portfolio
   ========================================================================== */

/* SF Pro Display — the same files the Webflow site self-hosts */
@font-face { font-family: "SF Pro Display"; src: url("../fonts/sf-pro-display-light-68be6c.otf") format("opentype"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "SF Pro Display"; src: url("../fonts/sf-pro-display-regular-e27589.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "SF Pro Display"; src: url("../fonts/sf-pro-display-medium-9154cd.otf") format("opentype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "SF Pro Display"; src: url("../fonts/sf-pro-display-semibold-1-3e58d8.otf") format("opentype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "SF Pro Display"; src: url("../fonts/sf-pro-display-bold-586ded.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }

/* Layout grid mirrors the Webflow site:
   ≥992px: 1360px frame with 80px inner margins (content 1200px at 1440)
   768–991px: 80px side margins · ≤479px: 40px side margins */
:root {
  --bg: #fcfcfc;
  --surface: #f1f2f3;
  --surface-2: #e9eaec;
  --ink: #000;
  --ink-2: #1a1b1f;
  --muted: #727272;
  --muted-2: #666;
  --line: #e4e4e7;
  --pill-border: #d0d5dd;
  --radius: 8px;
  --radius-lg: 12px;
  --frame: 1360px;
  --gutter: 80px;
  --nav-h: 52px;
  --line-c: #e6e6e6;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: #111; color: #fff; }
:focus-visible { outline: 2px solid #111; outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--frame); margin: 0 auto; padding: 0 var(--gutter); }
.divider { display: block; width: calc(100% - 2 * var(--gutter)); max-width: 1200px; height: 1px; background: var(--line-c); border: 0; margin: 0 auto; }
@media (max-width: 479px) { :root { --gutter: 40px; } }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(252, 252, 252, .86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  transition: box-shadow .3s var(--ease), transform .35s var(--ease);
}
.nav.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__inner {
  height: 100%; max-width: var(--frame); margin: 0 auto;
  padding: 0 calc(var(--gutter) - 15px) 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; color: var(--ink); opacity: 0; transform: translateY(-4px); transition: opacity .3s, transform .3s; pointer-events: none; }
.nav.is-scrolled .nav__brand, .nav--solid .nav__brand { opacity: 1; transform: none; pointer-events: auto; }
.nav__brand img { width: 28px; height: 28px; }
.nav__links { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px 8px 30px; font-size: 16px; line-height: 28px; font-weight: 300; color: var(--muted-2);
  transition: color .2s;
}
.nav__link::after {
  content: ""; position: absolute; left: 30px; right: 15px; bottom: 6px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__link:hover, .nav__link.is-current { color: var(--ink); }
.nav__link:hover::after, .nav__link.is-current::after { transform: scaleX(1); }
.nav__link--dd { padding-right: 10px; }
.nav__link--dd::after { right: 30px; }
.chev { width: 14px; height: 14px; transition: transform .25s var(--ease); }

.dropdown { position: relative; }
.dropdown__menu {
  position: absolute; top: calc(100% + 8px); left: 50%;
  width: 300px; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.14);
  opacity: 0; visibility: hidden; transform: translate(-50%, -6px) scale(.98);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.dropdown.is-open .dropdown__menu { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); }
.dropdown.is-open .chev { transform: rotate(180deg); }
.dropdown__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; transition: background .2s; }
.dropdown__item:hover { background: var(--surface); }
.dropdown__icon { width: 34px; height: 34px; border-radius: 8px; background: var(--surface); display: grid; place-items: center; flex: none; }
.dropdown__icon svg { width: 18px; height: 18px; }
.dropdown__title { display: block; font-size: 14px; font-weight: 500; color: var(--ink); line-height: 1.3; text-transform: capitalize; }
.dropdown__sub { display: block; font-size: 13px; color: var(--muted); line-height: 1.3; }

.nav__toggle { display: none; width: 40px; height: 40px; margin-right: -10px; position: relative; }
.nav__toggle span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s; }
.nav__toggle span:nth-child(1) { top: 15px; }
.nav__toggle span:nth-child(2) { top: 20px; }
.nav__toggle span:nth-child(3) { top: 25px; }
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 991px) {
  .nav__inner { padding: 0 var(--gutter); }
  .nav__brand { opacity: 1; transform: none; pointer-events: auto; }
  .nav__toggle { display: block; }
  .nav__links {
    /* .nav has backdrop-filter, which makes it the containing block — so size explicitly */
    position: absolute; top: var(--nav-h); left: 0; right: 0; height: calc(100vh - var(--nav-h)); height: calc(100dvh - var(--nav-h));
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 16px var(--gutter) 40px; background: var(--bg);
    overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transform: none; }
  .nav.is-open { background: var(--bg); }
  .nav__links > li { border-bottom: 1px solid var(--line); }
  .nav__link { width: 100%; justify-content: space-between; padding: 18px 0; font-size: 22px; color: var(--ink); }
  .nav__link::after { display: none; }
  .dropdown__menu { position: static; width: auto; transform: none; box-shadow: none; border: 0; padding: 0 0 12px; display: none; opacity: 1; visibility: visible; background: transparent; }
  .dropdown.is-open .dropdown__menu { display: block; transform: none; }
  .dropdown__item { padding: 10px 0; }
}

/* --------------------------------------------------------------------------
   Reveal animations
   -------------------------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-fade { opacity: 0; transition: opacity 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal-fade.is-in { opacity: 1; }
.load-in { opacity: 0; transform: translateY(14px); animation: loadIn .9s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes loadIn { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-fade, .load-in { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
}

/* --------------------------------------------------------------------------
   Buttons / pills
   -------------------------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  background: #fff; color: var(--ink);
  border: 1px solid var(--pill-border); border-radius: 999px;
  font-size: 16px; line-height: 20px; font-weight: 300;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s, transform .25s var(--ease);
}
.pill:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill:active { transform: scale(.97); }
.pill svg { width: 16px; height: 16px; }
.pill-row { display: flex; justify-content: center; }

.text-link { position: relative; color: var(--muted); transition: color .2s; }
.text-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 1px; background: currentColor; opacity: .5; transition: opacity .2s; }
.text-link:hover { color: var(--ink); }
.text-link:hover::after { opacity: 1; }

/* --------------------------------------------------------------------------
   Home — hero
   -------------------------------------------------------------------------- */
main { padding-top: var(--nav-h); }
/* One statement in black, one line in grey, then the two contact links */
.hero { padding: 48px 0 56px; }
.hero__title { margin: 0; max-width: 760px; font-size: 32px; font-weight: 400; line-height: 42px; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.hero__sub { margin-top: 10px; font-size: 18px; line-height: 28px; color: var(--muted); font-weight: 300; }
.hero__links { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.hero__links a { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; line-height: 24px; color: var(--muted); transition: color .2s; }
.hero__links a:hover { color: var(--ink); }
.hero__links a:hover span { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.hero__links svg { width: 16px; height: 16px; flex: none; }
.contact-block h2 { font-size: 14px; line-height: 24px; font-weight: 400; color: var(--ink); margin: 0; }
.contact-block a { display: block; font-size: 14px; line-height: 20px; color: var(--muted); width: fit-content; }
.contact-block a:hover { color: var(--ink); }
.contact-block .text-link { margin: 0; line-height: 24px; }
@media (max-width: 991px) {
  .hero { padding-top: 64px; }
}
@media (max-width: 767px) {
  .hero__title { font-size: 26px; line-height: 36px; }
}
@media (max-width: 479px) {
  .hero { padding: 32px 0 44px; }
  .hero__title { font-size: 22px; line-height: 32px; }
  .hero__sub { font-size: 16px; line-height: 24px; }
  .hero__links { margin-top: 24px; flex-direction: column; gap: 10px; }
  .contact-block a { font-size: 16px; line-height: 24px; }
}

/* --------------------------------------------------------------------------
   Sections — 40px under the first divider, 60px under the rest,
   100px from a section's last row to the next divider
   -------------------------------------------------------------------------- */
.section { padding: 61px 0 100px; }
.divider--wide + .section { padding-top: 40px; }
.section-head { margin-bottom: 20px; }
.section-head h2 { font-size: 16px; font-weight: 400; color: var(--ink); line-height: 20px; }
.section-head p { font-size: 14px; line-height: 20px; color: var(--muted); }
@media (min-width: 480px) and (max-width: 767px) {
  .section-head h2 { line-height: 10px; }
  .section { padding-top: 69px; }
  .divider--wide + .section { padding-top: 37px; }
  .section .cases + .pill-row { margin-top: 45px; }
  #gallery.section { padding-top: 64px; }
}
@media (max-width: 479px) {
  .section { padding: 40px 0 60px; }
  .section-head h2 { line-height: 24px; }
  .section-head p { font-size: 16px; line-height: 24px; }
}

/* --------------------------------------------------------------------------
   Case study cards
   -------------------------------------------------------------------------- */
/* Featured card 1200×400, then three square cards with 8px gaps, all inside the content column */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 29px 8px; margin: 0; }
.card { display: flex; flex-direction: column; gap: 0; }
.card--feature { grid-column: 1 / -1; margin: 0; }
.card__media {
  position: relative; overflow: hidden;
  background: var(--surface); border-radius: var(--radius);
  aspect-ratio: 1 / 1;
}
.card--feature .card__media { aspect-ratio: 3 / 1; }
.card__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity .6s var(--ease), transform 1.1s var(--ease);
}
.card__media .alt { opacity: 0; }
.card:hover .card__media .main, .card:focus-visible .card__media .main { opacity: 0; }
.card:hover .card__media .alt, .card:focus-visible .card__media .alt { opacity: 1; }
.card:hover .card__media img { transform: scale(1.02); }
.card__meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-top: 10px; }
.card__eyebrow { font-size: 14px; color: var(--muted); font-weight: 300; line-height: 20px; }
.card__title { margin-top: -1px; font-size: 14px; color: var(--ink); font-weight: 300; line-height: 20px; }
.card__arrow { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid var(--pill-border); display: grid; place-items: center; opacity: 0; transform: translateX(-6px); transition: opacity .3s var(--ease), transform .3s var(--ease), background .3s; }
.card__arrow svg { width: 14px; height: 14px; }
.card:hover .card__arrow { opacity: 1; transform: none; }
@media (hover: none) { .card__arrow { opacity: 1; transform: none; } }
.cases + .pill-row { margin-top: 69px; }
.cases + .pill-row .pill { min-width: 170px; }
/* tablet: one centered 480×400 column */
@media (max-width: 991px) {
  .cases { grid-template-columns: 480px; justify-content: center; row-gap: 77px; margin: 0; }
  .card--feature { margin: 0 0 -46px; }
  .card__media, .card--feature .card__media { aspect-ratio: 480 / 400; }
  .card--feature .card__media img { object-fit: contain; }
}
@media (max-width: 767px) {
  .cases { row-gap: 24px; }
  .card--feature { margin-bottom: -16px; }
}
/* phone: one column inside the 40px margins */
@media (max-width: 479px) {
  .cases { grid-template-columns: 1fr; row-gap: 43px; margin: 0; padding-top: 16px; }
  .card--feature { margin-bottom: -15px; }
  .card__media, .card--feature .card__media { aspect-ratio: 288 / 240; }
  .card__meta { padding: 11px 0 0; }
  .card__eyebrow, .card__title { font-size: 16px; line-height: 19px; }
  .card__title { margin-top: 0; }
}

/* --------------------------------------------------------------------------
   Expandable grid (additional works / gallery)
   -------------------------------------------------------------------------- */
/* Additional works: three 300px-tall tiles across, 8px gaps, inside the content column */
.xgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 8px; margin: 0; padding-top: 4px; }
.xgrid--4 { grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; padding-top: 0; }
.xitem { display: flex; flex-direction: column; gap: 0; text-align: left; width: 100%; }
.xitem__media { position: relative; overflow: hidden; background: var(--surface); border-radius: var(--radius); height: 300px; width: 100%; }
.xgrid--4 .xitem__media { height: auto; aspect-ratio: 294 / 209; }
.xitem__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.xitem__cover {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: rgba(0,0,0,.08); color: #111; font-weight: 500; font-size: 14px;
  opacity: 0; transform: scale(1.1); transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.xitem__cover span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; background: rgba(255,255,255,.9); border-radius: 999px; backdrop-filter: blur(6px); }
.xitem__cover svg { width: 14px; height: 14px; }
.xitem:hover .xitem__cover, .xitem:focus-visible .xitem__cover { opacity: 1; transform: scale(1); }
.xitem:hover .xitem__media img { transform: scale(1.04); }
.xitem__caption { margin-top: 4px; font-size: 14px; color: var(--muted); line-height: 28px; }
#additional { padding-bottom: 112px; }
@media (max-width: 991px) {
  .xgrid { grid-template-columns: repeat(2, 1fr); }
  .xitem__media { height: auto; aspect-ratio: 4 / 3; }
  .xgrid--4 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 479px) {
  .xgrid { grid-template-columns: 1fr; row-gap: 28px; }
  .xitem__caption { font-size: 16px; }
  #additional { padding-bottom: 60px; }
}

/* --------------------------------------------------------------------------
   Modal / lightbox
   -------------------------------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: grid; grid-template-rows: auto 1fr auto;
  opacity: 0; visibility: hidden; transform: scale(1.04);
  transition: opacity .4s var(--ease), transform .4s var(--ease), visibility .4s;
}
.modal.is-open { opacity: 1; visibility: visible; transform: none; }
.modal__bar { display: flex; justify-content: space-between; align-items: center; padding: 16px var(--gutter); gap: 16px; }
.modal__caption { font-size: 15px; color: var(--muted); }
.modal__close, .modal__nav { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--pill-border); background: #fff; transition: background .2s, color .2s, border-color .2s; }
.modal__close:hover, .modal__nav:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.modal__close svg, .modal__nav svg { width: 18px; height: 18px; }
.modal__stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 0 clamp(16px, 8vw, 100px); min-height: 0; }
.modal__stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius); transition: opacity .3s; }
.modal__stage img.is-loading { opacity: 0; }
.modal__foot { display: flex; justify-content: center; gap: 12px; padding: 16px; }
.modal__count { align-self: center; font-variant-numeric: tabular-nums; font-size: 14px; color: var(--muted); min-width: 60px; text-align: center; }
body.no-scroll { overflow: hidden; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer { padding: 0 0 56px; }
/* One row: copyright on the left, the two contact links on the right */
.footer__row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 32px; padding-top: 32px; }
.footer__links { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; flex-wrap: wrap; }
.footer__links a { font-size: 14px; line-height: 28px; color: var(--muted); transition: color .2s; }
.footer__links a:hover { color: var(--ink); }
.footer__copy { margin: 0; font-size: 14px; line-height: 28px; color: var(--muted); }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--muted); transition: color .2s; }
.copy-btn:hover { color: var(--ink); }
.copy-btn svg { width: 14px; height: 14px; }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 120;
  padding: 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px;
  transform: translate(-50%, 20px); opacity: 0; transition: opacity .3s var(--ease), transform .3s var(--ease); pointer-events: none;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* Explore cards (bottom of inner pages) */
.explore { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.explore a { display: flex; flex-direction: column; gap: 28px; padding: 22px; border-radius: var(--radius-lg); background: var(--surface); transition: background .3s var(--ease), transform .3s var(--ease); }
.explore a:hover { background: var(--surface-2); transform: translateY(-3px); }
.explore svg { width: 22px; height: 22px; }
.explore strong { display: block; font-weight: 500; color: var(--ink); font-size: 15px; text-transform: capitalize; }
.explore span { font-size: 14px; color: var(--muted); }
@media (max-width: 600px) { .explore { grid-template-columns: 1fr; } .explore a { flex-direction: row; align-items: center; gap: 16px; } }

/* --------------------------------------------------------------------------
   Page header (inner pages)
   -------------------------------------------------------------------------- */
.page-head { padding: clamp(32px, 7vw, 72px) 0 clamp(24px, 4vw, 40px); }
.page-head h1 { font-size: clamp(24px, 3vw, 30px); font-weight: 400; color: var(--ink); letter-spacing: -.01em; }
.page-head p { margin-top: 12px; color: var(--muted); max-width: 34em; line-height: 1.75; }

/* --------------------------------------------------------------------------
   About — uses the same content column as every other page.
   60px above each divider, 40px below (80px before Experience).
   -------------------------------------------------------------------------- */
.about-wrap { width: calc(100% - 2 * var(--gutter)); max-width: 1200px; margin: 0 auto; }
.about-page .page-head { padding: 60px 0; }
/* Three equal columns, 40px apart. Intro: text across two, photo in the third.
   Rows below: label in the first, content across the other two. */
.about-intro, .about-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; }
.about-intro { align-items: center; }
.about-intro__text { grid-column: 1 / 3; max-width: 600px; }
.about-page .page-head h1 { font-size: 32px; line-height: 42px; font-weight: 400; letter-spacing: -.01em; }
.about-page .page-head p { margin-top: 14px; font-size: 18px; line-height: 30px; font-weight: 300; color: var(--muted); max-width: none; }
.about-intro__img { grid-column: 3; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.about-intro__img img { width: 100%; height: 100%; object-fit: cover; }

.about-sec { padding: 64px 0 80px; }
.about-row + .about-row { margin-top: 72px; }
.about-row__label { padding-top: 16px; }
.about-row > :last-child { grid-column: 2 / 4; }
.about-row h2, .about-block h2 { font-size: 20px; line-height: 32px; font-weight: 400; color: var(--ink); margin: 0; }
.about-row__label p { margin-top: 8px; max-width: 300px; font-size: 14px; line-height: 24px; color: var(--muted); }
.cv { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cv__item { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cv__item h3 { font-size: 16px; line-height: 24px; font-weight: 400; color: var(--ink); }
.cv__item p { margin-top: 2px; font-size: 14px; line-height: 24px; color: var(--muted); }
.cv__year { flex: none; font-size: 14px; line-height: 24px; color: var(--muted); font-variant-numeric: tabular-nums; }
.skills { border-top: 1px solid var(--line); }
.skill { border-bottom: 1px solid var(--line); }
.skill__btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; text-align: left; }
.skill__btn h3 { font-size: 16px; line-height: 24px; font-weight: 400; color: var(--ink); }
.skill__plus { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--pill-border); display: grid; place-items: center; flex: none; transition: transform .35s var(--ease), background .25s, color .25s; }
.skill__plus svg { width: 12px; height: 12px; }
.skill.is-open .skill__plus { transform: rotate(45deg); background: var(--ink); color: #fff; border-color: var(--ink); }
.skill__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.skill.is-open .skill__body { grid-template-rows: 1fr; }
.skill__body > div { overflow: hidden; }
.skill__body p { padding-bottom: 20px; color: var(--muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 22px; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--surface); font-size: 13px; color: var(--ink-2); }

.about-block { padding: 40px 0 60px; }
.about-block h2 { margin: 0; }
.about-block .about-wrap > p { color: var(--muted); font-size: 14px; line-height: 24px; margin: 0; }
/* Photo rows as on Webflow: 3, 4 and 5 across, 8px apart */
.photo-grid { display: grid; gap: 8px; margin-top: 8px; }
.about-block .about-wrap > p + .photo-grid { margin-top: 28px; }
.photo-grid--3 { grid-template-columns: repeat(3, 1fr); }
.photo-grid--4 { grid-template-columns: repeat(4, 1fr); }
.photo-grid--5 { grid-template-columns: repeat(5, 1fr); }
.photo-grid img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); background: var(--surface); }
.photo-grid--tall img { aspect-ratio: 1440 / 1943; }

@media (max-width: 991px) {
  .about-intro { grid-template-columns: minmax(0, 1fr) 240px; column-gap: 32px; }
  .about-intro__text { grid-column: 1; }
  .about-intro__img { grid-column: 2; }
  .about-page .page-head h1 { font-size: 26px; line-height: 36px; }
  .about-page .page-head p { font-size: 16px; line-height: 28px; }
  .about-row { grid-template-columns: 160px minmax(0, 1fr); column-gap: 32px; }
  .about-row > :last-child { grid-column: 2; }
  .photo-grid + .photo-grid { margin-top: 20px; }
}
@media (max-width: 767px) {
  .about-page .page-head { padding: 40px 0; }
  .about-intro, .about-row { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
  .about-intro__img { grid-column: 1; width: min(100%, 320px); }
  .about-sec { padding: 40px 0 56px; }
  .about-row + .about-row { margin-top: 48px; }
  .about-row > :last-child { grid-column: 1; }
  .about-row { row-gap: 16px; }
  .about-row__label { padding-top: 0; }
  .about-row__label p { max-width: none; }
}
@media (max-width: 479px) {
  .about-page .page-head { padding: 20px 0 40px; }
  .about-page .page-head h1 { font-size: 22px; line-height: 32px; }
  .about-intro__img { width: 100%; }
  .cv__item { flex-direction: column; gap: 2px; }
  .photo-grid--3 { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Gallery page
   -------------------------------------------------------------------------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--pill-border); font-size: 14px; color: var(--muted-2); background: #fff; transition: all .25s var(--ease); text-transform: capitalize; }
.tab:hover { color: var(--ink); border-color: var(--ink); }
.tab.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.gal-section { scroll-margin-top: calc(var(--nav-h) + 24px); }
/* Gallery page: 3 columns of 300px-tall tiles across the content column,
   207px from one grid's last row to the next title */
.gallery-page .page-head { padding: 50px 0 40px; }
.gallery-page .page-head h1 { font-size: 20px; line-height: 28px; font-weight: 400; letter-spacing: 0; }
.gallery-page .page-head p { font-size: 14px; line-height: 24px; margin-top: 8px; }
.gal-section + .divider + .gal-section { padding-top: 106px; }
.gal-section .section-head { margin-bottom: 40px; }
.xgrid--gal { grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 4px 0 0; }
.xgrid--gal .xitem__media { height: 300px; }
#selected { padding-top: 105px; }
#selected .section-head { margin-bottom: 72px; }
.section-head--center { text-align: center; }
.section-head--center h2 { font-size: 20px; line-height: 40px; }
@media (max-width: 991px) {
  .xgrid--gal { grid-template-columns: repeat(2, 1fr); padding: 0; }
  .xgrid--gal .xitem__media { height: auto; }
}
@media (max-width: 479px) {
  .xgrid--gal { grid-template-columns: 1fr; }
}

.carousel { position: relative; }
.carousel__track { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 8px; scrollbar-width: none; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { flex: 0 0 calc((100% - 16px) / 3); aspect-ratio: 395 / 305; scroll-snap-align: start; border-radius: var(--radius); overflow: hidden; background: var(--surface); cursor: zoom-in; }
.carousel__slide img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767px) { .carousel__slide { flex-basis: calc((100% - 8px) / 2); } }
@media (max-width: 479px) { .carousel__slide { flex-basis: 86%; } }
.carousel__controls { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 16px; flex-wrap: wrap; }
.carousel__btns { display: flex; gap: 8px; }
.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--pill-border); background: #fff; display: grid; place-items: center; transition: background .2s, color .2s, border-color .2s, opacity .2s; }
.round-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.round-btn:disabled { opacity: .35; pointer-events: none; }
.round-btn svg { width: 16px; height: 16px; }
.progress { flex: 1; max-width: 240px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .3s var(--ease); }

/* --------------------------------------------------------------------------
   Resume
   -------------------------------------------------------------------------- */
.resume-sheet { max-width: 880px; margin: 0 auto; border-radius: var(--radius-lg); overflow: hidden; background: #fff; box-shadow: 0 1px 0 var(--line), 0 30px 60px -30px rgba(0,0,0,.18); border: 1px solid var(--line); }
.page-head--center { text-align: center; }
.page-head--center p { margin-left: auto; margin-right: auto; }
.page-head .pill { margin-top: 20px; }
/* Resume — Webflow: centred 20px title 30px under the nav, 710px sheet 49px under the button */
.resume-page .page-head { padding: 30px 0 49px; }
.resume-page .page-head h1 { font-size: 20px; line-height: 40px; font-weight: 400; letter-spacing: 0; }
.resume-page .page-head p { margin-top: 0; font-size: 14px; line-height: 24px; }
.resume-page .page-head .pill { margin-top: 11px; }
.resume-page .resume-sheet { max-width: 710px; }
@media (max-width: 991px) {
  .resume-page .page-head { padding-top: 90px; }
  .resume-page .resume-sheet { max-width: 488px; }
}
@media (max-width: 479px) {
  .resume-page .page-head { padding-top: 0; }
  .resume-page .resume-sheet { max-width: none; }
}

/* --------------------------------------------------------------------------
   Case study
   -------------------------------------------------------------------------- */
.cs { position: relative; }
.cs-toc { position: fixed; top: 194px; left: 40px; z-index: 10; list-style: none; margin: 0; padding: 0; transition: opacity .3s; }
.cs-toc a { display: block; padding: 2.5px 0; font-size: 16px; line-height: 22px; font-weight: 300; color: #a3a3a3; text-transform: lowercase; transition: color .2s, transform .3s var(--ease); }
.cs-toc a:hover { color: var(--ink-2); }
.cs-toc a.is-active { color: var(--ink); transform: translateX(4px); }
.cs-toc.is-hidden { opacity: 0; pointer-events: none; }
@media (max-width: 1279px) { .cs-toc { display: none; } }

/* Case-study grid: images span the content column (same margins as every page),
   info block 980px, text 740px, ~141px around each text block, 8px between stacked images */
.cs > .container { max-width: none; padding: 0; }
.cs-hero, .cs .container > .panel, .cs-section > .panel, .cs-section > .media-stack, .cs-section > .media-row,
.cs-section > .compare, .cs .next-project { width: calc(100% - 2 * var(--gutter)); max-width: 1200px; margin-left: auto; margin-right: auto; }
.cs-hero { text-align: center; padding: 20px 0 40px; }
.cs-hero h1 { font-size: 20px; font-weight: 400; color: var(--ink); line-height: 32px; max-width: none; margin: 0 auto; letter-spacing: 0; }
.cs-hero p { margin-top: 0; font-size: 15px; line-height: 28px; color: var(--muted); }
.cs-hero .pill { margin-top: 26px; }

.panel { background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; }
.panel img { width: 100%; height: auto; }
.panel--pad { padding: clamp(16px, 4vw, 48px); }
.media-stack { display: grid; gap: 8px; }
.media-row { display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); gap: 8px; }
@media (max-width: 600px) { .media-row { grid-template-columns: 1fr; } }
.zoomable { cursor: zoom-in; }
.cs-section > * + .panel, .cs-section > * + .media-stack, .cs-section > * + .media-row, .cs-section > .media-stack + .media-stack { margin-top: 8px; }
.cs-section > .prose + * { margin-top: 0; }

.cs-info { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 78px; width: calc(100% - 2 * var(--gutter)); max-width: 980px; margin: 0 auto; padding: 60px 0 62px; }
.cs-info h2 { font-size: 16px; line-height: 20px; font-weight: 400; color: var(--ink); margin-bottom: 8px; }
.cs-info p, .cs-info li { font-size: 15px; color: var(--muted); line-height: 28px; }
.cs-info ul { list-style: none; margin: 0; padding: 0; }
/* Case studies without a divider line under the info block (Webflow: 160px to the first heading) */
.cs-info--noline { padding-bottom: 21px; }
@media (max-width: 600px) { .cs-info { grid-template-columns: 1fr; } }

.cs-section { scroll-margin-top: calc(var(--nav-h) + 20px); padding-top: 0; }
.prose { width: calc(100% - 2 * var(--gutter)); max-width: 740px; margin: 0 auto; padding: 139px 0 140px; }
.prose h2 { font-size: 20px; font-weight: 400; color: var(--ink); line-height: 28px; margin-bottom: 0; letter-spacing: 0; }
.prose h3 { font-size: 16px; font-weight: 400; color: var(--ink); margin: 24px 0 0; line-height: 28px; }
.prose p { color: var(--muted); font-size: 15px; line-height: 28px; }
.prose h2 + p { margin-top: 30px; }
.prose p + p { margin-top: 14px; }
.prose .label { display: inline-block; font-size: 14px; line-height: 24px; color: var(--muted); margin-bottom: 10px; }
@media (max-width: 991px) {
  .cs-hero { padding-top: 40px; }
  .cs-info { width: 64%; gap: 40px 76px; }
  .prose { max-width: 380px; }
}
@media (max-width: 479px) {
  .cs-hero { padding-top: 17px; }
  .cs-hero h1 { font-size: 30px; line-height: 32px; }
  .cs-info { width: calc(100% - 2 * var(--gutter)); grid-template-columns: 1fr; }
  .cs-info h2 { margin-bottom: 28px; }
  .prose { width: calc(100% - 2 * var(--gutter)); max-width: none; }
  .prose h2 { font-size: 24px; line-height: 30px; }
  .prose p { line-height: 30px; }
}
.quote { font-size: clamp(20px, 2.4vw, 26px); color: var(--ink); text-align: center; font-weight: 300; padding: clamp(28px, 5vw, 56px) 0; }

.flows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 860px; margin: 0 auto; padding: clamp(28px, 5vw, 48px) 0; }
.flow { padding: 20px; border-radius: var(--radius-lg); background: var(--surface); }
.flow h3 { font-size: 15px; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.flow p { font-size: 14px; color: var(--muted); line-height: 1.65; }
@media (max-width: 767px) { .flows { grid-template-columns: 1fr; } }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare figure { margin: 0; }
.compare figcaption { margin-top: 8px; font-size: 14px; line-height: 24px; color: var(--muted); }
@media (max-width: 600px) { .compare { grid-template-columns: 1fr; } }

/* Image grids that keep the Webflow column counts: 4-up, 3-up and 2-up rows */
.media-grid { display: grid; gap: 8px; width: calc(100% - 2 * var(--gutter)); max-width: 1200px; margin: 8px auto 0; }
.media-grid--2 { grid-template-columns: repeat(2, 1fr); }
.media-grid--3 { grid-template-columns: repeat(3, 1fr); }
.media-grid--4 { grid-template-columns: repeat(4, 1fr); }
.prose + .media-grid { margin-top: 0; }
@media (max-width: 479px) { .media-grid--4 { grid-template-columns: repeat(2, 1fr); } }

/* Videos: full-width clips are 500px tall at desktop, like the Webflow page */
.cs-video { border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); aspect-ratio: 1140 / 500; }
.cs-video video, .flow-row__video video { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 991px) { .cs-video { aspect-ratio: 16 / 9; } }

/* Before/after switch: a labelled two-way control above a pair of stacked images */
.compare-switch { width: calc(100% - 2 * var(--gutter)); max-width: 1200px; margin: 0 auto 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cs-section > .compare-switch + .switch-stage { margin-top: 0; }
.cs-section > .prose + .compare-switch { margin-top: -22px; }
.cs-section > .switch-stage { width: calc(100% - 2 * var(--gutter)); max-width: 1200px; margin-left: auto; margin-right: auto; }
.switch { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--pill-border); }
.switch::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--ink); transition: transform .4s var(--ease); }
.switch[data-state="b"]::before { transform: translateX(100%); }
.switch button { position: relative; z-index: 1; min-width: 132px; height: 40px; padding: 0 22px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 15px; font-weight: 400; line-height: 1; white-space: nowrap; color: var(--muted); cursor: pointer; transition: color .3s; }
.switch button:hover { color: var(--ink); }
.switch button[aria-pressed="true"] { color: #fff; }
.switch button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
/* One-time nudge when the switch scrolls into view, until it has been used */
.switch.is-seen:not(.is-used)::before { animation: switch-nudge 1.5s var(--ease) .5s 2; }
@keyframes switch-nudge { 0%, 55%, 100% { transform: translateX(0); } 25% { transform: translateX(16px); } }
.switch-stage { display: grid; }
.switch-stage img { grid-area: 1 / 1; transition: opacity .45s var(--ease), visibility .45s; }
.switch-stage[data-show="a"] img:nth-child(2), .switch-stage[data-show="b"] img:nth-child(1) { opacity: 0; visibility: hidden; }
@media (max-width: 479px) {
  .switch { display: grid; width: 100%; }
  .switch button { min-width: 0; padding: 0 10px; font-size: 14px; }
}

/* User story rows: text beside a screen recording, alternating sides */
.flow-rows { width: calc(100% - 2 * var(--gutter)); max-width: 1200px; margin: 0 auto; }
.flow-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; margin-top: 100px; }
.flow-row__text { max-width: 500px; width: 100%; margin: 0 auto; padding: 0 40px; }
.flow-row__text h3 { font-size: 20px; line-height: 28px; font-weight: 400; color: var(--ink); margin: 0 0 8px; }
.flow-row__text p { font-size: 15px; line-height: 28px; color: var(--muted); }
.flow-row__video { width: 100%; max-width: 533px; margin: 0 auto; aspect-ratio: 16 / 9; background: var(--surface); }
@media (max-width: 767px) {
  .flow-row { grid-template-columns: 1fr; gap: 20px; margin-top: 60px; }
  .flow-row__text { order: 2; max-width: none; padding: 0; }
  .flow-row__video { max-width: none; }
}
.pairs { margin-top: 120px; }
.pairs > .media-grid:first-child { margin-top: 0; }
@media (max-width: 767px) { .pairs { margin-top: 80px; } }

/* Text block followed directly by the user-story line */
.prose--tight { padding-bottom: 100px; }
.cs-quote { width: calc(100% - 2 * var(--gutter)); max-width: 740px; margin: 0 auto; padding: 0 0 140px; text-align: center; font-size: 30px; line-height: 62px; font-weight: 300; color: var(--muted); }
@media (max-width: 767px) { .cs-quote { font-size: 22px; line-height: 40px; padding-bottom: 100px; } }
.prose p + h2 { margin-top: 30px; }

/* Tesla case study: big gradient title, then full-width slides (as on Webflow) */
.page-white { --bg: #fff; }
.tesla-hero { text-align: center; padding: 20px 5% 0; }
.tesla-hero h1 { margin: 0; font-size: 70px; line-height: 84px; font-weight: 700; letter-spacing: 0; color: var(--ink); }
.tesla-hero h1 strong { font-weight: 700; color: #0b5cff; background-image: linear-gradient(90deg, #0b5cff, #31a8ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.tesla-hero p { margin-top: 24px; font-size: 20px; line-height: 28px; font-weight: 500; color: #555; }
.tesla-cover { width: calc(100% - 2 * var(--gutter)); max-width: 1200px; margin: 40px auto 0; border-radius: var(--radius); overflow: hidden; }
.tesla-cover img { display: block; width: 100%; height: auto; }
.slides { max-width: 1920px; margin: 0 auto; }
.slides > img { display: block; width: 100%; height: auto; }
.cs-section.slides + .cs-section.slides { margin-top: 9px; }
.gif-row { display: grid; grid-template-columns: .75fr 1fr 1fr 1fr .75fr; }
.gif-row img { display: block; width: 100%; height: auto; aspect-ratio: 317 / 551; object-fit: cover; }
.gif-row img:first-child { grid-column: 2; }
@media (max-width: 767px) {
  .tesla-hero { padding-top: 72px; }
  .tesla-hero h1 { font-size: 48px; line-height: 58px; }
}
@media (max-width: 479px) {
  .tesla-hero { padding-top: 90px; }
  .tesla-hero h1 { font-size: 20px; line-height: 24px; }
  .tesla-hero p { font-size: 16px; line-height: 20px; }
}

.next-project { display: block; margin-top: clamp(48px, 8vw, 96px); padding: clamp(28px, 5vw, 48px); border-radius: var(--radius-lg); background: var(--surface); transition: background .3s; }
.next-project:hover { background: var(--surface-2); }
.next-project__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: center; }
.next-project small { font-size: 14px; line-height: 24px; color: var(--muted); }
.next-project h2 { margin-top: 8px; font-size: clamp(20px, 2.4vw, 26px); font-weight: 400; color: var(--ink); }
.next-project p { color: var(--muted); font-size: 15px; margin-top: 4px; }
.next-project .pill { margin-top: 20px; }
.next-project:hover .pill { background: var(--ink); color: #fff; border-color: var(--ink); }
.next-project__img { border-radius: var(--radius); overflow: hidden; }
.next-project__img img { transition: transform 1s var(--ease); }
.next-project:hover .next-project__img img { transform: scale(1.03); }
@media (max-width: 767px) { .next-project__grid { grid-template-columns: 1fr; } }
.explore--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 600px) { .explore--2 { grid-template-columns: 1fr; } }
