/* =====================================================================
   LEE JUGON PORTFOLIO — motion studio style
   ===================================================================== */
:root {
  --bg: #0c0c0b;
  --bg-2: #151513;
  --bg-3: #1d1d1a;
  --ink: #f3f0ea;
  --ink-2: #b9b5ad;
  --muted: #7d7a74;
  --line: #2a2926;
  --accent: #ff5a2e;
  --accent-ink: #0c0c0b;
  --radius: 14px;
  --gutter: clamp(16px, 3.2vw, 48px);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  /* 포스터형 좁은 대문자 제목용 (영문 전용) */
  --display: "Anton", "Pretendard Variable", Pretendard, Impact, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-x: hidden;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
/* 화면 전체에 은은한 필름 그레인 */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: .07;
  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%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.wrap { padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------------- header ---------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; gap: 24px; padding: 0 var(--gutter);
  transition: background .3s, backdrop-filter .3s, border-color .3s, transform .35s var(--ease);
  border-bottom: 1px solid transparent;
}
@media (max-width: 720px) { .site-header.hide { transform: translateY(-100%); } }
.site-header.scrolled { background: rgba(12, 12, 11, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-text { font-weight: 800; letter-spacing: -.01em; font-size: 15px; line-height: 1.05; display: flex; flex-direction: column; }
.logo-text small { font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: .02em; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  position: relative; padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: .04em;
  color: var(--ink-2); transition: color .2s, background .2s;
}
.nav .l-ko { display: none; }
.nav a sup { font-family: var(--mono); font-size: 9px; color: var(--muted); margin-left: 3px; vertical-align: top; }
.nav a:hover { color: var(--ink); background: var(--bg-3); }
.nav a.active { color: var(--accent-ink); background: var(--ink); }
.nav a.active sup { color: var(--accent-ink); opacity: .6; }
.nav .nav-sep { width: 1px; background: var(--line); margin: 6px 6px; }
.header-cta {
  padding: 9px 16px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 13px; transition: transform .25s var(--ease);
}
.header-cta:hover { transform: translateY(-2px); }


/* ---------------- page transition ---------------- */
#app { min-height: 100vh; }
.page { animation: pageIn .7s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- hero ---------------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-top: calc(var(--header-h) + 32px); padding-bottom: 40px; position: relative; }
.hero-eyebrow { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--ink-2); margin-bottom: 28px; }
.hero-eyebrow .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.hero-title { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(64px, 17vw, 300px); line-height: .9; letter-spacing: -.005em; text-transform: uppercase; }
.hero-title .row { display: flex; align-items: center; gap: .14em; overflow: hidden; padding-bottom: .04em; }
.hero-title .word { display: inline-block; animation: rise 1.1s var(--ease) both; }
.hero-title .row:nth-child(2) .word { animation-delay: .12s; }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
.hero-pill {
  display: inline-block; height: .74em; aspect-ratio: 16 / 9; border-radius: 999px; overflow: hidden; flex-shrink: 0;
  background: var(--bg-3); animation: pillIn 1.2s .35s var(--ease) both; transform-origin: left center;
}
.hero-pill video { width: 100%; height: 100%; object-fit: cover; }
@keyframes pillIn { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }
.hero-title .accent { color: var(--accent); }
.hero-bottom { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.hero-intro { max-width: 620px; margin: 0; font-size: clamp(16px, 1.4vw, 19px); color: var(--ink-2); line-height: 1.7; }
.hero-intro strong { color: var(--ink); font-weight: 700; }
.scroll-cue { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.scroll-cue i { width: 1px; height: 44px; background: linear-gradient(var(--ink), transparent); animation: cue 1.6s infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------------- metrics ---------------- */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric { padding: 36px 24px 32px; border-right: 1px solid var(--line); }
.metric:first-child { padding-left: 0; }
.metric:last-child { border-right: 0; }
.metric-value { font-family: var(--display); font-size: clamp(44px, 5.4vw, 84px); font-weight: 400; letter-spacing: 0; line-height: 1; font-variant-numeric: tabular-nums; }
.metric-value small { font-family: var(--sans); font-size: .36em; font-weight: 700; margin-left: 4px; color: var(--accent); letter-spacing: -.01em; }
.metric-label { margin-top: 14px; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ---------------- marquee ---------------- */
.marquee { overflow: hidden; padding: 28px 0; border-bottom: 1px solid var(--line); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee-track span { font-size: clamp(20px, 2.4vw, 32px); font-weight: 700; color: var(--muted); padding: 0 28px; white-space: nowrap; display: flex; align-items: center; gap: 56px; }
.marquee-track span::after { content: "✦"; font-size: .5em; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------- section heads ---------------- */
.section { padding-top: clamp(80px, 10vw, 150px); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 40px; }
.section-head h2 { margin: 0; font-family: var(--display); font-size: clamp(44px, 7vw, 112px); font-weight: 400; letter-spacing: 0; line-height: .92; text-transform: uppercase; }
.section-head p { margin: 0; color: var(--muted); max-width: 340px; font-size: 14px; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; transition: background .25s, color .25s, border-color .25s; white-space: nowrap; }
.link-arrow:hover { background: var(--ink); color: var(--accent-ink); border-color: var(--ink); }
.link-arrow svg { width: 14px; height: 14px; }

/* ---------------- work grid / cards ---------------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 28px); }
.grid > .card { grid-column: span 6; }
.grid.featured > .card:nth-child(4n+1) { grid-column: span 7; }
.grid.featured > .card:nth-child(4n+2) { grid-column: span 5; margin-top: clamp(40px, 8vw, 140px); }
.grid.featured > .card:nth-child(4n+3) { grid-column: span 5; }
.grid.featured > .card:nth-child(4n+4) { grid-column: span 7; margin-top: clamp(-100px, -6vw, -40px); }
.grid.featured > .card:nth-child(4n+4):last-child { margin-top: 0; }

.card { display: block; position: relative; }
.card-media { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--bg-3); isolation: isolate; }
.card-media img, .card-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), opacity .5s; }
.card-media video { opacity: 0; }
.card.playing .card-media video { opacity: 1; }
/* 유튜브 링크 미리보기: 카드 크기에 꽉 차게(가운데 기준으로 잘라서) */
.card-yt { position: absolute; inset: 0; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity .5s; background: #000; }
.card.playing .card-yt { opacity: 1; }
/* 유튜브가 위(제목)·아래(로고)에 띄우는 막대가 카드 밖으로 잘리도록 살짝 키움 */
.card-yt iframe { position: absolute; top: 50%; left: 50%; border: 0; height: 100%; width: auto; aspect-ratio: 16 / 9; transform: translate(-50%, -50%) scale(1.36); }
.card-yt.v iframe { width: 100%; height: auto; aspect-ratio: 9 / 16; transform: translate(-50%, -50%) scale(1.12); }
.card:hover .card-media img, .card:hover .card-media video { transform: scale(1.045); }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .55)); pointer-events: none; }
.card-kpi {
  position: absolute; left: 14px; bottom: 14px; z-index: 2; display: flex; align-items: baseline; gap: 8px;
  padding: 7px 12px; border-radius: 999px; background: rgba(12, 12, 11, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 12px; color: var(--ink-2);
}
.card-kpi b { color: var(--accent); font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.card-tag { position: absolute; top: 14px; left: 14px; z-index: 2; padding: 5px 10px; border-radius: 999px; background: rgba(12, 12, 11, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--ink-2); }
.card-play { position: absolute; top: 14px; right: 14px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; background: rgba(12, 12, 11, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; place-items: center; }
.card-play svg { width: 11px; height: 11px; margin-left: 2px; fill: var(--ink); }
.card-info { display: flex; justify-content: space-between; gap: 16px; padding-top: 16px; }
.card-title { margin: 0; font-size: clamp(18px, 1.6vw, 22px); font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }
.card-sub { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.card-meta { text-align: right; color: var(--muted); flex-shrink: 0; padding-top: 4px; }

/* home Selected Work: 세로형 카드 가로 슬라이더 (마우스로 끌기) */
.slider-side { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.slider-side p { text-align: right; }
.slider-nav { display: flex; gap: 8px; }
.slider-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: background .25s, color .25s, border-color .25s, opacity .25s; }
.slider-btn svg { width: 16px; height: 16px; }
.slider-btn[data-slide="-1"] svg { transform: rotate(180deg); }
.slider-btn:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.slider-btn:disabled { opacity: .3; cursor: default; }
.no-overflow .slider-nav, .no-overflow .slider-progress { display: none; }

.work-slider {
  display: flex; gap: clamp(14px, 1.6vw, 24px); overflow-x: auto; overscroll-behavior-x: contain;
  margin: 0 calc(-1 * var(--gutter)); padding: 8px var(--gutter) 10px; scroll-padding: 0 var(--gutter); /* 위아래 여백: hover 라인이 잘리지 않게 */
  scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab; outline-offset: -2px;
}
.work-slider::-webkit-scrollbar { display: none; }
.work-slider.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.work-slider.dragging .card { pointer-events: none; }
.work-slider .card { flex: 0 0 clamp(240px, 23vw, 340px); scroll-snap-align: start; }
.work-slider img { -webkit-user-drag: none; user-select: none; }
.card-tall .card-media { aspect-ratio: 3 / 4; }
.card-num {
  position: absolute; right: 14px; bottom: 12px; z-index: 2; font-family: var(--display); font-size: clamp(40px, 4vw, 64px); line-height: .9;
  color: rgba(255, 255, 255, .9); text-shadow: 0 4px 24px rgba(0, 0, 0, .45); pointer-events: none;
}
.card-tall .card-kpi { right: auto; max-width: calc(100% - 90px); flex-wrap: wrap; row-gap: 0; }
.slider-progress { position: relative; height: 2px; margin-top: 28px; background: var(--line); border-radius: 2px; overflow: hidden; }
.slider-progress i { position: absolute; top: 0; bottom: 0; left: 0; width: 20%; background: var(--accent); border-radius: 2px; transition: left .15s linear; }

/* illustration masonry */
.masonry { columns: 3 320px; column-gap: clamp(16px, 2vw, 28px); }
.masonry .card { break-inside: avoid; margin-bottom: clamp(28px, 3vw, 44px); }
.masonry .card-media { aspect-ratio: auto; }
.masonry .card-media img { position: static; height: auto; }
.masonry .card-media::after { display: none; }

/* ---------------- category index (home) ---------------- */
.cat-index { border-top: 1px solid var(--line); }
.cat-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.1fr) 80px 48px; align-items: center; gap: 24px;
  padding: 26px 0; border-bottom: 1px solid var(--line); position: relative; transition: color .3s, padding .4s var(--ease);
}
.cat-row .num { color: var(--muted); }
.cat-row h3 { margin: 0; font-size: clamp(30px, 4.6vw, 72px); font-weight: 900; letter-spacing: -.045em; line-height: 1; text-transform: uppercase; transition: color .3s, transform .5s var(--ease); }
.cat-row .ko { font-size: 15px; color: var(--ink-2); }
.cat-row .ko b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 2px; }
.cat-row .count { color: var(--muted); text-align: right; }
.cat-row .arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: background .3s, border-color .3s, transform .4s var(--ease); }
.cat-row .arrow svg { width: 14px; height: 14px; }
.cat-row:hover h3 { color: var(--accent); transform: translateX(12px); }
.cat-row:hover .arrow { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: rotate(-45deg); }
.cat-float {
  position: fixed; left: 0; top: 0; width: 300px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; pointer-events: none; z-index: 30;
  opacity: 0; transform: translate(-50%, -50%) scale(.8); transition: opacity .3s, transform .4s var(--ease);
}
.cat-float.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cat-float img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------- category page ---------------- */
.cat-hero { padding-top: calc(var(--header-h) + clamp(48px, 8vw, 120px)); padding-bottom: clamp(40px, 5vw, 72px); }
.cat-hero .mono { color: var(--accent); }
.cat-hero h1 { margin: 16px 0 0; font-family: var(--display); font-size: clamp(56px, 15vw, 260px); font-weight: 400; letter-spacing: 0; line-height: .88; text-transform: uppercase; }
.cat-hero-bottom { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.cat-hero-bottom p { margin: 0; font-size: clamp(17px, 1.5vw, 21px); }
.cat-hero-bottom p b { display: block; color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-tabs a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink-2); transition: all .2s; }
.cat-tabs a:hover { color: var(--ink); border-color: var(--ink-2); }
.cat-tabs a.active { background: var(--ink); color: var(--accent-ink); border-color: var(--ink); }

.next-cat { display: block; margin-top: clamp(80px, 10vw, 150px); padding: clamp(40px, 6vw, 80px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.next-cat .mono { color: var(--muted); }
.next-cat strong { display: flex; align-items: center; gap: .3em; margin-top: 12px; font-family: var(--display); font-size: clamp(52px, 11vw, 180px); font-weight: 400; letter-spacing: 0; line-height: .9; text-transform: uppercase; transition: color .3s; }
.next-cat strong svg { width: .5em; height: .5em; transition: transform .5s var(--ease); }
.next-cat:hover strong { color: var(--accent); }
.next-cat:hover strong svg { transform: translateX(16px); }

/* ---------------- project detail ---------------- */
.proj-hero { padding-top: calc(var(--header-h) + clamp(40px, 6vw, 96px)); }
.crumbs { display: flex; gap: 10px; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.proj-hero h1 { margin: 18px 0 8px; font-size: clamp(38px, 6.4vw, 104px); font-weight: 900; letter-spacing: -.05em; line-height: 1; }
.proj-hero .sub { margin: 0; font-size: clamp(17px, 1.6vw, 22px); color: var(--ink-2); }
.proj-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 40px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proj-meta dt { color: var(--muted); margin-bottom: 6px; }
.proj-meta dd { margin: 0; font-size: 15px; font-weight: 600; }

.player { margin-top: clamp(32px, 4vw, 56px); border-radius: var(--radius); overflow: hidden; background: #000; position: relative; aspect-ratio: 16 / 9; }
.player video, .player iframe { width: 100%; height: 100%; border: 0; object-fit: contain; background: #000; }
.player img.player-img { width: 100%; height: 100%; object-fit: cover; }
.yt-facade { position: absolute; inset: 0; width: 100%; display: block; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .4s; }
.yt-facade:hover img { transform: scale(1.03); filter: brightness(.8); }
.play-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: clamp(72px, 9vw, 120px); aspect-ratio: 1; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; transition: transform .4s var(--ease);
}
.play-btn svg { width: 28%; height: 28%; margin-left: 6%; fill: currentColor; }
.yt-facade:hover .play-btn { transform: translate(-50%, -50%) scale(1.08); }
/* 세로 쇼츠: 재생하면 가운데 9:16 화면으로 */
.player-short iframe { width: auto; height: 100%; aspect-ratio: 9 / 16; display: block; margin: 0 auto; }
@media (max-width: 900px) {
  .player-short:has(iframe) { aspect-ratio: 9 / 16; max-width: 420px; margin-inline: auto; }
  .player-short:has(iframe) iframe { width: 100%; }
}
/* 세로형(9:16) 완성 영상 */
.player-vertical { aspect-ratio: 9 / 16; width: min(420px, 100%); margin-inline: auto; }
.player-gif { aspect-ratio: auto; background: var(--bg-2); }
.player-gif img { width: 100%; height: auto; }

.case { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); margin-top: clamp(56px, 7vw, 110px); }
.case-col .mono { color: var(--accent); display: flex; align-items: center; gap: 10px; }
.case-col .mono::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.case-col p { margin: 14px 0 0; font-size: clamp(16px, 1.3vw, 18px); color: var(--ink-2); line-height: 1.75; }
.case-col.result p { color: var(--ink); }
.kpi-big { margin-top: 12px; font-size: clamp(44px, 5.4vw, 84px); font-weight: 900; letter-spacing: -.045em; line-height: 1; color: var(--accent); }
.kpi-big + small { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.proj-link { margin-top: 28px; }

.variants { margin-top: clamp(56px, 7vw, 110px); }
.variants h2, .gallery-title { margin: 0 0 24px; font-size: clamp(24px, 2.4vw, 34px); font-weight: 800; letter-spacing: -.03em; }
.variant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.variant-grid.vertical { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); max-width: 820px; }
.variant video { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; object-fit: contain; }
.variant-grid.vertical .variant video { aspect-ratio: 9 / 16; }
.variant p { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }

.gallery { margin-top: clamp(56px, 7vw, 110px); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 24px); }
.gallery-grid figure { margin: 0; border-radius: 12px; overflow: hidden; background: var(--bg-2); cursor: zoom-in; }
.gallery-grid figure.wide { grid-column: 1 / -1; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.gallery-grid figure:hover img { transform: scale(1.03); }
.gallery-grid.ill figure { background: var(--bg-2); display: grid; place-items: center; }
.gallery-grid.ill img { object-fit: contain; height: auto; }

.proj-nav { display: grid; grid-template-columns: 1fr 1fr; margin-top: clamp(80px, 10vw, 150px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proj-nav a { padding: 36px 0; display: flex; flex-direction: column; gap: 8px; transition: color .3s; }
.proj-nav a + a { text-align: right; border-left: 1px solid var(--line); padding-left: 24px; }
.proj-nav a .mono { color: var(--muted); }
.proj-nav a strong { font-size: clamp(20px, 2.6vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.proj-nav a:hover { color: var(--accent); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(5, 5, 5, .94); display: grid; place-items: center; padding: 56px 16px; opacity: 0; pointer-events: none; transition: opacity .3s; cursor: zoom-out; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lightbox button { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; background: var(--bg-3); font-size: 22px; }

/* ---------------- about ---------------- */
.about-hero { padding-top: calc(var(--header-h) + clamp(48px, 8vw, 120px)); }
.about-hero h1 { margin: 16px 0 0; font-size: clamp(34px, 5.8vw, 96px); font-weight: 900; letter-spacing: -.05em; line-height: 1.12; }
.about-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; align-content: start; }
.about-facts li { display: grid; gap: 4px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.about-facts b { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 3.4vw, 52px); line-height: 1; }
.about-facts small { margin-left: 4px; font-family: var(--sans); font-size: .4em; font-weight: 700; color: var(--accent); }
.about-facts span { font-size: 13px; color: var(--muted); }
.about-hero h1 em { font-style: normal; color: var(--accent); }
.about-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(32px, 5vw, 80px); margin-top: clamp(48px, 6vw, 96px); padding-top: 32px; border-top: 1px solid var(--line); }
.about-body .lead { margin: 0; font-size: clamp(20px, 2vw, 28px); font-weight: 700; letter-spacing: -.02em; line-height: 1.45; }
.about-body p { margin: 0 0 18px; color: var(--ink-2); font-size: 17px; line-height: 1.8; }
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pillar { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px 32px; transition: border-color .3s, transform .4s var(--ease); }
.pillar:hover { border-color: var(--accent); transform: translateY(-6px); }
.pillar .mono { color: var(--muted); }
.pillar h3 { margin: 40px 0 6px; font-family: var(--display); font-size: clamp(36px, 3.4vw, 52px); font-weight: 400; letter-spacing: .005em; line-height: 1; }
.pillar h3 + b { color: var(--accent); font-size: 15px; }
.pillar p { margin: 14px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.timeline .row { display: grid; grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.timeline .row:first-child { border-top: 1px solid var(--line); }
.timeline .period { color: var(--muted); padding-top: 4px; }
.timeline h3 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.timeline h3 + span { color: var(--accent); font-size: 14px; font-weight: 600; }
.timeline p { margin: 0; color: var(--ink-2); font-size: 15px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); }
.skill-group { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.skill-group .mono { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { padding: 6px 12px; border-radius: 999px; background: var(--bg-3); font-size: 14px; }
.awards { list-style: none; margin: 0; padding: 0; }
.awards li { padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 16px; display: flex; gap: 14px; }
.awards li::before { content: "✦"; color: var(--accent); }

/* ---------------- footer / contact ---------------- */
.site-footer { padding: clamp(100px, 12vw, 180px) var(--gutter) 32px; }
.footer-cta .mono { color: var(--muted); }
.footer-cta a.mail { display: inline-block; margin-top: 14px; font-size: clamp(16px, 1.4vw, 20px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; position: relative; transition: color .3s; word-break: break-all; }
.footer-cta a.mail::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.footer-cta a.mail:hover { color: var(--accent); }
.footer-cta a.mail:hover::after { transform: scaleX(1); }
.footer-cta h2 { margin: 12px 0 0; font-size: clamp(20px, 2vw, 28px); font-weight: 700; line-height: 1.3; letter-spacing: -.02em; color: var(--ink); word-break: keep-all; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin-top: clamp(64px, 8vw, 120px); padding-top: 28px; border-top: 1px solid var(--line); color: var(--ink-2); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-transform: none; letter-spacing: .02em; font-size: 13px; }
.footer-links a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; transition: color .2s, text-decoration-color .2s; }
.footer-links a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.footer-sign { text-align: right; }
.footer-sign strong { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3.4vw, 48px); line-height: 1; color: var(--ink); }
.footer-sign .mono { color: var(--muted); }

/* ---------------- home: WHAT I DO poster ---------------- */
.poster {
  position: relative; margin-top: clamp(80px, 10vw, 150px); padding: clamp(72px, 9vw, 140px) 0; overflow: hidden;
  background:
    radial-gradient(90% 80% at 85% 15%, rgba(255, 90, 46, .26), transparent 60%),
    radial-gradient(70% 70% at 0% 100%, rgba(255, 90, 46, .10), transparent 60%),
    var(--bg-2);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.poster-eyebrow { display: flex; gap: 10px; color: var(--accent); margin-bottom: clamp(24px, 3vw, 40px); }
.poster-eyebrow span + span { color: var(--muted); }
.poster-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: clamp(24px, 4vw, 64px); align-items: end; }
.poster-lines { margin: 0; display: flex; flex-direction: column; font-weight: 400; }
.poster-lines a {
  display: flex; align-items: baseline; gap: 16px; width: fit-content;
  font-family: var(--display); font-size: clamp(44px, 7vw, 132px); line-height: .92; text-transform: uppercase; color: var(--ink);
  transition: color .3s, transform .5s var(--ease);
}
@media (min-width: 561px) { .poster-lines a span { white-space: nowrap; } }
.poster-lines a small { font-size: 12px; color: var(--muted); transform: translateY(-.6em); transition: color .3s; white-space: nowrap; }
.poster-lines a.accent { color: var(--accent); }
.poster-lines a:hover { color: var(--accent); transform: translateX(10px); }
.poster-lines a:hover small { color: var(--ink); }
.poster-side p { margin: 0 0 18px; color: var(--ink-2); font-size: 15px; line-height: 1.75; }
.poster-side .mono { font-size: 11px; line-height: 1.9; color: var(--muted); }

/* ---------------- home: profile board (이력판) ---------------- */
.profile { padding-top: clamp(72px, 9vw, 130px); }
.pf-board { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.5fr) minmax(0, 1fr); }
.pf-board > div { padding: 0 clamp(18px, 2.6vw, 40px); border-left: 1px solid rgba(255, 90, 46, .45); }
.pf-board > div:first-child { padding-left: 0; border-left: 0; }
.pf-board > div:last-child { padding-right: 0; }
.pf-name {
  margin: 0; padding: 14px 0 10px; border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  font-family: var(--display); font-weight: 400; font-size: clamp(54px, 6.4vw, 104px); line-height: .92; letter-spacing: .005em;
}
.pf-role { margin: 12px 0 0; color: var(--ink-2); font-size: 14px; }
.pf-label {
  display: inline-block; margin: clamp(28px, 3vw, 44px) 0 12px; padding-bottom: 4px; border-bottom: 2px solid var(--accent);
  font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1; letter-spacing: .02em; text-transform: uppercase; color: var(--accent);
}
.pf-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; color: var(--ink); }
.pf-contact a:hover { color: var(--accent); }
.pf-head {
  margin: 0; padding-bottom: 10px; border-bottom: 2px solid var(--accent);
  font-family: var(--display); font-weight: 400; font-size: clamp(34px, 3.4vw, 54px); line-height: 1; letter-spacing: .01em; text-transform: uppercase;
}
.pf-head ~ .pf-head { margin-top: clamp(36px, 4vw, 56px); }
.pf-table { list-style: none; margin: 0; padding: 0; }
.pf-table li { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid rgba(255, 90, 46, .35); }
.pf-table.two li { grid-template-columns: 112px minmax(0, 1fr); }
.pf-date { font-family: var(--display); font-size: 17px; letter-spacing: .03em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.pf-title { font-size: 15px; font-weight: 600; }
.pf-note { font-size: 13px; color: var(--ink-2); text-align: right; white-space: nowrap; }
.pf-skills { list-style: none; margin: 0; padding: 0; }
.pf-skills > li { padding: 18px 0 18px; border-bottom: 1px solid rgba(255, 90, 46, .35); display: grid; gap: 12px; }
.pf-sk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pf-sk-head b { font-size: 20px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; color: var(--accent); }
.pf-sk-head span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pf-tools { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pf-tools li { padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.pf-skills p { margin: 0; font-size: 14px; line-height: 1.55; letter-spacing: -.01em; color: var(--muted); }

/* ---------------- category: case-study stack ---------------- */
.case-toc { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.case-toc button {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--tint) 45%, var(--line)); background: color-mix(in srgb, var(--tint) 12%, var(--bg)); transition: background .25s, transform .3s var(--ease);
}
.case-toc button .mono { color: color-mix(in srgb, var(--tint) 70%, white); font-size: 11px; }
.case-toc button:hover { background: color-mix(in srgb, var(--tint) 30%, var(--bg)); transform: translateY(-2px); }

.case-sec {
  --tint: #ff5a2e; position: relative; isolation: isolate; overflow: hidden; scroll-margin-top: calc(var(--header-h) - 1px);
  padding: clamp(64px, 8vw, 128px) 0 clamp(72px, 9vw, 140px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 24%, var(--bg)) 0%, color-mix(in srgb, var(--tint) 9%, var(--bg)) 42%, var(--bg) 100%);
  border-top: 1px solid color-mix(in srgb, var(--tint) 40%, var(--line));
}
/* 레퍼런스의 커다란 배경 도형을 은은한 원형 빛으로 재해석 */
.case-sec::before {
  content: ""; position: absolute; z-index: -1; right: -18vw; top: -22vw; width: 62vw; aspect-ratio: 1; border-radius: 50%;
  border: clamp(40px, 7vw, 120px) solid color-mix(in srgb, var(--tint) 16%, transparent); pointer-events: none;
}
.case-inner { max-width: 1160px; margin: 0 auto; }
.case-top { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .2); color: var(--ink-2); }
.case-top span:last-child { color: color-mix(in srgb, var(--tint) 65%, white); }
.case-title { margin: clamp(28px, 4vw, 52px) 0 8px; font-size: clamp(34px, 5.2vw, 76px); font-weight: 900; letter-spacing: -.045em; line-height: 1.05; }
.case-sub { margin: 0; color: var(--ink-2); font-size: clamp(16px, 1.4vw, 20px); }
.case-sec .player { margin-top: clamp(28px, 3.4vw, 48px); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7); }
.case-cover { margin: clamp(28px, 3.4vw, 48px) 0 0; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); cursor: zoom-in; }
.case-cover img { width: 100%; height: auto; transition: transform 1s var(--ease); }
.case-cover:hover img { transform: scale(1.02); }
.case-stills { --n: 4; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(8px, 1vw, 14px); margin-top: clamp(8px, 1vw, 14px); }
.case-stills figure { position: relative; margin: 0; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--bg-2); cursor: zoom-in; }
.case-stills img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.case-stills figure:hover img { transform: scale(1.05); }
.case-stills figcaption { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(12, 12, 11, .7); color: var(--ink-2); font-size: 10px; }
/* 세로형 대표 스틸컷 (콘텐츠 유형별) */
.vstills { margin-top: clamp(28px, 3.4vw, 48px); }
.vstills-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 18px); margin-top: 14px; }
.vstills figure { margin: 0; }
.vstill-img { position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .7); }
.vstill-img img, .vstill-img video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vstill-img video { opacity: 0; transition: opacity .4s; }
.vstill-img video.on { opacity: 1; }
.vstill-rank { position: absolute; left: 8px; top: 8px; z-index: 2; font-family: var(--display); font-size: 22px; line-height: 1; padding: 6px 8px 4px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); }
.vstills-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
/* 조회수 강조 오버레이 (stills 의 views) */
.vstill-views {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; gap: 2px;
  padding: 48px 12px 12px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .55) 40%, rgba(0, 0, 0, .88));
}
.vstill-views .mono { font-size: 10px; color: rgba(255, 255, 255, .75); letter-spacing: .14em; }
.vstill-views b { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 3vw, 46px); line-height: .95; color: var(--accent); letter-spacing: .01em; }
.vstill-views small { margin-left: 3px; font-family: var(--sans); font-size: .38em; font-weight: 700; color: #fff; }
/* 가로 슬라이드형 (stillsSlider) */
.vstills.is-slider .vstills-grid { display: flex; grid-template-columns: none; margin-top: 14px; }
.vstills.is-slider figure { flex: 0 0 clamp(170px, 17vw, 228px); scroll-snap-align: start; }
.vstills.is-slider .slider-progress { margin-top: 18px; }
/* 흐름형(stillsFlow): 컷 사이 화살표 — 이미지 세로 가운데, 컷 간격 한가운데에 표시 */
.vstills.flow .vstills-grid { --fgap: clamp(30px, 3vw, 44px); column-gap: var(--fgap); }
.vstills.flow figure { position: relative; }
.flow-slot { position: absolute; z-index: 3; top: 0; left: 0; width: 100%; aspect-ratio: 9 / 16; display: flex; align-items: center; justify-content: flex-end; pointer-events: none; }
.flow-arrow {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  transform: translateX(calc(50% + var(--fgap) / 2)); background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tint, var(--accent)) 18%, var(--bg)), 0 8px 20px -6px rgba(0, 0, 0, .6);
}
.flow-arrow svg { width: 18px; height: 18px; }
.vstills figcaption { padding-top: 10px; display: grid; gap: 2px; }
.vstills figcaption .mono { color: color-mix(in srgb, var(--tint, var(--accent)) 65%, white); font-size: 10px; }
.vstills figcaption b { font-size: 14px; font-weight: 600; line-height: 1.4; }
.vstills figcaption a { margin-top: 4px; width: fit-content; color: var(--muted); font-size: 10px; text-decoration: underline; text-underline-offset: 3px; }
.vstills figcaption a:hover { color: var(--accent); }
.case-ov { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(24px, 4vw, 72px); margin-top: clamp(40px, 5vw, 72px); padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .16); }
.case-label { color: color-mix(in srgb, var(--tint) 65%, white); }
.case-kpi { margin-top: 18px; }
.case-kpi b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(52px, 6.4vw, 104px); line-height: .95; color: var(--accent); }
.case-kpi small { display: block; margin-top: 8px; color: var(--ink-2); font-size: 14px; }
.case-ov-body { display: flex; flex-direction: column; }
.case-ov-body p { margin: 0 0 22px; color: var(--ink-2); font-size: clamp(15px, 1.2vw, 17px); line-height: 1.8; }
.case-ov-body .ov-result { order: 3; margin-bottom: 0; color: var(--ink); }  /* 데스크톱: 과제 → 해결 → 결과 순서 */
.ov-toggle { display: none; order: 4; width: fit-content; margin-top: 14px; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; color: var(--ink-2); font-size: 11px; }
.case-ov-body b { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 500; }
.case-spec { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: clamp(32px, 4vw, 52px) 0 0; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .16); border-bottom: 1px solid rgba(255, 255, 255, .16); }
.case-spec dt { color: var(--muted); margin-bottom: 8px; }
.case-spec dd { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.5; }
.case-spec dd.big { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 2.6vw, 40px); line-height: 1; }
.case-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.case-sec .link-arrow { border-color: rgba(255, 255, 255, .22); background: rgba(12, 12, 11, .35); }
.case-sec .link-arrow:hover { background: var(--ink); color: var(--accent-ink); }

/* project detail: 상단에 프로젝트 고유 색을 은은하게 */
.proj-tint { position: absolute; inset: 0 0 auto 0; height: 90vh; z-index: -1; pointer-events: none; background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 22%, var(--bg)), var(--bg)); }
.page { position: relative; isolation: isolate; }

/* ---------------- about: resume board ---------------- */
.resume { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); border-top: 2px solid var(--ink); }
.resume > div { padding: 28px clamp(16px, 2.4vw, 36px) 8px; border-right: 1px solid var(--line); }
.resume > div:first-child { padding-left: 0; }
.resume > div:last-child { border-right: 0; padding-right: 0; }
.resume-id h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(52px, 6vw, 96px); line-height: .9; }
.resume-id > p { margin: 14px 0 32px; color: var(--ink-2); font-size: 14px; }
.r-label { display: block; color: var(--accent); margin-bottom: 10px; }
.r-head { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 2.6vw, 38px); letter-spacing: .01em; text-transform: uppercase; }
.r-head ~ .r-head { margin-top: 36px; }
.r-list { list-style: none; margin: 0; padding: 0; }
.r-list li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; display: grid; gap: 2px; }
.r-list li .mono { color: var(--muted); font-size: 11px; }
.r-list a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.r-list a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.r-skill { padding: 14px 0; border-bottom: 1px solid var(--line); }
.r-skill .r-label { margin-bottom: 4px; font-size: 11px; }
.r-skill p { margin: 0; font-size: 15px; color: var(--ink); line-height: 1.6; }

/* ---------------- 프레임 hover: 바깥쪽 메인컬러 라인이 위 가운데부터 시계 방향으로 그려짐 ---------------- */
/* 한 개의 .frame-ring 을 마우스가 올라간 프레임 둘레로 옮겨 놓고(app.js), --draw 각도를 0→360°로 늘려 선을 그림 */
@property --draw { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.frame-ring {
  position: absolute; left: 0; top: 0; z-index: 40; pointer-events: none; padding: 2px; box-sizing: border-box;
  border-radius: var(--ring-r, 16px); opacity: 0; --draw: 0deg;
  background: conic-gradient(from 0deg, var(--accent) var(--draw), transparent var(--draw));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  transition: --draw .3s var(--ease), opacity .3s;
}
.frame-ring.on { opacity: 1; --draw: 360deg; transition: --draw .9s cubic-bezier(.65, 0, .35, 1), opacity .15s; }
@media (hover: none), (pointer: coarse) { .frame-ring { display: none; } }

/* ---------------- 마우스 커서: 평소 흰색 → 프레임 위에서 메인컬러로 서서히 ---------------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 100; width: 22px; height: 26px; pointer-events: none; opacity: 0; transition: opacity .2s; will-change: transform; }
.cursor.ready { opacity: 1; }
.cursor svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45)); }
.cursor .c-base { fill: #fff; stroke: #0c0c0b; stroke-width: 1.3; stroke-linejoin: round; }
.cursor .c-tint { fill: url(#cursorGrad); stroke: #0c0c0b; stroke-width: 1.3; stroke-linejoin: round; opacity: 0; transition: opacity .45s var(--ease); }
.cursor.on .c-tint { opacity: 1; }
html.has-cursor, html.has-cursor * { cursor: none !important; }
html.has-cursor iframe { cursor: auto !important; }
@media (hover: none), (pointer: coarse) { .cursor, .cat-float { display: none; } }

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .nav a { padding: 8px 9px; font-size: 12px; }
  .nav a sup { display: none; }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .header-cta { display: none; }
  .nav { gap: 2px; }
  .nav a { padding: 7px 8px; font-size: 12px; letter-spacing: .02em; }
  .nav .nav-sep { margin: 6px 2px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { padding: 28px 16px; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(3) { padding-left: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid > .card, .grid.featured > .card:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
  .cat-row { grid-template-columns: 40px minmax(0, 1fr) 44px; gap: 12px 16px; }
  .cat-row .ko, .cat-row .count { display: none; }
  .cat-row .arrow { width: 40px; height: 40px; }
  .proj-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case { grid-template-columns: 1fr; }
  .about-body, .two-col { grid-template-columns: 1fr; }
  .timeline .row { grid-template-columns: 1fr; gap: 6px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .hero-bottom { grid-template-columns: 1fr; }
  .scroll-cue { display: none; }
  .cat-hero-bottom { flex-direction: column; align-items: flex-start; }
  .poster-grid { grid-template-columns: 1fr; }
  .pf-board { grid-template-columns: 1fr; row-gap: 44px; }
  .pf-board > div { padding: 0; border-left: 0; }
  .slider-side { align-items: flex-start; }
  .slider-side p { text-align: left; }
  .work-slider .card { flex-basis: clamp(220px, 42vw, 320px); }
  .case-ov { grid-template-columns: 1fr; }
  .case-spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-stills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vstills-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; }
  /* 흐름형은 줄바꿈하면 화살표 방향이 끊기므로 한 줄로 두고 옆으로 넘기기 */
  .vstills.flow .vstills-grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 30%; overflow-x: auto;
    scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin;
  }
  .vstills.flow figure { scroll-snap-align: start; }
  /* 가로로 넘기는 줄: 스크롤바 숨김 (휴대폰처럼 손가락으로 밀어서 이동) */
  .vstills .vstills-grid { scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .vstills .vstills-grid::-webkit-scrollbar { display: none; }
  .case-stills figure:only-child, .case-stills figure:nth-child(3):last-child { grid-column: 1 / -1; }
  .resume { grid-template-columns: 1fr; }
  .resume > div { padding: 24px 0 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .resume > div:last-child { border-bottom: 0; }
  .footer-sign { text-align: left; }
}
/* 좁은 화면: 로고 아래 줄에 카테고리 메뉴를 한 줄로 (넘치면 가로 스크롤) */
@media (max-width: 720px) {
  :root { --header-h: 100px; }
  .site-header { height: auto; flex-wrap: wrap; row-gap: 6px; padding-top: 12px; padding-bottom: 8px; background: rgba(12, 12, 11, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
  .nav {
    order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter);
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - 32px), transparent);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex-shrink: 0; padding: 8px 12px; font-size: 13px; background: var(--bg-2); }
  .nav .nav-sep { flex-shrink: 0; }
  .header-cta { display: inline-block; margin-left: auto; padding: 7px 14px; font-size: 12px; }
}
@media (max-width: 560px) {
  /* 휴대폰: 짧은 한글 이름으로 바꿔 메뉴 6개가 한 줄에 모두 보이게 */
  .nav .l-en, .nav .nav-sep { display: none; }
  .nav .l-ko { display: inline; }
  .nav { justify-content: space-between; -webkit-mask-image: none; mask-image: none; }
  .nav a { padding: 8px 10px; font-size: 13px; letter-spacing: 0; }
  .gallery-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .card-info { flex-direction: column; gap: 6px; }
  .card-meta { text-align: left; padding-top: 0; }
  .proj-nav { grid-template-columns: 1fr; }
  .proj-nav a + a { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .hero-title .row { gap: .1em; }
  .poster-lines a { flex-direction: column; gap: 4px; }
  .poster-lines a small { transform: none; order: -1; }
  .poster-lines a + a { margin-top: 10px; }
  .case-top { flex-direction: column; gap: 4px; }
  .vstills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 다음 컷이 오른쪽에 살짝 보이게 해서 옆으로 밀 수 있다는 걸 알 수 있게 */
  .vstills.flow .vstills-grid { grid-template-columns: none; grid-auto-columns: 40%; }
  .vstills.is-slider figure { flex-basis: 40vw; }

  /* 휴대폰 첫 화면: 빈 위쪽 공간을 줄이고 제목을 크게 */
  .hero { min-height: 84svh; justify-content: center; padding-top: calc(var(--header-h) + 28px); }
  .hero-title { font-size: 19vw; }
  .hero-bottom { margin-top: 28px; }

  /* 휴대폰 카테고리 페이지: 길이 줄이기 */
  .case-sec { padding: 48px 0 56px; }
  .case-stills figure:nth-child(n+3) { display: none; }          /* 분할 컷은 2장만 */
  .case-stills figure:nth-child(2) { grid-column: auto; }
  .case-ov { margin-top: 32px; padding-top: 20px; }
  .case-ov-body .ov-result { order: 0; margin-bottom: 0; }        /* 결과를 먼저 */
  .case-ov-body .ov-more-item { display: none; order: 1; }
  .case-ov-body.open .ov-more-item { display: block; margin: 18px 0 0; }
  .ov-toggle { display: inline-block; }
  .case-spec { margin-top: 24px; gap: 14px; padding: 14px 0; }
  /* 세로형 대표 컷(번호형)도 한 줄로 넘겨 보기 */
  .vstills:not(.flow):not(.is-slider) .vstills-grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 40%; overflow-x: auto;
    scroll-snap-type: x mandatory; padding-bottom: 4px;
  }
  .vstills:not(.flow):not(.is-slider) figure { scroll-snap-align: start; }
  .work-slider .card { flex-basis: 68vw; }
  .pf-table li { grid-template-columns: 1fr; gap: 2px; }
  .pf-table.two li { grid-template-columns: 1fr; }
  .pf-note { text-align: left; }
  .slider-btn { width: 42px; height: 42px; }
}

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