:root {
  color-scheme: light dark;
  --ink: #14202b;
  --ink-2: #44515e;
  --ink-3: #6b7783;
  --line: #e3e8ee;
  --bg: #ffffff;
  --bg-soft: #f5f8fa;
  --accent: #0e5e7a;
  --accent-2: #13849f;
  --accent-soft: #e6f3f6;
  --good: #1a7f5a;
  --warn: #b4452f;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --th: #f0f4f7;
  --nav-bg: rgba(255,255,255,.92);
  --venue-line: #cfe3ea;
  --bar-bg: #eef2f5;
  --notice-bg: #fff8ec;
  --notice-line: #f3dfb8;
  --demo-bg: #f4f7fb;
  --radius: 12px;
  --maxw: 1080px;
  --text-w: 820px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: var(--text-w); margin-left: auto; margin-right: auto; }

/* ---------- nav ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topnav .container { display: flex; align-items: center; gap: 22px; height: 52px; overflow-x: auto; scrollbar-width: none; }
.topnav .container::-webkit-scrollbar { display: none; }
.topnav .brand { font-weight: 800; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; }
.topnav a.navlink { color: var(--ink-2); font-size: 14px; font-weight: 500; white-space: nowrap; }
.topnav a.navlink:hover { color: var(--accent); text-decoration: none; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 36px; text-align: center; background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg) 100%); }
.venue {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: var(--surface); border: 1px solid var(--venue-line); border-radius: 999px; padding: 4px 14px; margin-bottom: 18px;
}
.hero h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(28px, 4.2vw, 44px); line-height: 1.18; font-weight: 700; letter-spacing: -.01em;
  margin: 0 auto 10px; max-width: 980px;
}
.hero h1 .brad { color: var(--accent); }
.hero .subtitle {
  font-size: clamp(16px, 2vw, 19px); color: var(--ink-2); line-height: 1.55;
  display: inline-block; max-width: 820px; margin: 4px auto 28px; padding: 14px 26px;
  background: var(--surface); border: 1px solid var(--venue-line); border-radius: 14px;
  box-shadow: 0 2px 10px rgba(14, 94, 122, .08);
}
.authors { font-size: 17px; margin: 0 auto 8px; max-width: 900px; }
.authors span { display: inline-block; margin: 0 8px 4px; white-space: nowrap; }
.authors sup { color: var(--ink-3); font-size: 11px; margin-left: 1px; }
.affils { font-size: 14px; color: var(--ink-2); max-width: 900px; margin: 0 auto 6px; }
.affils span { display: inline-block; margin: 0 8px 2px; }
.notes { font-size: 13px; color: var(--ink-3); margin-bottom: 26px; }

.buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 9px 18px;
  font-size: 15px; font-weight: 600; transition: transform .15s, background .15s;
}
.btn:hover { background: var(--accent); text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; fill: currentColor; }
.btn.disabled { background: #9aa5af; pointer-events: none; }

/* ---------- sections ---------- */
section { padding: 56px 0; }
section.alt { background: var(--bg-soft); }
h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(24px, 3vw, 31px); font-weight: 700; text-align: center; margin: 0 0 8px; letter-spacing: -.01em;
}
.section-lead { text-align: center; color: var(--ink-2); margin: 0 auto 32px; max-width: 760px; }
h3 { font-size: 19px; margin: 36px 0 12px; }
p { margin: 0 0 14px; }

/* ---------- teaser ---------- */
.teaser { margin-top: 8px; }
.tldr {
  max-width: var(--text-w); margin: 0 auto 26px; padding: 16px 20px;
  border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.tldr b { color: var(--accent); }

/* ---------- interactive demo ---------- */
.demo-wrap { border-radius: 14px; background: var(--demo-bg); }
.teaser figcaption { max-width: 1040px; margin-left: auto; margin-right: auto; }
.demo-wrap iframe {
  position: absolute; top: 0; left: 0; width: 1296px; height: 810px; border: 0;
  transform-origin: 0 0;
}

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0 auto; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; text-align: center; }
.stat .num { font-size: 30px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; line-height: 1.1; }
.stat .num small { font-size: 17px; font-weight: 700; }
.stat .lbl { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; line-height: 1.4; }

/* ---------- figures ---------- */
figure { margin: 0 0 8px; }
figure img {
  width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: zoom-in;
}
figcaption { font-size: 14.5px; color: var(--ink-2); margin-top: 10px; line-height: 1.55; }
figcaption b { color: var(--ink); }
.fig-pad img { padding: 10px; }

/* ---------- pipeline cards ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step .idx {
  display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 10px;
}
.step h4 { margin: 0 0 8px; font-size: 17px; }
.step p { font-size: 15px; color: var(--ink-2); margin: 0; }
.step .tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 8px; margin-top: 10px; }

details.more { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
details.more summary { cursor: pointer; padding: 14px 20px; font-weight: 600; list-style: none; }
details.more summary small { font-weight: 400; color: var(--ink-3); margin-left: 8px; font-size: 13.5px; }
details.more summary:hover { color: var(--accent); }
section details.more + details.more { margin-top: 12px; }
section details.more { margin-bottom: 20px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "＋"; color: var(--accent); margin-right: 10px; font-weight: 700; }
details.more[open] summary::before { content: "－"; }
details.more .inner { padding: 0 20px 20px; }

.back-link { font-size: 13px; color: var(--ink-3); margin: 0 0 12px; }

/* ---------- tables ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 18px; }
.tab {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 7px 15px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.panel[hidden] { display: none; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 12px; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--line); }
th { background: var(--th); font-weight: 600; color: var(--ink); }
td:first-child, th:first-child { text-align: left; }
tbody tr:last-child td { border-bottom: none; }
tr.ours td { background: var(--accent-soft); }
tr.ours td:first-child { font-weight: 700; color: var(--accent); }
tr.group td { background: var(--surface-2); font-weight: 600; color: var(--ink-3); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; text-align: left; }
td.best { font-weight: 700; }
.tnote { font-size: 13px; color: var(--ink-3); margin-top: 10px; }

/* ---------- reader study ---------- */
.reader-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; align-items: stretch; }
.reader-side { display: flex; flex-direction: column; gap: 22px; }
.reader-side > .card { flex: 1 1 auto; display: flex; flex-direction: column; }
.reader-side > .card > table { margin-top: auto; margin-bottom: auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h4 { margin: 0 0 4px; font-size: 16px; }
.card .sub { font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-bottom: 14px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.c-base { background: #b9c3cc; }
.c-mllm { background: #e3a857; }
.c-brad { background: var(--accent); }
.reader { margin-bottom: 14px; }
.reader .name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.reader .name span { font-weight: 400; color: var(--ink-3); }
.bar-row { display: grid; grid-template-columns: 1fr 44px; align-items: center; gap: 8px; margin: 3px 0; }
.bar { height: 11px; border-radius: 6px; background: var(--bar-bg); overflow: hidden; }
.bar > div { height: 100%; border-radius: 6px; }
.bar-row .v { font-size: 12.5px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.kappa { display: flex; align-items: center; gap: 14px; margin: 8px 0 18px; }
.kappa .from, .kappa .to { text-align: center; }
.kappa .big { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.kappa .from .big { color: #8a96a1; }
.kappa .to .big { color: var(--accent); }
.kappa .arrow { font-size: 26px; color: var(--ink-3); }
.kappa small { display: block; font-size: 12.5px; color: var(--ink-3); }
.reader-grid > *, .two > *, .steps > * { min-width: 0; }
.mini { width: 100%; font-size: 13.5px; }
.mini td, .mini th { white-space: normal; }
.mini td, .mini th { padding: 6px 8px; }

/* ---------- gallery ---------- */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

/* side-by-side figures with equal image heights: width share follows each image's aspect ratio */
.pair { display: flex; gap: 22px; align-items: flex-start; }
.pair > figure { flex: var(--ar, 1) 1 0; min-width: 0; }

/* ---------- notices / bibtex ---------- */
.notice {
  max-width: var(--text-w); margin: 0 auto; font-size: 14px; color: var(--ink-2);
  background: var(--notice-bg); border: 1px solid var(--notice-line); border-radius: var(--radius); padding: 14px 18px;
}
.bib { position: relative; max-width: var(--text-w); margin: 0 auto; }
.bib pre {
  margin: 0; background: #0f1b24; color: #dbe7ef; border-radius: var(--radius); padding: 20px 22px; overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 13.5px; line-height: 1.6;
}
.copy {
  position: absolute; top: 10px; right: 10px; border: 1px solid #33485a; background: #1b2b38; color: #dbe7ef;
  border-radius: 8px; padding: 5px 11px; font: inherit; font-size: 13px; cursor: pointer;
}
.copy:hover { background: #24394a; }

footer { padding: 32px 0 44px; text-align: center; font-size: 13px; color: var(--ink-3); border-top: 1px solid var(--line); }
footer p { margin: 4px 0; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(10,16,22,.88); display: none;
  align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; background: #fff; }


/* ---------- dark theme ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e6edf3; --ink-2: #b4c0cc; --ink-3: #8b98a5;
    --line: #2b3640; --bg: #11171c; --bg-soft: #161e25;
    --accent: #5cc3dc; --accent-2: #7fd3e6; --accent-soft: #1c4250;
    --surface: #1a232b; --surface-2: #1e2830; --th: #212c35;
    --nav-bg: rgba(17,23,28,.9); --venue-line: #24495a;
    --bar-bg: #26323c; --notice-bg: #2a2416; --notice-line: #4a3f22;
    --demo-bg: #11171c;
  }
  .btn { background: #e6edf3; color: #11171c; }
  .btn:hover { background: var(--accent); color: #0b1216; }
  .tab[aria-selected="true"] { background: #e6edf3; color: #11171c; border-color: #e6edf3; }
  .c-base { background: #6b7a87; }
  .kappa .from .big { color: #6b7a87; }
  figure img { border-color: #2b3640; }
  .bib pre { background: #0b1115; border: 1px solid var(--line); }
  .step .idx { color: #0b1216; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .reader-grid, .two { grid-template-columns: 1fr; }
  .pair { flex-direction: column; }
  .pair > figure { flex: none; width: 100%; }
  section { padding: 44px 0; }
  .hero { padding: 44px 0 28px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .stat .num { font-size: 25px; }
  .authors span { margin: 0 5px 4px; }
}
