/* ============================================================
   PORTFOLIO — shared system (Home / About / Play)
   ============================================================ */

:root {
  --bg: #FAFAFA;
  --ink: #141414;
  --ink-2: #6B6B6B;
  --ink-3: #9A9A9A;
  --line: rgba(20,20,20,.10);
  --surface: #FFFFFF;

  /* Poster palette — used inside pills only */
  --red:    #E63525;
  --yellow: #F5C518;
  --cream:  #F2EBDD;
  --blue:   #2238E0;

  --sans: 'Satoshi', ui-sans-serif, system-ui, sans-serif;

  /* Shared horizontal rhythm */
  --shell-max: 1200px;
  --shell-pad-x: 40px;
  --topbar-h: 56px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  min-height: 100vh;
  /* Soft warm gradient — keeps the page airy, not loud */
  background:
    radial-gradient(1200px 700px at 8% -10%, #FFF1E6 0%, rgba(255,241,230,0) 60%),
    radial-gradient(1100px 800px at 100% 10%, #EAF0FF 0%, rgba(234,240,255,0) 55%),
    radial-gradient(900px 700px at 50% 110%, #F3ECFF 0%, rgba(243,236,255,0) 60%),
    var(--bg);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--shell-pad-x);
}

/* ============ TOPBAR ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  background: rgba(250,250,250,.55);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.topbar.is-scrolled {
  background: rgba(250,250,250,.78);
  border-bottom-color: var(--line);
}
.topbar-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 14px var(--shell-pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: var(--topbar-h);
}
.mark {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.01em;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.mark .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink);
  display: inline-block;
}
.topbar nav.desktop-nav {
  display: flex; gap: 24px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -.005em;
}
.topbar nav.desktop-nav a {
  position: relative;
  padding-bottom: 3px;
  color: var(--ink);
  transition: color .2s;
}
.topbar nav.desktop-nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1.5px;
  background: var(--ink);
  transition: right .3s cubic-bezier(.2,.8,.2,1);
}
.topbar nav.desktop-nav a:hover::after,
.topbar nav.desktop-nav a.is-current::after { right: 0; }

/* Hamburger */
.menu-btn {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.6);
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.menu-btn span {
  display: block;
  width: 16px; height: 1.5px;
  background: var(--ink);
  position: relative;
}
.menu-btn span::before,
.menu-btn span::after {
  content: '';
  position: absolute;
  left: 0; right: 0; height: 1.5px;
  background: var(--ink);
  transition: transform .25s ease;
}
.menu-btn span::before { top: -5px; }
.menu-btn span::after  { top:  5px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after  { transform: translateY(-5px) rotate(-45deg); }

/* Mobile drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--topbar-h);
  left: 0; right: 0;
  background: rgba(250,250,250,.96);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
  z-index: 99;
  padding: 12px var(--shell-pad-x) 24px;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .25s cubic-bezier(.2,.8,.2,1);
}
.mobile-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 4px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a .num {
  display: none;
}

/* ============ HERO (home) ============ */
.hero {
  min-height: calc(100vh - var(--topbar-h));
  padding: 96px 0 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  --display-size: clamp(44px, 7.4vw, 112px);
}
.greet {
  font-weight: 700;
  font-size: var(--display-size);
  line-height: 1.02;
  letter-spacing: -.035em;
  color: var(--ink);
  max-width: 16ch;
  text-wrap: balance;
}
.greet .wave {
  display: inline-block;
  transform-origin: 70% 80%;
  animation: wave 2.8s ease-in-out infinite;
}
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

/* Rotating pill + description */
.id-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  font-weight: 500;
  font-size: clamp(18px, 1.7vw, 28px);
  line-height: 1.35;
  letter-spacing: -.01em;
  color: var(--ink);
  max-width: 56ch;
}
.pill-stage {
  display: inline-grid;
  grid-template-areas: "stack";
  vertical-align: middle;
}
.pill-stage > .pill { grid-area: stack; }
.pill {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  padding: .12em .56em .18em;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1em;
  line-height: 1.2;
  letter-spacing: -.012em;
  color: var(--bg);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .45s cubic-bezier(.2,.8,.2,1), transform .45s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}
.pill.is-active  { opacity: 1; transform: translateY(0); }
.pill.is-leaving { opacity: 0; transform: translateY(-6px); }
.pill .dot { color: inherit; }

.desc-stage {
  position: relative;
  display: inline-grid;
  grid-template-areas: "stack";
  min-height: 1.4em;
  flex: 1 1 100%;
  padding-top: 4px;
}
.desc-stage > .desc { grid-area: stack; }
.desc-stage .desc {
  color: var(--ink-2);
  font-weight: 400;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .45s ease, transform .45s ease;
  text-wrap: pretty;
}
.desc-stage .desc.is-active { opacity: 1; transform: translateY(0); }

/* Postscript & scroll-cue */
.ps {
  margin-top: 16px;
  max-width: 56ch;
  font-weight: 400;
  font-size: clamp(14px, 1.05vw, 17px);
  line-height: 1.55;
  letter-spacing: -.005em;
  color: var(--ink-2);
  text-wrap: pretty;
}
.ps .btw { color: var(--ink); font-weight: 600; }
.ps .ipa { font-weight: 600; color: var(--ink); padding: 0 .05em; }
.ps s { color: var(--ink-2); opacity: .65; }

.scroll-cue {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--ink);
  align-self: flex-start;
}
.scroll-cue .arrow-down {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: grid; place-items: center;
  font-size: 12px;
  transition: transform .25s ease;
}
.scroll-cue:hover .arrow-down { transform: translateY(2px); }

/* ============ SECTION HEADERS (work / about / play) ============ */
.section {
  padding: 80px 0 96px;
}
.about-hero { padding-bottom: 8px; }
.about-section { padding-top: 32px; }
@media (max-width: 1000px) {
  .about-hero { padding-bottom: 0; }
  .about-section { padding-top: 24px; }
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.section-head h2 {
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -.02em;
  line-height: 1;
}
.section-head .meta {
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: .02em;
  font-weight: 500;
}

/* ============ WORK GRID ============ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 40px;
}
.card {
  display: block;
  color: inherit;
}
.card .thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: #ECECEC;
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.card:hover .thumb { transform: translateY(-3px); }
.card .thumb svg, .card .thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.card .body {
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card .meta-row {
  display: flex;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.card .meta-row .sep { opacity: .5; }

/* Card pills — small tag chips above the project name */
.card .pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 2px;
}
.card .pills .pill-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
}
.card .name {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.015em;
  line-height: 1.15;
}
.card .desc {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: 48ch;
}
.card .arrow {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card .arrow span {
  transition: transform .25s ease;
  display: inline-block;
}
.card:hover .arrow span { transform: translateX(4px); }

/* ============ PAGE HERO (about / play / résumé) ============ */
.page-hero {
  padding: 80px 0 24px;
  max-width: 720px;
}
.page-hero .tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 18px;
}
.page-hero .tag::before {
  content: '';
  width: 18px; height: 1.5px; background: currentColor; opacity: .6;
}
.page-hero h1 {
  font-weight: 700;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.02;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.page-hero .sub {
  margin-top: 22px;
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
  text-wrap: pretty;
}

/* ============ ABOUT layout ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: min-content;
  gap: 64px;
  align-items: start;
}
.about-side {
  align-self: end;
  grid-row: 1;
}
.about-text p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 22px;
  text-wrap: pretty;
}
.about-text p strong { font-weight: 700; }
.about-text p em { font-style: italic; }

.about-side {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.photo-slot {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background:
    repeating-linear-gradient(135deg, rgba(20,20,20,.04) 0 8px, rgba(20,20,20,.06) 8px 16px),
    #F0EDE7;
  display: grid;
  place-items: center;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--ink-2);
  text-transform: uppercase;
  overflow: hidden;
}
.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.side-block .label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.6);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.chip-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chip-list .chip {
  border-radius: 10px;
  justify-content: flex-start;
}

/* Full-width meta row below the about grid */
.about-meta {
  margin-top: 72px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.about-meta .side-block .label {
  font-size: 13px;
  margin-bottom: 18px;
}
.about-meta .chips {
  gap: 10px;
}
.about-meta .chip {
  padding: 10px 16px;
  font-size: 14px;
}
@media (max-width: 1000px) {
  .about-meta { margin-top: 48px; gap: 32px; }
}

/* ============ PLAY layout ============ */
.play-row {
  display: grid;
  gap: 48px 32px;
  margin-bottom: 64px;
}
.play-row:last-child { margin-bottom: 0; }
.play-row.two   { grid-template-columns: 1fr 1fr; }
.play-row.three { grid-template-columns: 1fr 1fr 1fr; }

.play-item {
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: inherit;
  text-decoration: none;
}
.play-image {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #f3f4f6;
}
.play-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .55s cubic-bezier(.2,.8,.2,1);
}
a.play-item:hover .play-image img { transform: scale(1.02); }

.play-meta h3 {
  font-weight: 700;
  font-size: clamp(20px, 1.6vw, 26px);
  letter-spacing: -.015em;
  line-height: 1.15;
  margin: 0 0 10px;
  color: var(--ink);
}
.play-meta p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
  margin: 0;
  max-width: 44ch;
}

@media (max-width: 1000px) {
  .play-row { gap: 36px 24px; margin-bottom: 48px; }
  .play-row.three { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .play-row.two, .play-row.three { grid-template-columns: 1fr; }
}

/* ============ PLAY grid ============ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 28px;
}
.play-card {
  display: block;
  color: inherit;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease;
}
.play-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -20px rgba(20,20,20,.18);
}
.play-card .image {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  font-size: 56px;
  overflow: hidden;
}
.play-card .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .55s cubic-bezier(.2,.8,.2,1);
}
.play-card:hover .image img { transform: scale(1.03); }
.play-card .body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.play-card .tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.play-card .title {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.012em;
  line-height: 1.25;
}
.play-card .desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ============ FOOTER ============ */
.foot {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-2);
  flex-wrap: wrap;
}
.foot a { color: var(--ink); font-weight: 500; }

/* Mini case-study body (short play projects) */
.cs-mini {
  max-width: 720px;
  margin: 32px auto 24px;
  padding: 0 8px;
}
.cs-mini p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  text-wrap: pretty;
}

/* ============================================================
   CASE STUDY
   ============================================================ */

/* Back link */
.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: .01em;
  transition: color .2s ease, transform .2s ease;
}
.cs-back:hover { color: var(--ink); transform: translateX(-2px); }

/* Title block */
.cs-title {
  padding: 40px 0 32px;
  max-width: 880px;
}
.cs-title .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 22px;
}
.cs-title .eyebrow .swatch {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--blue);
  display: inline-block;
}
.cs-title h1 {
  font-weight: 700;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.cs-title h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--ink-2);
}
.cs-title .lede {
  margin-top: 24px;
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 60ch;
  text-wrap: pretty;
}

/* Meta strip — Role / Team / Timeline / Tools */
.cs-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding: 28px 0;
  margin: 8px 0 40px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cs-meta .item .k {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.cs-meta .item .v {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

/* Hero image */
.cs-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  background: #ECECEC;
  margin-bottom: 24px;
}
.cs-hero svg, .cs-hero img { width: 100%; height: 100%; display: block; object-fit: cover; }
.cs-hero.fit {
  aspect-ratio: auto;
  background: #0b0b0b;
}
.cs-hero.fit img { height: auto; object-fit: contain; }
.cs-hero-cap {
  font-size: 12px;
  color: var(--ink-2);
  font-family: ui-monospace, monospace;
  letter-spacing: .04em;
  margin-bottom: 80px;
}

/* Body layout — left TOC rail + content column */
.cs-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 80px;
  padding-bottom: 80px;
}
.cs-toc {
  position: sticky;
  top: calc(var(--topbar-h) + 32px);
  align-self: start;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cs-toc .label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.cs-toc a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  color: var(--ink-2);
  font-weight: 500;
  letter-spacing: -.005em;
  transition: color .2s ease;
}
.cs-toc a .num {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--ink-3);
  min-width: 18px;
}
.cs-toc a .bar {
  width: 14px; height: 1px;
  background: var(--ink-3);
  opacity: .5;
  transition: width .25s ease, background .2s ease, opacity .2s ease;
}
.cs-toc a:hover { color: var(--ink); }
.cs-toc a.is-active { color: var(--ink); }
.cs-toc a.is-active .bar { width: 28px; background: var(--ink); opacity: 1; }

/* Content sections */
.cs-content { min-width: 0; }
.cs-section {
  padding: 8px 0 56px;
  scroll-margin-top: calc(var(--topbar-h) + 24px);
}
.cs-section .num {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.cs-section h2 {
  font-weight: 700;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.05;
  letter-spacing: -.025em;
  margin-bottom: 24px;
  text-wrap: balance;
}
.cs-section p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 18px;
  max-width: 64ch;
  text-wrap: pretty;
}
.cs-section p.lead {
  font-size: 20px;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 24px;
  line-height: 1.5;
}
.cs-section p strong { font-weight: 700; }
.cs-section p em { font-style: italic; color: var(--ink-2); }
.cs-section ul {
  list-style: none;
  margin: 8px 0 18px;
  padding: 0;
  max-width: 64ch;
}
.cs-section ul li {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  padding: 8px 0 8px 24px;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.cs-section ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 17px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink);
}
.cs-section ul li:last-child { border-bottom: none; }

/* Pull-quote */
.cs-quote {
  padding: 32px 0;
  margin: 16px 0 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cs-quote .q {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -.015em;
  color: var(--ink);
  text-wrap: balance;
}
.cs-quote .q::before { content: '\201C'; color: var(--ink-3); margin-right: 4px; }
.cs-quote .q::after  { content: '\201D'; color: var(--ink-3); margin-left: 2px; }
.cs-quote .attr {
  margin-top: 14px;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--ink-2);
}

/* Callout / takeaway */
.cs-callout {
  padding: 24px 28px;
  margin: 16px 0 32px;
  border-left: 2px solid var(--ink);
  background: rgba(255,255,255,.55);
  border-radius: 0 12px 12px 0;
}
.cs-callout .k {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}
.cs-callout .v {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  text-wrap: pretty;
}

/* Image slot inside body */
.cs-figure {
  margin: 16px 0 32px;
}
.cs-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  background: #EFEDE7;
}

/* Overlay figure — small gif centered on a wider static image */
.cs-overlay {
  position: relative;
  width: 100%;
  margin: 16px 0 32px;
}
.cs-overlay .base {
  width: 100%;
  height: auto;
  display: block;
}
.cs-overlay .over {
  position: absolute;
  top: 50%;
  left: 26%;
  transform: translate(-50%, -50%);
  width: 42%;
  height: auto;
  box-shadow: 0 6px 18px -8px rgba(20,20,20,.18);
}
.cs-overlay.right .over { left: 74%; }
@media (max-width: 760px) {
  .cs-overlay .over { width: 44%; left: 27%; }
  .cs-overlay.right .over { left: 73%; }
}
/* Split: bulleted text on one side, image/gif frame on the other */
.cs-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  margin: 24px 0 48px;
}
.cs-split.flip { direction: rtl; }
.cs-split.flip > * { direction: ltr; }
.cs-split .copy {
  position: relative;
  padding: 12px 0;
}
.cs-split .copy .bignum {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Satoshi', system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(180px, 22vw, 320px);
  line-height: 1;
  color: rgba(0, 89, 47, 0.1);
  letter-spacing: -0.04em;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.cs-split .copy .inner {
  position: relative;
  z-index: 1;
}
.cs-split .copy h3 {
  font-weight: 700;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  color: var(--ink);
}
.cs-split .copy ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 44ch;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cs-split .copy ul li {
  position: relative;
  padding: 0 0 0 22px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  border: none;
}
.cs-split .copy ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
}
.cs-split .frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Only show the dashed placeholder chrome when the frame is empty */
.cs-split .frame:has(.placeholder) {
  background: #f4f5f7;
  border: 1px dashed #cfd3da;
}
.cs-split .frame img,
.cs-split .frame canvas,
.cs-split .frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.cs-split .frame .placeholder {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8a8f99;
  text-align: center;
  padding: 24px;
}
@media (max-width: 760px) {
  .cs-split {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 16px 0 36px;
  }
  .cs-split.flip { direction: ltr; }
  .cs-split .copy .bignum {
    font-size: 200px;
    top: 0;
    left: auto;
    right: -10px;
    transform: none;
  }
  .cs-split .frame { aspect-ratio: 16 / 10; }
}

.cs-figure .slot {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(20,20,20,.04) 0 8px, rgba(20,20,20,.06) 8px 16px),
    #EFEDE7;
  display: grid;
  place-items: center;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--ink-2);
  text-transform: uppercase;
}
.cs-figure.tall .slot { aspect-ratio: 4 / 5; }
.cs-figure.wide .slot { aspect-ratio: 21 / 9; }
.cs-figure .cap {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  text-wrap: pretty;
  font-family: ui-monospace, monospace;
  letter-spacing: .02em;
}

/* Two-up grid for figures */
.cs-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 16px 0 32px;
}
.cs-grid-2 .cs-figure { margin: 0; }

/* Stat row */
.cs-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 16px 0 32px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cs-stats .stat .n {
  font-size: clamp(32px, 3.5vw, 48px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: 8px;
}
.cs-stats .stat .l {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
}

/* Next project CTA */
.cs-next {
  margin-top: 24px;
  padding: 56px 0 80px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
}
.cs-next .label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 10px;
}
.cs-next a.title {
  font-weight: 700;
  font-size: clamp(28px, 3.2vw, 44px);
  letter-spacing: -.025em;
  line-height: 1.05;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  transition: gap .25s ease;
}
.cs-next a.title:hover { gap: 22px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1000px) {
  .about-grid { grid-template-columns: 1fr; gap: 48px; align-items: start; }
  .about-side { align-self: start; }
  .photo-slot { max-width: 360px; aspect-ratio: 4 / 4; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }

  .cs-body { grid-template-columns: 1fr; gap: 0; }
  .cs-toc { display: none; }
  .cs-meta { grid-template-columns: repeat(2, 1fr); gap: 24px 28px; }
}
@media (max-width: 880px) {
  .grid-2 { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 760px) {
  :root { --shell-pad-x: 22px; }
  .topbar nav.desktop-nav { display: none; }

  .cs-title { padding: 24px 0 24px; }
  .cs-hero { aspect-ratio: 4 / 3; border-radius: 18px; }
  .cs-hero-cap { margin-bottom: 56px; }
  .cs-section { padding: 4px 0 40px; }
  .cs-section p, .cs-section ul li { font-size: 16px; }
  .cs-section p.lead { font-size: 18px; }
  .cs-grid-2 { grid-template-columns: 1fr; }
  .cs-stats { grid-template-columns: 1fr; gap: 20px; }
  .cs-next { padding: 40px 0 56px; }
  .menu-btn { display: inline-flex; }
  .mobile-nav { display: flex; }
  .topbar-inner { padding: 10px var(--shell-pad-x); }

  .hero { padding: 48px 0 64px; gap: 26px; min-height: auto; }
  .greet { letter-spacing: -.03em; }
  .id-line { font-size: 18px; }
  .desc-stage { min-height: 3.6em; }

  .section { padding: 56px 0 72px; }
  .section-head { margin-bottom: 32px; padding-bottom: 14px; gap: 8px; }

  .page-hero { padding: 48px 0 8px; }
  .page-hero h1 { font-size: clamp(36px, 9vw, 56px); }

  .about-text p { font-size: 16px; line-height: 1.6; margin-bottom: 18px; }

  .grid-3 { grid-template-columns: 1fr; gap: 20px; }
  .play-card .image { aspect-ratio: 16 / 10; font-size: 48px; }

  .foot { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 420px) {
  :root { --shell-pad-x: 18px; }
  .greet { font-size: 40px; }
  .page-hero h1 { font-size: 36px; }
  .card .name { font-size: 20px; }
}

/* ---------- How might we statement ---------- */
.cs-section .cs-hmw {
  margin: 28px 0 32px;
  max-width: 60ch;
  padding: 4px 0 6px 22px;
  border-left: 2px solid var(--ink);
  font-size: clamp(20px, 1.5vw, 24px);
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -.012em;
  text-wrap: pretty;
}
.cs-section .cs-hmw .hmw-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 8px;
}

/* ---------- Custom cursor ---------- */
@media (hover: hover) and (pointer: fine) {
  html, body { cursor: none; }
  a, button, [role="button"], input, textarea, select, label,
  .card, .play-card, .scroll-cue, .cs-toc a, .menu-btn,
  .cs-back, .pill, .pill-tag {
    cursor: none;
  }
  #cursorDot {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2238E0;
    pointer-events: none;
    z-index: 99999;
    transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
    transition: width .18s ease, height .18s ease, opacity .18s ease, background .18s ease;
    will-change: transform;
    mix-blend-mode: normal;
  }
  #cursorDot.is-hover {
    width: 28px;
    height: 28px;
    background: rgba(34, 56, 224, 0.35);
  }
  #cursorDot.is-hidden { opacity: 0; }
  /* Inside the lightbox the page is dimmed almost-black; keep the dot visible */
  .lightbox.is-open ~ #cursorDot,
  body:has(.lightbox.is-open) #cursorDot {
    background: #fff;
  }
  body:has(.lightbox.is-open) #cursorDot.is-hover {
    background: rgba(255, 255, 255, 0.35);
  }
}

/* ---------- Image lightbox ---------- */
.cs-zoomable { cursor: zoom-in; }
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 11, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  padding: 40px;
  cursor: zoom-out;
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.97);
  transition: transform 240ms cubic-bezier(.2,.8,.2,1);
}
.lightbox.is-open img { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
@media (max-width: 760px) {
  .lightbox { padding: 16px; }
  .lightbox-close { top: 12px; right: 12px; }
}

/* Side-by-side figure: large image (with arrow) + small follow-up media */
.cs-figure-pair .pair {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cs-figure-pair .pair-main {
  flex: 1 1 auto;
  width: auto;
  max-width: 78%;
  height: auto;
  display: block;
}
.cs-figure-pair .pair-gif {
  flex: 0 0 auto;
  width: 22%;
  max-width: 22%;
  height: auto;
  display: block;
  border-radius: 14px;
  overflow: hidden;
}
/* When pair sits inside a cs-split .frame, neutralize the frame chrome */
.cs-split .frame.cs-figure-pair {
  aspect-ratio: auto;
  background: transparent;
  border: none;
  display: block;
  overflow: visible;
}
.cs-split .frame.cs-figure-pair .pair img {
  width: auto;
  height: auto;
  object-fit: contain;
}
@media (max-width: 760px) {
  .cs-figure-pair .pair { flex-direction: column; gap: 10px; }
  .cs-figure-pair .pair-main,
  .cs-figure-pair .pair-gif { max-width: 100%; width: 100%; }
}

/* Iteration row with an image-with-arrow + companion media at equal height.
   Each .iter-pair-item gets flex-grow = aspect ratio (W/H) so widths fill the
   row proportionally → both rendered heights match exactly. */
.cs-split .frame.iter-pair-frame {
  aspect-ratio: auto;
  background: transparent;
  border: none;
  display: block;
  overflow: visible;
}
.iter-pair {
  display: flex;
  align-items: flex-end;
  gap: 3.5%;
}
.iter-pair-item {
  flex-grow: var(--aspect, 0.6);
  flex-basis: 0;
  flex-shrink: 1;
  min-width: 0;
}
.iter-pair-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
@media (max-width: 760px) {
  .iter-pair { flex-direction: column; align-items: stretch; gap: 14px; }
  .iter-pair-item { width: 100%; }
}

/* Case study sign-off */
.cs-thanks {
  margin-top: 24px;
  padding: 80px 0 24px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.cs-thanks .ty {
  font-weight: 700;
  font-size: clamp(28px, 3.2vw, 44px);
  letter-spacing: -.025em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 14px;
}
.cs-thanks .ty-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 560px;
  margin: 0 auto;
}
.cs-thanks .ty-sub a {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1.5px solid var(--ink);
  transition: color .2s ease, border-color .2s ease;
}
.cs-thanks .ty-sub a:hover { color: var(--ink-2); border-bottom-color: var(--ink-2); }
.cs-thanks + .cs-next { border-top: none; padding-top: 0; }
@media (max-width: 760px) {
  .cs-thanks { padding: 56px 0 16px; }

/* ---------- Back to top button (mobile case studies) ---------- */
.back-to-top {
  display: none;
}
@media (max-width: 900px) {
  .back-to-top {
    display: flex;
    justify-content: center;
    padding: 32px 0 8px;
  }
  .back-to-top a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
    text-decoration: none;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 10px 20px;
    transition: color .2s ease, border-color .2s ease;
  }
  .back-to-top a:hover { color: var(--ink); border-color: var(--ink); }
}
}
