/* =========================================================
   HEO JIIN — FOLIO 2026
   Minimal · sans-serif · soft white · thin black lines
   ========================================================= */

/* ── self-hosted fonts (assets/fonts) — no external dependency ── */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('assets/fonts/geist-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('assets/fonts/geist-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('assets/fonts/jakarta-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('assets/fonts/jakarta-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
  --paper:     #fafafa;
  --paper-2:   #f2f2f0;
  --ink:       #141414;
  --ink-soft:  #3a3a3a;
  --ink-mute:  #6e6e6e;
  --line:      #141414;
  --line-soft: rgba(20,20,20,.14);

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  /* small-label face (name kept for compatibility) */
  --mono: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;

  --pad: clamp(20px, 5vw, 72px);
  --t1: cubic-bezier(.2,.7,.2,1);
  --t2: cubic-bezier(.5,0,.05,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--paper); }

/* =========================================================
   CUSTOM CURSOR
   ========================================================= */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 9100;
  pointer-events: none;
  transform: translate3d(-200px,-200px,0);
  transition: opacity .25s var(--t1);
  mix-blend-mode: difference;
}
.cursor__dot {
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  background: #fff;
  border-radius: 999px;
  transition: transform .28s var(--t1);
}
.cursor.is-hover .cursor__dot { transform: scale(3.2); }
/* Keep one cursor on mouse devices, independent of viewport width. */
@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor, body.has-custom-cursor * { cursor: none !important; }
}
@media (hover: none), (pointer: coarse) {
  .cursor { display: none !important; }
  body, a, button, .work-card, .overlay__scrim,
  .case__link, [class*="__close"], [class*="__nav"] { cursor: auto; }
  a, button, .work-card, .case__link { cursor: pointer; }
}

/* =========================================================
   TOPBAR
   ========================================================= */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px var(--pad);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  transition: background .35s var(--t1), border-color .35s var(--t1);
}
/* over the hero video — transparent bar, white text */
.topbar.is-over-hero {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}
.topbar.is-over-hero .topbar__brand,
.topbar.is-over-hero .topbar__brand span,
.topbar.is-over-hero .topbar__nav a,
.topbar.is-over-hero .meta-clock {
  color: #fff;
}
.topbar.is-over-hero .topbar__brand { text-shadow: 0 1px 12px rgba(20,20,20,.4); }
.topbar__brand { font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.topbar__brand span { color: var(--ink-mute); font-weight: 400; margin-left: 2px; }
.topbar__nav {
  justify-self: center;
  display: flex; gap: 26px;
  font-family: var(--mono);
  font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase;
}
.topbar__nav a { color: var(--ink-mute); transition: color .2s var(--t1); }
.topbar__nav a:hover { color: var(--ink); }
.topbar__meta { justify-self: end; }
.meta-clock {
  font-family: var(--mono);
  font-size: 12.5px; letter-spacing: .06em;
  color: var(--ink-mute);
}

/* =========================================================
   HERO  — fullscreen video background
   ========================================================= */
.hero {
  position: relative;
  background: #c2d5ef url('assets/video/hero-poster.jpg') center / cover no-repeat;
  height: 100svh;
  min-height: 520px;
  width: 100%;
  overflow: hidden;
  /* word bottom-left, intro bottom-right — align their last
     text-row baselines so MAKER and "BA in Design." sit level */
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: last baseline;
  padding: var(--pad);
  gap: 32px;
}

/* video fills the frame, no letterboxing */
.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
}
.hero__video.is-ready { opacity: 1; }
.work-card__arrow { display: inline-block; margin-left: .18em; font-size: .8em; vertical-align: .06em; }

/* faint veil — lifts text legibility off the pastel video */
.hero__veil {
  position: absolute; inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top,
      rgba(20,20,20,.32) 0%,
      rgba(20,20,20,.10) 26%,
      rgba(20,20,20,0)   52%);
}

/* bottom-left: bold uppercase intro word */
.hero__word {
  position: relative;
  z-index: 2;
  margin: 0;
  color: #fff;
  font-weight: 800;
  font-size: clamp(44px, 8.5vw, 132px);
  line-height: 0.94;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  text-shadow: 0 2px 30px rgba(20,20,20,.25);
}

/* bottom-right: small intro paragraph */
.hero__intro {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: 38ch;
  justify-self: end;
  /* justified block, balanced line lengths so no word sticks out */
  text-align: justify;
  text-align-last: right;
  text-wrap: balance;
  hyphens: none;
  font-size: clamp(12px, 1vw, 14px);
  line-height: 1.45;
  color: rgba(255,255,255,.94);
  font-weight: 460;
  text-shadow: 0 1px 16px rgba(20,20,20,.4);
}

/* =========================================================
   SECTION HEAD
   ========================================================= */
.section-head {
  display: flex;
  align-items: baseline;   /* title and count share one baseline */
  justify-content: space-between;
  gap: 24px;
  padding: clamp(44px, 8vh, 84px) var(--pad) 16px;   /* slightly tighter below the title */
  border-top: 1.5px solid var(--line);
}
.section-title {
  margin: 0;
  font-weight: 660;
  font-size: clamp(20px, 2.4vw, 32px);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.section-count {
  font-family: var(--mono);
  font-size: 12.5px; letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  white-space: nowrap;
}

/* =========================================================
   WORKS GRID
   ========================================================= */
.works-section { padding-bottom: clamp(40px, 8vh, 96px); }
/* extra breathing room between the hero video and the first section */
.works-section .section-head {
  padding-top: clamp(56px, 9vh, 104px);
}
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 1.8vw, 26px);
  padding: clamp(24px, 4vh, 44px) var(--pad) 0;
}
.works-group-title {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-mute);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .06em;
}
.works-group-title--next {
  margin-top: clamp(28px, 4vw, 56px);
}
.work-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 18px;
  border: 0;
  border-radius: 4px;
  background-color: var(--paper-2);
  background-image: var(--thumb);
  background-size: cover;
  background-position: var(--thumb-pos, center);
  font: inherit;
  text-align: left;
  overflow: hidden;
  cursor: none;
  transition: transform .5s var(--t1), box-shadow .5s var(--t1);
}
/* opt-in hairline for cards where the artwork has a light edge
   that needs definition against the page */
.work-card--bordered {
  border: 1px solid #e2e2e2;
}
.work-card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 4px;
  background: rgba(20,20,20,0);
  transition: background .45s var(--t1);
}
.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px -22px rgba(20,20,20,.4);
}
.work-card:hover::after { background: rgba(20,20,20,.12); }

/* ── coming soon card — visible but inert ── */
.work-card--soon {
  background-color: var(--paper-2);
  background-image: none;
  cursor: not-allowed;
}
.work-card--soon::after { display: none; }
.work-card--soon:hover {
  transform: none;
  box-shadow: none;
}
.work-card--soon .work-card__plate {
  background: transparent;
  left: 50%;
  bottom: 50%;
  transform: translate(-50%, 50%);
  text-align: center;
  align-items: center;
  padding: 14px 22px;
  max-width: 80%;
}
.work-card--soon:hover .work-card__plate { transform: translate(-50%, 50%); }
.work-card--soon .work-card__title { color: var(--ink); }
.work-card--soon .work-card__cat {
  color: var(--ink-mute);
  margin-top: 6px;
  padding: 4px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}
/* placeholder tile that closes the grid when the project count is odd —
   quiet grey field, no thumbnail, no hover response at all.
   the extra .work-card class outranks the generic .work-card:hover rules
   further down, which would otherwise shift the plate on hover */
.work-card.work-card--soon {
  background-color: #edecea;
  border: 1px solid var(--line-soft);
  cursor: none;
}
.work-card.work-card--soon .work-card__title { color: var(--ink-mute); }
.work-card.work-card--soon .work-card__plate,
.work-card.work-card--soon:hover .work-card__plate {
  transform: translate(-50%, 50%) !important;
  transition: none;
}
.work-card__plate {
  position: absolute;
  left: 18px; bottom: 18px;
  z-index: 1;
  display: flex; flex-direction: column; gap: 3px;
  padding: 15px 18px;
  background: var(--paper);
  border-radius: 2px;
  max-width: calc(100% - 36px);
  transition: transform .5s var(--t1);
}
.work-card:hover .work-card__plate { transform: translateY(-2px); }
.work-card__title {
  font-weight: 660;
  font-size: clamp(16px, 1.6vw, 21px);
  letter-spacing: -0.005em;
  line-height: 1.15;
  text-transform: uppercase;
}
.work-card__cat {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 2px;
}

/* =========================================================
   ABOUT
   ========================================================= */
.about__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  padding: clamp(28px, 5vh, 56px) var(--pad) clamp(40px, 8vh, 88px);
}
.about__lead {
  padding-right: 16px;                       /* pull the justified edge in a touch */
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.6;
  color: var(--ink-soft);
  text-align: justify;
  text-align-last: left;
  text-wrap: pretty;      /* keeps word gaps even, avoids orphans */
  hyphens: none;
}
.about__lead p { margin: 0 0 1em; }
.about__lead p:last-child { margin-bottom: 0; }

.about__sheet { margin: 0; }
.about__sheet div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 18px;
  padding: 11px 6px;
  border-bottom: 1px solid var(--line-soft);
}
.about__sheet div:first-child { border-top: 1px solid var(--line-soft); }
.about__sheet dt {
  font-family: var(--mono);
  font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-mute);
  white-space: nowrap;
}
.about__sheet dd {
  margin: 0;
  font-size: 13.5px;
  text-align: right;
  color: var(--ink);
}

/* Multi-line row (Experience) — label left, stacked values right */
.about__sheet-multi {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 11px 6px;
  border-bottom: 1px solid var(--line-soft);
}
.about__sheet-multi dt {
  font-family: var(--mono);
  font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-mute);
  white-space: nowrap;
}
.about__sheet-multi dd {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}
.about__sheet-multi dd span {
  font-size: 13.5px;
  color: var(--ink);
}

/* Skills row — stacked label + two-line tag grid */
.about__sheet-skills {
  display: block;
  padding: 14px 6px 4px;
  border-bottom: 1px solid var(--line-soft);
}
.about__sheet-skills dt {
  font-family: var(--mono);
  font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 12px;
}
.about__sheet-skills dd {
  margin: 0;
  display: grid;
  grid-template-columns: auto auto;   /* two columns that hug their content */
  grid-template-rows: repeat(5, auto);
  grid-auto-flow: column;             /* fill top-to-bottom, left column first */
  justify-content: end;               /* flush with the right-aligned values above */
  gap: 8px 22px;
}
.about__sheet-skills dd span {
  font-size: 13.5px;                  /* same as the other sheet values */
  color: var(--ink);
  text-align: right;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.about__skills {
  grid-column: 1 / -1;
  display: grid;
  gap: 28px;
}
.about__skills h3 {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 400;
}
.about__skills ul {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.about__skills li {
  padding: 7px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-soft);
  background: transparent;
  transition:
    transform .35s var(--t1),
    box-shadow .35s var(--t1),
    border-color .35s var(--t1),
    color .35s var(--t1);
}
/* hover: chip eases up and lifts off the page */
.about__skills li:hover {
  transform: translateY(-3px);
  border-color: var(--ink-mute);
  color: var(--ink);
  box-shadow: 0 8px 18px -8px rgba(20,20,20,.28);
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact { padding-bottom: 0; }
.contact__list {
  list-style: none; margin: 0;
  padding: clamp(8px, 2vh, 20px) var(--pad) clamp(40px, 8vh, 80px);
}
.contact__list li { border-bottom: 1px solid var(--line-soft); }
.contact__list li:first-child { border-top: 1px solid var(--line-soft); }
.contact__list a {
  display: flex; align-items: baseline; gap: 20px;
  padding: clamp(20px, 3.4vh, 34px) 4px;
  transition: padding-left .4s var(--t1);
}
.contact__list a:hover { padding-left: 22px; }
.contact__label {
  font-family: var(--mono);
  font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-mute);
  flex: 0 0 90px;
}
.contact__value {
  font-weight: 500;
  font-size: clamp(17px, 2vw, 26px);
  letter-spacing: -0.015em;
}

/* =========================================================
   FOOTER
   ========================================================= */
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px var(--pad);
  border-top: 1.5px solid var(--line);
  font-family: var(--mono);
  font-size: 12.5px; letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.foot a { transition: color .2s var(--t1); }
.foot a:hover { color: var(--ink); }

/* =========================================================
   CASE OVERLAY  — fullscreen, slides up from bottom
   ========================================================= */
.overlay {
  position: fixed; inset: 0; z-index: 500;
  visibility: hidden;
}
.overlay.is-open { visibility: visible; }

/* dim backdrop — the index dims behind */
.overlay__scrim {
  position: absolute; inset: 0;
  background: rgba(20,20,20,.5);
  opacity: 0;
  transition: opacity .45s var(--t1);
  cursor: none;
}
.overlay.is-open .overlay__scrim { opacity: 1; }

/* the project sheet — leaves a strip of backdrop at the top */
.overlay__sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  top: clamp(6px, 1vh, 12px);           /* slim gap -> dimmed index peeks */
  background: var(--paper);
  border-top: 1.5px solid var(--line);
  border-radius: 14px 14px 0 0;
  transform: translateY(100%);
  transition: transform .6s var(--t2);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 -30px 60px -30px rgba(20,20,20,.5);
}
.overlay.is-open .overlay__sheet { transform: translateY(0); }

/* floating close button — sticks to the top-right while scrolling,
   takes no layout space so the case starts right at the top */
.overlay__close {
  position: sticky;
  top: clamp(14px, 2vw, 22px);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 41px;
  height: 41px;
  margin: clamp(14px, 2vw, 22px) clamp(10px, 1.3vw, 15px) -41px auto;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 8px 24px -10px rgba(20,20,20,.4);
  cursor: none;
  transition: background .25s var(--t1), color .25s var(--t1),
              transform .3s var(--t1);
}
.overlay__close:hover {
  background: var(--ink);
  color: var(--paper);
  transform: rotate(90deg);
}

.overlay__inner { padding-bottom: 90px; }

/* ── case content ───────────────────────────────── */
.case__hero {
  /* copy width: aligns with the inner edge of the last meta box (Role),
     i.e. the meta row's right edge minus the box's 18px inner padding */
  --copy-w: calc(100% - 18px);
  padding: clamp(36px, 6vw, 80px) var(--pad) clamp(28px, 4vw, 48px);
  max-width: 1100px;
}
.case__no {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute);
}
.case__title {
  margin: 0 0 28px;
  font-weight: 500;
  font-size: clamp(34px, 6.5vw, 92px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.case__meta {
  list-style: none; margin: 0 0 30px; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.case__meta li {
  display: flex; flex-direction: column; gap: 5px;
  padding: 16px 18px 16px 0;
}
.case__meta li + li { border-left: 1px solid var(--line-soft); padding-left: 18px; }
.case__meta li span {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-mute);
}
.case__meta li b { font-weight: 500; font-size: 14px; }
.case__lede {
  margin: 0 0 14px;
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.5;
  color: var(--ink);
  max-width: var(--copy-w);
  text-wrap: pretty;
}
.case__para + .case__para { margin-top: 18px; }
/* barely-there emphasis inside case copy */
.case__em { font-weight: 560; }
.case__para {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: var(--copy-w);
  text-wrap: pretty;
}

/* fine-print note under a case intro (e.g. AI disclaimer) */
.case__note {
  margin: 26px 0 0;
  max-width: var(--copy-w);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-mute);
  text-wrap: pretty;
}

/* small closing note at the very end of every case (added by JS) */
.case__thanks {
  margin: clamp(72px, 12vh, 140px) var(--pad) 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(20,20,20,.45);
}

/* external link button inside a case (e.g. research deck) */
.case__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: none;
  transition: background .25s var(--t1), color .25s var(--t1);
}
.case__link:hover {
  background: var(--ink);
  color: var(--paper);
}
/* second button on the same row (e.g. live site + interactive game) */
.case__link + .case__link {
  margin-left: 10px;
}

/* =========================================================
   CASE GALLERY  — pair / full / video, no leftover whitespace
   ========================================================= */
.case__gallery {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.4vw, 20px);
  padding: clamp(8px, 1.4vw, 20px) var(--pad) 0;
}

/* shared figure shell */
.case__gallery figure {
  margin: 0;
  background: var(--paper-2);
  border: 1px solid rgba(20,20,20,.06);   /* very light grey edge */
  border-radius: 4px;
  overflow: hidden;
}

/* ── two images on one row, equal height, cropped to align ── */
.g-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 1.4vw, 20px);
  align-items: stretch;
}
.g-pair figure {
  aspect-ratio: 3 / 2;          /* uniform row height — kills frame gaps */
}
.g-pair figure img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;            /* fill the frame, no whitespace */
  object-position: center;
}

/* square + wide variant: 1st figure keeps a true 1:1,
   2nd figure matches that height (wide gif fills, cropped sides) */
.g-pair--sq figure:first-child { aspect-ratio: 1 / 1; }
.g-pair--sq figure:last-child  { aspect-ratio: auto; }   /* stretches to row height */
.g-pair--sq figure:last-child img { height: 100%; }

/* photo + wide gif: gif keeps a 16:9 frame (more horizontal room),
   the photo column is narrower and crops to the same row height */
.g-pair--wide {
  grid-template-columns: 0.62fr 1fr;   /* photo smaller, gif wider */
}
.g-pair--wide figure:last-child {       /* the gif — wide 16:9 */
  aspect-ratio: 16 / 9;
}
.g-pair--wide figure:first-child {      /* the photo — fills row height */
  aspect-ratio: auto;
}
.g-pair--wide figure:first-child img { height: 100%; }

/* ── one image, full width, natural aspect ── */
.g-full {
  width: 100%;
}
.g-full img {
  display: block;
  width: 100%; height: auto;    /* original ratio, no crop */
}

/* ── GIFs overlaid onto blank frames inside a board image ──
   top/height per frame are set inline as % of the image height */
.g-overlaid { position: relative; }
.g-overlaid .g-gif {
  position: absolute;
  /* slightly smaller than the frame, centred, same width on both */
  left: 50%;
  transform: translateX(-50%);
  width: 88%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .5s var(--t1);
}
.g-overlaid .g-gif[src] { opacity: 1; }

/* pill link overlaid on a board image (e.g. "visit live website");
   position + colours per board via inline style */
.g-visit {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--visit-bg, var(--paper));
  color: var(--visit-ink, var(--ink));
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 8px 24px -10px rgba(0,0,0,.45);
  transition: transform .3s var(--t1), box-shadow .3s var(--t1);
}
.g-visit:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.5);
}
@media (max-width: 860px) {
  .g-visit { padding: 8px 14px; font-size: 11.5px; }
}

/* ── video, full width 16:9 ── */
.g-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-color: transparent;
}
.g-video iframe,
.g-video video {
  display: block;
  width: 100%; height: 100%;
  border: 0;
  object-fit: cover;
}
/* RE:MEDY interactive web capture — iframe keeps the source ratio (55.83%)
   so Vimeo adds no letterbox; the recording itself has a thin grey strip
   baked into its bottom edge, so the figure is shortened by a few px and
   overflow:hidden crops that strip away */
.g-video--remedy { aspect-ratio: auto; }
.g-video--remedy iframe {
  height: auto;
  aspect-ratio: 100 / 55.83;
  margin-bottom: -4px;   /* crop: hides the grey strip at the bottom of the video */
}

/* pill link sitting on a video — kept clear of the player's control bar */
.g-visit--video {
  right: clamp(12px, 2vw, 28px);
  bottom: clamp(56px, 7vw, 84px);
}

/* ── placeholder for not-yet-uploaded images ── */
.g-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(45deg,
      var(--paper-2) 0 14px,
      #ededeb 14px 28px);
  border: 1px dashed var(--line-soft);
}
.g-empty.g-full { aspect-ratio: 21 / 9; }
.g-empty span {
  font-family: var(--mono);
  font-size: 13px; letter-spacing: .1em;
  color: var(--ink-mute);
}

/* =========================================================
   EXPERIMENTS — lighter layout for the side-studies case
   ========================================================= */
.case__hero--compact {
  padding-bottom: clamp(16px, 2vw, 28px);
}
.case__hero--compact .case__title {
  font-size: clamp(28px, 5vw, 64px);
  margin-bottom: 18px;
}

.case__experiments {
  padding: clamp(8px, 1.4vw, 20px) var(--pad) 0;
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 6vw, 96px);
}

.exp {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.6vw, 22px);
  padding-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--line-soft);
}
.exp:first-child {
  border-top: 0;
  padding-top: 0;
}

.exp__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.exp__title {
  margin: 0;
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.exp__meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.exp__para {
  margin: 0;
  max-width: 64ch;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.exp__grid {
  margin-top: clamp(6px, 0.8vw, 10px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 1.4vw, 20px);
}
.exp__cell {
  margin: 0;
  background: var(--paper-2);
  border: 1px solid rgba(20,20,20,.06);
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}
.exp__cell--wide {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}
.exp__cell img,
.exp__cell video {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
/* natural — let the asset set its own height (no crop).
   Defined after the base rule so it wins on equal specificity. */
.exp__cell--natural {
  aspect-ratio: auto;
}
.exp__cell--natural img,
.exp__cell--natural video {
  height: auto;
  object-fit: contain;
}

/* ── experiments: full-width video + button row (PLAYABLE BRANDS) ── */
.exp__video {
  position: relative;            /* anchors the overlaid .g-visit pill */
  margin: clamp(6px, 0.8vw, 10px) 0 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}
.exp__video iframe {
  display: block;
  width: 100%; height: 100%;
  border: 0;
}
/* KASANE: exact source ratio (no letterbox); the recording has thin black
   lines baked into its left/right edges, so the iframe is scaled up a hair
   and the figure's overflow:hidden crops ~2–3px off every side */
.exp__video--kasane { aspect-ratio: 100 / 56.81; }
.exp__video--kasane iframe { transform: scale(1.004); }
.exp__video--lievito { aspect-ratio: 100 / 56.92; }
/* placeholder until the video is uploaded */
.exp__video--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(45deg,
      var(--paper-2) 0 14px,
      #ededeb 14px 28px);
  border: 1px dashed var(--line-soft);
}
.exp__video--empty span {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
/* buttons under the video, with breathing room above */
.exp__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(4px, 0.6vw, 8px);
}
.exp__actions .case__link { margin-top: 0; }
.exp__actions .case__link + .case__link { margin-left: 0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .case__meta { grid-template-columns: repeat(2, 1fr); }
  .case__meta li:nth-child(3) { border-left: 0; padding-left: 0; }
  .case__meta li:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 860px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar__nav { display: none; }
  .works-grid { grid-template-columns: 1fr; }
  .work-card { aspect-ratio: 3 / 2; }
  .about__grid { grid-template-columns: 1fr; }
  /* narrow lines: justify opens wide gaps, so fall back to ragged-right */
  .about__lead { text-align: left; padding-right: 0; }
  .about__sheet dd { font-size: 12.5px; }
  .overlay__sheet { top: clamp(4px, 1vh, 10px); }
  /* gallery: pairs stack to single column on mobile */
  .g-pair { grid-template-columns: 1fr; }
  .g-pair figure { aspect-ratio: 4 / 3; }
  /* experiments: stack the grid on mobile */
  .exp__grid { grid-template-columns: 1fr; }
  .exp__cell { aspect-ratio: 4 / 3; }
  .exp__cell--wide { aspect-ratio: 16 / 9; }
  .exp__cell--natural { aspect-ratio: auto; }
  /* hero: stack word + intro vertically */
  .hero {
    grid-template-columns: 1fr;
    align-content: end;
    align-items: start;
    gap: 16px;
  }
  .hero__intro {
    justify-self: start;
    text-align-last: left;
    max-width: 40ch;
  }
}
@media (max-width: 560px) {
  .case__meta { grid-template-columns: 1fr; }
  .case__meta li,
  .case__meta li + li {
    border-left: 0; padding-left: 0;
    border-top: 1px solid var(--line-soft);
  }
  .case__meta li:first-child { border-top: 0; }
}

/* =========================================================
   SMALL-LABEL WEIGHT — Jakarta Sans, a touch bolder than default
   ========================================================= */
.topbar__nav, .meta-clock, .section-count,
.work-card__cat,
.about__sheet dt, .about__sheet-multi dt, .about__sheet-skills dt,
.about__skills h3, .contact__label, .foot,
.case__no, .case__meta li span,
.case__link, .exp__meta, .g-empty span, .case__thanks {
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* CROWD CHOICE board coordinates follow the supplied 1921 × 5883 artwork. */
.crowd-gallery { gap: 0; }
.case__gallery .crowd-board,
.case__gallery .variant-board { position: relative; overflow: visible; border: 0; border-radius: 0; background: #fff; }
.crowd-demo { position: absolute; left: 6.976%; top: 19.633%; width: 86.048%; height: 15.808%; background: #f4f4f4; }
.crowd-demo iframe { display: block; border: 0; width: 100%; height: 100%; }
.crowd-explainer { position: absolute; top: 74.65%; right: 6.976%; width: 86.048%; display: flex; justify-content: flex-end; pointer-events: none; z-index: 3; }
.crowd-explainer__trigger { pointer-events: auto; width: clamp(54px, 8vw, 112px); aspect-ratio: 1; border: 0; border-radius: 50%; color: #fff; background: #3960f8; font-family: inherit; font-weight: 600; font-size: clamp(8px, 1vw, 13px); line-height: 1.25; box-shadow: 0 5px 18px #2345ac26; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; transition: transform .25s ease-in-out, box-shadow .25s ease-in-out; }
.crowd-explainer__trigger:hover { transform: scale(1.06); box-shadow: 0 8px 24px #2345ac38; }
.crowd-explainer__trigger:focus-visible { outline: 3px solid #172b75; outline-offset: 4px; }
.crowd-explainer__panel { pointer-events: auto; position: absolute; top: calc(100% + 12px); right: 0; width: 100%; background: #e2e7f9; border-radius: 12px; box-shadow: 0 12px 48px #15274b30; overflow: hidden; animation: crowd-reveal .23s ease-in-out; }
.crowd-explainer__panel img { width: 100%; height: auto; display: block; margin-bottom: -1%; }
.crowd-explainer__close { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #fff; color: #18213b; font-size: 22px; cursor: pointer; }
.crowd-prototype { background: #fff; padding: 3.9% 6.976%; }
.crowd-prototype__video { position: relative; aspect-ratio: 16 / 9; }
.crowd-prototype__video iframe { display: block; border: 0; width: 100%; height: 100%; }
@keyframes crowd-reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .crowd-explainer__trigger { transition: none; } .crowd-explainer__panel { animation: none; } }

.crowd-board__visit { right: 6.976%; bottom: calc(82.4% + 3px); }
.crowd-board__try { right: calc(5.2% + 6px); bottom: 1.6%; --visit-bg: #3960f8; --visit-ink: #fff; }
/* Release the settled transform layer so WebKit paints the MP4 normally. */
.overlay.is-open:has(.crowd-gallery) .overlay__sheet { transform: none; }


.variant-demo { position: absolute; left: 5%; top: 79.15%; width: 90%; aspect-ratio: 16 / 9; background: #e8e8eb; }
.variant-demo iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 0; }

.variant-board__visit { right: 6.976%; bottom: calc(62% + 7px); }
.variant-demo__visit { right: 0; top: calc(100% + 16px); bottom: auto; }
.g-visit.variant-visit { border: 0; }
.variant-visit:disabled { opacity: 1; cursor: default; }
.variant-visit:disabled:hover { transform: none; }
.case__link.variant-visit:disabled:hover { background: transparent; color: var(--ink); }
