:root {
  color-scheme: dark;
  --bg: oklch(16.5% 0.004 70);
  --bg-2: oklch(20% 0.005 70);
  --ink: oklch(94% 0.006 80);
  --ink-2: oklch(82% 0.006 80);
  --muted: oklch(66% 0.008 75);
  --rule: oklch(30% 0.006 70);
  --accent: oklch(80% 0.12 75);
  --scrim: oklch(12% 0.004 70 / 0.82);
  --scrim-2: oklch(12% 0.004 70 / 0.6);

  --font: "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", system-ui, sans-serif;

  --t-xs: 0.8125rem; --t-sm: 0.875rem; --t-md: 1rem; --t-lg: 1.1875rem; --t-xl: 1.5rem;
  --t-2xl: clamp(1.75rem, 1.2vw + 1.3rem, 2.25rem);
  --t-section: clamp(2.25rem, 3vw + 1rem, 3.75rem);
  --t-display: clamp(2.75rem, 5vw + 1rem, 5.5rem);
  --t-hero: clamp(3.25rem, 7vw + 1rem, 7.5rem);

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px; --s-10: 160px;
  --container: 1440px; --gutter: clamp(20px, 4vw, 56px); --gap: clamp(16px, 2vw, 28px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --mast-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--mast-h); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--t-md); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ul, dl, dd, figure { margin: 0; }
ul { list-style: none; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
.num { font-variant-numeric: tabular-nums; }
[lang="ko"] { word-break: keep-all; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; box-shadow: 0 0 0 5px var(--bg); transition: none; }
h1[lang="ko"], .title[lang="ko"], .film-ko { letter-spacing: -0.01em; }
.nw { white-space: nowrap; }
::selection { background: var(--accent); color: var(--bg); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: var(--s-4); top: -100px; z-index: 50; background: var(--ink); color: var(--bg); padding: var(--s-2) var(--s-4); }
.skip:focus-visible { top: var(--s-4); }

/* masthead */
.mast { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--rule); }
.mast-in { height: var(--mast-h); display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); }
.wordmark { font-weight: 600; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.wordmark [lang="ko"] { font-weight: 400; color: var(--muted); margin-left: var(--s-1); }
.mast nav { display: flex; gap: clamp(var(--s-4), 2.5vw, var(--s-6)); font-size: var(--t-sm); }
.mast nav a { color: var(--ink-2); text-decoration: none; padding-block: var(--s-2); }
.mast nav a:hover { color: var(--ink); }

/* shared frame: index stills share one shape so the grid lines up; film pages show the whole frame */
.frame { overflow: hidden; background: var(--bg-2); aspect-ratio: 16 / 9; }
.frame--wide { aspect-ratio: 2 / 1; }
.frame img { width: 100%; height: 100%; object-fit: cover; }

.when { color: var(--muted); font-size: var(--t-sm); white-space: nowrap; }
.when span { display: block; font-size: var(--t-xs); }
.title .ko { display: block; margin-top: var(--s-1); font-size: 0.78em; font-weight: 400; color: var(--muted); }
a:hover .title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: var(--muted); }

/* hero */
.hero { position: relative; isolation: isolate; }
.hero-frame { color: var(--ink); position: relative; height: clamp(30rem, calc(100svh - var(--mast-h)), 64vw); background: var(--bg-2); }
.hero-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--scrim) 0%, var(--scrim-2) 40%, transparent 75%); pointer-events: none; }
.hero-frame figcaption { position: absolute; z-index: 2; left: 0; right: 0; bottom: var(--s-6); display: flex; justify-content: flex-end; gap: var(--s-2); font-size: var(--t-sm); color: var(--ink-2); }
.hero-frame figcaption a { text-decoration: none; display: inline-block; padding-block: 11px; margin-block: -11px; }
.hero-frame figcaption a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.hero-frame figcaption span { color: var(--ink-2); }
.hero-text { position: absolute; z-index: 1; left: 0; right: 0; bottom: var(--s-6); pointer-events: none; }
.hero h1 { font-size: var(--t-hero); line-height: 0.95; letter-spacing: -0.03em; max-width: 9ch; }
.hero .lead { margin-top: var(--s-4); font-size: var(--t-lg); color: var(--ink-2); max-width: 34ch; }

/* sections */
.work { padding-top: var(--s-10); }
.work-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); padding-bottom: var(--s-6); }
.work-head h2, .about h2 { font-size: var(--t-section); letter-spacing: -0.025em; }
.work-head p { color: var(--muted); font-size: var(--t-sm); }

/* producing: two even columns, no film larger than another */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8) var(--gap); }
.tile a { display: block; text-decoration: none; }
.tile-cap { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-5); padding-top: var(--s-4); }
.tile .title { font-size: var(--t-xl); }
.tile .title .ko { font-size: var(--t-md); }
.tile-by { margin-top: var(--s-2); font-size: var(--t-sm); color: var(--ink-2); }
.tile-honour { margin-top: var(--s-1); font-size: var(--t-sm); color: var(--muted); }
.tile .when { text-align: right; padding-top: 0.3em; }

.slate { margin-top: var(--s-9); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: var(--gap); }
.slate h3 { font-size: var(--t-lg); color: var(--muted); font-weight: 400; padding-top: var(--s-4); }
.slate ul { border-top: 1px solid var(--rule); }
.slate-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: var(--gap); align-items: baseline; padding-block: var(--s-4); border-bottom: 1px solid var(--rule); text-decoration: none; }
.slate-row .title { font-size: var(--t-lg); }
.slate-row .title .ko { display: inline; margin-left: var(--s-2); font-size: var(--t-sm); }
.slate-by { font-size: var(--t-sm); color: var(--ink-2); }
.slate-row .when { text-align: right; }
.slate-row .when span, .reel .when span { display: inline; margin-left: var(--s-2); }

/* directing: one film per row, the frame wider than the words */
.reels { display: grid; gap: var(--s-8); }
.reel a { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s-6) var(--gap); align-items: end; text-decoration: none; }
.reel-text { padding-bottom: var(--s-2); display: flex; flex-direction: column; }
.reel-text .when { order: -1; }
.title--l { font-size: var(--t-2xl); margin-top: var(--s-3); letter-spacing: -0.02em; }
.title--l .ko { font-size: var(--t-lg); margin-top: var(--s-2); }
.reel-role { margin-top: var(--s-4); font-size: var(--t-sm); color: var(--ink-2); }
.reel-facts { margin-top: var(--s-1); font-size: var(--t-sm); color: var(--muted); }

.honours { margin-top: var(--s-5); display: grid; gap: var(--s-3); font-size: var(--t-sm); }
.honours li { padding-left: var(--s-3); border-left: 1px solid var(--accent); line-height: 1.45; }
.honours span { display: block; color: var(--muted); }

/* about */
.about { padding-top: var(--s-10); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gap); }
.about .lead { margin-top: var(--s-6); font-size: var(--t-lg); line-height: 1.55; color: var(--ink-2); max-width: 34ch; }
.edu { margin-top: var(--s-6); display: grid; gap: var(--s-4); font-size: var(--t-sm); max-width: 34ch; }
.edu dt { color: var(--ink); }
.edu dd { margin: var(--s-1) 0 0; color: var(--muted); }
.about h3 { padding-top: var(--s-3); font-size: var(--t-sm); font-weight: 400; color: var(--muted); padding-bottom: var(--s-3); border-bottom: 1px solid var(--rule); }
.awards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--gap); padding-top: var(--s-5); }
.aw-what { font-size: var(--t-lg); line-height: 1.3; }
.aw-where { margin-top: var(--s-1); font-size: var(--t-sm); color: var(--muted); }
.awards a { display: inline-block; margin-top: var(--s-2); padding-block: 11px; margin-block: -3px -11px; font-size: var(--t-sm); text-underline-offset: 0.2em; text-decoration-color: var(--muted); }
.awards a:hover { text-decoration-color: var(--ink); }

/* close */
.close { margin-top: var(--s-10); padding-block: var(--s-9) var(--s-7); border-top: 1px solid var(--rule); }
.close-line { color: var(--muted); }
.close-mail { display: inline-block; margin-top: var(--s-3); font-size: var(--t-display); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; text-decoration: none; overflow-wrap: anywhere; }
.close-mail:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.fine { margin-top: var(--s-8); font-size: var(--t-xs); color: var(--muted); }

/* film page */
.film-lead img { width: auto; max-width: 100%; height: auto; max-height: 85svh; margin-inline: auto; }
.film-head { padding-top: var(--s-7); }
.film-head--bare { padding-top: var(--s-9); }
.back { font-size: var(--t-sm); }
.back a { color: var(--muted); text-decoration: none; display: inline-block; padding-block: 11px; margin-block: -11px; }
.back a:hover { color: var(--ink); }
.film h1 { margin-top: var(--s-4); font-size: var(--t-display); letter-spacing: -0.03em; line-height: 1; max-width: 16ch; }
.film-ko { margin-top: var(--s-3); font-size: var(--t-xl); color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-7); margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--rule); }
.meta dt, .credits dt { font-size: var(--t-xs); color: var(--muted); }
/* same 4 / 8 split as Credits and About: the words start where the credit names start, the poster sits in the left column */
.film-body { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); grid-template-areas: "side main"; gap: var(--s-7) var(--gap); padding-block: var(--s-8); align-items: start; }
.film-main { grid-area: main; }
.logline { font-size: var(--t-xl); line-height: 1.45; letter-spacing: -0.015em; max-width: 38ch; }
.film-main .honours { margin-top: var(--s-7); max-width: 40rem; }
.support { margin-top: var(--s-3); font-size: var(--t-sm); color: var(--muted); max-width: 40rem; }
.film-main .honours + .support, .logline + .support { margin-top: var(--s-6); }
.poster { grid-area: side; width: 100%; max-width: 18rem; }
.stills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.stills .frame { aspect-ratio: auto; }
.stills .frame img { height: auto; }
.credits { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gap); padding-top: var(--s-9); }
.credits h2 { font-size: var(--t-2xl); }
.credits dl { columns: 2; column-gap: var(--gap); }
.credits dl > div { break-inside: avoid; margin-bottom: var(--s-5); }
.credits dd { margin-top: var(--s-1); }
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: var(--s-9); padding-top: var(--s-5); border-top: 1px solid var(--rule); }
.pager a { font-size: var(--t-xl); font-weight: 500; letter-spacing: -0.02em; text-decoration: none; }
.pager a:last-child { text-align: right; }
.pager a:hover { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.pager span { display: block; font-size: var(--t-xs); font-weight: 400; color: var(--muted); letter-spacing: 0; }

@media (max-width: 64rem) {
  .reel a, .about, .credits, .slate, .film-body { grid-template-columns: minmax(0, 1fr); }
  .slate h3 { padding-top: 0; }
  .about-body { margin-top: var(--s-7); }
  .film-body { grid-template-areas: "main" "side"; }
}
@media (max-width: 48rem) {
  :root { --mast-h: 56px; }
  .mast nav a:nth-child(3), .wordmark [lang="ko"] { display: none; }
  .mast nav a { padding-block: 13px; }
}
@media (max-width: 22rem) {
  .mast-in { flex-wrap: wrap; height: auto; min-height: var(--mast-h); column-gap: var(--s-4); }
}
@media (max-width: 48rem) {
  .tiles { grid-template-columns: minmax(0, 1fr); gap: var(--s-7); }
  .hero-frame { height: min(78svh, 40rem); }
  .hero-frame figcaption { justify-content: flex-start; bottom: auto; top: var(--s-4); }
  .hero-frame::before { content: ""; position: absolute; inset: 0 0 auto; height: 30%; z-index: 1; background: linear-gradient(to bottom, var(--scrim), transparent); pointer-events: none; }
  .tile-cap { flex-direction: column; gap: var(--s-1); }
  .tile .when { order: -1; text-align: left; padding-top: 0; }
  .tile .when span { display: inline; margin-left: var(--s-2); }
  .hero-text { bottom: var(--s-5); }
  .slate-row { grid-template-columns: minmax(0, 1fr) auto; }
  .slate-by { grid-row: 2; }
  .awards, .stills { grid-template-columns: minmax(0, 1fr); }
  .credits dl { columns: 1; }
  .credits dl > div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: var(--s-3); margin-bottom: var(--s-3); }
  .credits dd { margin-top: 0; }
  .work, .about { padding-top: var(--s-9); }
}
.slate-by:empty { display: none; }
