:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --text: #1f2328;
  --text-soft: #57606a;
  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --border: #d0d7de;
  --code-bg: #f6f8fa;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
               "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ----------- Header / Hero ----------- */
.hero {
  padding: 80px 0 56px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
}

.venue-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  margin-bottom: 22px;
  text-transform: uppercase;
}

.title {
  font-size: 40px;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.title .acronym {
  color: var(--accent);
}

.subtitle {
  font-size: 20px;
  font-weight: 400;
  color: var(--text-soft);
  margin: 0 0 32px;
}

.authors {
  margin: 18px 0 8px;
  font-size: 17px;
  line-height: 1.6;
}

.authors .author {
  display: inline-block;
  margin: 0 8px;
  white-space: nowrap;
}

.authors .corresponding {
  color: var(--text-soft);
}

.affiliation {
  font-size: 15px;
  color: var(--text-soft);
  margin: 4px 0 24px;
}

/* ----------- Buttons ----------- */
.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #111827;
  color: #fff;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 500;
  border: 1px solid #111827;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  background: #1f2937;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.12);
}

.btn.outline {
  background: #fff;
  color: #111827;
  border-color: var(--border);
}

.btn.outline:hover {
  background: var(--bg-soft);
}

.btn svg { width: 16px; height: 16px; }

/* ----------- Sections ----------- */
section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type { border-bottom: 0; }

h2 {
  font-size: 28px;
  margin: 0 0 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 20px;
  margin: 28px 0 10px;
  font-weight: 600;
}

p { margin: 0 0 16px; }

/* Abstract */
.abstract {
  background: var(--bg-soft);
}
.abstract p {
  font-size: 17px;
  line-height: 1.75;
  color: #374151;
}

/* Figures */
figure {
  margin: 28px 0;
  text-align: center;
}

figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}

figure.figure-medium img {
  max-width: 70%;
}

@media (max-width: 768px) {
  figure.figure-medium img { max-width: 100%; }
}

/* Three-column ablation tables */
.ablation-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 20px 0;
}

.ablation-row .ablation-col {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 14px;
}

.ablation-row .ablation-col h4 {
  font-size: 14.5px;
  margin: 0 0 10px;
  font-weight: 600;
  text-align: center;
  color: var(--text);
}

.ablation-row table { font-size: 13.5px; }
.ablation-row th, .ablation-row td { padding: 6px 8px; }

@media (max-width: 900px) {
  .ablation-row { grid-template-columns: 1fr; }
}

figcaption {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 1.55;
  text-align: left;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

figcaption strong { color: var(--text); }

/* Highlight boxes */
.highlight-box {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.highlight-box p:last-child { margin-bottom: 0; }

/* Step cards */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 28px 0 12px;
}

.step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.step:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.step .step-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.step h4 {
  font-size: 17px;
  margin: 0 0 8px;
  font-weight: 600;
}

.step p {
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 1.55;
  margin: 0;
}

/* Results */
.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 24px 0;
}

.metric-card {
  text-align: center;
  padding: 22px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.metric-value {
  font-size: 30px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.4;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 20px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

th, td {
  padding: 9px 12px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

th:first-child, td:first-child {
  text-align: left;
}

thead th {
  background: var(--bg-soft);
  font-weight: 600;
  border-bottom: 2px solid var(--border);
}

tr.ours td {
  background: var(--accent-soft);
  font-weight: 600;
}

tr.upper-bound td {
  color: var(--text-soft);
  font-style: italic;
}

/* Code blocks */
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.55;
}

code {
  font-family: "SF Mono", Menlo, Monaco, "Courier New", monospace;
  font-size: 0.92em;
}

p code, li code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}

/* BibTeX */
.bibtex {
  position: relative;
}

.bibtex .copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-soft);
}

.bibtex .copy-btn:hover { background: var(--bg-soft); color: var(--text); }

/* Footer */
footer {
  padding: 36px 0;
  text-align: center;
  color: var(--text-soft);
  font-size: 14px;
  border-top: 1px solid var(--border);
}

footer a { color: var(--text-soft); text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
  .title { font-size: 30px; }
  .subtitle { font-size: 17px; }
  .hero { padding: 56px 0 40px; }
  section { padding: 44px 0; }
  h2 { font-size: 24px; }
  .steps { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .authors .author { display: block; margin: 4px 0; }
}
