:root {
  --fg: #111;
  --muted: #8a8a8a;
  --line: #e4e4e4;
  --bg: #fff;
  --side: 270px;
  --pad: 32px;
  --fs: 13.5px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: var(--fs);
  line-height: 1.55;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--muted); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }

/* ---------- side index ---------- */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side);
  padding: var(--pad); overflow-y: auto;
}
.name { display: block; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 18px; }
.menu-btn { display: none; }
.nav { text-transform: uppercase; letter-spacing: 0.03em; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav li { margin: 0; }
.nav a { display: inline-block; padding: 1px 0; }
.nav .sub { padding-left: 14px; }
.nav .works { padding-left: 14px; text-transform: none; letter-spacing: 0; margin: 2px 0 6px; }
.nav .works a { color: var(--muted); }
.nav .works a:hover, .nav .works a.on { color: var(--fg); }
.nav a.on { color: var(--fg); font-weight: 600; }
.nav .soon { color: var(--muted); }
.nav .gap { height: 64px; }

/* ---------- main ---------- */
.main { margin-left: var(--side); padding: var(--pad) var(--pad) 80px; min-height: 100vh; outline: none; }
.work { max-width: 1076px; margin: 24px auto 0; padding: 0 48px; }

.stage {
  position: relative; width: 100%;
  height: min(64vh, 640px);
  display: flex; align-items: center; justify-content: center;
  user-select: none; -webkit-user-select: none;
}
.stage img { width: 100%; height: 100%; object-fit: contain; display: block; opacity: 0; transition: opacity .35s ease; }
.stage img.ready { opacity: 1; }
.stage .placeholder {
  width: 100%; height: 100%; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--muted); text-align: center; padding: 24px;
}
.arrow {
  position: absolute; top: 0; bottom: 0; width: 44px;
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 300; color: var(--fg);
  opacity: .8; transition: opacity .2s ease;
}
.arrow:hover, .arrow:focus-visible { opacity: 1; }
.arrow.prev { left: -48px; }
.arrow.next { right: -48px; }
.arrow.off { visibility: hidden; }

/* ---------- player ---------- */
.player {
  display: grid; grid-template-columns: auto minmax(0, max-content) auto 1fr auto; align-items: center; gap: 14px;
  margin-top: 18px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.player .count { color: var(--muted); min-width: 44px; }
.play { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.play svg { width: 13px; height: 13px; }
.player .track { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.player.off { visibility: hidden; }
.nobar { margin-top: 18px; }
.bar { position: relative; height: 18px; cursor: pointer; min-width: 60px; }
.bar::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.bar span { position: absolute; left: 0; top: 50%; height: 1px; margin-top: 0; background: var(--fg); width: 0; }
.player .time { color: var(--muted); min-width: 92px; text-align: right; }

/* ---------- text ---------- */
.text { margin-top: 22px; }
.text h1 { font-size: 17px; font-weight: 600; margin: 0 0 10px; letter-spacing: 0; line-height: 1.4; }
.text h1 .yr { font-weight: 400; color: var(--muted); margin-left: 10px; }
.meta div { padding: 1px 0; }
.text .links { margin-top: 12px; }
.links a { border-bottom: 1px solid var(--line); margin-right: 14px; }
.status { color: var(--muted); margin-bottom: 8px; }

/* ---------- index list ---------- */
.list { max-width: 980px; margin: 24px auto 0; }
.list h2 { font-size: var(--fs); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; margin: 0 0 14px; }
.list .group { margin: 26px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.row {
  display: grid; grid-template-columns: 92px 1fr 180px 160px; gap: 16px;
  padding: 9px 0; border-top: 1px solid var(--line);
}
.row:last-child { border-bottom: 1px solid var(--line); }
.row .y, .row .c, .row .r { color: var(--muted); }
a.row:hover .t { color: var(--muted); }
.intro { max-width: 560px; color: var(--fg); margin: 0 0 8px; }

/* ---------- pages ---------- */
.page { max-width: 760px; margin: 24px auto 0; }
.page h2 { font-size: var(--fs); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; margin: 34px 0 10px; }
.page h2:first-child { margin-top: 0; }
.page h3 { font-size: var(--fs); font-weight: 600; margin: 30px 0 8px; }
.cv h3 { margin-top: 26px; }
.cvrow { display: grid; grid-template-columns: 64px 1fr 200px; gap: 16px; padding: 3px 0; }
.art .pdf { display: block; width: 100%; height: 80vh; border: 1px solid var(--line); }
.art .links { margin-top: 10px; }
.row.rel { grid-template-columns: 92px 64px 1fr 160px 220px; align-items: center; }
.row .cover { width: 48px; height: 48px; object-fit: cover; display: block; }
.art .open { background: none; border: 0; padding: 0; font: inherit; color: var(--fg); cursor: pointer;
  text-decoration: underline; text-underline-offset: 4px; font-weight: 600; margin: 30px 0 10px; display: inline-block; }
.art .open:hover { color: var(--muted); }
.row .a { color: var(--muted); }
.row .l a { border-bottom: 1px solid var(--line); margin-right: 12px; }
.nav .label { display: inline-block; padding: 1px 0; }
.nav .contact { margin-top: 2px; }
.nav .contact a { color: var(--fg); }
.nav .contact a:hover { color: var(--muted); }
.intro-page { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.intro-page .logo { width: min(440px, 78vw); height: auto; }
.cvrow .y { color: var(--muted); }
.cvrow .r { color: var(--muted); }

/* ---------- mobile ---------- */
@media (max-width: 820px) {
  :root { --pad: 18px; --fs: 14px; }
  .side {
    position: sticky; top: 0; width: auto; inset: auto; z-index: 10;
    background: var(--bg); padding: 14px var(--pad); overflow: visible;
    border-bottom: 1px solid var(--line);
  }
  .side-top { display: flex; justify-content: space-between; align-items: center; }
  .name { margin: 0; font-size: 13px; }
  .menu-btn { display: block; letter-spacing: .03em; font-size: 13px; }
  .nav {
    display: none; position: fixed; inset: 49px 0 0 0; background: var(--bg);
    padding: 22px var(--pad) 40px; overflow-y: auto; font-size: 16px; line-height: 1.9;
  }
  .side.open .nav { display: block; }
  .nav .gap { height: 28px; }
  .main { margin-left: 0; padding: 8px var(--pad) 64px; }
  .work, .list, .page { margin-top: 10px; }
  .stage { height: auto; min-height: 200px; aspect-ratio: 4 / 3; }
  .work { padding: 0 30px; }
  .arrow { width: 28px; font-size: 18px; }
  .arrow.prev { left: -30px; }
  .arrow.next { right: -30px; }
  .player { gap: 10px; }
  .player { grid-template-columns: auto minmax(0,1fr) auto auto; }
  .player .bar { grid-column: 1 / -1; grid-row: 2; }
  .cvrow { grid-template-columns: 52px 1fr; gap: 2px 12px; }
  .cvrow .r { grid-column: 2; font-size: 12.5px; }
  .row.rel { grid-template-columns: 48px 1fr; gap: 2px 12px; }
  .row.rel .y { grid-column: 2; grid-row: 1; }
  .row.rel .cv0 { grid-column: 1; grid-row: 1 / span 4; }
  .row.rel .t, .row.rel .r, .row.rel .l { grid-column: 2; }
  .art .pdf { height: 70vh; }
  .player .time { min-width: 0; }
  .text { grid-template-columns: 1fr; gap: 14px; }
  .row { grid-template-columns: 64px 1fr; gap: 4px 12px; }
  .row .c, .row .r { grid-column: 2; font-size: 12.5px; }
}
.nav .nocase { text-transform: none; }
.nav .soon { cursor: default; }
.nav span.soon { display: inline-block; padding: 1px 0; }
