/* ============================================================
   JOHN TRABELSI — portfolio
   Type:  Helvetica Neue / Inter Tight (display + body)
          Instrument Serif italic (accents) · Geist Mono (labels)
   Color: white, ink, neutral gray hairlines. Imagery carries the color.
   Shape: 1px outline + rounded corners. No shadows.
   ============================================================ */

:root {
  /* site tokens. Namespaced so a case study that redefines the legacy
     names on :root (the Luminair case does) cannot recolor the shell. */
  --c-bg: #ffffff;
  --c-ink: #111214;
  --c-muted: #5e6066;
  --c-faint: #9b9da3;
  --c-line: #e5e7eb;
  --c-line-2: #c9ccd2;
  --c-wash: #f4f4f5;
  --c-dark: #0b0b0a;
  --c-dark-line: rgba(255, 255, 255, 0.14);
  --c-dark-muted: rgba(255, 255, 255, 0.56);
  --c-accent: var(--c-ink);

  --ff-sans: "Helvetica Neue", "Inter Tight", Helvetica, Arial, sans-serif;
  --ff-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --ff-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r: 14px;
  --r-lg: clamp(14px, 1.6vw, 24px);
  --gut: clamp(16px, 3.5vw, 56px);
  --maxw: 1680px;
  --nav-h: 64px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.18, 1);

  /* legacy names, still read by the per-project content styles */
  --bg: #ffffff;
  --panel: #ffffff;
  --ink: #111214;
  --muted: #5e6066;
  --line: #e5e7eb;
  --line-strong: #c9ccd2;
  --accent: #111214;
  --f-display: var(--ff-sans);
  --f-body: var(--ff-sans);
  --f-mono: var(--ff-mono);
  --label-size: clamp(10px, 0.78vw, 12px);
  --logo-filter: brightness(0);
}

/* cover-to-cover page transitions (browsers without support just navigate) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-group(pj-cover) { animation-duration: 0.7s; animation-timing-function: cubic-bezier(0.76, 0, 0.18, 1); }
::view-transition-old(pj-cover), ::view-transition-new(pj-cover) { width: 100%; height: 100%; object-fit: cover; }
::view-transition-old(root) { animation-duration: 0.3s; }
::view-transition-new(root) { animation-duration: 0.5s; }

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--ff-sans);
  font-weight: 400;
  line-height: 1.32; /* case-study layouts inherit this base; changing it reflows them */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
::selection { background: var(--c-ink); color: var(--c-bg); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 4px; }

/* ---------- shared atoms ---------- */
.mono {
  font-family: var(--ff-mono);
  font-size: var(--label-size);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.mono--ink { color: var(--c-ink); }
.idx { font-variant-numeric: tabular-nums; }
.shell { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
.serif, .display em { font-family: var(--ff-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--c-muted);
  border: 1px solid var(--c-line); border-radius: 999px; padding: 5px 10px;
}

.pill {
  font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px; border: 1px solid var(--c-line-2); border-radius: 999px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill:hover { background: var(--c-ink); color: var(--c-bg); border-color: var(--c-ink); }

/* image frame: exactly the image, outlined, rounded */
.frame {
  position: relative; overflow: hidden;
  border: 1px solid var(--c-line); border-radius: var(--r-lg);
  background: var(--c-wash);
}
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
a:hover > .frame img { transform: scale(1.035); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--nav-h); padding-inline: var(--gut);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  color: #fff; border-bottom: 1px solid transparent;
  transition: transform 0.5s var(--ease), background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
.nav--solid {
  color: var(--c-ink);
  background: rgba(255, 255, 255, 0.84);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--c-line);
}
.nav--hidden { transform: translateY(-101%); }
.nav__logo { display: flex; align-items: center; gap: 12px; flex: none; }
.nav__logo img { height: 24px; width: auto; filter: brightness(0) invert(1); transition: filter 0.4s ease; }
.nav--solid .nav__logo img { filter: brightness(0); }
.nav__logo .mono { color: inherit; letter-spacing: 0.2em; font-size: 12px; }
.nav__links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 38px); }
.nav__links a, .nav__back {
  font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  position: relative; padding: 6px 0;
}
.nav__links a::after, .nav__back::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease);
}
.nav__links a:hover::after, .nav__back:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__here {
  position: absolute; left: 50%; transform: translate(-50%, 6px); opacity: 0;
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap;
  transition: opacity 0.4s ease, transform 0.4s var(--ease); pointer-events: none;
}
.nav--titled .nav__here { opacity: 1; transform: translate(-50%, 0); }
.nav__back { display: inline-flex; gap: 9px; align-items: center; }
.nav__back .ar { transition: transform 0.3s var(--ease); }
.nav__back:hover .ar { transform: translateX(-4px); }
@media (max-width: 620px) { .nav__logo .mono, .nav__here { display: none; } }

.scrollprogress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 70;
  background: var(--c-ink); transform: scaleX(0); transform-origin: left;
}
.scrollprogress--light { background: #fff; mix-blend-mode: difference; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; height: 100svh; min-height: 600px; background: var(--c-bg); }
/* the stage shrinks into an outlined, rounded card as the page scrolls (--hp: 0 → 1) */
.hero__stage {
  position: absolute; inset: 0; overflow: hidden; background: #000; color: #fff;
  clip-path: inset(0 calc(var(--hp, 0) * var(--gut)) calc(var(--hp, 0) * 5svh) round calc(var(--hp, 0) * 28px));
}
.hero__media { position: absolute; inset: -6% 0; transform: translate3d(0, calc(var(--hp, 0) * 5%), 0); }
.hero__media video { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.1) contrast(1.04) brightness(0.9); }
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.28) 62%, rgba(0,0,0,0.78) 100%);
}
.hero__content {
  position: absolute; inset: var(--nav-h) var(--gut) clamp(18px, 3vw, 34px) var(--gut);
  display: grid; grid-template-rows: auto 1fr auto;
  transform: translate3d(0, calc(var(--hp, 0) * -6svh), 0); opacity: calc(1 - var(--hp, 0) * 1.25);
}
.hero__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 14px; }
.hero__row .mono { color: rgba(255, 255, 255, 0.72); }
.hero__main { align-self: end; padding-bottom: clamp(20px, 3.4vw, 46px); }
.hero__kicker { display: inline-block; color: rgba(255, 255, 255, 0.78); margin-bottom: clamp(14px, 1.8vw, 26px); }
.hero__title {
  font-weight: 500; font-size: clamp(3.1rem, min(11.2vw, 19svh), 13rem);
  line-height: 0.88; letter-spacing: -0.05em;
}
.hero__title .ln { display: block; overflow: hidden; padding-bottom: 0.13em; margin-bottom: -0.13em; }
.hero__title .ln > span { display: block; }
.hero__title em { color: rgba(255, 255, 255, 0.62); padding-right: 0.06em; }
.hero__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.24); }
.hero__foot .mono { color: rgba(255, 255, 255, 0.72); }
.hero__scroll { display: inline-flex; align-items: center; gap: 12px; }
.hero__scroll .bar { width: 44px; height: 1px; background: rgba(255,255,255,0.7); transform-origin: left; animation: scrollbar 2.4s ease-in-out infinite; }
@keyframes scrollbar { 0%, 100% { transform: scaleX(0.3); } 50% { transform: scaleX(1); } }
@media (max-width: 620px) { .hero__hide-s { display: none; } }

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
.sec-label { display: flex; align-items: baseline; gap: 12px; }
.sec-label .n { font-family: var(--ff-mono); font-size: var(--label-size); letter-spacing: 0.12em; color: var(--c-faint); }
.split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.split > .sec-label { position: sticky; top: calc(var(--nav-h) + 24px); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split > .sec-label { position: static; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about { padding-block: clamp(90px, 15vh, 210px) clamp(60px, 9vh, 130px); }
.statement {
  font-weight: 500; font-size: clamp(1.75rem, 3.7vw, 3.75rem);
  line-height: 1.12; letter-spacing: -0.035em; text-wrap: pretty; max-width: 26em;
}
.statement em { font-family: var(--ff-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }
.statement strong { font-weight: 500; }
.motion-on .statement.is-split .w { color: var(--c-line-2); transition: color 0.5s ease; }
.motion-on .statement.is-split .w.on { color: var(--c-ink); }
.facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(16px, 2vw, 32px);
  margin-top: clamp(44px, 6vw, 92px); border-top: 1px solid var(--c-line);
}
.facts > div { padding-top: 16px; }
.facts .k { display: block; margin-bottom: 8px; }
.facts .v { font-size: clamp(1rem, 1.3vw, 1.25rem); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.about__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(30px, 3.6vw, 52px); }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr 1fr; row-gap: 22px; } }

/* disciplines ticker */
.ticker { overflow: hidden; border-block: 1px solid var(--c-line); padding-block: clamp(16px, 1.8vw, 26px); }
.ticker__track { display: inline-flex; white-space: nowrap; will-change: transform; animation: marquee 44s linear infinite; }
.ticker__track span { font-size: clamp(1.1rem, 1.9vw, 1.9rem); letter-spacing: -0.02em; padding-right: 0.6em; }
.ticker__track span::after { content: "/"; font-family: var(--ff-serif); font-style: italic; color: var(--c-faint); padding-left: 0.6em; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   WORK
   ============================================================ */
.works { padding-block: clamp(80px, 12vh, 170px) clamp(70px, 11vh, 160px); }
.works__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-bottom: clamp(34px, 5vw, 80px); }
.works__title { font-weight: 500; font-size: clamp(3rem, 10vw, 10.5rem); line-height: 0.86; letter-spacing: -0.055em; }
.works__title sup { font-family: var(--ff-mono); font-size: 0.11em; letter-spacing: 0.06em; font-weight: 400;
  vertical-align: top; position: relative; top: 0.9em; margin-left: 0.7em; color: var(--c-muted); }
.works__title .ln { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.works__title .ln > span { display: block; }

.feature { display: block; }
.feature .frame { aspect-ratio: 16 / 8.5; }
.card-meta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 6px 16px; padding-top: 18px; }
.card-meta .num, .card-meta .yr { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--c-faint); font-variant-numeric: tabular-nums; }
.card-title { font-weight: 500; letter-spacing: -0.035em; line-height: 1; font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  display: inline-flex; align-items: baseline; gap: 0.3em; }
.feature .card-title { font-size: clamp(2rem, 4.4vw, 4.6rem); letter-spacing: -0.045em; }
.card-title .arr { font-size: 0.6em; opacity: 0; transform: translate(-6px, 6px); transition: opacity 0.35s ease, transform 0.35s var(--ease); }
a:hover .card-title .arr { opacity: 1; transform: none; }
.card-tags { grid-column: 2 / -1; font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-muted); }
.card-tags b { font-weight: 400; color: var(--c-ink); }

.feat-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 5.5vw, 96px) clamp(22px, 3vw, 48px); margin-top: clamp(44px, 6vw, 104px);
}
.feat-card { display: block; }
.feat-card .frame { aspect-ratio: 16 / 8.5; }
@media (min-width: 900px) { .feat-grid > .feat-card:nth-child(even) { margin-top: clamp(60px, 9vw, 160px); } }
@media (max-width: 760px) { .feat-grid { grid-template-columns: 1fr; } }

/* index list (hover shows the cover next to the cursor) */
.index { margin-top: clamp(80px, 11vw, 180px); }
.index + .index { margin-top: clamp(56px, 7vw, 110px); }
.index__head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 16px; border-bottom: 1px solid var(--c-ink); }
.index__row {
  display: grid; grid-template-columns: 56px minmax(0, 1.25fr) minmax(0, 1fr) 64px 28px; align-items: center; gap: 16px;
  padding-block: clamp(18px, 2vw, 30px); border-bottom: 1px solid var(--c-line);
  transition: opacity 0.35s ease, padding 0.45s var(--ease);
}
.index__row .num, .index__row .yr { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--c-faint); font-variant-numeric: tabular-nums; }
.index__title { font-weight: 500; font-size: clamp(1.4rem, 2.9vw, 3rem); letter-spacing: -0.04em; line-height: 1.02; }
.index__tags { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-muted); }
.index__arr { justify-self: end; font-size: 1.2rem; transition: transform 0.4s var(--ease); }
.index__thumb { display: none; }
@media (hover: hover) and (min-width: 861px) {
  /* dim the cells, not the row: the row's own opacity belongs to the reveal */
  .index__row > * { transition: opacity 0.35s ease; }
  .index:hover .index__row:not(:hover) > * { opacity: 0.3; }
  .index:hover .index__row:hover { padding-left: 14px; }
  .index__row:hover .index__arr { transform: translate(3px, -3px); }
}
@media (max-width: 860px) {
  .index__row { grid-template-columns: 96px minmax(0, 1fr) 20px; grid-template-areas: "th ti ar" "th tg ar"; gap: 4px 14px; }
  .index__row .num, .index__row .yr { display: none; }
  .index__thumb { display: block; grid-area: th; width: 96px; aspect-ratio: 16 / 10; object-fit: cover;
    border: 1px solid var(--c-line); border-radius: 8px; }
  .index__title { grid-area: ti; align-self: end; }
  .index__tags { grid-area: tg; align-self: start; font-size: 10px; }
  .index__arr { grid-area: ar; }
}

/* floating cover preview + cursor disc (fine pointers only, added by site.js) */
.peek {
  position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none;
  width: clamp(260px, 26vw, 420px); aspect-ratio: 16 / 10; overflow: hidden;
  border: 1px solid var(--c-line); border-radius: var(--r); background: var(--c-wash);
  opacity: 0; scale: 0.86; transition: opacity 0.3s ease, scale 0.45s var(--ease);
}
.peek.on { opacity: 1; scale: 1; }
.peek img { width: 100%; height: 100%; object-fit: cover; }
.cursor {
  position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none;
  width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%;
  display: grid; place-items: center; background: var(--c-ink); color: #fff;
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  opacity: 0; scale: 0.2; transition: opacity 0.25s ease, scale 0.4s var(--ease);
}
.cursor.on { opacity: 1; scale: 1; }

/* ============================================================
   PROCESS (dark band, runs into the footer)
   ============================================================ */
.process { background: var(--c-dark); color: #fff; padding-block: clamp(90px, 13vh, 190px);
  border-radius: var(--r-lg) var(--r-lg) 0 0; }
.process .mono, .process .sec-label .n { color: var(--c-dark-muted); }
.process .mono--ink { color: #fff; }
.process__head { font-weight: 500; font-size: clamp(2.1rem, 5.6vw, 5.8rem); line-height: 0.98; letter-spacing: -0.045em; text-wrap: balance; max-width: 15em; }
.process__head em { font-family: var(--ff-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; color: rgba(255,255,255,0.62); }
.process__body { font-size: clamp(1.1rem, 1.5vw, 1.45rem); line-height: 1.42; letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.74); max-width: 46ch; margin-top: clamp(22px, 2.6vw, 40px); }
/* the diagram is black on white: inverted and screened so it draws in white on the band */
.process__media { margin-top: clamp(44px, 6vw, 96px); }
.process__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.process__scroll::-webkit-scrollbar { display: none; }
.process__hint { display: none; margin-top: 14px; }
@media (max-width: 760px) { .process__hint { display: block; } }
.process__media img { width: 100%; min-width: 760px; height: auto; filter: invert(1); mix-blend-mode: screen; }

/* ============================================================
   FOOTER
   ============================================================ */
.foot { background: var(--c-dark); color: #fff; padding-top: clamp(60px, 8vw, 130px); border-top: 1px solid var(--c-dark-line); }
.foot--solo { border-top: 0; }
.foot .mono { color: var(--c-dark-muted); }
.foot__top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: clamp(20px, 2.6vw, 40px); }
.foot__email { display: inline-block; font-weight: 500; font-size: clamp(2.1rem, 8.4vw, 9rem); line-height: 0.95; letter-spacing: -0.055em;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size 0.6s var(--ease); padding-bottom: 0.06em; }
.foot__email:hover { background-size: 100% 2px; }
.foot__email em { font-family: var(--ff-serif); font-style: italic; font-weight: 400; letter-spacing: -0.03em; }
.foot__socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(30px, 4vw, 64px); }
.foot .pill { border-color: rgba(255, 255, 255, 0.28); }
.foot .pill:hover { background: #fff; color: var(--c-dark); border-color: #fff; }
.foot__mark { overflow: hidden; padding-top: clamp(50px, 7vw, 110px); }
.foot__mark .marquee {
  display: inline-flex; white-space: nowrap; font-weight: 500; letter-spacing: -0.06em; line-height: 0.82;
  font-size: clamp(4.4rem, 19vw, 20rem); will-change: transform; animation: marquee 30s linear infinite;
}
.foot__mark .marquee span { padding-right: 0.28em; }
.foot__mark .marquee em { font-family: var(--ff-serif); font-style: italic; font-weight: 400; letter-spacing: -0.03em; color: rgba(255,255,255,0.5); }
.foot__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px;
  padding-block: clamp(22px, 2.6vw, 36px); margin-top: clamp(30px, 4vw, 60px); border-top: 1px solid var(--c-dark-line); }
.foot__legal a { color: #fff; }

/* ============================================================
   PROJECT PAGE
   ============================================================ */
.pj-hero { padding-top: var(--nav-h); }
.pj-hero__head { padding-block: clamp(44px, 7vw, 110px) clamp(28px, 3.4vw, 52px); }
.pj-eyebrow { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: clamp(20px, 3vw, 40px); }
.pj-title { font-family: var(--ff-sans); font-weight: 500; font-size: clamp(3.4rem, 10.4vw, 11rem);
  line-height: 0.88; letter-spacing: -0.055em; text-wrap: balance; }
.pj-cover { position: relative; overflow: hidden; aspect-ratio: 16 / 8.5; view-transition-name: pj-cover;
  border: 1px solid var(--c-line); border-radius: var(--r-lg); background: var(--c-wash); }
.pj-cover img { width: 100%; height: 100%; object-fit: cover; }
.pj-cover--live [data-viz] { position: absolute; inset: 0; }

.pj-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: clamp(18px, 2vw, 32px);
  padding-block: clamp(26px, 3vw, 44px); border-bottom: 1px solid var(--c-line); }
.pj-meta .k { display: block; margin-bottom: 10px; font-family: var(--ff-mono); font-size: var(--label-size);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-muted); }
.pj-meta .v { font-size: clamp(0.98rem, 1.2vw, 1.15rem); letter-spacing: -0.01em; }
.pj-meta .v.tags { display: flex; flex-wrap: wrap; }
@media (max-width: 560px) { .pj-meta { grid-template-columns: 1fr 1fr; } }

.pj-content { padding-block: clamp(50px, 7vw, 120px) clamp(60px, 8vw, 130px); }
.pj-lead { font-weight: 500; font-size: clamp(1.6rem, 3.3vw, 3.3rem); line-height: 1.1; letter-spacing: -0.035em;
  text-wrap: pretty; max-width: 22em; }


/* one chapter: sticky title rail on the left, content on the right */
.sec { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(24px, 4vw, 64px);
  border-top: 1px solid var(--c-line); padding-top: clamp(22px, 2.6vw, 38px); margin-top: clamp(64px, 8.5vw, 150px); }
.sec.pj-intro { border-top: 0; margin-top: 0; padding-top: 0; }
.sec__head { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; }
.sec__num { display: block; font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--c-faint); margin-bottom: clamp(12px, 1.4vw, 20px); }
.sec__title { font-weight: 500; font-size: clamp(1.6rem, 2.5vw, 2.6rem); line-height: 1.02; letter-spacing: -0.04em; text-wrap: balance; }
.sec__sub { color: var(--c-muted); font-size: clamp(1rem, 1.15vw, 1.15rem); line-height: 1.45; margin-top: 14px; max-width: 34ch; }
.sec__body { min-width: 0; }
.sec__body > :first-child { margin-top: 0; }
.sec__body > :last-child { margin-bottom: 0; }
@media (max-width: 960px) {
  .sec { grid-template-columns: 1fr; gap: clamp(22px, 4vw, 36px); }
  .sec__head { position: static; }
  .sec__sub { max-width: 60ch; }
}

/* ---- content blocks ---- */
.blk-p { font-size: clamp(1.08rem, 1.3vw, 1.3rem); line-height: 1.58; letter-spacing: -0.008em; margin: 0 0 1.15em; max-width: 62ch; }
.blk-p a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--c-line-2); }
.blk-p a:hover { text-decoration-color: currentColor; }
.blk-callout { font-weight: 500; font-size: clamp(1.4rem, 2.5vw, 2.3rem); line-height: 1.16; letter-spacing: -0.03em;
  border-left: 2px solid var(--accent); padding: 4px 0 4px clamp(18px, 2vw, 30px); margin: clamp(34px, 4.4vw, 64px) 0; max-width: 30em; text-wrap: pretty; }
.blk-fig { margin: clamp(26px, 3.4vw, 56px) 0; border: 1px solid var(--c-line); border-radius: var(--r); overflow: hidden; }
.blk-fig img { width: 100%; height: auto; }
.blk-fig.inset { max-width: 460px; }
.blk-viz { margin: clamp(26px, 3.4vw, 56px) 0; }
.blk-row { display: grid; gap: clamp(12px, 1.6vw, 22px); margin: clamp(26px, 3.4vw, 56px) 0; grid-auto-rows: 1fr; }
.blk-row.n2 { grid-template-columns: repeat(2, 1fr); }
.blk-row.n3 { grid-template-columns: repeat(3, 1fr); }
.blk-row.n6 { grid-template-columns: 1fr; gap: clamp(20px, 3vw, 40px); }
.blk-row .cell { border: 1px solid var(--c-line); border-radius: var(--r); overflow: hidden; aspect-ratio: 1 / 1; }
.blk-row.n6 .cell { aspect-ratio: 16 / 9; }
.blk-row .cell img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) { .blk-row.n3 { grid-template-columns: repeat(2, 1fr); } }
.blk-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 64px); margin: clamp(32px, 4vw, 60px) 0; }
@media (max-width: 680px) { .blk-cols { grid-template-columns: 1fr; } }
.blk-cols h4 { font-family: var(--ff-mono); font-size: 12px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase;
  margin: 0 0 16px; padding-bottom: 13px; border-bottom: 1px solid var(--c-ink); }
.blk-cols ul { list-style: none; margin: 0; padding: 0; }
.blk-cols li { font-size: clamp(1rem, 1.2vw, 1.15rem); line-height: 1.4; padding: 12px 0; border-bottom: 1px solid var(--c-line); }
.blk-video { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: clamp(26px, 3.4vw, 56px) 0;
  border: 1px solid var(--c-line); border-radius: var(--r); overflow: hidden; background: #000; }
.blk-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.blk-logos { margin: clamp(26px, 3.4vw, 52px) 0; }
.blk-logos .lbl { display: block; margin-bottom: 16px; font-family: var(--ff-mono); font-size: var(--label-size); letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-muted); }
.blk-logos .strip { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(22px, 3.5vw, 52px);
  padding: clamp(22px, 2.6vw, 34px) 0; border-block: 1px solid var(--c-line); }
.blk-logos img { height: clamp(20px, 2.2vw, 30px); width: auto; object-fit: contain; filter: brightness(0); opacity: 0.75; transition: opacity 0.25s; }
.blk-logos.press img { height: clamp(18px, 2vw, 26px); }
.blk-logos img:hover { opacity: 1; }
.blk-quote { font-family: var(--ff-serif); font-style: italic; font-weight: 400; font-size: clamp(1.8rem, 3.8vw, 3.7rem);
  line-height: 1.06; letter-spacing: -0.02em; margin: clamp(44px, 6vw, 96px) 0; max-width: 20em; text-wrap: pretty; }
.blk-quote cite { display: block; margin-top: 24px; font-family: var(--ff-mono); font-style: normal; font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-muted); }
.blk-def { border: 1px solid var(--c-line); border-radius: var(--r); padding: clamp(18px, 2vw, 28px); margin: clamp(30px, 3.6vw, 52px) 0; max-width: 56ch; }
.blk-def b { font-family: var(--ff-mono); font-weight: 500; font-size: clamp(1.05rem, 1.5vw, 1.35rem); letter-spacing: 0.02em; }
.blk-def span { display: block; margin-top: 8px; color: var(--c-muted); font-size: clamp(1rem, 1.2vw, 1.15rem); line-height: 1.5; }
.blk-impact { margin: clamp(70px, 9vw, 150px) 0 clamp(20px, 3vw, 40px); }
.blk-impact .big { font-weight: 500; font-size: clamp(2.6rem, 7.4vw, 7.6rem); line-height: 0.92; letter-spacing: -0.055em; text-wrap: balance; }
.blk-impact .big em { font-family: var(--ff-serif); font-style: italic; font-weight: 400; letter-spacing: -0.03em; color: var(--accent); }
.blk-impact .sub { color: var(--c-muted); font-size: clamp(1.1rem, 1.5vw, 1.45rem); line-height: 1.4; margin-top: clamp(20px, 2.5vw, 34px); max-width: 40ch; text-wrap: pretty; }
.blk-grid { display: grid; gap: clamp(10px, 1.4vw, 18px); margin: clamp(26px, 3.4vw, 56px) 0; }
.blk-grid.c1 { grid-template-columns: 1fr; justify-items: center; }
.blk-grid.c1 .cell { width: min(700px, 100%); }
.blk-grid.c2 { grid-template-columns: repeat(2, 1fr); }
.blk-grid.c3 { grid-template-columns: repeat(3, 1fr); }
.blk-grid.c4 { grid-template-columns: repeat(4, 1fr); }
.blk-grid.c5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px) { .blk-grid.c4, .blk-grid.c5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .blk-grid.c3, .blk-grid.c4, .blk-grid.c5 { grid-template-columns: repeat(2, 1fr); } }
.blk-grid .cell { aspect-ratio: 1 / 1; border: 1px solid var(--c-line); border-radius: var(--r); overflow: hidden;
  display: flex; align-items: center; justify-content: center; }
.blk-grid.c2 .cell { aspect-ratio: 16 / 10; }
.blk-grid.dark .cell { background: #000; border-color: #000; }
.blk-grid .cell img { width: 100%; height: 100%; object-fit: cover; }
.blk-grid.contain .cell img { object-fit: contain; }
.blk-grid.contain .cell { aspect-ratio: 1 / 1; }
.blk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 30px); margin: clamp(32px, 4vw, 60px) 0; }
@media (max-width: 680px) { .blk-stats { grid-template-columns: repeat(2, 1fr); row-gap: 30px; } }
.blk-stats > div { border-top: 1px solid var(--c-ink); padding-top: 16px; }
.blk-stats .n { font-weight: 500; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1; letter-spacing: -0.05em; }
.blk-stats .l { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-muted); margin-top: 12px; line-height: 1.45; }
.blk-phones { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(10px, 1.4vw, 18px); margin: clamp(26px, 3.4vw, 52px) 0; }
@media (max-width: 900px) { .blk-phones { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .blk-phones { grid-template-columns: repeat(2, 1fr); } }
.blk-phones .ph { aspect-ratio: 160 / 330; }
.blk-phones .ph img { width: 100%; height: 100%; object-fit: contain; }
/* 2x2 positioning map */
.blk-quad { position: relative; width: 100%; max-width: 660px; aspect-ratio: 1 / 1; margin: clamp(36px, 4vw, 60px) 0;
  border: 1px solid var(--c-line-2); border-radius: var(--r); }
.blk-quad::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--c-line); }
.blk-quad::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--c-line); }
.blk-quad .ax { position: absolute; font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-muted); }
.blk-quad .ax-t { top: 12px; left: 50%; transform: translateX(-50%); }
.blk-quad .ax-b { bottom: 12px; left: 50%; transform: translateX(-50%); }
.blk-quad .ax-l { left: 14px; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; rotate: 180deg; }
.blk-quad .ax-r { right: 14px; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; }
.blk-quad .pt { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; gap: 9px; align-items: center; text-align: center; width: 150px; }
.blk-quad .pt .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--c-faint); }
.blk-quad .pt .lb { font-size: 13px; line-height: 1.2; }
.blk-quad .pt.me .dot { width: 18px; height: 18px; background: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 14%, transparent); }
.blk-quad .pt.me .lb { font-weight: 500; font-size: 16px; letter-spacing: -0.02em; }
@media (max-width: 560px) { .blk-quad .pt { width: 96px; } .blk-quad .pt .lb { font-size: 11px; } .blk-quad .pt.me .lb { font-size: 13px; } }
/* compounding-system flow */
.blk-flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: clamp(10px, 1.2vw, 16px); margin: clamp(32px, 4vw, 60px) 0; }
.blk-flow .st { flex: 1 1 210px; border: 1px solid var(--c-line); border-radius: var(--r); padding: clamp(18px, 2vw, 26px); display: flex; flex-direction: column; gap: 10px; }
.blk-flow .st .n { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--c-faint); }
.blk-flow .st h4 { font-weight: 500; letter-spacing: -0.03em; line-height: 1.04; font-size: clamp(1.1rem, 1.7vw, 1.5rem); }
.blk-flow .st p { font-size: clamp(0.95rem, 1.1vw, 1.05rem); line-height: 1.45; color: var(--c-muted); }
.blk-flow .arrow { display: flex; align-items: center; color: var(--c-faint); font-size: 1.3rem; }
@media (max-width: 760px) { .blk-flow { flex-direction: column; } .blk-flow .st { flex: 0 0 auto; } .blk-flow .arrow { transform: rotate(90deg); align-self: center; } }
/* RabbAI chat */
.blk-chat { max-width: 460px; margin: clamp(34px, 4vw, 58px) 0; border: 1px solid var(--c-line-2); background: #fff; border-radius: 22px; overflow: hidden; }
.blk-chat .screen { position: relative; padding: 26px 18px 30px; display: flex; flex-direction: column; gap: 22px;
  background-image: radial-gradient(rgba(17, 18, 20, 0.16) 1.1px, transparent 1.2px); background-size: 22px 22px; }
.blk-chat .msg.q { align-self: flex-end; max-width: 76%; }
.blk-chat .msg.q .bub { background: var(--c-ink); color: #fff; border-radius: 22px; padding: 13px 19px; font-size: 1.05rem; line-height: 1.4; }
.blk-chat .msg.a { display: flex; align-items: flex-start; gap: 10px; max-width: 92%; }
.blk-chat .msg.a .av { width: 34px; height: 34px; flex: none; margin-top: 2px; }
.blk-chat .msg.a .av img { width: 100%; height: 100%; object-fit: contain; }
.blk-chat .msg.a .col { display: flex; flex-direction: column; gap: 9px; }
.blk-chat .msg.a .bub { background: #fff; border: 1px solid var(--c-line); border-radius: 20px; padding: 15px 17px; font-size: 1.02rem; line-height: 1.5; }
.blk-chat .cite { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 4px; }
.blk-chat .cite .src { font-family: var(--ff-mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-muted);
  border: 1px solid var(--c-line); border-radius: 4px; padding: 4px 8px; display: inline-flex; gap: 6px; align-items: center; }
.blk-chat .cite .src::before { content: "\00a7"; color: var(--accent); }
.blk-chat .inputbar { display: flex; align-items: center; gap: 12px; margin: 0 14px 16px; border: 1px solid var(--c-line-2); border-radius: 999px; padding: 7px 7px 7px 8px; background: #fff; }
.blk-chat .inputbar .x { width: 30px; height: 30px; border-radius: 50%; flex: none; border: 1px solid var(--c-line); color: var(--c-muted); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.blk-chat .inputbar .ph { flex: 1; font-size: 1rem; color: var(--c-muted); }
.blk-chat .inputbar .send { width: 34px; height: 34px; border-radius: 50%; flex: none; background: var(--c-ink); display: flex; align-items: center; justify-content: center; }
.blk-chat .inputbar .send::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: #fff; }
/* engagement scorecards */
.blk-score { margin: clamp(42px, 5vw, 76px) 0; border: 1px solid var(--c-line); border-radius: var(--r); padding: clamp(20px, 2.6vw, 40px); }
.blk-score .sc-head h4 { font-weight: 500; letter-spacing: -0.035em; line-height: 1.02; font-size: clamp(1.3rem, 2.1vw, 1.9rem); margin: 0 0 9px; }
.blk-score .sc-head .sub { color: var(--c-muted); font-size: clamp(1rem, 1.2vw, 1.12rem); margin: 0 0 22px; max-width: 58ch; }
.blk-score .sc-points { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px 30px; }
@media (max-width: 680px) { .blk-score .sc-points { grid-template-columns: 1fr; } }
.blk-score .sc-points li { font-size: 0.98rem; line-height: 1.4; padding-left: 16px; position: relative; }
.blk-score .sc-points li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 1px; background: var(--accent); }
.blk-score .legend { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--c-line); }
.blk-score .legend span { display: inline-flex; gap: 8px; align-items: center; font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-muted); }
.blk-score .legend i { width: 11px; height: 11px; border-radius: 3px; }
.blk-score .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 2.2vw, 34px); }
@media (max-width: 760px) { .blk-score .grid { grid-template-columns: repeat(2, 1fr); } }
.blk-score .dim .k { font-weight: 500; letter-spacing: -0.02em; font-size: clamp(0.95rem, 1.2vw, 1.08rem); line-height: 1.1; margin-bottom: 15px; }
.blk-score .dim .bars { display: flex; gap: 9px; align-items: flex-end; height: 94px; }
.blk-score .dim .bar { position: relative; width: 30px; height: 100%; background: var(--c-wash); border-radius: 6px; overflow: hidden; }
.blk-score .dim .bar .fill { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 6px; transform-origin: bottom; }
.motion-on .blk-score .dim .bar .fill { transform: scaleY(0); }
.motion-on .blk-score.in .dim .bar .fill { transform: none; transition: transform 1.1s var(--ease-io) 0.15s; }
.blk-score .dim .sl { margin-top: 13px; font-family: var(--ff-mono); font-size: 12.5px; letter-spacing: 0.02em; }
.blk-score .dim .sl .sep { color: var(--c-faint); margin: 0 3px; }
.blk-score.emph-others .bar.others .fill, .blk-score.emph-ours .bar.ours .fill { background: var(--c-ink); }
.blk-score.emph-others .bar.ours .fill, .blk-score.emph-ours .bar.others .fill { background: var(--c-line-2); }
.blk-score.emph-others .li-o, .blk-score.emph-ours .li-u { background: var(--c-ink); }
.blk-score.emph-others .li-u, .blk-score.emph-ours .li-o { background: var(--c-line-2); }
.blk-score.emph-others .sl .o, .blk-score.emph-ours .sl .u { color: var(--c-ink); font-weight: 500; }
.blk-score.emph-others .sl .u, .blk-score.emph-ours .sl .o { color: var(--c-muted); }

/* fallback when a project has no long-form content yet */
.pj-body { padding-block: clamp(50px, 7vw, 120px); }
.pj-note { margin-top: 28px; font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-muted); }

/* next / previous */
.pj-foot { border-top: 1px solid var(--c-line); padding-block: clamp(50px, 7vw, 120px) clamp(60px, 8vw, 130px); }
.pj-next { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: end; }
.pj-next .lbl, .pj-prev .lbl { display: block; font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-muted); margin-bottom: 16px; }
.pj-foot .nm { display: block; font-weight: 500; font-size: clamp(2.2rem, 6.4vw, 6.8rem); line-height: 0.9; letter-spacing: -0.055em; text-wrap: balance; }
.pj-next .frame { aspect-ratio: 16 / 8.5; }
.pj-prev { display: inline-flex; flex-direction: column; margin-top: clamp(34px, 4vw, 60px); }
.pj-prev .nm { font-size: clamp(1.1rem, 1.6vw, 1.5rem); letter-spacing: -0.03em; line-height: 1.1; }
.pj-prev:hover .nm { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
@media (max-width: 760px) { .pj-next { grid-template-columns: 1fr; } }

/* ============================================================
   MOTION (content is visible by default; .motion-on is added by an
   inline script only when JS runs and the user allows motion)
   ============================================================ */
.motion-on [data-reveal]:not([data-reveal="card"]) { opacity: 0; transform: translateY(26px); }
.motion-on [data-reveal]:not([data-reveal="card"]).in { opacity: 1; transform: none;
  transition: opacity 0.9s ease, transform 0.9s var(--ease); }
.motion-on [data-reveal].in[data-delay="1"] { transition-delay: 0.08s; }
.motion-on [data-reveal].in[data-delay="2"] { transition-delay: 0.16s; }

/* cards: the frame wipes open, the image settles, the caption follows */
.motion-on [data-reveal="card"] .frame { clip-path: inset(0 0 100% 0 round var(--r-lg)); }
.motion-on [data-reveal="card"] .frame img { transform: scale(1.14); }
.motion-on [data-reveal="card"] .card-meta { opacity: 0; transform: translateY(14px); }
.motion-on [data-reveal="card"].in .frame { clip-path: inset(0 0 0 0 round var(--r-lg)); transition: clip-path 1.1s var(--ease-io); }
.motion-on [data-reveal="card"].in .frame img { transform: scale(1); transition: transform 1.5s var(--ease); }
.motion-on [data-reveal="card"].in:hover .frame img { transform: scale(1.035); transition: transform 1.2s var(--ease); }
.motion-on [data-reveal="card"].in .card-meta { opacity: 1; transform: none; transition: opacity 0.8s ease 0.35s, transform 0.8s var(--ease) 0.35s; }
.motion-on [data-reveal="card"][data-delay="1"].in .frame { transition-delay: 0.1s; }

/* line-mask reveal for display type */
.motion-on .linemask .ln > span { transform: translateY(108%); }
.motion-on .linemask.in .ln > span { transform: none; transition: transform 1.1s var(--ease-io); }
.motion-on .linemask.in .ln:nth-child(2) > span { transition-delay: 0.08s; }
.motion-on .linemask.in .ln:nth-child(3) > span { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  .ticker__track, .foot__mark .marquee, .hero__scroll .bar { animation: none; }
  .hero__stage { clip-path: none; }
}
