:root {
  --text: #202124;
  --muted: #5f6368;
  --line: #dedfe3;
  --light: #f5f6f8;
  --lighter: #fafbfc;
  --accent: #2563eb;
  --accent-soft: #eaf0ff;
  --dark: #24262b;
  --baseline: #8b9098;
  --max-width: 1000px;
  --wide-width: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 8px 12px;
  border-radius: 6px;
  color: #fff;
  background: #111;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.container {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}
.wide-container { width: min(calc(100% - 40px), var(--wide-width)); }
.text-container { max-width: 900px; }

.hero {
  padding: 76px 0 42px;
  text-align: center;
  background: #fff;
}
.hero-container { max-width: 1100px; }
.hero h1 {
  margin: 0 auto 26px;
  max-width: 1080px;
  font-size: clamp(2.2rem, 5.2vw, 4.15rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
}
.title-secondary { font-weight: 730; }
.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 24px;
  margin-bottom: 10px;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  color: #1e5fbd;
}
.authors span { white-space: nowrap; }
sup { font-size: 0.65em; line-height: 0; }
.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  color: #44474d;
  font-size: 0.96rem;
}
.corresponding {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}
.pill-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 17px;
  border: 1px solid var(--dark);
  border-radius: 999px;
  color: #fff;
  background: var(--dark);
  font-weight: 650;
  line-height: 1;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.pill-button:hover {
  color: #fff;
  background: #111318;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgb(0 0 0 / 0.14);
}
.pill-button:focus-visible, .tab-button:focus-visible, .copy-button:focus-visible, .image-button:focus-visible, .lightbox-close:focus-visible {
  outline: 3px solid rgb(37 99 235 / 0.35);
  outline-offset: 3px;
}
.pill-button svg, .copy-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.teaser-section { padding: 8px 0 58px; }
.hero-figure, .research-figure, .tab-figure, .split-figure { margin: 0; }
.hero-figure { text-align: center; }
.hero-figure img { width: min(100%, 1030px); margin: 0 auto; }
.hero-figure figcaption, .research-figure figcaption {
  max-width: 940px;
  margin: 18px auto 0;
  color: #373a40;
  font-size: 1rem;
  text-align: center;
}
.image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.section { padding: 70px 0; }
.section-light { background: var(--light); }
.section h2 {
  margin: 0 0 26px;
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-align: center;
}
.abstract-text {
  margin: 0 auto;
  font-size: 1.05rem;
  text-align: justify;
  text-justify: inter-word;
}
.section-lede {
  max-width: 880px;
  margin: -7px auto 30px;
  color: #3c4047;
  font-size: 1.04rem;
  text-align: center;
}

.contribution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 38px;
}
.contribution-card {
  position: relative;
  min-height: 180px;
  padding: 24px 22px 21px;
  border: 1px solid #d9dce2;
  border-radius: 12px;
  background: #fff;
}
.card-index {
  display: inline-block;
  margin-bottom: 15px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.contribution-card h3 {
  margin: 0 0 7px;
  font-size: 1.08rem;
  line-height: 1.3;
}
.contribution-card p { margin: 0; color: var(--muted); font-size: 0.93rem; line-height: 1.55; }

.research-figure {
  width: min(100%, 1040px);
  margin: 0 auto;
}
.research-figure img {
  max-height: 720px;
  margin: 0 auto;
  object-fit: contain;
}
.compact-figure {
  width: min(50%, 520px);
  margin-bottom: 38px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.compact-figure img { max-height: 530px; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 30px 0 26px;
}
.tab-button {
  min-height: 42px;
  padding: 9px 17px;
  border: 1px solid #cfd3da;
  border-radius: 8px;
  color: #383b41;
  background: #fff;
  font-weight: 650;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}
.tab-button:hover { border-color: #858b95; }
.tab-button.is-active {
  color: #fff;
  border-color: var(--dark);
  background: var(--dark);
}
.tab-panel { animation: tabFade 180ms ease; }
.tab-panel[hidden] { display: none !important; }
@keyframes tabFade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.tab-figure {
  max-width: 880px;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid #dfe1e6;
  border-radius: 10px;
  background: #fff;
}
.tab-figure img { max-height: 780px; margin: 0 auto; }

.result-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.result-highlight-grid.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: 28px;
}
.result-highlight {
  display: flex;
  min-height: 122px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 1px solid #dce0e6;
  border-radius: 11px;
  background: var(--lighter);
  text-align: center;
}
.result-value {
  color: #174ca7;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.result-label { margin-top: 7px; color: var(--muted); font-size: 0.9rem; }

.chart-card {
  max-width: 900px;
  margin: 0 auto 30px;
  padding: 24px 26px 27px;
  border: 1px solid #dce0e6;
  border-radius: 12px;
  background: #fff;
}
.chart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.chart-heading h3 { margin: 0; font-size: 1.12rem; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 0.85rem; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 13px; height: 13px; border-radius: 3px; }
.legend-swatch.baseline { background: var(--baseline); }
.legend-swatch.ours { background: var(--accent); }
.bar-chart { display: grid; gap: 20px; }
.bar-group {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 14px;
}
.bar-label { color: #3d4046; font-size: 0.9rem; }
.bar-track { display: grid; gap: 6px; }
.bar {
  position: relative;
  width: var(--bar);
  min-width: 62px;
  height: 22px;
  border-radius: 0 5px 5px 0;
}
.bar.baseline { background: var(--baseline); }
.bar.ours { background: var(--accent); }
.bar span {
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  color: #30333a;
  font-size: 0.8rem;
  font-weight: 700;
  transform: translateY(-50%);
}

.table-wrap {
  max-width: 980px;
  margin: 0 auto;
  overflow-x: auto;
  border: 1px solid #dde0e5;
  border-radius: 10px;
  background: #fff;
}
table {
  width: 100%;
  min-width: 690px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
}
caption {
  padding: 16px 18px 12px;
  color: #2f3238;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
}
th, td {
  padding: 10px 13px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}
th { color: #45484f; background: #f6f7f9; font-size: 0.82rem; font-weight: 720; }
tbody tr:hover { background: #fafbfc; }
.ours-row { color: #123b7a; background: #eef4ff; font-weight: 730; }
.table-note { margin: 0; padding: 9px 14px 14px; color: var(--muted); font-size: 0.78rem; }

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.analysis-card {
  padding: 22px;
  border: 1px solid #dce0e6;
  border-radius: 11px;
  background: #fff;
}
.analysis-card h3 { margin: 0 0 4px; font-size: 1.08rem; }
.analysis-subtitle { margin: 0 0 16px; color: var(--muted); font-size: 0.82rem; }
.mini-bars { display: grid; gap: 7px; }
.mini-bars div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px;
  border-radius: 6px;
  background: #f4f5f7;
  font-size: 0.8rem;
}
.mini-bars b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mini-bars .best { color: #0d3e8c; background: var(--accent-soft); }

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  align-items: center;
  gap: 40px;
}
.split-figure {
  padding: 16px;
  border: 1px solid #dce0e6;
  border-radius: 10px;
  background: #fff;
}
.split-copy p { margin: 0 0 16px; color: #3d4046; }

.citation-box {
  position: relative;
  overflow: hidden;
  border: 1px solid #d9dde4;
  border-radius: 10px;
  background: #f6f7f9;
}
.citation-box pre {
  margin: 0;
  padding: 25px 95px 25px 25px;
  overflow-x: auto;
  color: #25282e;
  font: 0.88rem/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre;
}
.copy-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #c9cdd5;
  border-radius: 7px;
  color: #33363c;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}
.copy-button:hover { border-color: #858b95; }
.copy-button.is-copied { color: #0f6b38; border-color: #8ac6a3; background: #edf9f2; }

.footer {
  padding: 42px 0 48px;
  color: #62666d;
  border-top: 1px solid #e1e3e7;
  background: #f8f9fa;
  font-size: 0.83rem;
  text-align: center;
}
.institution-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 34px;
  margin-bottom: 22px;
  color: #2e3137;
  font-size: 0.9rem;
  font-weight: 780;
  letter-spacing: 0.05em;
}
.footer p { max-width: 850px; margin: 8px auto; }
.footer-license { color: #858990; }


/* Footer Improvements */
.affiliation-logos {
  padding: 2.5rem 1.5rem 1.5rem;
  background: var(--background-primary);
  border-top: 1px solid var(--border-color);
}

.affiliation-logos .logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem 3rem;
}

.affiliation-logos a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.affiliation-logos img {
  max-height: 54px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  opacity: 0.88;
  transition: opacity 0.2s ease;
}

.affiliation-logos .logo-yonsei img {
  max-height: 56px;
  max-width: 260px;
}

.affiliation-logos .logo-eccv img {
  height: 88px;
  width: auto;
  max-width: 320px;
}

.affiliation-logos a:hover img {
  opacity: 1;
}


.lightbox {
  width: min(96vw, 1500px);
  max-width: none;
  max-height: 94vh;
  padding: 52px 18px 18px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 25px 80px rgb(0 0 0 / 0.38);
}
.lightbox::backdrop { background: rgb(0 0 0 / 0.72); }
.lightbox img { max-height: calc(94vh - 75px); margin: 0 auto; object-fit: contain; }
.lightbox-close {
  position: absolute;
  top: 8px;
  right: 13px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #333;
  background: #eef0f3;
  font-size: 26px;
  line-height: 32px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .contribution-grid, .analysis-grid { grid-template-columns: 1fr; }
  .contribution-card { min-height: auto; }
  .split-layout { grid-template-columns: 1fr; gap: 24px; }
  .split-copy { max-width: 720px; margin: 0 auto; }
}

@media (max-width: 700px) {
  .container, .wide-container { width: min(calc(100% - 28px), var(--wide-width)); }
  .hero { padding: 52px 0 30px; }
  .hero h1 { margin-bottom: 21px; font-size: clamp(2rem, 10vw, 3rem); }
  .authors { gap: 4px 14px; font-size: 1rem; }
  .affiliations { display: grid; gap: 2px; }
  .publication-links { gap: 8px; }
  .pill-button { min-height: 39px; padding: 8px 13px; font-size: 0.88rem; }
  .section { padding: 52px 0; }
  .teaser-section { padding-bottom: 42px; }
  .section h2 { margin-bottom: 22px; }
  .abstract-text { text-align: left; }
  .result-highlight-grid, .result-highlight-grid.two-column { grid-template-columns: 1fr; }
  .result-highlight { min-height: 102px; }
  .chart-card { padding: 19px 17px 22px; }
  .chart-heading { align-items: flex-start; flex-direction: column; }
  .bar-group { grid-template-columns: 50px 1fr; gap: 8px; }
  .bar span { font-size: 0.72rem; }
  .tabs { margin-top: 24px; }
  .tab-button { flex: 1 1 auto; padding-inline: 11px; font-size: 0.85rem; }
  .tab-figure { padding: 8px; }
  .citation-box pre { padding: 62px 17px 18px; font-size: 0.76rem; }
  .copy-button { top: 11px; left: 12px; right: auto; }
  .institution-row { display: grid; gap: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
