:root {
  --paper: #ecebe6;
  --ink: #0b0b0b;
  --sig: #ff3b00;
  --grey: #8a8984;
  --line: 2px solid var(--ink);
  --g: clamp(12px, 2.4vw, 28px);
  --display: "Archivo", "Black Han Sans", sans-serif;
  --ko: "Black Han Sans", "Archivo", sans-serif;
  --sans: "IBM Plex Sans KR", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "IBM Plex Sans KR", ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.55;
  word-break: keep-all; overflow-x: hidden;
}
body::after { /* 종이 그레인 */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: .07; mix-blend-mode: multiply;
}
a { color: inherit; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
mark { background: var(--sig); color: var(--ink); padding: 0 .12em; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; text-transform: uppercase; }
::selection { background: var(--sig); color: var(--ink); }

/* ── ticker ── */
.ticker { background: var(--sig); border-bottom: var(--line); overflow: hidden; white-space: nowrap; }
.ticker-track {
  display: inline-block; padding: 6px 0;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  animation: tick 40s linear infinite;
}
@keyframes tick { to { transform: translateX(-50%); } }

/* ── bar ── */
.bar {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: auto 1fr auto; align-items: stretch;
  background: var(--paper); border-bottom: var(--line);
}
.bar > * { padding: 12px var(--g); display: flex; align-items: center; }
.bar-logo {
  font-family: var(--display); font-weight: 900; font-stretch: 70%;
  font-size: 22px; text-decoration: none; border-right: var(--line); letter-spacing: -.01em;
}
.bar-logo span { color: var(--sig); }
.bar-nav { gap: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.bar-nav a {
  text-decoration: none; padding: 0 16px; height: 100%; display: flex; align-items: center;
  border-right: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
}
.bar-nav a:hover { background: var(--ink); color: var(--paper); }
.bar-clock { border-left: var(--line); font-variant-numeric: tabular-nums; }

/* ── hero ── */
.hero {
  position: relative; display: grid;
  grid-template-columns: repeat(12, 1fr);
  border-bottom: var(--line); overflow: hidden;
}
.hero-art {
  grid-column: 5 / -1; grid-row: 1 / 3;
  border-left: var(--line); min-height: min(72vh, 820px); position: relative;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; filter: contrast(1.05); }
.hero-title {
  grid-column: 1 / -1; grid-row: 1; z-index: 2; pointer-events: none;
  font-family: var(--display); font-weight: 900; font-stretch: 62%;
  font-size: clamp(110px, 27vw, 420px); line-height: .78; letter-spacing: -.035em;
  padding: var(--g) var(--g) 0; margin-left: -.03em;
  color: var(--ink);
}
.ht-row { display: table; background: var(--paper); padding: .02em .06em 0 .02em; border: var(--line); border-top: 0; border-left: 0; }
.ht-indent { margin-left: 1.1em; background: var(--sig); border: var(--line); }
.hero-title sup { font-size: .14em; vertical-align: top; position: relative; top: .5em; font-stretch: 100%; }
.hero-grid {
  grid-column: 1 / 5; grid-row: 2; align-self: end; z-index: 3;
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: var(--line); background: var(--paper);
}
.hero-grid .cell { padding: 14px var(--g); border-bottom: 1px solid var(--ink); font-size: 14px; line-height: 1.4; }
.hero-grid .cell:nth-child(odd) { border-right: 1px solid var(--ink); }
.hero-grid b { display: block; color: var(--grey); margin-bottom: 4px; font-weight: 400; }
.hero-manifesto {
  grid-column: 1 / -1; grid-row: 3; z-index: 3;
  border-top: var(--line); padding: var(--g);
  font-family: var(--display); font-weight: 800; font-stretch: 75%; text-transform: uppercase;
  font-size: clamp(34px, 6.4vw, 104px); line-height: .95; letter-spacing: -.01em;
  background: var(--paper);
}
.blink { color: var(--sig); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── block head ── */
.block { border-bottom: var(--line); position: relative; }
.block-head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: var(--g);
  padding: var(--g); border-bottom: var(--line);
}
.block-head .num {
  font-size: clamp(14px, 1.4vw, 18px); background: var(--ink); color: var(--paper);
  padding: 4px 8px; align-self: start;
}
.block-head h2 {
  font-family: var(--display); font-weight: 900; font-stretch: 62%;
  font-size: clamp(64px, 13vw, 200px); line-height: .8; letter-spacing: -.03em;
}
.block-head .ko { font-family: var(--mono); font-size: clamp(13px, 1.3vw, 16px); text-transform: lowercase; font-style: italic; }
.block-head .count { color: var(--grey); }

/* ── filters ── */
.filters { display: flex; flex-wrap: wrap; border-bottom: var(--line); }
.filters button { padding: 12px 18px; border-right: var(--line); }
.filters button:hover { background: var(--ink); color: var(--paper); }
.filters button[aria-pressed="true"] { background: var(--sig); }

/* ── index list ── */
.index-list { list-style: none; }
.index-list li { border-bottom: 1px solid var(--ink); }
.index-list li[hidden] { display: none; }
.index-list a {
  display: grid; grid-template-columns: 4ch 1.2fr 1fr 8ch 30ch 5ch; gap: var(--g); align-items: baseline;
  padding: 10px var(--g); text-decoration: none;
}
.index-list a:hover { background: var(--ink); color: var(--paper); }
.index-list a:hover .il-title { color: var(--sig); }
.il-title { font-family: var(--ko); font-size: clamp(18px, 2vw, 26px); line-height: 1.2; }
.il-en { font-family: var(--display); font-weight: 700; font-stretch: 75%; font-size: 15px; text-transform: uppercase; }
.il-course { color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.index-peek {
  position: fixed; top: 0; left: 0; z-index: 60; width: 280px; pointer-events: none;
  border: var(--line); background: var(--ink); opacity: 0; transition: opacity .15s;
  box-shadow: 8px 8px 0 var(--sig);
}
.index-peek.on { opacity: 1; }
.index-peek img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* ── sections ── */
.sec { border-bottom: var(--line); }
.sec.dark { background: var(--ink); color: var(--paper); --line: 2px solid var(--paper); }
.sec.dark .block-head .num { background: var(--sig); color: var(--ink); }
.grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: var(--g); padding: var(--g);
}
.card { grid-column: span 4; display: flex; flex-direction: column; border: var(--line); background: var(--paper); color: var(--ink); cursor: pointer; transition: transform .15s, box-shadow .15s; position: relative; }
.sec.dark .card { background: #151515; color: var(--paper); }
.card.xl { grid-column: span 12; }
.card.l { grid-column: span 8; }
.card.m { grid-column: span 6; }
.card.q { grid-column: span 3; }
.card.q .meta h3 { font-size: clamp(18px, 1.8vw, 24px); }
.card:hover, .card:focus-visible { transform: translate(-5px, -5px); box-shadow: 10px 10px 0 var(--sig); outline: none; }
.card[hidden] { display: none; }
.thumb { position: relative; overflow: hidden; aspect-ratio: 16/10; background: #222; border-bottom: var(--line); }
.card.xl .thumb { aspect-ratio: 21/9; }
.card.portrait .thumb { aspect-ratio: 4/5; }
.thumb img, .thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb video { opacity: 0; transition: opacity .2s; }
.card.playing .thumb video { opacity: 1; }
.sec.dark .card:not(.playing) .thumb img { filter: grayscale(1) contrast(1.15); }
.card:hover .thumb img { filter: none; }
.thumb .badge {
  position: absolute; left: 0; top: 0; z-index: 2;
  background: var(--ink); color: var(--paper); padding: 4px 8px;
}
.thumb .badge.sig { background: var(--sig); color: var(--ink); left: auto; right: 0; }
.thumb.private {
  display: grid; place-items: center; background:
    repeating-linear-gradient(45deg, var(--ink) 0 12px, var(--sig) 12px 24px);
}
.thumb.private span { background: var(--paper); color: var(--ink); padding: 8px 12px; border: var(--line); font-family: var(--mono); font-size: 12px; }
.meta { padding: 12px 14px 14px; display: grid; gap: 6px; }
.meta-top { display: flex; justify-content: space-between; gap: 12px; color: var(--grey); }
.meta h3 { font-family: var(--ko); font-weight: 400; font-size: clamp(22px, 2.4vw, 34px); line-height: 1.1; }
.card.xl .meta h3 { font-size: clamp(30px, 4.4vw, 64px); }
.meta .en { font-family: var(--display); font-weight: 800; font-stretch: 70%; text-transform: uppercase; font-size: 15px; letter-spacing: .01em; }
.meta p { font-size: 14px; max-width: 62ch; opacity: .85; }
.meta .credit { font-family: var(--mono); font-size: 11px; opacity: .6; }
.card.xl .meta { grid-template-columns: 1fr 1fr; column-gap: var(--g); }
.card.xl .meta .meta-top { grid-column: 1 / -1; }

/* cursor label */
.cursor-tag {
  position: fixed; z-index: 70; pointer-events: none; top: 0; left: 0;
  background: var(--sig); color: var(--ink); padding: 6px 10px; border: 2px solid var(--ink);
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  transform: translate(14px, 14px); opacity: 0; transition: opacity .1s;
}
.cursor-tag.on { opacity: 1; }

/* ── footer ── */
.foot { background: var(--sig); padding: var(--g); display: grid; gap: var(--g); }
.foot-big { font-family: var(--display); font-weight: 900; font-stretch: 62%; font-size: clamp(90px, 24vw, 380px); line-height: .78; letter-spacing: -.035em; }
.foot-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: var(--line); padding-top: 12px; }

/* ── viewer ── */
.viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; border: 0;
  background: var(--ink); color: var(--paper);
  display: none; grid-template-rows: auto 1fr auto;
}
.viewer[open] { display: grid; }
.viewer::backdrop { background: var(--ink); }
.viewer-bar, .viewer-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px var(--g); border-bottom: 2px solid var(--paper); }
.viewer-nav { border-bottom: 0; border-top: 2px solid var(--paper); }
.viewer-bar button, .viewer-nav button { padding: 6px 10px; border: 2px solid var(--paper); }
.viewer-bar button:hover, .viewer-nav button:hover { background: var(--sig); color: var(--ink); border-color: var(--sig); }
.viewer-stage { display: grid; place-items: center; min-height: 0; padding: var(--g); overflow: auto; }
.viewer-stage img, .viewer-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-stage .info { max-width: 70ch; margin-top: 14px; font-size: 14px; opacity: .8; }
.viewer-stage .link { display: inline-block; margin-top: 10px; background: var(--sig); color: var(--ink); padding: 8px 12px; text-decoration: none; font-family: var(--mono); font-size: 12px; font-weight: 600; }
.viewer-stage figure { display: grid; justify-items: center; max-height: 100%; min-height: 0; grid-template-rows: minmax(0, 1fr) auto; height: 100%; }

@media (max-width: 900px) {
  .hero-art { grid-column: 1 / -1; grid-row: 2; min-height: min(56vh, 520px); border-left: 0; border-top: var(--line); }
  .hero-grid { grid-column: 1 / -1; grid-row: 3; }
  .hero-manifesto { grid-row: 4; }
  .hero-title { padding-bottom: var(--g); }
  .ht-indent { margin-left: .4em; }
  .card, .card.l, .card.m { grid-column: span 12; }
  .card.s, .card.q { grid-column: span 6; }
  .card.xl .meta { grid-template-columns: 1fr; }
  .index-list a { grid-template-columns: 3ch 1fr 6ch; }
  .il-en, .il-course, .il-cat { display: none; }
  .bar { grid-template-columns: auto 1fr; }
  .bar-clock { display: none; }
  .index-peek { display: none; }
}
@media (max-width: 520px) {
  .card.s { grid-column: span 12; }
  .card.q { grid-column: span 6; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid .cell:nth-child(odd) { border-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track, .blink { animation: none; }
  .card { transition: none; }
}
