/* ===========================================================================
   ALF BAE — Portfolio 2024, interactive edition
   =========================================================================== */

/* ── tokens ──────────────────────────────────────────────────────────────── */
:root {
  --red: #d4102a;
  --blue: #0b62c4;
  --violet: #453a5e;

  --bg: #eef0f4;
  --bg-2: #e4e7ee;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --ink: #14161b;
  --ink-2: #5a6270;
  --ink-3: #8d95a3;
  --line: rgba(15, 23, 42, 0.10);
  --line-2: rgba(15, 23, 42, 0.06);
  --shadow-s: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 18px rgba(15, 23, 42, .06);
  --shadow-m: 0 2px 6px rgba(15, 23, 42, .07), 0 18px 44px rgba(15, 23, 42, .12);
  --shadow-l: 0 30px 90px rgba(15, 23, 42, .22);

  --r-s: 10px;
  --r-m: 16px;
  --r-l: 22px;

  --gap: clamp(8px, 0.9vw, 14px);
  --pad: clamp(18px, 4vw, 64px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", Arial, sans-serif;

  /* Latin display type is set tight; Korean needs the tracking back */
  --track-display: -.042em;
  --track-name: -.045em;
  --leading-body: 1.62;
}

html[lang="ko"] {
  --font: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
  --track-display: -.022em;
  --leading-body: 1.72;
}

html[data-theme="dark"] {
  --red: #ff4d63;
  --blue: #57a2ff;
  --violet: #b4a5d8;

  --bg: #0a0b0e;
  --bg-2: #101319;
  --surface: #15181f;
  --surface-2: #1b1f28;
  --ink: #edeff3;
  --ink-2: #a2aab8;
  --ink-3: #757e8e;
  --line: rgba(255, 255, 255, 0.13);
  --line-2: rgba(255, 255, 255, 0.07);
  --shadow-s: 0 1px 2px rgba(0, 0, 0, .5), 0 6px 18px rgba(0, 0, 0, .4);
  --shadow-m: 0 2px 6px rgba(0, 0, 0, .5), 0 18px 44px rgba(0, 0, 0, .5);
  --shadow-l: 0 30px 90px rgba(0, 0, 0, .7);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body[data-stage="cover"] { overflow: hidden; height: 100dvh; }

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: var(--blue); }

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

::selection { background: var(--blue); color: #fff; }

/* ── shared bits ─────────────────────────────────────────────────────────── */
.iconbtn {
  display: grid; place-items: center;
  width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s, transform .2s var(--ease);
}
.iconbtn:hover { color: var(--ink); border-color: var(--ink-3); transform: translateY(-1px); }
.iconbtn:active { transform: translateY(0) scale(.94); }
.iconbtn svg { width: 19px; height: 19px; fill: currentColor; }

#btnSound .i-off, #btnSound[aria-pressed="false"] .i-on { display: none; }
#btnSound[aria-pressed="false"] .i-off { display: block; }
#btnSound[aria-pressed="false"] { color: var(--ink-3); }

#btnTheme .i-moon { display: none; }
html[data-theme="dark"] #btnTheme .i-sun { display: none; }
html[data-theme="dark"] #btnTheme .i-moon { display: block; }

.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .68em 1.15em;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .875rem; font-weight: 600; letter-spacing: -.01em;
  text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s;
}
.btn::after { content: "↗"; font-size: .9em; opacity: .6; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn--solid { background: var(--blue); color: #fff; }
.btn--solid:hover { background: color-mix(in oklab, var(--blue) 86%, #000); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink-3); }
#btnTop::after { content: "↑"; }

/* ── progress + topbar ───────────────────────────────────────────────────── */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 90;
  background: var(--line-2);
  opacity: 0; transition: opacity .4s;
}
.progress__bar {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--red), var(--blue));
  transform: scaleX(0); transform-origin: 0 50%;
}
body[data-stage="deck"] .progress { opacity: 1; }

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; gap: 16px;
  padding: 14px var(--pad);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.topbar__home {
  padding: 0; border: 0; background: none; cursor: pointer;
  letter-spacing: -.02em;
}
.mark { font-size: 1rem; font-weight: 800; color: var(--red); }
.mark em { font-style: normal; color: var(--ink); margin-left: .18em; }

.topbar__meta {
  display: none; align-items: baseline; gap: 8px;
  margin-left: auto; margin-right: auto;
  font-size: .75rem; font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  padding: 7px 14px; border-radius: 999px;
  background: color-mix(in oklab, var(--surface) 76%, transparent);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  max-width: min(52vw, 520px);
}
body[data-stage="deck"] .topbar__meta { display: flex; }
.topbar__sep { opacity: .45; }
.topbar__title {
  color: var(--ink); font-weight: 600; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.topbar__tools { margin-left: auto; display: flex; gap: 8px; }
body[data-stage="deck"] .topbar__tools { margin-left: 0; }

/* language segmented toggle */
.langtoggle {
  display: flex; align-items: stretch;
  height: 38px; padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.langtoggle button {
  padding: 0 11px;
  border: 0; border-radius: 999px;
  background: none;
  font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  color: var(--ink-3);
  cursor: pointer;
  transition: color .2s, background .25s var(--ease);
}
.langtoggle button:hover { color: var(--ink); }
.langtoggle button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.langtoggle button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ── cover / bento ───────────────────────────────────────────────────────── */
.cover {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: 72px var(--pad) 24px;
  background:
    radial-gradient(120% 90% at 50% -10%, var(--bg-2), transparent 60%),
    var(--bg);
}
.cover__glow {
  position: absolute; inset: -20%;
  background: radial-gradient(360px 360px at var(--mx, 50%) var(--my, 40%),
    color-mix(in oklab, var(--blue) 16%, transparent), transparent 70%);
  opacity: .8; pointer-events: none;
  transition: opacity .5s;
}
.cover__inner {
  width: min(1500px, 100%);
  height: 100%;
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
  /* on short/narrow screens the grid scrolls here first; the deck opens
     only once this reaches its end (see app.js) */
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.cover__inner::-webkit-scrollbar { display: none; }

.bento {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(4, minmax(0, 1fr));
  grid-template-areas:
    "id id a a b b"
    "id id a a c d"
    "f  f  f  g g h"
    "i  i  j  k l l";
}

.tile {
  grid-area: var(--area);
  position: relative;
  display: block; padding: 0; margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow-s);
  will-change: transform;
  transition: box-shadow .35s var(--ease), border-color .35s, transform .35s var(--ease);
}
.tile:hover { box-shadow: var(--shadow-m); border-color: color-mix(in oklab, var(--blue) 35%, var(--line)); }
.tile:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.tile__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
  transform: scale(1.02);
  transition: transform .7s var(--ease), filter .5s;
}
.tile:hover .tile__img { transform: scale(1.08); }
html[data-theme="dark"] .tile__img { filter: brightness(.78) contrast(1.06) saturate(1.05); }

/* gradient veil anchored to the bottom — capped so tall tiles keep more art */
.tile__scrim {
  position: absolute; inset: auto 0 0 0;
  height: clamp(76px, 60%, 172px);
  background: linear-gradient(to top,
    var(--surface) 0%,
    color-mix(in oklab, var(--surface) 96%, transparent) 42%,
    color-mix(in oklab, var(--surface) 64%, transparent) 68%,
    transparent 100%);
  transition: opacity .4s;
}
.tile:hover .tile__scrim { opacity: .95; }

.tile__body {
  position: absolute; inset: auto 0 0 0;
  padding: clamp(10px, 1.1vw, 18px);
  display: flex; flex-direction: column; gap: 3px;
  text-shadow: 0 1px 0 var(--surface);
}
.tile__tag {
  align-self: flex-start;
  font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue);
  padding: 3px 7px; border-radius: 5px;
  background: color-mix(in oklab, var(--blue) 12%, transparent);
  margin-bottom: 3px;
}
.tile__title {
  margin: 0;
  font-size: clamp(.82rem, 1.02vw, 1.06rem);
  font-weight: 700; letter-spacing: -.022em; line-height: 1.18;
  color: var(--ink);
}
.tile__kicker {
  margin: 0; font-size: .7rem; color: var(--ink-2); letter-spacing: -.005em; line-height: 1.35;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.tile__num {
  position: absolute; top: 9px; right: 10px;
  padding: 3px 7px; border-radius: 999px;
  font-size: .66rem; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  background: color-mix(in oklab, var(--surface) 82%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.tile__go {
  position: absolute; top: 10px; left: 12px;
  width: 26px; height: 26px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--blue); color: #fff;
  font-size: .8rem;
  opacity: 0; transform: translateY(-4px) scale(.8);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.tile:hover .tile__go { opacity: 1; transform: none; }

/* identity tile */
.tile--id {
  grid-area: id;
  cursor: default;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(16px, 1.7vw, 30px);
  background:
    radial-gradient(120% 120% at 0% 0%, color-mix(in oklab, var(--blue) 9%, transparent), transparent 60%),
    var(--surface);
}
.tile--id:hover { transform: none; box-shadow: var(--shadow-s); border-color: var(--line); }
.id__name {
  margin: 0;
  font-size: clamp(1.6rem, 3.1vw, 3.1rem);
  font-weight: 800; letter-spacing: var(--track-name); line-height: .95;
  color: var(--red);
}
.id__name em { font-style: normal; display: block; color: var(--ink); }
.id__role {
  margin: .55em 0 0;
  font-size: clamp(.8rem, 1.05vw, 1.02rem); font-weight: 500;
  color: var(--ink-2); letter-spacing: -.015em;
}
.id__blurb {
  margin: 1em 0 0; max-width: 34ch;
  font-size: clamp(.74rem, .86vw, .9rem); line-height: 1.5; color: var(--ink-3);
}
.id__foot {
  display: flex; align-items: baseline; gap: 10px;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
  color: var(--ink-3);
}
.id__foot b { color: var(--blue); font-size: clamp(1rem, 1.5vw, 1.35rem); letter-spacing: -.02em; }

/* hint */
.cover__hint {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: .78rem; color: var(--ink-3); letter-spacing: -.005em;
  padding-bottom: 2px;
}
.cover__hint-sub { opacity: .7; }
.cover__hint-sub::before { content: "· "; }
.cover__wheel {
  width: 19px; height: 30px; border: 1.6px solid var(--ink-3); border-radius: 999px;
  position: relative; opacity: .7;
}
.cover__wheel i {
  position: absolute; left: 50%; top: 6px; width: 3px; height: 6px; border-radius: 2px;
  background: var(--ink-3); transform: translateX(-50%);
  animation: wheel 1.7s var(--ease) infinite;
}
@keyframes wheel {
  0%   { opacity: 0; transform: translate(-50%, -3px); }
  35%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 11px); }
}

/* the FLIP clone used for tile → chapter */
.flip-clone {
  position: fixed; z-index: 120;
  border-radius: var(--r-m);
  overflow: hidden;
  box-shadow: var(--shadow-l);
  will-change: transform;
  pointer-events: none;
}
.flip-clone img { width: 100%; height: 100%; object-fit: cover; }

/* ── deck ────────────────────────────────────────────────────────────────── */
.deck {
  opacity: 0;
  padding-top: 8vh;
  transition: opacity .5s .1s;
}
body[data-stage="deck"] .deck { opacity: 1; }

.chapter {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 30%) 1fr;
  gap: clamp(24px, 4vw, 72px);
  padding: clamp(48px, 9vh, 110px) var(--pad);
  border-top: 1px solid var(--line-2);
  scroll-margin-top: 0;
}
.chapter:first-child { border-top: 0; }

.chapter__intro {
  position: sticky;
  top: clamp(80px, 14vh, 140px);
  align-self: start;
}
.chapter__num {
  display: block;
  font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums;
  letter-spacing: .12em; color: var(--red);
  margin-bottom: 14px;
}
.chapter__kicker {
  margin: 0 0 8px;
  font-size: .78rem; font-weight: 600; letter-spacing: .01em; color: var(--ink-3);
}
.chapter__title {
  margin: 0 0 .5em;
  font-size: clamp(1.7rem, 3.1vw, 2.9rem);
  font-weight: 800; letter-spacing: var(--track-display); line-height: 1.02;
  color: var(--ink);
  text-wrap: balance;
}
.chapter__summary {
  margin: 0; max-width: 46ch;
  font-size: clamp(.94rem, 1.08vw, 1.06rem); line-height: var(--leading-body); color: var(--ink-2);
}

.chapter__list { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.chapter__list li {
  position: relative; padding-left: 22px;
  font-size: .92rem; line-height: 1.5; color: var(--ink-2);
}
.chapter__list li::before {
  content: ""; position: absolute; left: 4px; top: .58em;
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--blue); opacity: .55;
}

.chapter__meta { margin: 24px 0 0; display: grid; gap: 1px; background: var(--line-2); border-radius: var(--r-s); overflow: hidden; }
.chapter__meta div { background: var(--bg); padding: 12px 14px; }
.chapter__meta dt {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 5px;
}
.chapter__meta dd { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--ink); }

.chapter__actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }

.chapter__media { display: grid; gap: clamp(18px, 2.6vw, 34px); min-width: 0; }

.shot {
  margin: 0;
  border-radius: var(--r-l);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
  cursor: zoom-in;
  transition: box-shadow .45s var(--ease), transform .45s var(--ease), border-color .3s;
}
.shot:hover { box-shadow: var(--shadow-m); border-color: color-mix(in oklab, var(--blue) 30%, var(--line)); }
.shot img { width: 100%; height: auto; background: #fff; }
/* the slides are white — dim them at rest in dark mode, restore on hover */
html[data-theme="dark"] .shot img { filter: brightness(.84) contrast(1.03); transition: filter .35s; }
html[data-theme="dark"] .shot:hover img { filter: none; }
.shot figcaption {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px;
  font-size: .78rem; color: var(--ink-3);
  border-top: 1px solid var(--line-2);
  background: var(--surface-2);
}
.shot figcaption::before {
  content: "P" attr(data-page);
  font-weight: 700; font-variant-numeric: tabular-nums; color: var(--blue);
  font-size: .68rem; letter-spacing: .04em;
  padding: 2px 6px; border-radius: 4px;
  background: color-mix(in oklab, var(--blue) 12%, transparent);
}
.shot figcaption em { margin-left: auto; font-style: normal; opacity: .65; }

/* reveal state (Motion drives these when present, CSS is the fallback) */
.reveal { opacity: 0; transform: translateY(26px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

/* ── dots nav ────────────────────────────────────────────────────────────── */
.dots {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%);
  z-index: 70;
  display: none; flex-direction: column; gap: 9px;
  padding: 10px 8px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body[data-stage="deck"] .dots { display: flex; }
.dot {
  position: relative;
  width: 9px; height: 9px; padding: 0;
  border: 0; border-radius: 999px;
  background: var(--ink-3); opacity: .38;
  cursor: pointer;
  transition: opacity .25s, transform .25s var(--ease), background .25s;
}
.dot:hover { opacity: .9; transform: scale(1.35); }
.dot[aria-current="true"] { background: var(--red); opacity: 1; transform: scale(1.35); }
.dot span {
  position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%) translateX(6px);
  white-space: nowrap;
  font-size: .72rem; font-weight: 600; color: var(--ink);
  padding: 5px 10px; border-radius: 7px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
  opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s var(--ease);
}
.dot:hover span { opacity: 1; transform: translateY(-50%); }

/* ── footer ──────────────────────────────────────────────────────────────── */
.foot {
  padding: clamp(40px, 8vh, 90px) var(--pad) clamp(40px, 7vh, 70px);
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  opacity: 0; transition: opacity .5s;
}
body[data-stage="deck"] .foot { opacity: 1; }
.foot__row {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px;
  max-width: 1500px; margin: 0 auto;
}
.foot__name { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -.04em; color: var(--red); }
.foot__role { margin: 4px 0 0; font-size: .88rem; color: var(--ink-2); }
.foot__links { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── lightbox ────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 150;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(8px, 2vw, 26px);
  padding: clamp(48px, 7vh, 80px) clamp(10px, 3vw, 40px);
  background: color-mix(in oklab, var(--bg) 82%, #000);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
.lightbox[hidden] { display: none; }
.lightbox__stage { margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; align-items: center; }
.lightbox__stage img {
  max-width: 100%; max-height: 76vh;
  width: auto; height: auto;
  border-radius: var(--r-m);
  background: #fff;
  box-shadow: var(--shadow-l);
}
.lightbox__stage figcaption {
  font-size: .8rem; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.lightbox__close { position: absolute; top: 16px; right: 16px; }
.lightbox__nav { width: 46px; height: 46px; }

/* ── responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .bento {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(7, minmax(152px, auto));
    grid-template-areas:
      "id id a a"
      "id id a a"
      "b  b  c d"
      "f  f  f f"
      "g  g  h h"
      "i  i  j k"
      "l  l  l l";
  }
  .cover { padding-top: 66px; place-items: start center; }
  .cover__inner { max-height: 100%; }
  .bento { flex: 0 0 auto; }
  .cover__hint { position: sticky; bottom: 0; padding: 10px 0 4px; background: var(--bg); }
  .id__blurb { display: none; }
  .chapter { grid-template-columns: 1fr; }
  .chapter__intro { position: static; }
  .dots { display: none !important; }
}

@media (max-width: 620px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(9, minmax(156px, auto));
    grid-template-areas:
      "id id"
      "a  a"
      "b  b"
      "c  d"
      "f  f"
      "g  g"
      "h  i"
      "j  k"
      "l  l";
  }
  .cover { place-items: start center; padding-top: 62px; }
  .tile--id { min-height: 200px; }
  .id__blurb { display: block; }
  .cover__hint { flex-wrap: wrap; text-align: center; padding: 6px 0 14px; }
  .cover__hint-sub { flex-basis: 100%; }
  .cover__hint-sub::before { content: ""; }
  .lightbox { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lightbox__nav { position: absolute; bottom: 18px; }
  .lightbox__nav--prev { left: 22%; }
  .lightbox__nav--next { right: 22%; }
  .topbar__meta { display: none !important; }
}

/* ── Korean typography ───────────────────────────────────────────────────── */
/* keep-all stops Korean words breaking mid-word; break-word catches long URLs */
html[lang="ko"] .tile__title,
html[lang="ko"] .tile__kicker,
html[lang="ko"] .chapter__title,
html[lang="ko"] .chapter__summary,
html[lang="ko"] .chapter__list li,
html[lang="ko"] .chapter__meta dd,
html[lang="ko"] .shot figcaption,
html[lang="ko"] .id__blurb,
html[lang="ko"] .id__role {
  word-break: keep-all;
  overflow-wrap: break-word;
}
html[lang="ko"] .chapter__list li,
html[lang="ko"] .chapter__meta dd { line-height: 1.68; }
html[lang="ko"] .tile__title { line-height: 1.28; }
/* the uppercase tags are Latin-spaced; Korean tags need less tracking */
html[lang="ko"] .tile__tag,
html[lang="ko"] .chapter__meta dt { letter-spacing: .02em; }
html[lang="ko"] .id__foot { letter-spacing: .04em; }

/* ── reduced motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
