/* XIA — Ataraxia palette (shared with beomsukoh.com Quartz theme and the Ghostty theme) */
:root {
  --light: #ffffff;
  --lightgray: #e6e6e6;
  --gray: #737373;
  --dark: #0f0f0f;
  --accent: #a52142;
  --accent-soft: #c75b75;
  --accent-tint: #efd7dd;
  --ink: #2a3348;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f7f7;
  --panel: color-mix(in srgb, var(--light) 84%, transparent);
  --shadow: 0 12px 40px #080a1014;
  --display: "Newsreader", "Noto Serif KR", Georgia, "Times New Roman", serif;
  --body: "Inter", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", Roboto, "Apple SD Gothic Neo", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1120px;
  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 18px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --light: #262626;
  --lightgray: #353535;
  --gray: #8c8c8c;
  --dark: #d1d1d1;
  --accent: #c75b75;
  --accent-soft: #a52142;
  --accent-tint: #5c2130;
  --ink: #a8b0c2;
  --bg: #090b12;
  --surface: #11141c;
  --surface-2: #161a24;
  --panel: color-mix(in srgb, #090b12 78%, transparent);
  --shadow: 0 12px 40px #00000066;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --light: #262626;
    --lightgray: #353535;
    --gray: #8c8c8c;
    --dark: #d1d1d1;
    --accent: #c75b75;
    --accent-soft: #a52142;
    --accent-tint: #5c2130;
    --ink: #a8b0c2;
    --bg: #090b12;
    --surface: #11141c;
    --surface-2: #161a24;
    --panel: color-mix(in srgb, #090b12 78%, transparent);
    --shadow: 0 12px 40px #00000066;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: var(--accent-tint); color: var(--dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr-only:focus-visible { position: fixed; top: 12px; left: 12px; width: auto; height: auto; clip: auto; z-index: 100; background: var(--surface); padding: 0.5rem 0.8rem; }
code, kbd, pre { font-family: var(--mono); }

/* ---------- wordmark (crimson block X + serif IA, same as the org mark) ---------- */
.wordmark {
  display: inline-flex;
  align-items: stretch;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--dark);
}
.wordmark__x { background: #982e44; color: #fff; padding: 0.14em 0.16em 0.1em; margin-right: 0.08em; }
.wordmark__ia { padding-top: 0.14em; }
.wordmark:hover { color: var(--dark); }

/* ---------- top chrome ---------- */
.chrome {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 1.1rem var(--gutter);
  pointer-events: none;
  transition: background 0.3s, border-color 0.3s, padding 0.3s;
}
.chrome > * { pointer-events: auto; }
body.scrolled .chrome, .chrome--solid {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--lightgray) 70%, transparent);
  padding-top: 0.75rem; padding-bottom: 0.75rem;
  pointer-events: auto;
}
.chrome__nav { display: flex; align-items: center; gap: 1.25rem; font-size: 0.95rem; }
.chrome__nav a { color: var(--dark); opacity: 0.85; position: relative; }
.chrome__nav a:hover { opacity: 1; color: var(--accent); }
.chrome__nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent); border-radius: 2px;
}
.chrome__lang { font-size: 0.85rem; color: var(--gray); }
.chrome__lang a[aria-current="page"] { color: var(--dark); font-weight: 600; }
.chrome__lang a[aria-current="page"]::after { display: none; }
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--dark);
  cursor: pointer;
}
.iconbtn:hover { border-color: var(--lightgray); }
.iconbtn svg { width: 18px; height: 18px; }
:root[data-theme="dark"] .iconbtn .moon, :root:not([data-theme="dark"]) .iconbtn .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .iconbtn .sun { display: none; }
  :root:not([data-theme="light"]) .iconbtn .moon { display: block; }
}
@media (max-width: 700px) {
  .chrome {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    border-bottom: 1px solid var(--lightgray);
    padding: max(10px, env(safe-area-inset-top)) 12px 10px;
    pointer-events: auto;
  }
  .chrome__nav .hide-sm { display: none; }
  .chrome__nav { gap: 0.9rem; font-size: 0.9rem; }
}

/* ---------- hero: fixed full-viewport graph ---------- */
.hero {
  position: fixed;
  inset: 0;
  z-index: 1;
  height: 100dvh;
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; touch-action: none; }
@media (min-width: 861px) {
  .hero__canvas { left: clamp(0px, 18vw, 280px); -webkit-mask-image: linear-gradient(to right, transparent 0, #000 clamp(240px, 34vw, 560px)); mask-image: linear-gradient(to right, transparent 0, #000 clamp(240px, 34vw, 560px)); }
}
.hero__canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.hero__fallback {
  display: none; position: absolute; inset: 0; align-items: center; justify-content: center;
  color: var(--gray); font-size: 0.9rem; margin: 0;
}
.hero[data-graph="failed"] .hero__fallback { display: flex; }
.hero__loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; transition: opacity 0.6s; }
.hero[data-graph] .hero__loading { opacity: 0; }
.hero__loading span { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--gray); opacity: 0.35; animation: pulse 1.4s ease-in-out infinite; }
.hero__loading span:nth-child(2) { animation-delay: 0.2s; margin-left: 40px; margin-top: -30px; }
.hero__loading span:nth-child(3) { animation-delay: 0.4s; margin-left: -50px; margin-top: 24px; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 0.25; } 50% { transform: scale(1.6); opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) { .hero__loading span { animation: none; } }

.hero__copy {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(56px, 12vh, 120px);
  max-width: 640px;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.hero__copy > * { pointer-events: auto; }
.hero__eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}
.hero__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6.2vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}
.hero__title em { font-style: italic; color: var(--accent); }
.hero__lede {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--gray);
  max-width: 48ch;
  margin: 0 0 1.6rem;
  text-wrap: pretty;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--dark);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--dark);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { background: var(--dark); color: var(--bg); transform: translateY(-1px); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: #fff; }
.btn--small { padding: 0.5rem 0.9rem; font-size: 0.85rem; }

.hero__legend {
  position: absolute; right: var(--gutter); bottom: clamp(56px, 12vh, 120px);
  display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-end;
  font-size: 0.8rem; color: var(--gray);
  transition: opacity 0.35s;
}
.hero__legend button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: none; border: 0; padding: 0.2rem 0; color: var(--gray); font: inherit; cursor: pointer;
}
.hero__legend button:hover, .hero__legend button[aria-pressed="true"] { color: var(--dark); }
.hero__legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--gray); }
.hero__legend i.concept { background: var(--dark); }
.hero__legend i.hub, .hero__legend i.principle { background: var(--accent); }
.hero__legend i.product { background: var(--ink); }
.hero__hint {
  position: absolute; right: var(--gutter); bottom: max(14px, env(safe-area-inset-bottom));
  margin: 0; font-size: 0.74rem; color: var(--gray);
  transition: opacity 0.35s;
}
body.scrolled .hero__copy { opacity: 0; transform: translateY(12px); pointer-events: none; }
body.scrolled .hero__copy > * { pointer-events: none; }
body.scrolled .hero__hint, body.scrolled .hero__legend, body.scrolled .hero__down { opacity: 0; pointer-events: none; }
.hero__down {
  position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  color: var(--gray); font-size: 0.74rem; display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  transition: opacity 0.35s;
}
.hero__down::after { content: ""; width: 1px; height: 28px; background: currentColor; opacity: 0.5; animation: drop 2s ease-in-out infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 60% { transform: scaleY(1); transform-origin: top; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (prefers-reduced-motion: reduce) { .hero__down::after { animation: none; } }
@media (max-width: 860px) { .hero__down { display: none; } }
@media (max-width: 700px) {
  .hero__copy { left: 16px; right: 16px; bottom: 72px; max-width: none; }
  .hero__copy::before { content: ""; position: absolute; inset: -40px -16px -24px; background: linear-gradient(to top, color-mix(in srgb, var(--bg) 92%, transparent) 70%, transparent); z-index: -1; }
  .hero__legend, .hero__hint { display: none; }
  .hero__canvas { bottom: 44%; }
}

/* ---------- node detail panel ---------- */
.panel {
  position: fixed; z-index: 15;
  right: var(--gutter); top: clamp(72px, 10vh, 110px);
  width: min(360px, calc(100vw - 32px));
  background: var(--panel);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--lightgray);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem 1.2rem;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.panel[data-open="true"] { opacity: 1; transform: none; pointer-events: auto; }
body.scrolled .panel { opacity: 0; pointer-events: none; }
.panel__kind { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 0 0 0.35rem; display: flex; align-items: center; gap: 0.5rem; }
.panel__kind i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.panel h3 { font-family: var(--display); font-weight: 500; font-size: 1.45rem; line-height: 1.15; margin: 0 1.5rem 0.5rem 0; letter-spacing: -0.01em; }
.panel p { margin: 0 0 0.9rem; font-size: 0.92rem; color: var(--gray); text-wrap: pretty; }
.panel__close { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; color: var(--gray); cursor: pointer; font-size: 1rem; line-height: 1; }
.panel__close:hover { background: var(--lightgray); color: var(--dark); }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.9rem; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.78rem; line-height: 1; padding: 0.4rem 0.65rem; border-radius: 999px;
  border: 1px solid var(--lightgray); color: var(--dark); background: transparent; cursor: pointer; font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; opacity: 0.7; }
.panel__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
@media (max-width: 700px) {
  .panel { right: 12px; left: 12px; top: auto; bottom: max(12px, env(safe-area-inset-bottom)); width: auto; transform: translateY(16px); }
}

/* ---------- page sections over the graph ---------- */
.page { position: relative; z-index: 2; margin-top: 100dvh; }
.section { padding: clamp(56px, 9vh, 120px) var(--gutter); }
.section + .section { padding-top: 0; }
.section__inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  background: var(--panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--lightgray);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 56px);
  box-shadow: var(--shadow);
}
.section__index {
  position: absolute; top: clamp(20px, 3vw, 40px); right: clamp(24px, 4vw, 56px);
  font-family: var(--display); font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1; font-weight: 400;
  color: var(--lightgray); user-select: none; pointer-events: none;
}
.section__kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
.section__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
  text-wrap: balance;
  max-width: 24ch;
}
.section__lede {
  font-size: 1.08rem;
  color: var(--gray);
  max-width: 62ch;
  margin: 0 0 2.2rem;
  text-wrap: pretty;
}
.section__lede strong { color: var(--dark); font-weight: 500; }
.section__lede a { border-bottom: 1px solid var(--lightgray); }
.section__lede a:hover { border-color: var(--accent); }

/* vision pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.pillar { border-top: 1px solid var(--lightgray); padding-top: 1.1rem; display: flex; flex-direction: column; }
.pillar__n { font-family: var(--mono); font-size: 0.72rem; color: var(--gray); display: block; margin-bottom: 0.7rem; }
.pillar h3 { font-family: var(--display); font-weight: 500; font-size: 1.35rem; line-height: 1.2; margin: 0 0 0.6rem; display: flex; align-items: center; gap: 0.5rem; }
.pillar p { margin: 0; color: var(--gray); font-size: 0.97rem; text-wrap: pretty; }
.pillar__dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.pillar__more { display: inline-block; margin-top: auto; padding-top: 0.8rem; align-self: flex-start; font-size: 0.85rem; color: var(--accent); border-bottom: 1px solid transparent; }
.pillar__more:hover { border-color: currentColor; }

/* manifesto teaser */
.quote-block blockquote, .quote-block .section__lede { max-width: 880px; }
.quote-block blockquote {
  margin: 0 0 1.4rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--dark);
  text-wrap: balance;
}
.quote-block blockquote em { font-style: italic; color: var(--accent); }
.quote-block .section__lede { margin-bottom: 1.4rem; }

/* principles */
.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--lightgray); border: 1px solid var(--lightgray); border-radius: 12px; overflow: hidden; }
.principles li { background: var(--surface); padding: 1.4rem 1.5rem; position: relative; }
.principles li::before { content: attr(data-n); position: absolute; top: 1.2rem; right: 1.3rem; font-family: var(--mono); font-size: 0.7rem; color: var(--gray); }
.principles b { display: block; font-family: var(--display); font-weight: 500; font-size: 1.2rem; margin-bottom: 0.3rem; }
.principles span { color: var(--gray); font-size: 0.95rem; }

/* work cards */
.work { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (min-width: 1100px) { .work { grid-template-columns: repeat(4, 1fr); } }
.work__group { grid-column: 1 / -1; margin: 0.8rem 0 0; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray); display: flex; align-items: center; gap: 0.8rem; }
.work__group::after { content: ""; flex: 1; height: 1px; background: var(--lightgray); }
.work__group:first-child { margin-top: 0; }
.card {
  display: flex; flex-direction: column; gap: 0.5rem;
  border: 1px solid var(--lightgray);
  border-radius: 14px;
  padding: 1.1rem 1.15rem 1rem;
  background: var(--surface);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  color: inherit;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.card b { display: block; font-weight: 600; font-size: 1rem; line-height: 1.25; }
.card:hover b { color: var(--accent); }
.card span { color: var(--gray); font-size: 0.88rem; display: block; flex: 1; text-wrap: pretty; }
.card__meta { display: flex; flex-wrap: wrap; gap: 0.3rem 0.7rem; font-family: var(--mono); font-size: 0.7rem; color: var(--gray); margin-top: 0.3rem; }
.card__meta span { white-space: nowrap; }
.card__meta em { font-style: normal; color: var(--dark); }
.card__date { margin-left: auto; font-family: var(--body); font-size: 0.78rem; }
.card__tag { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.card__tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* about */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: start; }
.about blockquote {
  margin: 0 0 1.4rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--dark);
}
.about p { color: var(--gray); margin: 0 0 1rem; text-wrap: pretty; }
.about dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1.2rem; font-size: 0.95rem; }
.about dt { color: var(--gray); font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; padding-top: 0.2rem; }
.about dd { margin: 0; }
.about dd a { border-bottom: 1px solid var(--lightgray); }
.about dd a:hover { border-color: var(--accent); }

/* footer */
.footer {
  position: relative; z-index: 2;
  padding: 2.5rem var(--gutter) max(2rem, env(safe-area-inset-bottom));
  background: var(--panel);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--lightgray);
  font-size: 0.88rem; color: var(--gray);
}
.footer__inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer__brand p { margin: 0.6rem 0 0; max-width: 36ch; text-wrap: pretty; }
.footer h4 { margin: 0 0 0.6rem; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); font-weight: 500; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.footer li a { color: var(--dark); }
.footer li a:hover { color: var(--accent); }
.footer__meta { max-width: var(--max); margin: 2rem auto 0; padding-top: 1.2rem; border-top: 1px solid var(--lightgray); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; }

/* ---------- subpages (manifesto, work/<repo>) ---------- */
.doc { position: relative; z-index: 2; padding: clamp(104px, 16vh, 160px) var(--gutter) clamp(56px, 9vh, 120px); }
.doc__inner { max-width: 840px; margin: 0 auto; }
.doc__wide { max-width: var(--max); margin: 0 auto; }
.crumbs { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray); margin: 0 0 1.4rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent); }
.doc h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 0.8rem; text-wrap: balance;
}
.doc h1 em { font-style: italic; color: var(--accent); }
.doc__tagline { font-family: var(--display); font-size: clamp(1.2rem, 2.2vw, 1.6rem); line-height: 1.35; color: var(--gray); margin: 0 0 1.6rem; text-wrap: balance; }
.doc__meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; font-family: var(--mono); font-size: 0.74rem; color: var(--gray); margin: 0 0 2rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--lightgray); }
.doc__meta em { font-style: normal; color: var(--dark); }
.doc__grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.prose { font-size: 1.08rem; line-height: 1.7; max-width: var(--measure); }
.prose p { margin: 0 0 1.3rem; text-wrap: pretty; }
.prose h2 { font-family: var(--display); font-weight: 500; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; letter-spacing: -0.01em; margin: 3rem 0 1rem; }
.prose h2:first-child { margin-top: 0; }
.prose h2 small { display: block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.6rem; font-weight: 400; }
.prose a { border-bottom: 1px solid var(--lightgray); }
.prose a:hover { border-color: var(--accent); }
.prose blockquote {
  margin: 2.2rem 0; padding: 0 0 0 1.2rem; border-left: 2px solid var(--accent);
  font-family: var(--display); font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.35; color: var(--dark);
}
.prose blockquote p { margin: 0 0 0.4rem; }
.prose blockquote cite { display: block; font-family: var(--mono); font-style: normal; font-size: 0.72rem; color: var(--gray); letter-spacing: 0.06em; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1.3rem; }
.prose li { margin-bottom: 0.4rem; }
.prose hr { border: 0; height: 1px; background: var(--lightgray); margin: 2.5rem 0; }
.prose .sig { font-family: var(--display); font-style: italic; color: var(--gray); margin-top: 2.5rem; }
.aside { position: sticky; top: 96px; display: grid; gap: 1.2rem; font-size: 0.9rem; }
.aside__box { border: 1px solid var(--lightgray); border-radius: 14px; padding: 1rem 1.1rem; background: var(--surface); }
.aside h4 { margin: 0 0 0.6rem; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); font-weight: 500; }
.aside ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.aside li { display: flex; justify-content: space-between; gap: 1rem; }
.aside li span:last-child { color: var(--dark); text-align: right; }
.aside .btn { width: 100%; justify-content: center; }
.aside__links { display: grid; gap: 0.5rem; }
.figure { margin: 0 0 2rem; border: 1px solid var(--lightgray); border-radius: 14px; overflow: hidden; background: var(--surface); }
.figure img { display: block; width: 100%; height: auto; }
.figure figcaption { padding: 0.6rem 0.9rem; font-size: 0.78rem; color: var(--gray); font-family: var(--mono); }
.codeblock { position: relative; margin: 0 0 1.4rem; }
.codeblock pre { margin: 0; padding: 1rem 4.2rem 1rem 1.1rem; background: var(--surface-2); border: 1px solid var(--lightgray); border-radius: 12px; font-size: 0.82rem; line-height: 1.6; overflow-x: auto; color: var(--dark); white-space: pre; }
.codeblock__label { position: absolute; top: 8px; right: 10px; display: flex; gap: 0.4rem; align-items: center; font-family: var(--mono); font-size: 0.66rem; color: var(--gray); letter-spacing: 0.06em; }
.codeblock__copy { border: 1px solid var(--lightgray); background: var(--surface); color: var(--gray); border-radius: 6px; padding: 0.2rem 0.5rem; font: inherit; cursor: pointer; }
.codeblock__copy:hover { color: var(--accent); border-color: var(--accent); }
.docnav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--lightgray); }
.docnav a { display: block; }
.docnav small { display: block; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray); margin-bottom: 0.3rem; }
.docnav b { font-family: var(--display); font-weight: 500; font-size: 1.15rem; }
.docnav a:last-child { text-align: right; }
.related { margin-top: 2.5rem; }
.related h4 { margin: 0 0 0.8rem; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); font-weight: 500; }
.related .chips { margin: 0; }
.related .chip { padding: 0.5rem 0.8rem; font-size: 0.82rem; }

/* 404 */
.lost { min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: var(--gutter); position: relative; z-index: 2; }
.lost h1 { font-family: var(--display); font-weight: 500; font-size: clamp(3rem, 10vw, 7rem); line-height: 1; margin: 0 0 0.5rem; letter-spacing: -0.03em; }
.lost p { color: var(--gray); margin: 0 0 1.5rem; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .pillars, .work { grid-template-columns: 1fr 1fr; }
  .about, .doc__grid { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .section__index { display: none; }
}
@media (max-width: 560px) {
  .pillars, .work, .principles, .footer__inner, .docnav { grid-template-columns: 1fr; }
  .docnav a:last-child { text-align: left; }
  .section__inner { border-radius: 14px; }
}

/* reveal on scroll (no-JS safe: visible by default, JS adds .reveal) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Korean: break between words, never inside one; Hangul needs more leading */
:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }
:lang(ko) .hero__title, :lang(ko) .doc h1 { line-height: 1.16; letter-spacing: -0.01em; }
:lang(ko) .section__title { line-height: 1.22; letter-spacing: 0; }
:lang(ko) em, :lang(ko) .hero__title em, :lang(ko) .quote-block blockquote em, :lang(ko) .doc h1 em { font-style: normal; }
:lang(ko) .hero__lede, :lang(ko) .section__lede, :lang(ko) .prose { line-height: 1.8; }
:lang(ko) .quote-block blockquote, :lang(ko) .prose blockquote { line-height: 1.5; }
:lang(ko) .panel h3, :lang(ko) .pillar h3, :lang(ko) .principles b { line-height: 1.3; }
:lang(ko) .section__kicker, :lang(ko) .about dt, :lang(ko) .work__group, :lang(ko) .hero__eyebrow { letter-spacing: 0.02em; }

/* ---------- panel extras ---------- */
.chip i.hub, .chip i.principle { background: var(--accent); opacity: 1; }
.chip i.product, .chip i.concept { background: var(--dark); }
.panel__source { display: inline-block; margin-top: 0.45rem; font-family: var(--mono); font-size: 0.68rem; color: var(--gray); opacity: 0.8; }
.panel__kind i.hub, .panel__kind i.principle { background: var(--accent); }
.panel__kind i.concept, .panel__kind i.product { background: var(--dark); }
.panel__kind:has(i.concept), .panel__kind:has(i.product) { color: var(--gray); }
