/* ===== TOKENS ===== */
:root {
  --bg: #0e0e10;          /* near-black, warm */
  --panel: #161619;       /* raised surface */
  --panel-2: #1c1c20;     /* hover surface */
  --line: #26262b;        /* hairline */
  --text: #ecebe6;        /* warm white */
  --muted: #7d7a73;       /* metadata grey */
  --muted-2: #565159;     /* faint */
  --accent: #1473E6;      /* Adobe blue */
  --on-accent: #ffffff;   /* 액센트 위 텍스트 */

  --sidebar-w: 244px;
  --topbar-h: 56px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;   /* 인트로↔스튜디오 가벼운 스냅 (복귀를 막지 않게 proximity) */
}
.intro, .app { scroll-snap-align: start; }
/* 프로젝트 상세가 열리면 뒤 배경 스크롤 잠금 (스튜디오는 그 자리에 그대로 유지) */
html.pv-lock { overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img, video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ===== INTRO SHOWREEL ===== */
.intro {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #08080a;
}
/* living reel placeholder — swap for <video> autoplay muted loop later */
.intro-reel {
  position: absolute; inset: 0;
  will-change: transform, filter;   /* JS parallax target */
}
.intro-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.intro-reel-inner {
  position: absolute; inset: -14%;
  background:
    radial-gradient(38% 52% at 26% 32%, rgba(255,91,52,0.55), transparent 62%),
    radial-gradient(42% 48% at 74% 66%, rgba(139,92,246,0.40), transparent 62%),
    radial-gradient(38% 44% at 62% 22%, rgba(78,168,255,0.34), transparent 62%),
    radial-gradient(50% 60% at 40% 80%, rgba(62,207,142,0.22), transparent 64%);
  animation: drift 16s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: scale(1)    translate(0, 0)     rotate(0deg); }
  100% { transform: scale(1.25) translate(-4%, -3%) rotate(4deg); }
}
.intro-grain {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
  opacity: 0.5;
}
.intro-vignette {
  position: absolute; inset: 0;
  /* 가운데 텍스트 가독성용: 중앙도 살짝, 가장자리는 진하게 */
  background:
    radial-gradient(125% 100% at 50% 42%, rgba(6,6,9,0.30) 0%, rgba(6,6,9,0.56) 55%, rgba(6,6,9,0.88) 100%),
    linear-gradient(rgba(6,6,9,0.12), rgba(6,6,9,0.12));
}
.intro-content { position: relative; z-index: 2; text-align: center; padding: 0 24px; will-change: transform, opacity; }
.intro-eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(236,235,230,0.72);
}
.intro-title {
  margin-top: 22px;
  font-size: clamp(22px, 4.25vw, 60px);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.02;
  text-shadow: 0 2px 40px rgba(0,0,0,0.5);
}
.intro-subline {
  margin-top: 16px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em;
  color: rgba(236,235,230,0.72);
}
.intro-enter {
  margin-top: 38px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 26px; border-radius: 100px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(236,235,230,0.28);
  color: var(--text); font-size: 15px; font-weight: 500;
  backdrop-filter: blur(6px);
  transition: 0.25s var(--ease);
}
.intro-enter:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.intro-arrow { display: inline-block; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

.intro-corner {
  position: absolute; z-index: 2;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  color: rgba(236,235,230,0.6);
}
.intro-corner.tl { top: 26px; left: 28px; }
.intro-corner.tr { top: 26px; right: 28px; }
.intro-corner.bl { bottom: 26px; left: 28px; }
.intro-corner.br { bottom: 26px; right: 28px; animation: pulse 2.4s ease-in-out infinite; }
.intro-corner.bl { display: flex; align-items: center; gap: 8px; }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3ECF8E;
  box-shadow: 0 0 8px rgba(62,207,142,0.8);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* ===== APP GRID ===== */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-areas: "topbar topbar" "sidebar main";
  height: 100vh;
}

/* ===== TOP BAR ===== */
.topbar {
  grid-area: topbar;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { color: var(--accent); font-size: 18px; }
.brand-name { font-weight: 600; letter-spacing: -0.01em; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-tag { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.02em; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.icon-btn { color: var(--muted); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; transition: 0.2s var(--ease); }
.icon-btn:hover { color: var(--text); background: var(--panel-2); }
.clock { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #5aa2f5);
  color: var(--on-accent); font-size: 12px; font-weight: 600;
}

/* ===== SIDEBAR ===== */
.sidebar {
  grid-area: sidebar;
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 11px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-size: 14px;
  border-radius: 10px;
  transition: 0.2s var(--ease);
}
.cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.cta-play { font-size: 11px; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 26px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 9px;
  color: var(--muted); font-size: 14px; font-weight: 500;
  text-align: left; transition: 0.2s var(--ease);
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { color: var(--text); background: var(--panel); }
.nav-item.is-active { color: var(--text); background: var(--panel-2); }
.nav-item.is-active svg { color: var(--accent); }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.sidebar-foot a { font-size: 12px; color: var(--muted); transition: color 0.2s var(--ease); }
.sidebar-foot a:hover { color: var(--text); }

/* ===== MAIN ===== */
.main {
  grid-area: main;
  overflow-y: auto;
  padding: 0 clamp(28px, 5vw, 72px);
  /* Lenis 스무스 스크롤이 무게감을 담당 (CSS 스냅은 충돌 방지 위해 해제) */
}
/* 4개 뷰를 세로로 쌓아 스크롤로 Work→Play→About→Contact — 한 섹션씩 페이지처럼 */
.view {
  max-width: 1520px; margin: 0 auto;
  min-height: calc(100vh - var(--topbar-h));
  padding: clamp(44px, 7vh, 96px) 0 clamp(60px, 9vh, 110px);
  scroll-snap-align: start;
  scroll-snap-stop: always;        /* 한 번에 한 섹션만 넘어감 */
  display: flex; flex-direction: column; justify-content: safe center;
}
#view-work { justify-content: flex-start; }   /* Work은 위쪽 정렬 */
/* 섹션이 들어올 때 콘텐츠가 스윽 등장 → "다른 페이지" 느낌 */
.view > * {
  transition: opacity 0.6s var(--ease), transform 0.75s var(--ease);
}
.view:not(.in-view) > * { opacity: 0; transform: translateY(34px); }
.view.in-view > * { opacity: 1; transform: none; }

.greeting { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; margin-bottom: 16px; }
.headline { font-size: clamp(28px, 4.4vw, 54px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.06; max-width: 740px; }
.view-note { color: var(--muted); margin-top: 18px; max-width: 480px; }

/* ===== WORK BODY (list + preview) ===== */
.work-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 4vw, 72px);
  margin-top: 44px;
  align-items: start;
}

/* ===== PREVIEW PANE (living) ===== */
.preview-pane { position: sticky; top: 8px; display: flex; flex-direction: column; }
.preview-stage {
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(130% 120% at 28% 22%, color-mix(in srgb, var(--c) 60%, #0e0e10) 0%, #0b0b0d 68%);
  transition: background 0.5s var(--ease);
  display: grid; place-items: center;
}
/* periodic light sweep = "alive" even before real video */
.preview-stage::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,0.10) 50%, transparent 68%);
  transform: translateX(-120%);
  animation: sheen 4.2s var(--ease) infinite;
}
@keyframes sheen { 0% { transform: translateX(-120%); } 55%, 100% { transform: translateX(120%); } }
.preview-play {
  font-size: 34px;
  color: rgba(255,255,255,0.78);
  position: relative; z-index: 1;
  width: 66px; height: 66px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(2px);
  padding-left: 4px;
}
.preview-badge {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text);
  background: rgba(0,0,0,0.35); padding: 4px 8px; border-radius: 6px;
}
.preview-info { display: flex; flex-direction: column; gap: 3px; margin-top: 16px; }
.preview-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.preview-sub { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.preview-open {
  margin-top: 16px; align-self: flex-start;
  font-size: 13px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px;
  transition: 0.2s var(--ease);
}
.preview-open:hover { color: var(--text); border-color: var(--accent); }

/* ===== CURSOR-FOLLOWING FLOATING PREVIEW (furrow 방식) ===== */
.cursor-preview {
  position: fixed; top: 0; left: 0; z-index: 150;
  pointer-events: none;                 /* 아래 행의 hover를 막지 않음 */
  will-change: transform;
}
.cp-inner {                             /* 어도비 스타일 카드 */
  width: 300px; margin-left: 30px;      /* 커서 오른쪽으로 살짝 오프셋 */
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 10px 4px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  transform: translateY(-50%) scale(0.9);
  transform-origin: left center;
  opacity: 0;
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}
.cursor-preview.is-visible .cp-inner { opacity: 1; transform: translateY(-50%) scale(1); }
.cp-media {                             /* 위쪽 이미지/영상 프리뷰 */
  aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden;
  position: relative;
  background: radial-gradient(130% 130% at 30% 20%, color-mix(in srgb, var(--c) 60%, #0e0e10) 0%, #0b0b0d 70%);
  transition: background 0.4s var(--ease);
}
.cp-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cp-media::after {   /* 영상 대체 플레이스홀더의 빛 흐름 */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 34%, rgba(255,255,255,0.10) 50%, transparent 66%);
  transform: translateX(-120%);
  animation: sheen 3.6s var(--ease) infinite;
}
.cp-media:has(video)::after { display: none; }   /* 실제 영상 들어오면 빛 흐름 끔 */
.cp-text { padding: 14px 8px 12px; }    /* 아래쪽 간단한 소개 */
.cp-cat {
  display: block;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted);
}
.cp-title {
  margin-top: 8px;
  font-size: 15px; font-weight: 600; line-height: 1.34; letter-spacing: -0.01em;
  color: var(--text);
}

/* ===== START HERE (하나의 패널 안에 타일 서브섹션) ===== */
.start-block { margin: 0 0 40px; }
.start-panel {
  background: var(--panel);
  border: none;
  border-radius: 10px;
  padding: 20px;
}
.start-heading {
  display: block;
  font-size: 13px; color: var(--muted); letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.start-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
/* 포토샵 구조: 박스(일러스트) + 아래 캡션(텍스트) */
.start-item {
  display: flex; flex-direction: column; gap: 12px;
  text-align: left; color: var(--text); cursor: pointer;
  background: none; border: none; padding: 0;
}
.tile-box {
  display: flex; align-items: center; justify-content: center;
  min-height: 152px; padding: 20px;
  background: var(--panel-2); border-radius: 7px;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.start-item:hover .tile-box { transform: translateY(-3px); background: #23232a; }
.tile-box.dashed { background: rgba(255,255,255,0.015); border: 1.6px dashed #41414b; }
.tile-box.dashed .tile-illust img { max-width: 132px; max-height: 108px; }
.start-item:hover .tile-box.dashed { background: rgba(255,255,255,0.04); border-color: #55555f; }
.tile-icon { font-size: 34px; line-height: 1; color: var(--muted); }
.tile-thumb {
  width: 62px; height: 62px; border-radius: 10px;
  background: radial-gradient(120% 120% at 30% 25%, color-mix(in srgb, var(--c) 70%, #0e0e10), #0b0b0d 75%);
  border: 1px solid var(--line);
}
.tile-illust { display: flex; align-items: center; justify-content: center; }
.tile-illust img {
  max-height: 96px; max-width: 100px; width: auto; height: auto; object-fit: contain;
  opacity: 0.85;
}
.tile-caption { display: flex; flex-direction: column; gap: 4px; }
.tile-label { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.tile-sub { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.02em; }

@media (max-width: 900px) { .start-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== PANEL / TABLE ===== */
.panel-head { display: flex; align-items: center; justify-content: space-between; margin: 44px 0 4px; }
.panel-title { font-size: 13px; color: var(--muted); letter-spacing: 0.02em; }
.filter { display: flex; align-items: center; gap: 10px; }
.filter span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.filter input {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 12px; color: var(--text); font-size: 13px; width: 180px;
  transition: 0.2s var(--ease);
}
.filter input::placeholder { color: var(--muted); }
.filter input:focus { outline: none; border-color: var(--accent); width: 220px; }

.table { display: flex; flex-direction: column; }
.table-row {
  display: grid;
  grid-template-columns: 2fr 1.4fr 0.6fr;
  align-items: center;
  gap: 16px;
  padding: 24px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  transition: background 0.18s var(--ease), padding-left 0.18s var(--ease);
}
.table-head {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
  padding-top: 10px; padding-bottom: 10px;
}
.table-head span { cursor: default; }
button.table-row:hover { background: var(--panel); padding-left: 18px; }
.col-end, .cell-end { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.cell-name { display: flex; align-items: center; gap: 14px; font-weight: 500; font-size: 18px; }
.cell-type { color: var(--muted); font-size: 14px; }
.cell-year { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); flex-shrink: 0; }
button.table-row:hover .cell-name { color: var(--text); }

/* ===== PLAY GRID ===== */
.play-grid { columns: 3; column-gap: 20px; margin-top: 40px; }
.play-item { break-inside: avoid; margin-bottom: 20px; transition: transform 0.4s var(--ease); }
.play-item:hover { transform: rotate(-1.4deg) scale(1.02); }
.play-media { border-radius: 8px; overflow: hidden; position: relative; border: 1px solid var(--line); }
.play-item[data-ratio="tall"]   .play-media { aspect-ratio: 3 / 4; }
.play-item[data-ratio="wide"]   .play-media { aspect-ratio: 4 / 3; }
.play-item[data-ratio="square"] .play-media { aspect-ratio: 1 / 1; }
.play-media[data-ph]::after {
  content: attr(data-ph);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; color: rgba(236,235,230,0.22);
  background: repeating-linear-gradient(-45deg, #1a1a1e, #1a1a1e 11px, #202024 11px, #202024 22px);
}

/* ===== ABOUT ===== */
.about-text { font-size: 18px; color: var(--muted); max-width: 620px; margin-top: 24px; line-height: 1.6; }
.meta-grid { margin-top: 48px; max-width: 560px; }
.meta-row { display: flex; gap: 24px; padding: 15px 0; border-top: 1px solid var(--line); font-size: 15px; }
.meta-row:last-child { border-bottom: 1px solid var(--line); }
.meta-row span { width: 100px; color: var(--muted); flex-shrink: 0; font-family: var(--mono); font-size: 13px; }

/* ===== CONTACT ===== */
.contact-mail {
  display: inline-block; margin-top: 32px;
  font-size: clamp(28px, 5vw, 56px); font-weight: 600; letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line); padding-bottom: 6px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.contact-mail:hover { color: var(--accent); border-color: var(--accent); }
.contact-social { display: flex; gap: 24px; margin-top: 40px; }
.contact-social a { color: var(--muted); font-size: 14px; transition: color 0.2s var(--ease); }
.contact-social a:hover { color: var(--text); }

/* ===== PROJECT VIEW (slide-over) ===== */
.project-view {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform 0.72s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
  pointer-events: none;
  box-shadow: -30px 0 60px rgba(0,0,0,0.5);
}
.project-view.is-open { transform: translateX(0); pointer-events: auto; }

/* 세로 "Work" 탭 (맨 왼쪽) → 닫기 */
.pv-tab {
  position: absolute; top: 0; left: 0; bottom: 0; z-index: 3;
  width: 60px;
  display: flex; align-items: center; justify-content: center;
  border-right: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  transition: width 0.4s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.pv-tab span {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em;
  text-transform: uppercase;
}
/* hover: 오렌지로 변하며 사각형이 오른쪽으로 부드럽게 확장 */
.pv-tab:hover { width: 80px; color: var(--accent); background: var(--panel-2); }

/* 스크롤 영역: 전체 폭. WORK 탭(60px)만 비켜가는 최소 왼쪽 여백 */
.pv-scroll {
  height: 100%; overflow-y: auto;
  padding: clamp(28px, 5vw, 64px) clamp(24px, 4vw, 56px) 96px;
  padding-left: max(clamp(24px, 4vw, 56px), 84px);
}
/* 콘텐츠 폭 고정 → 큰 모니터에선 이미지 크기 그대로, 좌우 마진만 넓어짐 */
.pv-inner { max-width: 1200px; margin: 0 auto; }
.pv-scroll::-webkit-scrollbar { width: 10px; }
.pv-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; }

.pv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.pv-titlewrap { display: flex; align-items: baseline; gap: 16px; }
.pv-index { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.pv-title { font-size: clamp(32px, 5vw, 60px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.pv-close {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--text); font-size: 16px;
  display: grid; place-items: center;
  transition: 0.2s var(--ease);
}
.pv-close:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: rotate(90deg); }

/* 메타: 프로젝트 이름 밑 컴팩트 한 줄 */
.pv-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 0; margin-top: 20px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.03em; color: var(--muted);
}
.pv-meta span { display: inline-flex; align-items: baseline; }
.pv-meta span i { font-style: normal; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-2); margin-right: 8px; }
.pv-meta span:not(:last-child)::after { content: ""; width: 1px; height: 11px; background: var(--line); margin: 0 18px; align-self: center; }

/* 히어로(메인 영상) — 비었을 때(닫힐 때) 배경과 동일해 안 보이게 */
.pv-hero {
  margin: clamp(28px, 3vw, 40px) 0 0; aspect-ratio: 16 / 9; border-radius: 14px;
  border: 0; position: relative; overflow: hidden;
  background: var(--bg);
}
.pv-hero iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pv-hero[data-ph]::after { content: none; } /* 기본 플레이스홀더 텍스트 숨김 */

/* 설명: 왼쪽 큰 스테이트먼트 + 오른쪽 상세 문단 (Oddfellows 방식) */
.pv-state {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: clamp(40px, 7vw, 140px); align-items: start;
  margin: clamp(40px, 4.5vw, 64px) 0 clamp(56px, 6.5vw, 96px);
}
.pv-statement {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 34px); font-weight: 400;
  letter-spacing: -0.015em; line-height: 1.25; color: var(--text);
}
.pv-state-tag {
  display: inline-block; margin-top: clamp(18px, 2vw, 26px);
  font-size: 14px; color: var(--muted);
  text-decoration: underline; text-underline-offset: 4px;
}
.pv-state-desc {
  margin: 0; font-size: 16px; line-height: 1.65;
  color: rgba(236, 235, 230, 0.82);
}
@media (max-width: 720px) {
  .pv-state { grid-template-columns: 1fr; gap: 24px; }
}

.pv-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(6px, 0.8vw, 10px); }
.pv-shot {
  aspect-ratio: 4 / 3; border-radius: 12px; border: 1px solid var(--line);
  position: relative; overflow: hidden;
  background: repeating-linear-gradient(-45deg, #16161a, #16161a 12px, #1c1c21 12px, #1c1c21 24px);
}
.pv-shot.tall { aspect-ratio: 3 / 4; }
.pv-shot.wide { grid-column: 1 / -1; aspect-ratio: 21 / 9; }

/* 갤러리 실제 이미지 — 잘리지 않게 원본 비율 그대로 보여줌 */
.pv-shot-img, .pv-shot-img.wide, .pv-shot-img.tall {
  aspect-ratio: auto; background: none; margin: 0; display: block;
  border: none; border-radius: 0;
}
.pv-shot-img img { position: static; width: 100%; height: auto; object-fit: contain; display: block; }

/* 두 이미지를 높이 맞춰 나란히 — flex-grow=종횡비 → 높이 동일, gap 0 이라 검정 배경이 이어짐 */
.pv-pair { grid-column: 1 / -1; display: flex; gap: 0; align-items: flex-start; }
.pv-pair .pv-shot-img { flex-grow: var(--ar, 1); flex-basis: 0; min-width: 0; margin: 0; }

/* 갤러리 섹션: Logo / Styleframe / Animation — 소제목 + 섹션 간 여백 */
.pv-sec { grid-column: 1 / -1; }
.pv-sec + .pv-sec { margin-top: clamp(44px, 5.5vw, 80px); }
.pv-sec-title {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 clamp(14px, 1.6vw, 20px);
}
.pv-sec-body { display: flex; flex-direction: column; gap: clamp(6px, 0.8vw, 10px); }

/* 피날레: 마지막 마무리 영상 — 중앙 정렬, Animation 섹션과 큰 간격 */
.pv-finale { display: flex; justify-content: center; }
.pv-sec + .pv-finale { margin-top: clamp(72px, 9vw, 140px); }
.pv-finale-shot { width: min(100%, 74%); }
@media (max-width: 720px) {
  .pv-finale-shot { width: 100%; }
}

/* Reception: Threads 반응을 브랜드 톤으로 재해석 */
.pv-sec + .pv-reception { margin-top: clamp(72px, 9vw, 140px); }
/* View on Threads 링크 */
.pv-th-link {
  display: inline-block; margin-top: clamp(16px, 1.8vw, 20px);
  font-size: 14px; color: var(--accent);
  text-decoration: underline; text-underline-offset: 4px;
}
.pv-th-link:hover { filter: brightness(1.15); }
/* 카드 밑 영어 수치 하이라이트 */
.pv-thread-stats {
  display: flex; flex-wrap: wrap; gap: clamp(28px, 4vw, 60px);
  margin-top: clamp(22px, 2.6vw, 32px);
}
.pv-th-stat { display: flex; flex-direction: column; }
.pv-th-stat strong { font-size: clamp(26px, 2.8vw, 34px); font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.pv-th-stat span { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-top: 5px; }
.pv-thread {
  max-width: 600px; padding: clamp(20px, 2.4vw, 28px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
}
.pv-thread-head { display: flex; align-items: center; gap: 12px; }
.pv-th-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), #7cc0ff);
  color: #fff; font-weight: 700; font-size: 16px;
}
.pv-th-id { display: flex; flex-direction: column; line-height: 1.3; }
.pv-th-id strong { font-size: 15px; color: var(--text); font-weight: 600; }
.pv-th-id em { font-style: normal; font-size: 13px; color: var(--muted); }
.pv-thread-post {
  margin: clamp(16px, 1.8vw, 20px) 0; font-size: 16px; line-height: 1.55; color: var(--text);
}
.pv-thread-actions { display: flex; gap: 28px; }
.pv-th-act { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.pv-th-act svg { width: 18px; height: 18px; }
/* 익명 인용 */
.pv-thread-quotes {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.2vw, 16px); margin-top: clamp(16px, 1.8vw, 22px);
}
.pv-th-quote {
  margin: 0; padding: clamp(16px, 1.8vw, 20px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  font-size: 14px; line-height: 1.5; color: rgba(236, 235, 230, 0.78);
}
@media (max-width: 720px) {
  .pv-thread-quotes { grid-template-columns: 1fr; }
}

/* 행 단위 배치: 각 행마다 열 개수(--cols) 지정. 큰 이미지 2열, 작은 이미지 3열 */
.pv-grow {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr);
  gap: clamp(6px, 0.8vw, 10px); align-items: start; /* 가로 간격 = 행 사이 세로 간격과 동일 */
}
/* 고정 16:9 박스 + cover → 캡처 비율이 달라도 크기 통일(테두리 살짝 크롭) */
.pv-mshot { margin: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--panel); }
.pv-mshot img, .pv-mshot video { width: 100%; height: 100%; display: block; object-fit: cover; }

/* 갤러리 상단 히어로: 스크롤에 따라 줌인(JS가 transform:scale 적용).
   박스 비율 = 이미지 비율(1414/721) + contain → 스케일 1.0 이하라 내용이 안 잘림 */
.pv-zoom {
  grid-column: 1 / -1; margin: 0;
  border-radius: 8px; overflow: hidden; aspect-ratio: var(--ar, 1.96);
}
.pv-zoom img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  transform-origin: center; transform: scale(0.9); will-change: transform;
}
@media (max-width: 720px) {
  .pv-grow { grid-template-columns: 1fr 1fr; }
}

.pv-hero[data-ph]::after, .pv-shot[data-ph]::after {
  content: attr(data-ph); position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 15px; color: rgba(236,235,230,0.28);
}

@media (max-width: 720px) {
  .pv-meta { flex-direction: column; align-items: flex-start; gap: 8px 0; }
  .pv-meta span:not(:last-child)::after { display: none; }
  .pv-pair { flex-direction: column; }
  .pv-gallery { grid-template-columns: 1fr; }
  .pv-shot.wide { aspect-ratio: 16 / 9; }
  .pv-scroll { padding-right: clamp(20px, 6vw, 40px); }
}

/* ===== SCROLLBAR ===== */
.main::-webkit-scrollbar { width: 10px; }
.main::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; }
.main::-webkit-scrollbar-thumb:hover { background: #333339; }

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .work-body { grid-template-columns: 1fr; }
  .preview-pane { position: static; order: -1; margin-bottom: 8px; }
  .preview-stage { aspect-ratio: 16 / 9; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; grid-template-areas: "topbar" "main"; }
  .sidebar { display: none; }
  .play-grid { columns: 2; }
}
