/* ── tokens ─────────────────────────────── */
:root {
  --paper: #f1efe7;
  --ink: #0b0b0b;
  --acid: #d4ff00;
  --mute: #6b6a64;
  --line: rgba(11, 11, 11, 0.14);
  --display: 'Anton', 'Black Han Sans', 'Noto Sans KR', Impact, sans-serif;
  --ko-display: 'Black Han Sans', 'Anton', 'Noto Sans KR', sans-serif;
  --body: 'Archivo', 'Noto Sans KR', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Noto Sans KR', ui-monospace, monospace;
  --gut: clamp(16px, 3vw, 40px);
  --border: 2px solid var(--ink);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  word-break: keep-all;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
::selection { background: var(--acid); color: var(--ink); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
:focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); }

/* ── grid lines ─────────────────────────── */
.gridlines {
  position: fixed; inset: 0 var(--gut); z-index: 0; pointer-events: none;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.gridlines i { border-left: 1px solid var(--line); }
.gridlines i:last-child { position: absolute; right: 0; top: 0; bottom: 0; }
main, .footer { position: relative; z-index: 1; }
main { overflow-x: clip; }

/* ── loader ─────────────────────────────── */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; justify-content: space-between; padding: var(--gut);
}
.loader-top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; }
.loader-count { font-family: var(--display); font-size: clamp(120px, 34vw, 520px); line-height: 0.8; display: flex; align-items: flex-start; }
.loader-count i { font-style: normal; font-size: 0.25em; color: var(--acid); margin-left: 0.1em; }
.loader-bar { height: 6px; background: #222; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--acid); }

/* ── cursor ─────────────────────────────── */
.cursor, .cursor-dot { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 90; display: none; }
.cursor {
  width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  border: 1.5px solid #fff; mix-blend-mode: difference;
  display: none; align-items: center; justify-content: center;
  transition: width 0.3s, height 0.3s, margin 0.3s, background 0.3s, border-radius 0.3s;
}
.cursor-label { font: 700 12px/1 var(--mono); color: var(--ink); opacity: 0; transition: opacity 0.2s; white-space: nowrap; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--acid); border-radius: 50%; mix-blend-mode: difference; }
.has-cursor .cursor { display: flex; }
.has-cursor .cursor-dot { display: block; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.cursor.is-link { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: var(--acid); border-color: var(--acid); mix-blend-mode: normal; }
.cursor.is-link .cursor-label { opacity: 1; }
.cursor.is-text { width: 6px; height: 64px; margin: -32px 0 0 -3px; border-radius: 0; background: #fff; }

/* ── progress ───────────────────────────── */
.progress { position: fixed; left: 0; right: 0; top: 0; height: 4px; z-index: 60; }
.progress i { display: block; height: 100%; background: var(--acid); transform-origin: 0 50%; transform: scaleX(0); border-right: 2px solid var(--ink); }

/* ── topbar ─────────────────────────────── */
.topbar {
  position: fixed; top: 4px; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gut); color: #fff; mix-blend-mode: difference;
  font-family: var(--mono); font-size: 12px; text-transform: uppercase;
}
.brand { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; }
.brand-mark { color: #2b00ff; /* difference → acid-ish */ }
.nav { display: flex; gap: 22px; }
.nav a { position: relative; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.35s; }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.clock b { font-weight: 700; }

/* ── hero ───────────────────────────────── */
.hero { min-height: 100svh; padding: 110px var(--gut) var(--gut); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.hero-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tag-acid { background: var(--acid); border: var(--border); padding: 6px 12px; font-weight: 700; font-size: 14px; box-shadow: 4px 4px 0 var(--ink); }
.hero-title {
  font-family: var(--ko-display); font-weight: 400;
  font-size: clamp(56px, 12.6vw, 230px); line-height: 0.92; letter-spacing: -0.02em;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.04em; white-space: nowrap; }
.hero-title .line:nth-child(2) { padding-left: 12vw; }
.hero-title .line:nth-child(3) { color: var(--paper); -webkit-text-stroke: 2px var(--ink); }
.hero-title .line:nth-child(3) .num { color: var(--ink); background: var(--acid); -webkit-text-stroke: 0; padding: 0 0.08em; display: inline-block; }
.char { display: inline-block; will-change: transform; }
.hero-foot { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--gut); align-items: end; border-top: var(--border); padding-top: 20px; }
.hero-intro p { font-size: clamp(15px, 1.3vw, 19px); max-width: 38em; }
.hero-intro b { background: var(--acid); padding: 0 4px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: var(--border); }
.hero-stats div { padding: 12px 14px; border-left: var(--border); }
.hero-stats div:first-child { border-left: 0; }
.hero-stats dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--mute); }
.hero-stats dd { font-family: var(--display); font-size: clamp(32px, 4vw, 64px); line-height: 1; }

/* ── marquee ────────────────────────────── */
.marquee { overflow: hidden; border-block: var(--border); white-space: nowrap; position: relative; z-index: 2; }
.marquee-track { display: inline-flex; will-change: transform; }
.marquee-track span { font-family: var(--display); font-size: clamp(36px, 6vw, 92px); line-height: 1.15; padding: 0 0.35em; display: inline-flex; align-items: center; gap: 0.35em; text-transform: uppercase; }
.marquee-track span::after { content: '✳'; font-size: 0.5em; }
.marquee--acid { background: var(--acid); transform: rotate(-2deg) scale(1.04); margin-top: 20px; }
.marquee--ink { background: var(--ink); color: var(--paper); transform: rotate(1.5deg) scale(1.04); margin-top: -8px; }
.marquee--ink .marquee-track span { -webkit-text-stroke: 1.5px var(--paper); color: transparent; }
.marquee--big { background: var(--paper); }
.marquee--big .marquee-track span { font-size: clamp(60px, 13vw, 200px); }

/* ── section head ───────────────────────── */
.sec-head { display: grid; grid-template-columns: 120px 1fr; gap: 8px var(--gut); padding: 0 var(--gut); margin-bottom: 40px; }
.sec-num { padding-top: 0.8em; }
.sec-title { font-family: var(--ko-display); font-weight: 400; font-size: clamp(48px, 9vw, 150px); line-height: 0.95; letter-spacing: -0.01em; }
.sec-title em { font-style: normal; font-family: var(--display); background: var(--acid); padding: 0 0.1em; display: inline-block; }
.sec-title .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.05em; }
.sec-lead { grid-column: 2; max-width: 40em; font-size: 17px; color: #333; }

/* ── index list ─────────────────────────── */
.index { padding: 140px 0 120px; }
.index-list { border-top: var(--border); margin: 0 var(--gut); }
.index-row a {
  position: relative; display: grid; grid-template-columns: 60px 1.4fr 1fr 1fr 110px; align-items: center; gap: 16px;
  padding: 18px 8px; border-bottom: var(--border); overflow: hidden; isolation: isolate;
}
.index-row a::before { content: ''; position: absolute; inset: 0; background: var(--c); transform: scaleY(0); transform-origin: bottom; transition: transform 0.45s cubic-bezier(0.7, 0, 0.2, 1); z-index: -1; }
.index-row a:hover::before, .index-row a:focus-visible::before { transform: scaleY(1); }
.index-row .i-num { font-family: var(--mono); font-size: 13px; }
.index-row .i-title { font-family: var(--display); font-size: clamp(28px, 4.2vw, 64px); line-height: 1; text-transform: uppercase; transition: transform 0.45s cubic-bezier(0.7, 0, 0.2, 1); }
.index-row a:hover .i-title { transform: translateX(16px); }
.index-row .i-kicker { font-weight: 700; }
.index-row .i-cat { font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: #444; }
.index-row .i-star { font-family: var(--display); font-size: 28px; text-align: right; }
.index-preview {
  position: fixed; left: 0; top: 0; width: 300px; height: 380px; z-index: 40; pointer-events: none;
  opacity: 0; transform: scale(0.6); border: var(--border); box-shadow: 10px 10px 0 var(--ink); overflow: hidden;
}
.index-preview-inner { width: 100%; height: 100%; }
.pv { width: 100%; height: 100%; background: var(--c); padding: 18px; display: flex; flex-direction: column; justify-content: space-between; color: var(--fg); }
.pv-num { font-family: var(--display); font-size: 160px; line-height: 0.8; }
.pv-title { font-family: var(--display); font-size: 34px; line-height: 1; text-transform: uppercase; }
.pv-lang { display: flex; height: 14px; border: 2px solid currentColor; }
.pv-lang i { display: block; height: 100%; }

/* ── horizontal work ────────────────────── */
.work { position: relative; background: var(--ink); }
.work-pin { position: relative; height: 100vh; overflow: hidden; }
.work-track { display: flex; height: 100%; width: max-content; will-change: transform; }
.panel { position: relative; width: 100vw; height: 100vh; flex: none; overflow: hidden; }
.panel--intro { color: var(--paper); display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: 0 var(--gut); }
.panel-intro-title { font-family: var(--display); font-weight: 400; font-size: clamp(110px, 26vw, 420px); line-height: 0.82; color: var(--acid); }
.panel-intro-title .ko { font-family: var(--ko-display); font-size: 0.32em; color: var(--paper); }
.project {
  background: var(--c); color: var(--fg); padding: 96px var(--gut) 64px;
  display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: auto 1fr auto; gap: 20px var(--gut);
  border-left: 2px solid var(--ink);
}
.project-bgnum {
  position: absolute; right: -0.04em; bottom: -0.17em; font-family: var(--display); font-size: 78vh; line-height: 1;
  color: transparent; -webkit-text-stroke: 2px var(--fg); opacity: 0.35; pointer-events: none; z-index: 0;
}
.project > :not(.project-bgnum) { position: relative; z-index: 1; }
.project-top { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--fg); padding-bottom: 10px; }
.project-head { grid-column: 1; align-self: center; }
.project-title { font-family: var(--display); font-weight: 400; font-size: clamp(64px, 10.5vw, 190px); line-height: 0.88; text-transform: uppercase; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.project-title .char { transform-origin: 50% 100%; }
.project-kicker { font-family: var(--ko-display); font-size: clamp(22px, 2.4vw, 38px); margin-top: 14px; }
.project-side { grid-column: 2; grid-row: 2 / 4; align-self: end; background: var(--paper); color: var(--ink); border: var(--border); box-shadow: 10px 10px 0 var(--ink); padding: 22px; display: flex; flex-direction: column; gap: 16px; max-width: 520px; justify-self: end; width: 100%; }
.project-desc { font-size: 16px; }
.project-stars { display: flex; align-items: baseline; justify-content: space-between; border-block: var(--border); padding: 6px 0; }
.project-stars b { font-family: var(--display); font-weight: 400; font-size: clamp(48px, 5vw, 80px); line-height: 1; }
.lang-bar { display: flex; height: 18px; border: var(--border); overflow: hidden; }
.lang-bar i { display: block; height: 100%; transform-origin: 0 50%; border-right: 2px solid var(--ink); }
.lang-bar i:last-child { border-right: 0; }
.lang-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-family: var(--mono); font-size: 11px; }
.lang-legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 5px; background: var(--lc); border: 1px solid var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-family: var(--mono); font-size: 12px; border: 2px solid currentColor; padding: 3px 9px; text-transform: uppercase; }
.project-foot { grid-column: 1; align-self: end; display: flex; flex-direction: column; gap: 14px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; font: 700 14px/1 var(--mono); text-transform: uppercase;
  padding: 14px 20px; background: var(--ink); color: var(--paper); border: var(--border);
  box-shadow: 4px 4px 0 var(--acid); transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--acid); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.btn--ghost { background: var(--paper); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.work-hud { position: absolute; left: var(--gut); bottom: 16px; z-index: 5; color: #fff; mix-blend-mode: difference; display: flex; align-items: center; gap: 10px; }
.work-hud-bar { display: block; width: 140px; height: 3px; background: rgba(255, 255, 255, 0.3); }
.work-hud-bar b { display: block; height: 100%; width: 100%; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }

/* ── stack ──────────────────────────────── */
.stack { padding: 140px 0 100px; }
.stack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gut); padding: 0 var(--gut); }
.stack-block { border: var(--border); background: var(--paper); padding: 22px; box-shadow: 8px 8px 0 var(--ink); }
.block-title { font-size: 13px; margin-bottom: 18px; }
.block-title small { color: var(--mute); font-size: inherit; }
.bars li { display: grid; grid-template-columns: 110px 1fr 64px; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.bars .b-name { font-weight: 700; font-size: 14px; }
.bars .b-track { height: 26px; background: repeating-linear-gradient(90deg, transparent 0 9px, var(--line) 9px 10px); border: var(--border); }
.bars .b-fill { display: block; height: 100%; width: var(--w); background: var(--bc); border-right: var(--border); transform-origin: 0 50%; }
.bars .b-val { font-family: var(--display); font-size: 24px; text-align: right; }
.fw-title { padding: 0 var(--gut); margin-top: 56px; }
.fw { display: grid; grid-template-columns: repeat(4, 1fr); border-top: var(--border); border-left: var(--border); margin: 0 var(--gut); }
.fw li { border-right: var(--border); border-bottom: var(--border); padding: 18px; display: flex; flex-direction: column; gap: 6px; min-height: 170px; position: relative; overflow: hidden; transition: background 0.3s; background: var(--paper); }
.fw li:hover { background: var(--acid); }
.fw .fw-mark { font-family: var(--display); font-size: 64px; line-height: 1; }
.fw .fw-name { font-weight: 900; font-size: 18px; margin-top: auto; }
.fw .fw-note { font-size: 13px; color: #444; }

/* ── contact ────────────────────────────── */
.contact { background: var(--ink); color: var(--paper); padding: 120px var(--gut) 80px; display: flex; flex-direction: column; gap: 32px; }
.contact-about { font-size: clamp(20px, 2.4vw, 34px); max-width: 30em; font-weight: 500; line-height: 1.4; }
.contact-title { font-family: var(--display); font-weight: 400; font-size: clamp(90px, 22vw, 380px); line-height: 0.82; display: flex; flex-direction: column; }
.contact-title .outline { color: transparent; -webkit-text-stroke: 2px var(--paper); padding-left: 10vw; }
.contact-title .ko { font-family: var(--ko-display); font-size: 0.4em; color: var(--acid); line-height: 1.1; }
.contact-note { max-width: 36em; font-size: 17px; color: #bbb; }
.contact-links { display: flex; flex-wrap: wrap; gap: 14px; }
.contact-links .btn { font-size: clamp(14px, 1.4vw, 18px); padding: 22px 28px; background: var(--acid); color: var(--ink); box-shadow: 6px 6px 0 var(--paper); }
.contact-links .btn:hover { background: var(--paper); }

/* ── footer ─────────────────────────────── */
.footer { background: var(--acid); border-top: var(--border); overflow: hidden; }
.footer-big { font-family: var(--ko-display); font-size: clamp(48px, 11vw, 200px); line-height: 1; padding: 20px var(--gut) 0; white-space: nowrap; }
.footer-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px var(--gut); border-top: var(--border); }

/* ── mobile / vertical mode ─────────────── */
.is-vertical .work-pin { height: auto; overflow: visible; }
.is-vertical .work-track { flex-direction: column; width: 100%; transform: none !important; }
.is-vertical .panel { width: 100%; height: auto; min-height: 100svh; }
.is-vertical .panel--intro { min-height: 70svh; }
.is-vertical .work-hud { display: none; }

@media (max-width: 900px) {
  .nav { display: none; }
  .hero-foot { grid-template-columns: 1fr; }
  .sec-head { grid-template-columns: 1fr; }
  .sec-lead { grid-column: 1; }
  .index-row a { grid-template-columns: 36px 1fr auto; gap: 4px 12px; }
  .index-row .i-kicker { grid-column: 2; grid-row: 2; font-size: 14px; }
  .index-row .i-cat { display: none; }
  .index-row .i-star { grid-row: 1 / 3; grid-column: 3; font-size: 22px; }
  .project { grid-template-columns: 1fr; grid-template-rows: auto; padding: 80px var(--gut) 48px; }
  .project-head, .project-side, .project-foot { grid-column: 1; grid-row: auto; }
  .project-side { justify-self: stretch; max-width: none; box-shadow: 6px 6px 0 var(--ink); }
  .project-bgnum { font-size: 60vw; bottom: auto; top: 40px; }
  .stack-grid { grid-template-columns: 1fr; }
  .fw { grid-template-columns: repeat(2, 1fr); }
  .fw li { min-height: 140px; }
  .bars li { grid-template-columns: 84px 1fr 52px; }
  .gridlines { grid-template-columns: repeat(2, 1fr); }
  .gridlines i:nth-child(n+3):not(:last-child) { display: none; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 15.5vw; }
  .hero-title .line:nth-child(2) { padding-left: 6vw; }
  .hero-stats dd { font-size: 30px; }
  .clock span { display: none; }
  .contact-links .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .loader { display: none; }
}

/* ── AI Next 편집 훅 (추가분) ─────────────── */
[hidden] { display: none !important; }
.contact-form { display: grid; gap: 12px; max-width: 560px; }
.contact-form input, .contact-form textarea {
  font: inherit; font-size: 16px; width: 100%; padding: 16px 18px; color: var(--paper);
  background: transparent; border: 2px solid var(--paper); border-radius: 0;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #888; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--acid); }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-form button { justify-self: start; cursor: pointer; padding: 18px 28px; background: var(--acid); color: var(--ink); box-shadow: 6px 6px 0 var(--paper); }
.form-status { min-height: 1.4em; color: #bbb; }
