/* ==========================================================================
   manachai.com — 2026 interactive edition
   Light, type-led layout with dark story sections. GSAP + Lenis drive motion.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-2: #f4f4f1;
  --bg-3: #ebebe7;
  --ink: #0e0e0e;
  --ink-2: #454545;
  --muted: #8a8a86;
  --line: #e6e6e2;
  --dark: #0a0a0a;
  --dark-2: #151515;
  --dark-3: #232323;
  --on-dark: #f4f4f1;
  --on-dark-2: #a6a6a2;
  --accent: #1f4ed8;
  --brand: #114488;

  --font-display: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 26px;
  --radius-sm: 16px;
  --gutter: clamp(20px, 5vw, 80px);
  --max: 1480px;
  --nav-h: 76px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-2: cubic-bezier(0.76, 0, 0.24, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

::selection { background: var(--ink); color: var(--bg); }

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* ---------- Typography ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.96;
}
.h-xxl { font-size: clamp(58px, 9.8vw, 156px); }
.h-xl  { font-size: clamp(44px, 6.6vw, 104px); }
.h-lg  { font-size: clamp(34px, 4.6vw, 68px); letter-spacing: -0.03em; line-height: 1.02; }
.h-md  { font-size: clamp(26px, 3.2vw, 44px); letter-spacing: -0.025em; line-height: 1.08; }
.h-sm  { font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.02em; line-height: 1.15; }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.lead { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--bg);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
  will-change: transform;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-hover, var(--accent));
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform .45s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover { color: #fff; }
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border: 1px solid var(--ink);
}
.btn--ghost:hover { border-color: var(--accent); }
.btn--light { --btn-bg: var(--on-dark); --btn-fg: var(--dark); }
.btn--light:hover { color: #fff; }
.btn--ghost-light { --btn-bg: transparent; --btn-fg: var(--on-dark); border: 1px solid rgba(255,255,255,.35); }
.btn--ghost-light:hover { border-color: var(--accent); }
.btn__icon { width: 16px; height: 16px; flex: none; transition: transform .4s var(--ease); }
.btn:hover .btn__icon--down { transform: translateY(3px); }
.btn:hover .btn__icon--right { transform: translateX(4px); }
.btn:hover .btn__icon--diag { transform: translate(3px, -3px); }
.btn--sm { padding: 12px 18px; font-size: 14px; }

/* ---------- Preloader ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--dark);
  color: var(--on-dark);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px var(--gutter);
  will-change: transform;
}
.loader__top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; letter-spacing: .02em; }
.loader__name { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.loader__bottom { display: flex; justify-content: space-between; align-items: flex-end; }
.loader__count { font-family: var(--font-display); font-weight: 500; font-size: clamp(64px, 12vw, 180px); letter-spacing: -.05em; line-height: .9; font-variant-numeric: tabular-nums; }
.loader__bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--on-dark); transform-origin: left; transform: scaleX(0); }
html.is-loading { overflow: hidden; }

/* ---------- Ticker ---------- */

.ticker {
  position: relative;
  z-index: 60;
  background: var(--dark);
  color: var(--on-dark);
  font-size: 13px;
  letter-spacing: .01em;
  height: 38px;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}
.ticker__track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: ticker var(--ticker-speed, 40s) linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item { display: inline-flex; align-items: center; gap: 22px; padding-right: 22px; }
.ticker__item .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: inline-block; }
.ticker__item a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.35); }
.ticker__item a:hover { text-decoration-color: #fff; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 70;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: transform .5s var(--ease), border-color .3s, background .3s;
}
.nav.is-scrolled { border-color: var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__logo { display: inline-flex; align-items: center; gap: 12px; }
.nav__logo img { height: 16px; width: auto; }
.nav__logo span { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.nav__links { display: flex; gap: 34px; }
.nav__links a {
  position: relative;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 8px 0;
  transition: color .3s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1.5px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { display: inline-flex; align-items: center; gap: 12px; }
.nav__burger {
  display: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
}
.nav__burger span { width: 18px; height: 1.5px; background: var(--ink); transition: transform .4s var(--ease), opacity .3s; }
.nav__burger.is-open span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav__burger.is-open span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: var(--dark);
  color: var(--on-dark);
  padding: calc(var(--nav-h) + 40px) var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
}
.menu__links a { display: block; font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 10vw, 72px); letter-spacing: -.03em; line-height: 1.05; padding: 6px 0; }
.menu__meta { display: flex; flex-wrap: wrap; gap: 18px 32px; font-size: 14px; color: var(--on-dark-2); }
.menu__meta a { color: var(--on-dark); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: calc(100svh - var(--nav-h) - 38px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(56px, 9vh, 120px) clamp(48px, 7vh, 96px);
  overflow: hidden;
}
.hero__grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
.hero__eyebrow { font-size: 15px; font-weight: 500; color: var(--ink-2); margin-bottom: clamp(20px, 3vh, 36px); }
.hero__title { color: var(--ink); }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero__title .line > span { display: block; will-change: transform; }
.hero__title .line em { font-style: normal; color: var(--accent); }
.hero__sub { margin-top: clamp(24px, 3.5vh, 40px); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(26px, 4vh, 44px); }
.hero__badge {
  position: relative;
  width: clamp(120px, 12vw, 168px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--ink);
}
.hero__badge svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 18s linear infinite; }
.hero__badge svg text { font-family: var(--font-body); font-size: 7.4px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; fill: var(--ink); }
.hero__badge .arrow { width: 26px; height: 26px; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero__scroll { position: absolute; left: var(--gutter); bottom: 22px; display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hero__scroll i { display: block; width: 1px; height: 36px; background: var(--line); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform: translateY(-100%); animation: scrollhint 1.8s var(--ease-2) infinite; }
@keyframes scrollhint { 0% { transform: translateY(-100%); } 55% { transform: translateY(0); } 100% { transform: translateY(100%); } }

/* ---------- Sections ---------- */

.section { padding-block: clamp(72px, 10vw, 150px); }
.section--tight { padding-block: clamp(48px, 7vw, 100px); }
.section__head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; align-items: end; margin-bottom: clamp(36px, 5vw, 72px); }
.section__head .lead { justify-self: end; }
.section--dark { background: var(--dark); color: var(--on-dark); }
.section--dark .eyebrow { color: var(--on-dark-2); }
.section--dark .lead { color: var(--on-dark-2); }
.section--soft { background: var(--bg-2); }

/* ---------- About ---------- */

.about__card {
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, .8fr);
  gap: 32px;
  align-items: end;
}
.about__text { font-family: var(--font-display); font-weight: 500; font-size: clamp(22px, 2.6vw, 38px); letter-spacing: -.02em; line-height: 1.22; }
.about__text .w { display: inline-block; opacity: .16; will-change: opacity; }
.about__side { display: flex; flex-direction: column; gap: 22px; justify-self: end; align-items: flex-end; text-align: right; }
.about__side p { font-size: 15px; color: var(--ink-2); max-width: 28ch; }
.statement { text-align: center; max-width: 22ch; margin: clamp(60px, 9vw, 120px) auto 0; }
.statement em { font-style: normal; color: var(--muted); }

/* ---------- Media / reveal ---------- */

.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-3);
  isolation: isolate;
}
.media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); will-change: transform; }
.media--reveal { clip-path: inset(6% 4% 6% 4% round var(--radius)); }
.media--portrait { aspect-ratio: 16 / 9; margin-top: clamp(48px, 6vw, 88px); }
.media--portrait img { object-position: 50% 30%; filter: grayscale(1); transition: filter .8s var(--ease); }
.media--portrait:hover img { filter: grayscale(0); }
.media__caption { position: absolute; left: 24px; bottom: 22px; z-index: 2; display: flex; gap: 10px; align-items: center; color: #fff; font-size: 13px; letter-spacing: .04em; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.media__caption i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- Stats ---------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: clamp(48px, 6vw, 88px); }
.stat { padding: clamp(24px, 3vw, 40px) 0 clamp(24px, 3vw, 40px) clamp(16px, 2vw, 28px); border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__num { font-family: var(--font-display); font-weight: 600; font-size: clamp(38px, 4.8vw, 72px); letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat__num small { font-size: .5em; letter-spacing: -.02em; margin-left: .06em; color: var(--muted); }
.stat__label { margin-top: 10px; font-size: 14px; color: var(--ink-2); max-width: 20ch; }

/* ---------- Expertise cards ---------- */

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card {
  --tone: 0;
  position: relative;
  min-height: clamp(240px, 26vw, 360px);
  padding: 26px 26px 24px;
  border-radius: var(--radius);
  background: var(--card-bg, var(--bg-2));
  color: var(--card-fg, var(--ink));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  will-change: transform;
}
.card:hover { box-shadow: 0 30px 60px -30px rgba(0,0,0,.35); }
.card__idx { font-size: 12px; letter-spacing: .12em; font-weight: 700; opacity: .55; }
.card__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -.025em; line-height: 1.05; margin-top: 14px; }
.card__body { font-size: 14.5px; line-height: 1.5; opacity: .82; margin-top: 18px; }
.card__glow { position: absolute; inset: -40%; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.35), transparent 40%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.card:hover .card__glow { opacity: 1; }
.card--t1 { --card-bg: #f1f1ee; }
.card--t2 { --card-bg: #e7e7e3; }
.card--t3 { --card-bg: #dcdcd7; }
.card--t4 { --card-bg: #cfcfca; }
.card--t5 { --card-bg: #9f9f9a; --card-fg: #fff; }
.card--t6 { --card-bg: #5c5c59; --card-fg: #fff; }
.card--t7 { --card-bg: #2a2a29; --card-fg: #fff; }
.card--t8 { --card-bg: var(--dark); --card-fg: #fff; }
.card--wide { grid-column: span 2; }
.card--cta { justify-content: center; align-items: flex-start; gap: 20px; }
.card--cta .card__glow { background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(31,78,216,.55), transparent 45%); }

/* ---------- Clients ---------- */

.clients {
  background: var(--dark);
  color: var(--on-dark);
  border-radius: var(--radius);
  padding: clamp(32px, 5vw, 72px);
  display: grid;
  gap: 32px;
}
.clients__list { font-family: var(--font-display); font-weight: 500; font-size: clamp(24px, 3.4vw, 50px); letter-spacing: -.025em; line-height: 1.22; max-width: 24ch; }
.clients__list span { display: inline; opacity: .55; transition: opacity .3s, color .3s; cursor: default; }
.clients__list span:hover { opacity: 1; color: #fff; }
.clients__list span.is-lit { opacity: 1; }
.clients__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.clients__foot p { color: var(--on-dark-2); font-size: 15px; max-width: 46ch; }

.logos { margin-top: 18px; padding-block: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.logos__label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.logos__track { display: flex; width: max-content; gap: clamp(48px, 8vw, 120px); align-items: center; animation: ticker 28s linear infinite; }
.logos:hover .logos__track { animation-play-state: paused; }
.logos__track img { height: 30px; width: auto; opacity: .55; filter: grayscale(1) contrast(1.1); transition: opacity .3s, filter .3s; }
.logos__track img.is-tall { height: 40px; }
.logos__track img:hover { opacity: 1; filter: none; }
.logos__track span { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -.02em; color: var(--ink-2); opacity: .7; white-space: nowrap; }

/* ---------- Big marquee ---------- */

.marquee { background: var(--dark); color: var(--on-dark); padding-block: clamp(28px, 4vw, 48px); overflow: hidden; border-top: 1px solid rgba(255,255,255,.08); }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__item { font-family: var(--font-display); font-weight: 600; font-size: clamp(56px, 9vw, 150px); letter-spacing: -.04em; line-height: 1; white-space: nowrap; padding-right: .35em; }
.marquee__item em { font-style: normal; -webkit-text-stroke: 1.5px rgba(255,255,255,.7); color: transparent; }

/* ---------- Pinned story ---------- */

.story { background: var(--dark); color: var(--on-dark); position: relative; }
.story__intro { padding: clamp(80px, 12vw, 170px) var(--gutter) clamp(40px, 7vw, 100px); text-align: center; }
.story__intro p { margin: 0 auto; max-width: 30ch; font-family: var(--font-display); font-weight: 500; font-size: clamp(24px, 3.4vw, 50px); letter-spacing: -.025em; line-height: 1.22; }
.story__intro .w { display: inline-block; opacity: .16; }
.story__pin { position: relative; height: 100svh; overflow: hidden; }
.story__bg { position: absolute; inset: 0; }
.story__bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: grayscale(1) brightness(.5) contrast(1.05); transform: scale(1.1); will-change: opacity, transform; }
.story__bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,.05), rgba(0,0,0,.7) 75%); }
.story__texts { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 var(--gutter); text-align: center; }
.story__line { grid-area: 1 / 1; max-width: 18ch; opacity: 0; will-change: opacity, transform; }
.story__line .k { display: block; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-2); margin-bottom: 18px; font-family: var(--font-body); font-weight: 600; }
.story__hint { position: absolute; left: 0; right: 0; bottom: 26px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-2); }
.story__hint svg { width: 14px; height: 14px; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.story__progress { position: absolute; top: 0; left: 0; height: 2px; width: 100%; background: rgba(255,255,255,.12); }
.story__progress i { display: block; height: 100%; width: 100%; background: var(--on-dark); transform-origin: left; transform: scaleX(0); }

.cta { text-align: center; padding: clamp(90px, 14vw, 200px) var(--gutter); background: var(--dark); color: var(--on-dark); }
.cta h2 { max-width: 20ch; margin-inline: auto; }
.cta h2 em { font-style: normal; color: var(--on-dark-2); }
.cta .btn { margin-top: 40px; }

/* ---------- Work list ---------- */

.work { position: relative; }
.work__list { border-top: 1px solid var(--line); }
.work__row {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: clamp(22px, 3vw, 38px) 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: padding .4s var(--ease);
}
.work__row:hover { padding-left: 14px; }
.work__row::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.work__row:hover::after { transform: scaleX(1); }
.work__idx { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.work__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 3vw, 44px); letter-spacing: -.03em; line-height: 1.05; }
.work__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.work__meta span { font-size: 12.5px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); }
.work__year { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 14px; }
.work__year svg { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.work__row:hover .work__year svg { transform: translate(3px, -3px); }
.work__thumb { display: none; }
.work__preview {
  position: fixed;
  top: 0; left: 0;
  z-index: 50;
  width: clamp(240px, 24vw, 380px);
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.8);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.45);
  will-change: transform;
}
.work__preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; }
.work__preview img.is-on { opacity: 1; }

/* ---------- Footer ---------- */

.footer { padding: clamp(72px, 10vw, 140px) 0 36px; }
.footer__wrap { padding-top: 12px; }
.footer__grid { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 40px; margin-top: clamp(40px, 6vw, 80px); padding-top: 40px; border-top: 1px solid var(--line); }
.footer__col h4 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; font-weight: 700; }
.footer__col a { display: block; padding: 5px 0; font-size: 15px; color: var(--ink-2); transition: color .3s, transform .3s var(--ease); }
.footer__col a:hover { color: var(--ink); transform: translateX(4px); }
.footer__contact .h-md { margin-bottom: 20px; }
.footer__contact a.big { font-family: var(--font-display); font-weight: 500; font-size: clamp(18px, 2vw, 26px); letter-spacing: -.02em; color: var(--ink); padding: 4px 0; }
.footer__contact a.big:hover { color: var(--accent); }
.footer__cta { margin-top: 24px; }
.footer__social { display: flex; gap: 10px; margin-top: 22px; }
.footer__social a { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; transition: background .3s, color .3s, border-color .3s; }
.footer__social a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.footer__social svg { width: 18px; height: 18px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer__bottom p { max-width: 70ch; }
.footer__top { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.footer__top:hover { color: var(--ink); }

/* ---------- Cursor ---------- */

.cursor { position: fixed; top: 0; left: 0; z-index: 2000; pointer-events: none; mix-blend-mode: difference; }
.cursor__dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%); }
.cursor__ring { position: absolute; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.9); transform: translate(-50%, -50%); transition: width .35s var(--ease), height .35s var(--ease), background .35s; display: grid; place-items: center; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #000; }
.cursor.is-hover .cursor__ring { width: 64px; height: 64px; background: rgba(255,255,255,.95); }
.cursor.is-label .cursor__ring { width: 84px; height: 84px; background: #fff; }
.cursor.is-label .cursor__dot { opacity: 0; }
@media (pointer: coarse) { .cursor { display: none; } }
@media (pointer: fine) { body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; } }

/* ---------- Profile page ---------- */

.phead { padding-block: clamp(48px, 7vw, 100px) clamp(40px, 6vw, 80px); }
.phead__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(24px, 4vw, 48px); }
.phead__name .line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.phead__name .line > span { display: block; }
.phead__name em { font-style: normal; color: var(--muted); }
.phead__meta { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 14px; color: var(--ink-2); }
.phead__meta span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 10px; vertical-align: middle; }
.phead__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 4vw, 64px); align-items: stretch; }
.phead__media { min-height: 440px; }
.phead__media img { object-position: 60% 30%; }
.phead__body { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.phead__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.fact { background: var(--bg-2); border-radius: var(--radius-sm); padding: 18px 20px; }
.fact b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -.02em; }
.fact span { font-size: 13px; color: var(--muted); }

.highlights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.hl { background: var(--dark); color: var(--on-dark); border-radius: var(--radius); padding: 28px 26px; min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.hl:nth-child(2) { background: var(--dark-3); }
.hl:nth-child(3) { background: #3a3a38; }
.hl:nth-child(4) { background: var(--accent); }
.hl b { font-family: var(--font-display); font-weight: 600; font-size: clamp(36px, 4vw, 60px); letter-spacing: -.04em; line-height: 1; }
.hl b small { font-size: .5em; color: rgba(255,255,255,.65); margin-left: .05em; }
.hl p { font-size: 14px; line-height: 1.45; color: rgba(255,255,255,.78); }
.hl__glow { position: absolute; inset: -40%; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.22), transparent 42%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.hl:hover .hl__glow { opacity: 1; }

/* Timeline */
.timeline { position: relative; }
.timeline__line { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line); }
.timeline__line i { display: block; width: 100%; height: 100%; background: var(--ink); transform-origin: top; transform: scaleY(0); }
.exp { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: 32px clamp(32px, 5vw, 96px); padding: clamp(36px, 5vw, 72px) 0 clamp(36px, 5vw, 72px) clamp(24px, 4vw, 56px); border-bottom: 1px solid var(--line); }
.exp:last-child { border-bottom: 0; }
.exp::before { content: ""; position: absolute; left: -5px; top: calc(clamp(36px, 5vw, 72px) + 10px); width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink); }
.exp__side { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; }
.exp__years { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.exp__role { margin-top: 12px; }
.exp__company { margin-top: 10px; font-size: 16px; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.exp__company img { height: 22px; width: auto; }
.exp__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.exp__tags span { font-size: 12px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); }
.exp__body ul { display: grid; gap: 14px; }
.exp__body li { position: relative; padding-left: 26px; color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.exp__body li::before { content: ""; position: absolute; left: 0; top: .72em; width: 12px; height: 1.5px; background: var(--ink); }
.exp__gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 28px; }
.exp__gallery .media { aspect-ratio: 4 / 3; border-radius: 14px; }
.exp__gallery .media:first-child { grid-column: span 2; aspect-ratio: 16 / 10; }
.exp__gallery .media img { transform: none; transition: transform .8s var(--ease); }
.exp__gallery .media:hover img { transform: scale(1.06); }
.exp__gallery.is-two { grid-template-columns: repeat(2, 1fr); }
.exp__gallery.is-two .media:first-child { grid-column: span 1; aspect-ratio: 4 / 3; }

/* Brands */
.brands { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.brands__list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.brand { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); transition: padding .35s var(--ease); }
.brand:hover { padding-left: 12px; }
.brand b { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.6vw, 36px); letter-spacing: -.03em; }
.brand small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.brand span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.brands__media { position: sticky; top: calc(var(--nav-h) + 32px); }
.brands__media .media { aspect-ratio: 1.4; background: #fff; border: 1px solid var(--line); }
.brands__media .media img { object-fit: contain; padding: 8%; transform: none; }

/* Skills accordion */
.acc { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__btn { width: 100%; display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 20px; padding: clamp(20px, 2.6vw, 30px) 0; text-align: left; }
.acc__btn small { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.acc__btn .h-md { transition: transform .4s var(--ease); }
.acc__btn:hover .h-md { transform: translateX(8px); }
.acc__icon { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: background .3s, color .3s, transform .5s var(--ease); }
.acc__icon svg { width: 16px; height: 16px; }
.acc__item.is-open .acc__icon { background: var(--ink); color: var(--bg); transform: rotate(45deg); }
.acc__panel { height: 0; overflow: hidden; }
.acc__inner { padding: 0 0 clamp(24px, 3vw, 36px) 76px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px 48px; }
.acc__inner p { color: var(--ink-2); font-size: 16px; max-width: 46ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-content: start; }
.chips span { font-size: 13.5px; padding: 9px 14px; border-radius: 999px; background: var(--bg-2); color: var(--ink); transition: background .3s, color .3s, transform .3s var(--ease); }
.chips span:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }

/* Education */
.edu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.edu__item { background: var(--bg-2); border-radius: var(--radius); padding: 28px 26px; min-height: 200px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.edu__item .eyebrow { color: var(--muted); }
.edu__item p { color: var(--ink-2); font-size: 15px; }

/* Horizontal gallery */
.hgal { background: var(--dark); color: var(--on-dark); overflow: hidden; }
.hgal__head { padding: clamp(64px, 9vw, 130px) var(--gutter) clamp(24px, 4vw, 48px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
.hgal__head .lead { color: var(--on-dark-2); }
.hgal__pin { height: 100svh; display: flex; align-items: center; }
.hgal__track { display: flex; gap: clamp(14px, 2vw, 28px); padding-inline: var(--gutter); will-change: transform; }
.hgal__item { flex: none; width: clamp(260px, 30vw, 460px); }
.hgal__item.is-tall { width: clamp(220px, 22vw, 340px); }
.hgal__item .media { aspect-ratio: 4 / 5; border-radius: 20px; background: var(--dark-3); }
.hgal__item.is-wide { width: clamp(340px, 44vw, 640px); }
.hgal__item.is-wide .media { aspect-ratio: 3 / 2; }
.hgal__item .media img { transform: scale(1); transition: transform .8s var(--ease); }
.hgal__item:hover .media img { transform: scale(1.05); }
.hgal__cap { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--on-dark-2); }
.hgal__cap b { color: var(--on-dark); font-weight: 600; }
.hgal__hint { padding: 0 var(--gutter) clamp(48px, 7vw, 90px); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-2); display: flex; align-items: center; gap: 12px; }
.hgal__hint i { width: 48px; height: 1px; background: rgba(255,255,255,.3); }

/* ---------- Reveal helpers ---------- */

[data-reveal] { opacity: 0; transform: translateY(28px); will-change: transform, opacity; }
[data-reveal].is-in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); }
.no-js [data-reveal] { opacity: 1; transform: none; }
.no-js .about__text .w, .no-js .story__intro .w { opacity: 1; }
.no-js .media--reveal { clip-path: none; }
.no-js .media img { transform: none; }
.no-js .story__bg img:first-child, .no-js .story__line:first-child { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .ticker__track, .logos__track, .hero__badge svg, .hero__scroll i::after, .story__hint svg { animation: none !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .highlights { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --nav-h: 66px; }
  .nav__links, .nav__cta .btn { display: none; }
  .nav__burger { display: flex; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__badge { display: none; }
  .section__head { grid-template-columns: 1fr; }
  .section__head .lead { justify-self: start; }
  .about__card { grid-template-columns: 1fr; }
  .about__side { align-items: flex-start; text-align: left; justify-self: start; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .work__row { grid-template-columns: 1fr; gap: 12px; }
  .work__idx { display: none; }
  .work__thumb { display: block; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; margin-bottom: 8px; }
  .work__thumb img { width: 100%; height: 100%; object-fit: cover; }
  .work__preview { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__contact { grid-column: span 2; }
  .phead__grid { grid-template-columns: 1fr; }
  .phead__media { aspect-ratio: 4 / 3; min-height: 0; }
  .exp { grid-template-columns: 1fr; padding-left: 24px; }
  .exp__side { position: static; }
  .brands { grid-template-columns: 1fr; }
  .brands__media { position: static; }
  .acc__inner { grid-template-columns: 1fr; padding-left: 0; }
  .acc__btn { grid-template-columns: 1fr auto; }
  .acc__btn small { display: none; }
  .edu { grid-template-columns: 1fr; }
  .hgal__pin { height: auto; padding-bottom: 32px; }
  .hgal__track { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 12px; }
  .hgal__track::-webkit-scrollbar { display: none; }
  .hgal__item { scroll-snap-align: start; width: min(78vw, 360px); }
  .hgal__item.is-wide, .hgal__item.is-tall { width: min(78vw, 360px); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; padding: 22px 20px 20px; }
  .card--wide { grid-column: span 1; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
  .highlights { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .exp__gallery { grid-template-columns: 1fr 1fr; }
  .exp__gallery .media:first-child { grid-column: span 2; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__contact { grid-column: span 1; }
  .hero { min-height: 0; }
  .hero__scroll { display: none; }
  .ticker { font-size: 12px; }
}
