/* ============================================================
   Leo Wan — Portfolio
   Dark / bold-sans / sky-blue — one long scroll
   ============================================================ */

:root {
  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "Montserrat", system-ui, sans-serif;

  --bg:      #0d0d0f;
  --bg-2:    #161619;
  --panel:   #1b1b1f;
  --ink:     #f4f4f5;
  --ink-soft:#bdbdc2;
  --muted:   #7e7e86;
  --line:    rgba(255,255,255,.12);
  --line-2:  rgba(255,255,255,.06);
  --accent:  #42d0b5;
  --accent-ink: #ffffff;

  --pad-x: clamp(22px, 6vw, 130px);
  --maxw: 1280px;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: .01em;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad-x); width: 100%; }

/* labels / eyebrows */
.eyebrow {
  font-size: 13px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase;
  color: var(--accent); display: inline-block;
}
.eyebrow.line::after {
  content: ""; display: block; width: 38px; height: 2px; background: var(--accent);
  margin-top: 14px; opacity: .8;
}

/* big section title */
.section-title {
  font-family: var(--font-display);
  font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  font-size: clamp(34px, 6vw, 76px); line-height: 1; margin: 0; text-align: center;
}
.section-sub {
  text-align: center; letter-spacing: .34em; text-transform: uppercase;
  font-size: clamp(14px, 1.6vw, 18px); color: var(--ink-soft); font-weight: 400;
  margin: 22px 0 0;
}

/* ---------- top nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--pad-x);
  background: linear-gradient(to bottom, rgba(8,8,9,.92), rgba(8,8,9,0));
  transition: background .4s ease, padding .4s ease, box-shadow .4s ease;
}
.nav.scrolled {
  background: rgba(10,10,12,.86);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  padding-block: 14px; box-shadow: 0 1px 0 var(--line-2);
}
.nav__brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 300; font-size: 22px; letter-spacing: .03em;
}
.nav__mark {
  width: 34px; height: 34px; border: 1.5px solid var(--ink); display: grid; place-items: center;
  font-size: 13px; font-weight: 700; letter-spacing: 0; position: relative; overflow: hidden;
}
.nav__mark span { position: relative; z-index: 1; }
.nav__mark::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 46%, var(--ink) 46% 54%, transparent 54%);
}
.nav__links { display: flex; gap: clamp(18px, 3vw, 46px); align-items: center; }
.nav__links a {
  font-size: 13.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); position: relative; padding: 6px 0; transition: color .3s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent);
  transition: width .35s cubic-bezier(.2,.7,.2,1);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a.active { color: var(--accent); }
.nav__links a.active::after { width: 100%; }
.nav__burger { display: none; }

/* ---------- right-side dot nav ---------- */
.dots {
  position: fixed; right: clamp(16px, 2.5vw, 40px); top: 50%; transform: translateY(-50%);
  z-index: 55; display: flex; flex-direction: column; gap: 18px; align-items: center;
}
.dots button {
  width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--ink-soft);
  background: transparent; cursor: pointer; padding: 0; position: relative;
  transition: border-color .3s, background .3s, transform .3s;
}
.dots button:hover { border-color: var(--ink); transform: scale(1.15); }
.dots button.active { background: var(--accent); border-color: var(--accent); }
.dots button .tip {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.dots button:hover .tip, .dots button.active .tip { opacity: 1; }

/* ---------- generic section ---------- */
.panel {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(96px, 13vh, 150px);
  scroll-margin-top: 0;
}
.panel.dark   { background: radial-gradient(120% 90% at 80% 10%, #2a2a30 0%, var(--bg) 55%); }
.panel.darker { background: radial-gradient(110% 80% at 15% 90%, #1d1d22 0%, #08080a 60%); }

/* ============================================================
   HOME / HERO
   ============================================================ */
#home { padding: 0; overflow: hidden; }
.hero {
  position: relative; min-height: 100vh; width: 100%;
  display: grid; grid-template-columns: 1fr; align-items: stretch;
  background: radial-gradient(130% 100% at 25% 30%, #34343b 0%, #131316 55%, #0a0a0c 100%);
}
.hero__left { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: 0 var(--pad-x); }
.hero__name {
  font-family: var(--font-display); font-weight: 500; line-height: .94; letter-spacing: 0;
  font-size: clamp(64px, 11vw, 168px); margin: 0;
}
.hero__role {
  margin: 26px 0 0; font-size: clamp(14px, 1.7vw, 19px); font-weight: 600;
  letter-spacing: .42em; text-transform: uppercase; color: var(--accent);
}
.hero__tagline {
  margin: 18px 0 0; max-width: 46ch; font-size: clamp(12px, 1.15vw, 14px); font-weight: 300;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); line-height: 1.9;
}
.hero__tagline span { color: var(--accent); margin: 0 6px; }
.hero__photo { position: absolute; inset: 0; z-index: 1; }
.hero__photo image-slot {
  position: absolute; inset: 0; width: 100%; height: 100%;
  filter: grayscale(1) contrast(1.02);
}
.hero__photo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  filter: grayscale(1) contrast(1.02);
}
.hero__photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, rgba(10,10,12,.92) 0%, rgba(10,10,12,.55) 38%, rgba(10,10,12,.15) 70%, transparent 100%),
              linear-gradient(to top, rgba(10,10,12,.6), transparent 32%);
}
.hero__copyright {
  position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; z-index: 3;
  font-size: 12px; letter-spacing: .12em; color: var(--muted);
}
.hero__scroll {
  position: absolute; left: var(--pad-x); bottom: 36px; z-index: 3;
  display: flex; align-items: center; gap: 12px; font-size: 11px; letter-spacing: .24em;
  text-transform: uppercase; color: var(--muted);
}
.hero__scroll .bar { width: 46px; height: 1px; background: var(--muted); position: relative; overflow: hidden; }
.hero__scroll .bar::after {
  content: ""; position: absolute; inset: 0; background: var(--accent);
  transform: translateX(-100%); animation: scrollbar 2.4s cubic-bezier(.7,0,.3,1) infinite;
}
@keyframes scrollbar { 0%{transform:translateX(-100%)} 50%{transform:translateX(0)} 100%{transform:translateX(100%)} }

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; column-gap: clamp(30px, 6vw, 90px); row-gap: clamp(24px, 3vw, 40px); align-items: stretch; }
.about__photo { grid-column: 1; grid-row: 1 / 2; display: flex; }
.about__photo image-slot { width: 100%; height: 100%; min-height: clamp(360px, 56vh, 560px); filter: grayscale(1) contrast(1.02); }
.about__photo img { width: 100%; height: 100%; min-height: clamp(360px, 56vh, 560px); object-fit: cover; object-position: center top; filter: grayscale(1) contrast(1.02); }
.about__body { grid-column: 2; grid-row: 1 / 2; }
.about__cta { grid-column: 2; grid-row: 2 / 3; justify-self: start; align-self: start; }
.about__body .eyebrow { margin-bottom: 24px; }
.about__hi { font-size: clamp(18px, 2vw, 22px); color: var(--ink); margin: 0 0 20px; font-weight: 400; }
.about__body p { color: var(--ink-soft); margin: 0 0 18px; max-width: 52ch; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent); color: #fff; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  font-size: 14px; padding: 18px 40px; margin-top: 18px; transition: background .3s, transform .3s;
  border: none; cursor: pointer;
}
.btn:hover { background: #000; color: #fff; transform: translateY(-2px); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: #000; color: #fff; background: #000; }

/* ============================================================
   PROFESSIONAL
   ============================================================ */
.skills { margin-top: clamp(48px, 8vh, 96px); display: grid; gap: clamp(28px, 4.5vh, 46px); max-width: 880px; margin-inline: auto; }
.skill { display: grid; grid-template-columns: 280px 1fr; gap: clamp(20px,3vw,44px); align-items: start; }
.skill__head { text-align: left; }
.skill__name { font-size: 15px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); line-height: 1.4; }
.skill__years { margin-top: 8px; font-size: 14px; font-weight: 600; letter-spacing: .08em; color: var(--accent); }
.skill__desc { grid-column: 2; margin: 0; font-size: 15px; color: var(--ink-soft); max-width: 60ch; line-height: 1.7; }

.subhead { text-align: center; letter-spacing: .34em; text-transform: uppercase; font-weight: 600; font-size: clamp(16px,1.8vw,20px); margin: clamp(60px,9vh,110px) 0 30px; }
.tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; max-width: 720px; margin-inline: auto; }
.tool {
  position: relative;
  width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid var(--line);
  background: var(--panel); font-weight: 600; font-size: 13px; letter-spacing: .04em; color: var(--ink-soft);
  transition: transform .3s, border-color .3s, color .3s;
}
.tool:hover { transform: translateY(-4px); border-color: var(--accent); color: var(--ink); }
.tool img { width: 40px; height: 40px; object-fit: contain; display: block; }
.tool::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: #42D0B5; color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .03em;
  padding: 6px 10px; border-radius: 6px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .2s, transform .2s; z-index: 5;
}
.tool::before {
  content: ""; position: absolute; bottom: calc(100% + 4px); left: 50%;
  transform: translateX(-50%) translateY(4px); border: 5px solid transparent; border-top-color: #42D0B5;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 5;
}
.tool:hover::after, .tool:hover::before { opacity: 1; transform: translateX(-50%) translateY(0); }
.langs { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(40px, 8vw, 110px); margin-top: 26px; }
.lang { text-align: center; }
.lang b { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(20px,2.4vw,28px); color: var(--accent); letter-spacing: .04em; }
.lang span { font-size: 13px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }

/* ============================================================
   PORTFOLIO
   ============================================================ */
.pf-intro { text-align: center; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-soft); margin: 26px 0 clamp(44px,7vh,80px); font-size: 15px; }
.pf-intro a { color: var(--accent); }
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pf-card--hidden { display: none; }
.pf-more { display: flex; justify-content: center; margin-top: clamp(32px, 5vh, 56px); }
.pf-card {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; cursor: pointer; background: var(--panel);
}
.pf-card image-slot { width: 100%; height: 100%; pointer-events: none; }
.pf-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-card__veil {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px; background: linear-gradient(to top, rgba(8,8,10,.92) 0%, rgba(8,8,10,.2) 55%, transparent 100%);
  opacity: 0; transition: opacity .4s ease;
}
.pf-card:hover .pf-card__veil { opacity: 1; }
.pf-card__tag { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.pf-card__title { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.15; }
.pf-card__metric {
  position: absolute; top: 18px; left: 18px; right: 18px; z-index: 2; max-width: 62%;
  background: var(--accent); padding: 8px 12px; color: #fff;
  opacity: 0; transform: translateY(-6px); transition: opacity .4s, transform .4s;
}
.pf-card__metric-num { display: block; font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1; letter-spacing: -0.01em; }
.pf-card__metric-lbl { display: block; margin-top: 5px; font-size: 11px; line-height: 1.3; font-weight: 500; letter-spacing: .01em; color: rgba(255,255,255,.92); }
.pf-card:hover .pf-card__metric { opacity: 1; transform: none; }
.pf-card__metric--plain { font-family: var(--font-body); font-weight: 600; font-size: 15px; line-height: 1.4; letter-spacing: 0; color: #fff; }

/* lightbox */
.lb {
  position: fixed; inset: 0; z-index: 200; background: rgba(8,8,10,.97);
  display: flex; opacity: 0; pointer-events: none; transition: opacity .4s ease; overflow-y: auto;
}
.lb.open { opacity: 1; pointer-events: auto; }
.lb__inner { margin: auto; width: min(1180px, 92vw); display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px,4vw,64px) clamp(28px,4vw,64px); align-items: start; padding: 96px 24px; }
.lb__img, .lb__text { align-self: center; }
.lb__img { background: var(--panel); aspect-ratio: 16/10; overflow: hidden; }
.lb__img image-slot { width: 100%; height: 100%; }
.lb__tag { color: var(--accent); letter-spacing: .22em; text-transform: uppercase; font-size: 13px; margin-bottom: 16px; }
.lb__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px,3.4vw,42px); line-height: 1.08; margin: 0 0 22px; }
.lb__desc { color: var(--ink-soft); font-size: 16px; margin: 0 0 26px; }
.lb__metric { display: flex; align-items: baseline; gap: 16px; border-top: 1px solid var(--line); padding-top: 22px; }
.lb__metric .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px,5vw,64px); color: var(--accent); line-height: .9; letter-spacing: -0.02em; }
.lb__metric .lbl { font-size: 14px; color: var(--ink-soft); max-width: 26ch; }
#lbViewProject { margin-top: 28px; }
.lb__details { grid-column: 1 / -1; margin-top: clamp(40px, 6vh, 80px); border-top: 1px solid var(--line); padding-top: clamp(36px, 5vh, 64px); }
.lb__d-h { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px,2.6vw,32px); margin: 0 0 18px; }
.lb__d-eyebrow { color: var(--accent); letter-spacing: .22em; text-transform: uppercase; font-size: 12px; margin: 0 0 12px; }
.lb__d-p { color: var(--ink-soft); font-size: 16px; line-height: 1.7; margin: 0 0 26px; max-width: 70ch; }
.lb__d-figure { margin: 0 0 30px; }
.lb__d-figure image-slot { display: block; width: 100%; height: clamp(280px, 46vh, 520px); background: var(--panel); }
.lb__d-cap { font-size: 13px; color: var(--muted); letter-spacing: .04em; margin-top: 10px; }
.lb__d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 0 0 30px; }
.lb__d-grid image-slot { display: block; width: 100%; height: clamp(200px, 30vh, 320px); background: var(--panel); }
.lb__d-sub { font-family: var(--font-display); font-weight: 700; font-size: clamp(18px,2vw,24px); margin: 34px 0 18px; }
.lb__d-caps { list-style: none; padding: 0; margin: 0 0 32px; columns: 3; column-gap: 32px; }
.lb__d-caps li { break-inside: avoid; padding: 7px 0 7px 18px; position: relative; color: var(--ink-soft); font-size: 14.5px; border-bottom: 1px solid var(--line); }
.lb__d-caps li::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 6px; height: 6px; background: var(--accent); }
.lb__d-cell { margin: 0; }
.lb__d-cell img { display: block; width: 100%; height: auto; background: var(--panel); }
.lb__d-cell figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); letter-spacing: .03em; }
.lb__d-figure img { display: block; width: 100%; height: auto; background: var(--panel); }
.lb__d-quote { margin: 8px 0 30px; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); }
.lb__d-quote p { margin: 0; font-size: clamp(17px,1.9vw,21px); line-height: 1.5; color: var(--ink); font-style: italic; }
.lb__d-quote cite { display: block; margin-top: 10px; font-style: normal; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lb__d-kpi { display: flex; align-items: baseline; gap: 16px; margin: 8px 0 30px; flex-wrap: wrap; }
.lb__d-kpi b { font-family: var(--font-display); font-weight: 800; font-size: clamp(44px,6vw,72px); line-height: 1; color: var(--accent); letter-spacing: -0.02em; }
.lb__d-kpi span { font-size: 15px; color: var(--ink-soft); max-width: 32ch; }
@media (max-width: 720px) { .lb__d-grid { grid-template-columns: 1fr; } .lb__d-caps { columns: 2; } }
.lb__close { position: fixed; top: 28px; right: 34px; width: 46px; height: 46px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); font-size: 20px; cursor: pointer; transition: border-color .3s, color .3s; display: grid; place-items: center; }
.lb__close:hover { border-color: var(--accent); color: var(--accent); }
.lb__nav { position: fixed; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); font-size: 22px; cursor: pointer; display: grid; place-items: center; transition: border-color .3s, color .3s; }
.lb__nav:hover { border-color: var(--accent); color: var(--accent); }
.lb__nav.prev { left: 24px; }
.lb__nav.next { right: 24px; }

/* ============================================================
   EXPERIENCE  (center timeline)
   ============================================================ */
.timeline { position: relative; max-width: 1000px; margin: clamp(50px,8vh,90px) auto 0; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line); transform: translateX(-.5px); }
.tl-item { position: relative; width: 50%; padding: 0 56px clamp(40px,6vh,72px); }
.tl-item.left { left: 0; text-align: right; }
.tl-item.right { left: 50%; text-align: left; }
.tl-item::after {
  content: ""; position: absolute; top: 6px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--accent);
}
.tl-item.left::after  { right: -6.5px; }
.tl-item.right::after { left: -6.5px; }
.tl-date { color: var(--accent); font-weight: 600; letter-spacing: .16em; font-size: 14px; }
.tl-org { font-family: var(--font-display); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: clamp(20px,2.4vw,28px); margin: 8px 0 18px; }
.tl-role { color: var(--accent); font-weight: 500; font-size: 15px; margin-top: 16px; }
.tl-item p { color: var(--ink-soft); font-size: 14.5px; margin: 6px 0 0; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact__card { background: rgba(0,0,0,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); max-width: 1040px; margin: clamp(40px,7vh,72px) auto 0; padding: clamp(34px,5vw,64px); display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px,5vw,72px); }
.contact__card h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(24px,3vw,34px); margin: 0 0 22px; letter-spacing: .02em; }
.contact__card p { color: var(--ink-soft); margin: 0 0 14px; max-width: 36ch; }
.contact__form { display: grid; gap: 14px; }
.contact__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact__form input, .contact__form textarea {
  width: 100%; background: #fff; color: #111; border: none; padding: 16px 18px; font-family: var(--font-body);
  font-size: 15px; font-weight: 400;
}
.contact__form textarea { min-height: 130px; resize: vertical; }
.contact__form input::placeholder, .contact__form textarea::placeholder { color: #888; }
.contact__social { display: flex; gap: 16px; margin-top: 26px; }
.contact__social a { width: 42px; height: 42px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); transition: border-color .3s, color .3s, transform .3s; }
.contact__social a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.contact__info { margin-top: 26px; display: grid; gap: 10px; }
.contact__info a { color: var(--ink-soft); font-size: 14px; letter-spacing: .04em; }
.contact__info a:hover { color: var(--accent); }

.foot { border-top: 1px solid var(--line-2); padding: 26px var(--pad-x); display: flex; justify-content: center; align-items: center; gap: 14px; }
.foot span { font-size: 12px; letter-spacing: .12em; color: var(--muted); }

/* ============================================================
   TESTIMONIALS (carousel)
   ============================================================ */
#testimonials .eyebrow.line::after { margin-inline: auto; }
.tm { position: relative; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: clamp(12px, 3vw, 40px); margin-top: clamp(34px, 6vh, 64px); }
.tm__viewport { overflow: hidden; }
.tm__track { display: flex; }
.tm__slide { flex: 0 0 100%; min-width: 0; padding: 8px clamp(6px, 4vw, 60px); text-align: center; }
#testimonials { position: relative; overflow: hidden; }
.tm__photobg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center 30%;
  filter: grayscale(1) contrast(1.02);
  opacity: 0; transition: opacity .6s ease;
}
.tm__photobg.show { opacity: .4; }
#testimonials::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .6s ease;
  background: radial-gradient(120% 90% at 50% 45%, rgba(10,10,12,.12) 0%, rgba(10,10,12,.32) 100%);
}
#testimonials.tm-photo::after { opacity: 1; }
#testimonials .wrap { position: relative; z-index: 1; }
.tm__quote, .tm__by { text-shadow: 0 2px 18px rgba(0,0,0,.55); }
.tm__quote {
  font-family: var(--font-display); font-weight: 300; font-style: normal;
  font-size: clamp(20px, 2.6vw, 32px); line-height: 1.36; letter-spacing: -0.005em; margin: 0;
  text-wrap: balance;
}
.tm__quote::before { content: "\201C"; color: var(--accent); margin-right: .06em; }
.tm__quote::after { content: "\201D"; color: var(--accent); margin-left: .04em; }
.tm__by { margin: clamp(24px, 4vh, 40px) 0 0; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.tm__by b { color: var(--accent); font-weight: 600; }
.tm__chev {
  width: 48px; height: 48px; border: 1px solid var(--line); background: transparent; color: var(--ink);
  font-size: 22px; cursor: pointer; display: grid; place-items: center; transition: border-color .3s, color .3s; align-self: center;
}
.tm__chev:hover { border-color: var(--accent); color: var(--accent); }
.tm__dots { display: flex; justify-content: center; gap: 14px; margin-top: clamp(30px, 5vh, 50px); }
.tm__dots button {
  width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--muted); background: transparent; cursor: pointer; padding: 0;
  transition: background .3s, border-color .3s, transform .3s;
}
.tm__dots button.active { background: var(--accent); border-color: var(--accent); transform: scale(1.15); }

/* ---------- reveal (progressive enhancement) ---------- */
html.anim-ready .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
html.anim-ready .reveal.in { opacity: 1; transform: none; }
.reveal.force-show { opacity: 1 !important; transform: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .hero__scroll .bar::after { animation: none; } }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .dots { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero__left { padding-top: 120px; z-index: 2; }
  .hero__photo::after { background: linear-gradient(to top, rgba(10,10,12,.92), rgba(10,10,12,.45) 55%, rgba(10,10,12,.25)); }
  .about__grid { grid-template-columns: 1fr; gap: 36px; }
  .about__photo { grid-column: 1; grid-row: 1; order: -1; }
  .about__body { grid-column: 1; grid-row: auto; }
  .about__cta { grid-column: 1; grid-row: auto; }
  .pf-grid { grid-template-columns: repeat(2, 1fr); }
  .skill { grid-template-columns: 1fr; gap: 10px; }
  .skill__name { text-align: left; }
  .skill__desc { grid-column: 1; }
  .lb__inner { grid-template-columns: 1fr; }
  .timeline::before { left: 18px; }
  .tl-item { width: 100%; left: 0 !important; text-align: left !important; padding: 0 0 44px 50px; }
  .tl-item::after { left: 11.5px !important; right: auto !important; }
  .contact__card { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav__links { display: none; }
  .pf-grid { grid-template-columns: 1fr; }
  .contact__row { grid-template-columns: 1fr; }
}

/* ============================================================
   CASE STUDY PAGES
   ============================================================ */
.cs-hero { min-height: auto; padding-top: clamp(100px,16vh,160px); padding-bottom: clamp(48px,8vh,80px); }
.cs-back {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: clamp(28px,5vh,48px);
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); transition: color .3s;
}
.cs-back:hover { color: var(--accent); }
.cs-title {
  font-family: var(--font-display); font-weight: 500; font-size: clamp(34px,5.5vw,80px);
  line-height: 1.02; letter-spacing: -.01em; margin: 18px 0 22px;
}
.cs-desc { color: var(--ink-soft); font-size: clamp(15px,1.5vw,18px); max-width: 58ch; line-height: 1.7; margin: 0; }
.cs-metric { display: flex; align-items: baseline; gap: 16px; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 32px; }
.cs-metric .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px,5vw,64px); color: var(--accent); line-height: .9; letter-spacing: -0.02em; }
.cs-metric .lbl { font-size: 14px; color: var(--ink-soft); max-width: 32ch; }
.cs-hero-img { width: 100%; max-height: 580px; object-fit: cover; display: block; }
.cs-body { padding-block: clamp(60px,10vh,120px); }
.cs-foot-back { color: var(--muted); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; transition: color .3s; }
.cs-foot-back:hover { color: var(--accent); }
