:root {
  color-scheme: light dark;
  --bg: #f4f5f9;
  --surface: #ffffff;
  --ink: #171a2e;
  --muted: #5b6178;
  --line: #dcdfea;
  --accent: #3347ff;
  --accent-ink: #ffffff;
  --code: #e9ebf4;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e1b;
    --surface: #14172a;
    --ink: #e9ecfa;
    --muted: #9aa1bd;
    --line: #262a44;
    --accent: #8795ff;
    --accent-ink: #0c0e1b;
    --code: #1c2038;
  }
}

* { 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(--font);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; width: 100%; }
.foot { margin-top: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ── 상단 바 ── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; gap: 24px;
}
.brand {
  font-weight: 800; font-size: 18px; letter-spacing: -0.04em;
  color: var(--ink); text-decoration: none;
}
.topnav { margin-left: auto; display: flex; gap: 4px; }
.topnav a {
  position: relative; padding: 8px 12px; font-size: 15px; font-weight: 500;
  color: var(--muted); text-decoration: none; transition: color .15s;
}
.topnav a:hover { color: var(--ink); }
.topnav a[aria-current] { color: var(--ink); font-weight: 700; }
.topnav a[aria-current]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px;
  height: 2px; background: var(--accent); border-radius: 2px;
}

/* ── 레이아웃 ── */
.page { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.doc { max-width: 720px; margin: 0 auto; padding: 36px 24px 96px; }

/* ── 홈: 큰 로고 글자 ── */
.hero { padding: clamp(48px, 10vw, 112px) 0 clamp(40px, 7vw, 72px); }
.wordmark {
  margin: 0; font-weight: 800; line-height: 0.92;
  font-size: clamp(64px, 17vw, 200px); letter-spacing: -0.065em;
  animation: settle .8s cubic-bezier(.2,.7,.2,1) both;
}
.tagline { margin: clamp(28px, 4vw, 44px) 0 0; display: grid; gap: 6px; max-width: 28em; }
.tagline-en { font-size: clamp(26px, 4.4vw, 48px); font-weight: 600; letter-spacing: -0.045em; line-height: 1.15; }
.tagline-ko { font-size: clamp(16px, 2vw, 20px); color: var(--muted); letter-spacing: -0.02em; }
.lede { margin: 28px 0 0; font-size: clamp(18px, 2.4vw, 22px); color: var(--muted); max-width: 30em; line-height: 1.6; }
@keyframes settle { from { opacity: 0; letter-spacing: -0.02em; transform: translateY(8px); } to { opacity: 1; } }

.tagline { animation: settle .8s .15s cubic-bezier(.2,.7,.2,1) both; }
.section-title { margin: 0; padding: 14px 0; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--ink); }

/* 목록 행 */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { border-bottom: 1px solid var(--line); }
.rows a {
  display: grid; grid-template-columns: minmax(120px, 220px) 1fr 20px; gap: 16px; align-items: center;
  padding: 26px 4px; color: var(--ink); text-decoration: none;
  transition: padding .2s, background .2s;
}
.rows a:hover { padding-left: 14px; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.rows .name { font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -0.035em; }
.rows .desc { color: var(--muted); font-size: 15px; line-height: 1.5; }
.rows a::after {
  content: ""; width: 9px; height: 9px; justify-self: end;
  border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); transform: rotate(45deg);
}
.block { padding-bottom: clamp(40px, 7vw, 72px); }

.mail {
  display: inline-block; margin-top: 20px; color: var(--ink); text-decoration: none;
  font-size: clamp(24px, 5vw, 44px); font-weight: 800; letter-spacing: -0.04em;
  border-bottom: 3px solid var(--accent); line-height: 1.3;
}
.mail:hover { color: var(--accent); }

/* ── 문서 페이지 ── */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: .5; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }

.subnav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 36px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.subnav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current] { color: var(--ink); font-weight: 700; box-shadow: 0 2px 0 var(--accent); }

.doc h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.2; letter-spacing: -0.045em; font-weight: 800; margin: 0 0 12px; }
.doc h2 { font-size: 22px; line-height: 1.35; letter-spacing: -0.03em; font-weight: 700; margin: 52px 0 14px; padding-top: 28px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 17px; font-weight: 700; margin: 28px 0 8px; letter-spacing: -0.02em; }
.doc p, .doc li { font-size: 16px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li::marker { color: var(--muted); }
.doc hr { display: none; }
.doc .updated { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.doc blockquote { margin: 20px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.doc blockquote p { margin: 8px 0; }
.doc code { background: var(--code); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.doc table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14.5px; display: block; overflow-x: auto; }
.doc th, .doc td { padding: 10px 14px 10px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 700; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.doc .rows a { padding-left: 4px; }

/* ── 푸터 ── */
.foot { border-top: 1px solid var(--line); }
.foot .inner { max-width: 1080px; margin: 0 auto; padding: 28px 24px 56px; color: var(--muted); font-size: 14px; line-height: 1.7; display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; }
.foot a { color: var(--ink); }

@media (max-width: 640px) {
  .topbar .inner { padding: 0 16px; gap: 8px; }
  .page, .foot .inner { padding-left: 16px; padding-right: 16px; }
  .doc { padding: 28px 16px 72px; }
  .rows a { grid-template-columns: 1fr 20px; row-gap: 4px; }
  .rows .desc { grid-column: 1; grid-row: 2; }
  .rows a::after { grid-column: 2; grid-row: 1 / span 2; }
}
@media (prefers-reduced-motion: reduce) {
  .wordmark, .tagline { animation: none; }
  * { transition: none !important; scroll-behavior: auto !important; }
}
