/* =========================================================
   Junyoung Yang — Portfolio
   Editorial off-white / ink, one accent. Pretendard + Instrument Serif + Geist Mono
   ========================================================= */

:root {
  --paper: #f3f0e8;
  --paper-2: #e9e5db;
  --paper-3: #dcd7ca;
  --ink: #0e0e10;
  --ink-2: #3a3a3f;
  --ink-3: #74747c;
  --line: rgba(14, 14, 16, 0.12);
  --line-strong: rgba(14, 14, 16, 0.28);
  --accent: #e8451b;
  --accent-ink: #ffffff;
  --card: #ffffff;
  --card-dark: #121214;
  --shadow: 0 30px 80px -30px rgba(14, 14, 16, 0.35);
  --radius: 22px;
  --radius-sm: 12px;

  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-serif-kr: "Noto Serif KR", "Apple Myungjo", "Nanum Myeongjo", serif;
  --font-mono: "Geist Mono", "JetBrains Mono", "SF Mono", Menlo, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.83, 0, 0.17, 1);
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1440px;
}

[data-theme="dark"] {
  --paper: #0b0b0d;
  --paper-2: #131316;
  --paper-3: #1d1d21;
  --ink: #f2efe8;
  --ink-2: #c6c2b8;
  --ink-3: #7f7c74;
  --line: rgba(242, 239, 232, 0.12);
  --line-strong: rgba(242, 239, 232, 0.3);
  --accent: #ff5a2c;
  --card: #141417;
  --card-dark: #0b0b0d;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.5s var(--ease-out), color 0.5s var(--ease-out);
  word-break: keep-all;
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: var(--accent); color: #fff; }

/* Grain */
.grain {
  pointer-events: none;
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.045;
  z-index: 9998;
  mix-blend-mode: multiply;
  animation: grain 0.9s steps(4) infinite;
}
[data-theme="dark"] .grain { mix-blend-mode: screen; opacity: 0.06; }
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-1%, -3%); }
  100% { transform: translate(2%, 2%); }
}

/* Cursor */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--ink);
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), background 0.3s, opacity 0.3s;
  mix-blend-mode: difference;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: var(--font-sans); font-size: 12px; font-weight: 500; letter-spacing: 0.02em;
  opacity: 0;
}
.cursor span { opacity: 0; transition: opacity 0.2s; white-space: nowrap; }
.cursor.is-label { width: 72px; height: 72px; background: var(--accent); mix-blend-mode: normal; }
.cursor.is-label span { opacity: 1; }
.cursor.is-link { width: 40px; height: 40px; background: var(--ink); }
body.has-cursor { }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* Preloader */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--ink);
  color: var(--paper);
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: var(--gutter);
  font-family: var(--font-mono);
}
.loader__count { font-size: clamp(64px, 14vw, 180px); line-height: 0.85; letter-spacing: -0.04em; font-family: var(--font-sans); font-weight: 600; }
.loader__label { font-family: var(--font-sans); font-size: 13px; letter-spacing: 0.02em; opacity: 0.6; }
.loader__label em { font-family: var(--font-serif); font-style: italic; text-transform: none; letter-spacing: 0; font-size: 16px; opacity: 1; }

/* Layout helpers */
.wrap { width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; }
.section { padding-block: clamp(96px, 14vw, 200px); position: relative; }
.section--tight { padding-block: clamp(64px, 9vw, 120px); }
.eyebrow {
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 500; letter-spacing: 0.01em;
  color: var(--ink-3); display: flex; align-items: center; gap: 12px; margin-bottom: 28px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--ink-3); }
.eyebrow--accent { color: var(--accent); }
.eyebrow--accent::before { background: var(--accent); }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.h-display { font-size: clamp(40px, 6.4vw, 100px); letter-spacing: -0.045em; line-height: 1.04; font-weight: 700; }
.h-xl { font-size: clamp(32px, 4.4vw, 66px); line-height: 1.08; }
.h-lg { font-size: clamp(28px, 3.6vw, 52px); letter-spacing: -0.03em; line-height: 1.12; }
.h-md { font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -0.025em; line-height: 1.25; }
em.serif, .serif { font-family: var(--font-serif-kr); font-style: normal; font-weight: 600; letter-spacing: -0.045em; }
.serif.lat, em.lat, .lat { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.h-display em.serif, .h-xl em.serif { font-size: 0.95em; font-weight: 700; letter-spacing: -0.07em; margin-right: 0.02em; }
.h-display em.lat, .h-xl em.lat { font-size: 1.06em; letter-spacing: -0.04em; }
.lead { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.6; color: var(--ink-2); max-width: 46ch; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-sans); font-size: 12.5px; font-weight: 500; letter-spacing: 0.02em; }
.accent { color: var(--accent); }
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Reveal primitives */
.reveal-line { overflow: hidden; display: block; }
.reveal-line > span { display: block; transform: translateY(110%); }
.fade-up { opacity: 0; transform: translateY(28px); }
.mask-img { overflow: hidden; }
.mask-img img { transform: scale(1.15); }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  mix-blend-mode: difference; color: #fff;
  transition: transform 0.5s var(--ease-out);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__brand { font-family: var(--font-sans); font-size: 14px; font-weight: 600; letter-spacing: 0.01em; display: flex; align-items: center; gap: 10px; }
.nav__brand i { width: 8px; height: 8px; border-radius: 50%; background: #7bff5a; box-shadow: 0 0 0 0 rgba(123,255,90,0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(123,255,90,0.6);} 70% { box-shadow: 0 0 0 10px rgba(123,255,90,0);} 100% { box-shadow: 0 0 0 0 rgba(123,255,90,0);} }
.nav__links { display: flex; gap: 28px; font-family: var(--font-sans); font-size: 13.5px; font-weight: 500; letter-spacing: 0.01em; }
.nav__links a { position: relative; overflow: hidden; display: inline-block; height: 1.3em; line-height: 1.3em; }
.nav__links a span { display: block; transition: transform 0.45s var(--ease-out); }
.nav__links a span:nth-child(2) { position: absolute; top: 100%; left: 0; }
.nav__links a:hover span:nth-child(1) { transform: translateY(-100%); }
.nav__links a:hover span:nth-child(2) { transform: translateY(-100%); }
.nav__right { display: flex; align-items: center; gap: 18px; }
.theme-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.5); display: grid; place-items: center; }
.theme-btn svg { width: 15px; height: 15px; }
@media (max-width: 760px) { .nav__links { display: none; } }

/* Hero */
.hero {
  min-height: 100svh;
  display: grid; grid-template-rows: 1fr auto;
  padding-top: 120px; padding-bottom: 120px;
  position: relative;
}
.hero__top { display: grid; grid-template-columns: 1fr; gap: 40px; align-content: end; }
.hero__kicker { display: flex; gap: 14px; align-items: center; font-family: var(--font-sans); font-size: 14px; letter-spacing: 0; color: var(--ink-3); }
.hero__kicker b { color: var(--ink); font-weight: 500; }
.hero__title { margin-top: 20px; }
.hero__title .line { display: block; }
.hero__whatif {
  margin-top: clamp(28px, 4vw, 48px);
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 18px;
  font-size: clamp(20px, 2.3vw, 32px); letter-spacing: -0.02em; line-height: 1.25; font-weight: 400;
}
.hero__whatif .q { font-family: var(--font-serif); font-style: italic; color: var(--accent); white-space: nowrap; font-size: 1.15em; }
.hero__whatif .rot { display: block; position: relative; height: 1.25em; overflow: hidden; color: var(--ink-2); }
.hero__whatif .rot span { position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform; }
.hero__bottom { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: end; margin-top: clamp(48px, 8vw, 100px); }
.hero__lead { max-width: 56ch; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.75; }
.hero__lead strong { color: var(--ink); font-weight: 600; }
.hero__meta { display: grid; grid-template-columns: repeat(3, auto); gap: 28px; justify-content: end; font-family: var(--font-sans); font-size: 13px; letter-spacing: 0; color: var(--ink-3); }
.hero__meta div b { display: block; color: var(--ink); font-family: var(--font-sans); font-size: 28px; letter-spacing: -0.03em; text-transform: none; font-weight: 600; line-height: 1; margin-bottom: 8px; }
.hero__scroll { position: absolute; left: var(--gutter); bottom: 44px; font-family: var(--font-sans); font-size: 12px; letter-spacing: 0.04em; color: var(--ink-3); display: flex; align-items: center; gap: 10px; }
.hero__scroll i { width: 1px; height: 40px; background: var(--ink-3); position: relative; overflow: hidden; display: block; }
.hero__scroll i::after { content: ""; position: absolute; inset: 0; background: var(--accent); animation: scrollline 1.8s var(--ease-in-out) infinite; }
@keyframes scrollline { 0% { transform: translateY(-100%);} 50% { transform: translateY(0);} 100% { transform: translateY(100%);} }
@media (max-width: 860px) {
  .hero__bottom { grid-template-columns: 1fr; }
  .hero__meta { justify-content: start; }
  .hero__scroll { display: none; }
}

/* Marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 18px 0; white-space: nowrap; }
.marquee__track { display: inline-flex; gap: 48px; will-change: transform; }
.marquee__track span { font-size: clamp(20px, 2.4vw, 34px); letter-spacing: -0.03em; display: inline-flex; align-items: center; gap: 48px; }
.marquee__track span i { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; display: inline-block; }
.marquee__track em { font-family: var(--font-serif); font-style: italic; color: var(--ink-3); }

/* Strengths (판단) */
.judge { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.judge__sticky { position: sticky; top: 120px; }
.judge__list { display: grid; gap: 0; }
.judge__item { padding: 40px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 64px 1fr; gap: 20px; }
.judge__item:last-child { border-bottom: 1px solid var(--line); }
.judge__num { font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--accent); padding-top: 8px; }
.judge__item h3 { font-size: clamp(22px, 2.4vw, 32px); margin-bottom: 14px; }
.judge__item p { margin: 0; color: var(--ink-2); max-width: 56ch; }
.judge__item .ev { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-family: var(--font-sans); font-size: 12px; font-weight: 500; letter-spacing: 0; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink-2); }
.tag--accent { border-color: var(--accent); color: var(--accent); }
@media (max-width: 900px) { .judge { grid-template-columns: 1fr; } .judge__sticky { position: static; } }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: clamp(48px, 8vw, 96px); }
.stat { padding: 32px 28px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-size: clamp(36px, 4.4vw, 64px); letter-spacing: -0.045em; line-height: 1; font-weight: 600; }
.stat b small { font-size: 0.45em; letter-spacing: -0.02em; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.stat span { display: block; margin-top: 10px; font-size: 14px; color: var(--ink-3); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* Bento skills */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(150px, auto); gap: 14px; }
.bento__cell {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  transition: transform 0.6s var(--ease-out), border-color 0.4s;
  position: relative; overflow: hidden;
}
.bento__cell:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.bento__cell h4 { font-size: 18px; letter-spacing: -0.02em; }
.bento__cell p { margin: 0; font-size: 14px; color: var(--ink-2); }
.bento__cell .mono { color: var(--ink-3); }
.bento__cell--dark { background: var(--ink); color: var(--paper); border-color: transparent; }
.bento__cell--dark p { color: rgba(243,240,232,0.7); }
[data-theme="dark"] .bento__cell--dark { background: var(--paper-3); color: var(--ink); }
[data-theme="dark"] .bento__cell--dark p { color: var(--ink-2); }
.bento__cell--accent { background: var(--accent); color: #fff; border-color: transparent; }
.bento__cell--accent p, .bento__cell--accent .mono { color: rgba(255,255,255,0.85); }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; }
.row-2 { grid-row: span 2; }
.bento__big { font-size: clamp(40px, 5vw, 72px); letter-spacing: -0.045em; line-height: 0.95; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-family: var(--font-sans); font-size: 12px; font-weight: 500; letter-spacing: 0; padding: 6px 10px; background: var(--paper-2); border-radius: 8px; }
.bento__cell--dark .chips span { background: rgba(255,255,255,0.1); }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, 1fr); } .span-2, .span-3, .span-4 { grid-column: span 2; } }

/* Projects index */
.pindex { display: grid; gap: 0; border-top: 1px solid var(--line); }
.pindex a {
  display: grid; grid-template-columns: 60px 1fr auto auto; gap: 24px; align-items: center;
  padding: 28px 0; border-bottom: 1px solid var(--line);
  transition: padding 0.5s var(--ease-out);
}
.pindex a:hover { padding-left: 16px; }
.pindex a .n { font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--ink-3); }
.pindex a .t { font-size: clamp(22px, 3vw, 40px); letter-spacing: -0.035em; font-weight: 600; }
.pindex a .t em { font-family: var(--font-sans); font-style: normal; font-weight: 400; color: var(--ink-3); margin-left: 12px; font-size: 0.5em; }
.pindex a .d { font-family: var(--font-sans); font-size: 13px; color: var(--ink-3); letter-spacing: 0; }
.pindex a .arrow { width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; transition: background 0.4s, color 0.4s, transform 0.5s var(--ease-out); }
.pindex a:hover .arrow { background: var(--accent); color: #fff; border-color: var(--accent); transform: rotate(-45deg); }
@media (max-width: 700px) { .pindex a { grid-template-columns: 40px 1fr auto; } .pindex a .d { display: none; } }

/* Case study */
.case { padding-block: clamp(80px, 12vw, 160px); border-top: 1px solid var(--line); }
.case__grid { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.case__aside { position: sticky; top: 110px; }
.case__num { font-family: var(--font-sans); font-size: 13px; font-weight: 600; letter-spacing: 0.01em; color: var(--accent); margin-bottom: 20px; display: flex; gap: 12px; align-items: center; }
.case__num::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.case__title { font-size: clamp(34px, 4.2vw, 60px); letter-spacing: -0.04em; line-height: 1; }
.case__title em { display: block; font-family: var(--font-sans); font-style: normal; font-weight: 400; font-size: 0.42em; color: var(--ink-3); margin-top: 12px; letter-spacing: -0.01em; }
.case__meta { margin-top: 32px; display: grid; gap: 14px; font-size: 14px; }
.case__meta div { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.case__meta dt { font-family: var(--font-sans); font-size: 12.5px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); padding-top: 2px; }
.case__meta dd { margin: 0; color: var(--ink-2); }
.case__links { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
  transition: background 0.4s, color 0.4s, border-color 0.4s, transform 0.5s var(--ease-out);
  position: relative; overflow: hidden;
}
.btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--accent:hover { background: var(--ink); border-color: var(--ink); }
.btn svg { width: 14px; height: 14px; }
.btn--ghost { border-color: transparent; padding-left: 0; }
.btn--ghost:hover { background: transparent; color: var(--accent); border-color: transparent; }

.case__body { display: grid; gap: clamp(40px, 6vw, 72px); min-width: 0; }
.case__hook { font-size: clamp(24px, 2.8vw, 40px); letter-spacing: -0.035em; line-height: 1.22; font-weight: 500; }
.case__hook em { font-family: var(--font-serif-kr); font-style: normal; font-weight: 600; color: var(--accent); }
.story { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.story__step { padding-top: 18px; border-top: 1px solid var(--line-strong); }
.story__step .mono { color: var(--accent); display: block; margin-bottom: 12px; }
.story__step h4 { font-size: 18px; margin-bottom: 8px; letter-spacing: -0.02em; }
.story__step p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
@media (max-width: 1100px) { .story { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .case__grid { grid-template-columns: 1fr; } .case__aside { position: static; } }

.prose { max-width: 66ch; color: var(--ink-2); font-size: 16.5px; line-height: 1.75; }
.prose p { margin: 0 0 1.2em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose h4 { font-size: 20px; color: var(--ink); margin: 2em 0 0.7em; letter-spacing: -0.02em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.5em; }
.callout { border-left: 2px solid var(--accent); padding: 4px 0 4px 20px; margin: 1.6em 0; color: var(--ink); font-size: 18px; letter-spacing: -0.02em; line-height: 1.5; }
.callout em { font-family: var(--font-serif-kr); font-style: normal; font-weight: 600; }

/* Media */
.media { border-radius: var(--radius); overflow: hidden; background: var(--paper-2); position: relative; }
.media--video { aspect-ratio: 16/9; cursor: pointer; }
.media--video img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.media--video:hover img { transform: scale(1.04); }
.media--video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media__play { position: absolute; inset: 0; display: grid; place-items: center; }
.media__play i { width: 76px; height: 76px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; box-shadow: 0 20px 50px -20px rgba(0,0,0,0.5); transition: transform 0.5s var(--ease-out), background 0.4s; }
.media__play i svg { width: 22px; height: 22px; margin-left: 3px; fill: var(--ink); }
.media--video:hover .media__play i { transform: scale(1.1); background: var(--accent); }
.media--video:hover .media__play i svg { fill: #fff; }
.media__cap { position: absolute; left: 16px; bottom: 16px; font-family: var(--font-sans); font-size: 12px; font-weight: 500; letter-spacing: 0; color: #fff; background: rgba(0,0,0,0.45); padding: 6px 10px; border-radius: 6px; backdrop-filter: blur(6px); }
.media-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.media-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .media-grid, .media-grid--3 { grid-template-columns: 1fr; } }
.media-note { margin-top: 12px; font-family: var(--font-sans); font-size: 13px; color: var(--ink-3); }

/* Phones */
.phones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: end; }
.phone { border-radius: 30px; overflow: hidden; background: var(--paper-2); border: 1px solid var(--line); box-shadow: var(--shadow); aspect-ratio: 1206/2622; }
.phone img { width: 100%; height: 100%; object-fit: cover; }
.phone--up { transform: translateY(-24px); }
.phones__cap { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; font-family: var(--font-sans); font-size: 13px; color: var(--ink-3); }
@media (max-width: 760px) { .phones, .phones__cap { grid-template-columns: repeat(2, 1fr); } .phone--up { transform: none; } }

.shot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--card); }
.shot img { width: 100%; }
.shot--dark { background: #0b0b0d; }

/* Feature list */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px; transition: transform 0.5s var(--ease-out), border-color 0.3s; }
.feature:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.feature .mono { color: var(--accent); display: block; margin-bottom: 10px; }
.feature h4 { font-size: 16px; margin-bottom: 8px; letter-spacing: -0.02em; }
.feature p { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* Deep dive (details) */
.deep { border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.deep > summary {
  list-style: none; cursor: pointer; padding: 24px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-weight: 600; font-size: 18px; letter-spacing: -0.02em;
}
.deep > summary::-webkit-details-marker { display: none; }
.deep > summary .mono { color: var(--ink-3); font-weight: 400; margin-left: 8px; font-size: 13px; }
.deep > summary i { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; transition: transform 0.5s var(--ease-out), background 0.3s; flex: none; }
.deep > summary i::before { content: "+"; font-weight: 400; font-size: 20px; line-height: 1; }
.deep[open] > summary i { transform: rotate(45deg); background: var(--ink); color: var(--paper); border-color: var(--ink); }
.deep__body { padding: 0 28px 32px; border-top: 1px solid var(--line); }
.deep__cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; padding-top: 28px; }
.deep__cols > * { min-width: 0; }
@media (max-width: 900px) { .deep__cols { grid-template-columns: 1fr; } }
.arch {
  max-width: 100%;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; letter-spacing: 0;
  background: var(--ink); color: var(--paper); padding: 24px; border-radius: var(--radius-sm);
  overflow-x: auto; white-space: pre; margin: 0;
}
[data-theme="dark"] .arch { background: #000; }
.arch .k { color: #ffb08a; }
.arch .c { color: #7f7c74; }
.speclist { display: grid; gap: 0; font-size: 14px; }
.speclist div { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.speclist dt { font-family: var(--font-sans); font-size: 12.5px; font-weight: 500; color: var(--ink-3); padding-top: 2px; }
.speclist dd { margin: 0; color: var(--ink-2); }
.speclist dd code { font-family: var(--font-sans); font-size: 13px; background: var(--paper-2); padding: 1px 6px; border-radius: 4px; }
.incident { display: grid; gap: 12px; margin-top: 18px; }
.incident div { display: grid; grid-template-columns: 24px 1fr; gap: 12px; font-size: 14px; color: var(--ink-2); }
.incident div b { color: var(--ink); font-weight: 600; }
.incident div i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font-style: normal; font-family: var(--font-sans); font-size: 11px; font-weight: 600; display: grid; place-items: center; margin-top: 2px; }

/* Photo dock (사진 첨부 공간) */
.dock { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 24px; }
.dock__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.dock__head h4 { font-size: 16px; letter-spacing: -0.02em; }
.dock__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.dock__item { aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; background: var(--paper-2); position: relative; cursor: pointer; }
.dock__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.dock__item:hover img { transform: scale(1.05); }
.dock__item--empty { display: grid; place-items: center; cursor: default; }
.dock__item--empty span { font-family: var(--font-sans); font-size: 12px; letter-spacing: 0; color: var(--ink-3); text-align: center; padding: 10px; line-height: 1.5; }
.dock__item--empty::before { content: ""; position: absolute; inset: 10px; border: 1px dashed var(--line); border-radius: 8px; }
@media (max-width: 760px) { .dock__grid { grid-template-columns: repeat(2, 1fr); } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 9990; background: rgba(10,10,12,0.92); display: none; align-items: center; justify-content: center; padding: 40px; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }
.lightbox button { position: absolute; top: 24px; right: 28px; color: #fff; font-family: var(--font-sans); font-size: 14px; }

/* Small projects */
.small-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.small {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  display: flex; flex-direction: column; gap: 14px; min-height: 260px;
  transition: transform 0.5s var(--ease-out), border-color 0.3s;
}
.small:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.small .mono { color: var(--ink-3); display: flex; justify-content: space-between; }
.small h4 { font-size: 20px; letter-spacing: -0.025em; }
.small h4 em { font-family: var(--font-sans); font-style: normal; font-weight: 400; color: var(--ink-3); font-size: 0.75em; }
.small p { margin: 0; font-size: 14px; color: var(--ink-2); flex: 1; }
.small .chips span { font-size: 10.5px; }
@media (max-width: 900px) { .small-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .small-grid { grid-template-columns: 1fr; } }

/* Timeline */
.timeline { position: relative; margin-top: 40px; }
.timeline__track { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 20px; scrollbar-width: none; }
.timeline__track::-webkit-scrollbar { display: none; }
.tl { flex: 0 0 min(320px, 80vw); scroll-snap-align: start; padding: 0 28px 0 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--line-strong); }
.tl::after { content: ""; position: absolute; left: 0; top: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.tl--accent::after { background: var(--accent); border-color: var(--accent); }
.tl .date { font-family: var(--font-sans); font-size: 12.5px; font-weight: 500; color: var(--ink-3); margin-top: 28px; display: block; }
.tl h4 { font-size: 18px; margin-top: 8px; letter-spacing: -0.02em; }
.tl p { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-2); max-width: 30ch; }
.timeline__hint { font-family: var(--font-sans); font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }

/* Contact */
.contact { background: var(--ink); color: var(--paper); border-radius: var(--radius) var(--radius) 0 0; }
[data-theme="dark"] .contact { background: var(--paper-2); color: var(--ink); }
.contact .eyebrow { color: rgba(243,240,232,0.6); }
.contact .eyebrow::before { background: rgba(243,240,232,0.6); }
[data-theme="dark"] .contact .eyebrow { color: var(--ink-3); }
.contact__title { font-size: clamp(40px, 8vw, 128px); letter-spacing: -0.045em; line-height: 0.95; }
.contact__title em { color: var(--accent); }
.contact__row { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; margin-top: clamp(40px, 6vw, 80px); }
.contact__mail { font-size: clamp(20px, 3vw, 40px); letter-spacing: -0.03em; font-weight: 500; display: inline-block; position: relative; }
.contact__mail::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease-out); }
.contact__mail:hover::after { transform: scaleX(1); }
.contact__links { display: flex; gap: 22px; font-family: var(--font-sans); font-size: 14px; font-weight: 500; opacity: 0.85; }
.footer { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 40px 0 0; margin-top: 80px; border-top: 1px solid rgba(243,240,232,0.15); font-family: var(--font-sans); font-size: 12.5px; opacity: 0.55; }
@media (max-width: 760px) { .contact__row { grid-template-columns: 1fr; } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .grain, .cursor { display: none; }
  .reveal-line > span { transform: none; }
  .fade-up { opacity: 1; transform: none; }
  .mask-img img { transform: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Mobile refinements */
@media (max-width: 700px) {
  .hero__kicker { flex-wrap: wrap; row-gap: 6px; }
  .hero__whatif { display: block; font-size: 20px; }
  .hero__whatif .q { display: block; margin-bottom: 6px; font-size: 26px; }
  .hero__whatif .rot { height: 2.6em; }
  .hero__whatif .rot span { white-space: normal; line-height: 1.3; right: 0; }
  .hero { padding-bottom: 64px; }
  .h-display { font-size: clamp(40px, 12vw, 64px); }
  .case__hook { font-size: 24px; }
  .story { grid-template-columns: 1fr; }
  .dock__grid { grid-template-columns: repeat(2, 1fr); }
  .deep > summary { padding: 18px 20px; font-size: 16px; }
  .deep__body { padding: 0 20px 24px; }
  .arch { font-size: 11px; }
  .speclist div { grid-template-columns: 90px 1fr; }
}


/* 성과 스트립 */
.outcome { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.outcome div { background: var(--paper-2); border-radius: var(--radius-sm); padding: 22px 22px 20px; }
.outcome b { display: block; font-size: clamp(30px, 3.2vw, 44px); letter-spacing: -0.04em; line-height: 1; font-weight: 600; }
.outcome b small { font-size: 0.5em; font-weight: 500; color: var(--ink-3); margin-left: 3px; letter-spacing: -0.01em; }
.outcome span { display: block; margin-top: 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 700px) { .outcome { grid-template-columns: 1fr; } }

/* 흐름도 (구조 설명) */
.flow { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 0; align-items: start; margin: 8px 0 28px; }
.flow__col { position: relative; padding-right: 36px; }
.flow__col:last-child { padding-right: 0; }
.flow__col:not(:last-child)::after {
  content: ""; position: absolute; right: 10px; top: 46px; width: 16px; height: 16px;
  border-top: 1.5px solid var(--ink-3); border-right: 1.5px solid var(--ink-3); transform: rotate(45deg);
}
.flow__col:not(:last-child)::before { content: ""; position: absolute; right: 8px; top: 53px; width: 28px; height: 1.5px; background: var(--ink-3); }
.flow__head { font-size: 12.5px; font-weight: 500; color: var(--ink-3); margin-bottom: 10px; min-height: 18px; }
.flow__node { background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.flow__node b { display: block; font-size: 14.5px; letter-spacing: -0.02em; margin-bottom: 3px; }
.flow__node span { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.flow__node--accent { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.flow__node--dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.flow__node--dark span { color: rgba(243,240,232,0.7); }
[data-theme="dark"] .flow__node--dark { background: var(--paper-3); color: var(--ink); border-color: var(--paper-3); }
[data-theme="dark"] .flow__node--dark span { color: var(--ink-3); }
.flow__note { font-size: 13px; color: var(--ink-3); margin-top: -12px; margin-bottom: 24px; }
@media (max-width: 800px) {
  .flow { grid-template-columns: 1fr; }
  .flow__col { padding-right: 0; padding-bottom: 34px; }
  .flow__col:last-child { padding-bottom: 0; }
  .flow__col:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: 8px; transform: translateX(-50%) rotate(135deg); }
  .flow__col:not(:last-child)::before { right: auto; left: 50%; top: auto; bottom: 10px; width: 1.5px; height: 24px; transform: translateX(-50%); }
}
.deep__cols { grid-template-columns: 1fr; }

/* 서브 섹션 (AI Support) */
.sub { display: grid; gap: 24px; padding: 32px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card); }
.sub__head { max-width: 72ch; }
.sub__head .mono { display: block; margin-bottom: 12px; }
.sub__head h3 { margin-bottom: 14px; }
.sub__head h3 em { color: var(--accent); }
.sub__head p { margin: 0; color: var(--ink-2); line-height: 1.7; font-size: 15.5px; }
.sub__head p strong { color: var(--ink); }
.sub .media-note { margin-top: -8px; }
.sub .features { margin-top: 6px; }
.sub .feature { background: var(--paper); }
[data-theme="dark"] .sub .feature { background: var(--paper-2); }
@media (max-width: 700px) { .sub { padding: 20px; } }

/* 앱 선반 */
.apps { padding: 8px 0 clamp(48px, 7vw, 96px); }
.apps__head { text-align: center; margin-bottom: 22px; }
.apps__row { display: flex; justify-content: center; gap: clamp(14px, 3vw, 40px); flex-wrap: wrap; }
.app { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 108px; position: relative; }
.app__icon { width: 84px; height: 84px; border-radius: 22px; overflow: hidden; box-shadow: 0 18px 40px -18px rgba(14,14,16,0.45); transition: transform 0.5s var(--ease-out), box-shadow 0.5s; background: var(--card); }
.app__icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app:hover .app__icon { transform: translateY(-6px) scale(1.04); box-shadow: 0 26px 50px -20px rgba(14,14,16,0.55); }
.app.is-active .app__icon { transform: translateY(-6px) scale(1.06); outline: 3px solid var(--accent); outline-offset: 3px; }
.app__name { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.app::after { content: ""; position: absolute; left: 50%; bottom: -30px; width: 10px; height: 10px; background: var(--card); border-left: 1px solid var(--line-strong); border-top: 1px solid var(--line-strong); transform: translateX(-50%) rotate(45deg); opacity: 0; transition: opacity 0.3s; }
.app.is-active::after { opacity: 1; }
.app-card { margin: 26px auto 0; max-width: 820px; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 26px; display: grid; grid-template-columns: 96px 1fr; gap: 22px; position: relative; box-shadow: var(--shadow); }
.app-card[hidden] { display: none; }
.app-card__icon { width: 96px; height: 96px; border-radius: 24px; overflow: hidden; }
.app-card__icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-card__top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.app-card__top h3 { font-size: 24px; letter-spacing: -0.03em; }
.app-card p { margin: 0 0 14px; color: var(--ink-2); line-height: 1.65; }
.app-card .chips { margin-bottom: 16px; }
.app-card__links { display: flex; gap: 10px; flex-wrap: wrap; }
.app-card__close { position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 12px; display: grid; place-items: center; }
@media (max-width: 600px) { .app-card { grid-template-columns: 1fr; } .app { width: 84px; } .app__icon { width: 68px; height: 68px; border-radius: 18px; } }

/* 프로필 */
.profile { display: grid; grid-template-columns: minmax(280px, 1fr) 1.6fr; gap: 14px; margin-top: 14px; }
.profile__col { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 22px; align-content: start; }
.profile__block .mono { display: block; margin-bottom: 8px; }
.profile__block h4 { font-size: 18px; letter-spacing: -0.02em; line-height: 1.3; margin-bottom: 6px; }
.profile__block h4 small { display: block; font-size: 13px; font-weight: 400; color: var(--ink-3); margin-top: 2px; }
.profile__block p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.profile__col--wide > .mono { display: block; margin-bottom: 4px; }
.cap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cap { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }
[data-theme="dark"] .cap { background: var(--paper-2); }
.cap h4 { font-size: 15px; letter-spacing: -0.02em; margin-bottom: 6px; }
.cap p { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
@media (max-width: 900px) { .profile { grid-template-columns: 1fr; } .cap-grid { grid-template-columns: 1fr; } }

/* 챕터 */
.chapter { display: grid; grid-template-columns: 110px 1fr; gap: 20px; align-items: start; padding: 22px 0 18px; }
.chapter--2 { margin-top: 56px; }
.chapter__n { font-size: 12.5px; font-weight: 600; color: var(--accent); letter-spacing: 0.02em; padding-top: 6px; }
.chapter h3 { font-size: clamp(20px, 2.2vw, 26px); letter-spacing: -0.025em; margin-bottom: 6px; }
.chapter p { margin: 0; font-size: 14px; color: var(--ink-2); max-width: 70ch; }
@media (max-width: 600px) { .chapter { grid-template-columns: 1fr; gap: 6px; } }
.band { margin-top: clamp(40px, 8vw, 96px); padding: clamp(36px, 5vw, 64px) clamp(28px, 4vw, 56px); border-radius: var(--radius); background: var(--ink); color: var(--paper); }
[data-theme="dark"] .band { background: var(--paper-2); color: var(--ink); }
.band__n { display: block; font-size: 12.5px; font-weight: 600; color: var(--accent); margin-bottom: 14px; letter-spacing: 0.02em; }
.band h3 { font-size: clamp(26px, 3.6vw, 44px); letter-spacing: -0.035em; line-height: 1.1; margin-bottom: 14px; }
.band h3 em { color: var(--accent); font-size: 0.7em; margin-left: 10px; font-family: var(--font-sans); font-style: normal; font-weight: 500; }
.band p { margin: 0; max-width: 62ch; color: rgba(243,240,232,0.75); font-size: 15.5px; line-height: 1.65; }
[data-theme="dark"] .band p { color: var(--ink-2); }
.band--2 { background: var(--accent); color: #fff; }
.band--2 .band__n, .band--2 h3 em { color: rgba(255,255,255,0.8); }
.band--2 p { color: rgba(255,255,255,0.85); }
[data-theme="dark"] .band--2 { background: var(--accent); color: #fff; }
[data-theme="dark"] .band--2 p { color: rgba(255,255,255,0.85); }

.apps__note { text-align: center; max-width: 60ch; margin: 22px auto 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.6; }
.media-grid .shot img { width: 100%; }
.media-grid--mail .shot { max-height: 560px; overflow: hidden; position: relative; cursor: pointer; }
.media-grid--mail .shot::after { content: "클릭해서 전체 보기"; position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 0 14px; text-align: center; font-size: 12.5px; color: var(--ink-2); background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, var(--card) 70%); pointer-events: none; }

/* 브랜드 섹션 */
.apps__head { text-align: center; margin-bottom: 30px; }
.apps__head .eyebrow { margin-bottom: 18px; }
.brand__title { max-width: 22ch; margin: 0 auto 18px; }
.brand__lede { max-width: 66ch; margin: 0 auto 18px; color: var(--ink-2); font-size: 15.5px; line-height: 1.75; }
.touch { margin-top: clamp(40px, 6vw, 72px); }
.touch__head { margin-bottom: 18px; }
.touch__head .mono { display: block; margin-bottom: 8px; }
.touch__head h3 { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.03em; }
.touch__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.touch__cell { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 16px; display: grid; gap: 4px; align-content: start; transition: transform 0.5s var(--ease-out), border-color 0.3s; }
.touch__cell:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.touch__n { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 6px; }
.touch__cell b { font-size: 16px; letter-spacing: -0.02em; }
.touch__cell > span:not(.touch__n) { font-size: 12.5px; color: var(--ink-3); }
.touch__cell p { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 1000px) { .touch__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .touch__grid { grid-template-columns: repeat(2, 1fr); } }
