:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f7f7f8;
  --bg-tertiary: #f1f5f9;
  --text-primary: #000000;
  --text-secondary: #18181b;
  --text-muted: #52525b;
  --accent-primary: #60a5fa;
  --accent-secondary: #818cf8;
  --accent-gradient: linear-gradient(135deg, #ff2626 0%, #ff8383 33%, #6f9dff 66%, #3474ff 100%);
  --border-color: #d4d4d8;
  --panel-bg: #ffffff;
  --panel-bg-strong: #f4f4f5;
  --font-sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  overflow-x: hidden;
}

a {
  color: inherit;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 5%;
}

.container-wide {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 4%;
}

section {
  padding: 76px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

#tldr {
  padding-top: 36px;
}

.hero {
  min-height: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  padding: 78px 0 38px;
  background:
    radial-gradient(ellipse 72% 44% at 50% -15%, rgba(96, 165, 250, 0.14), transparent),
    linear-gradient(180deg, rgba(129, 140, 248, 0.05), rgba(255, 255, 255, 0)),
    var(--bg-primary);
}

.hero-content {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 5%;
}

.publication-title {
  max-width: 1280px;
  margin: 0 auto 34px;
  font-size: clamp(2.05rem, 4.45vw, 4rem);
  font-weight: 700;
  line-height: 1.18;
  text-align: center;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.publication-title .title-line {
  display: inline-block;
  padding: 0 0.14em 0.04em;
  text-align: center;
}

.publication-title .gradient-text,
.publication-title .title-subline {
  white-space: nowrap;
}

.publication-title .title-subline {
  display: block;
  font-size: clamp(1.7rem, 3.35vw, 2.75rem);
}

.publication-title .title-gradient {
  background: linear-gradient(135deg, #ff2626 0%, #ff8383 33%, #6f9dff 66%, #3474ff 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

.publication-authors {
  margin: 0 auto 12px;
  color: var(--text-secondary);
  font-size: 1.2rem;
}

.publication-authors a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.publication-authors a:hover {
  color: var(--accent-primary);
}

.author-block {
  display: inline-block;
  margin: 3px 7px;
}

.author-block sup,
.affiliations sup {
  color: var(--accent-primary);
  font-weight: 600;
}

.affiliations {
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.venue {
  display: inline-block;
  margin-bottom: 30px;
  color: #1b44e9;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  /* text-transform: uppercase; */
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 11px 24px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 1.04rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--text-muted);
  background: #e5e7eb;
}

.section-title {
  margin-bottom: 24px;
  text-align: center;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  font-weight: 650;
  line-height: 1.22;
}

.section-subtitle {
  margin: 42px 0 22px;
  color: var(--text-secondary);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 600;
}

.content-text {
  max-width: 980px;
  margin: 0 auto 34px;
  color: var(--text-secondary);
  font-size: 1.24rem;
  line-height: 1.78;
}

.content-text p + p {
  margin-top: 18px;
}

.tldr {
  max-width: 1040px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1.45rem;
  line-height: 1.65;
  text-align: center;
}

.media-block {
  margin: 34px auto 0;
}

.media-image {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-tertiary);
}

.media-image.flat {
  border-radius: 4px;
}

#method .media-image,
#generation .media-image,
#editing .media-image,
#rl .media-image {
  border: 0;
}

.comparison-graph {
  max-width: 920px;
  margin: 0 auto;
}

.figure-caption {
  max-width: 980px;
  margin: 14px auto 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.55;
  text-align: center;
}

.panel {
  padding: 26px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--panel-bg);
}

.contribution-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
}

.contribution-list li {
  padding: 20px 22px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text-secondary);
  font-size: 1.12rem;
  line-height: 1.62;
}

.contribution-list strong {
  color: var(--text-primary);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.method-card {
  padding: 22px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--panel-bg);
}

.method-card h3 {
  margin-bottom: 10px;
  color: var(--text-primary);
  font-size: 1.28rem;
}

.method-card ul {
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 1.08rem;
}

.equation-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px auto 8px;
}

.equation {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text-primary);
  font-size: 0.96rem;
  white-space: normal;
}

.equation .MathJax_Display {
  width: 100%;
  margin: 0;
}

.table-wrap {
  width: 100%;
  margin: 24px 0 12px;
  overflow-x: auto;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  background: #ffffff;
}

.results-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: #ffffff;
  color: #000000;
  font-size: 0.98rem;
}

.results-table th,
.results-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #d4d4d8;
  background: #ffffff;
  color: #000000;
  text-align: right;
  vertical-align: middle;
}

.results-table th:first-child,
.results-table td:first-child,
.results-table th:nth-child(2).left,
.results-table td:nth-child(2).left {
  text-align: left;
}

.results-table thead th {
  background: #f4f4f5;
  color: #000000;
  font-weight: 650;
}

.results-table tbody tr:last-child td {
  border-bottom: 0;
}

.highlight-row td {
  background: #eef2ff;
  color: #000000;
}

.model-name {
  color: #000000;
  font-weight: 650;
}

.note {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.98rem;
  text-align: center;
}

.references-block {
  margin-bottom: 72px;
}

.bibtex-container {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #f8fafc;
}

.bibtex-container pre {
  overflow-x: auto;
  padding: 24px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.96rem;
  line-height: 1.6;
}

#copyButton {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 76px;
  min-height: 34px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font: 600 0.92rem var(--font-sans);
  cursor: pointer;
}

.footer {
  padding: 34px 0 44px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  text-align: center;
}

.footer p {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 5%;
}

@media (max-width: 840px) {
  section {
    padding: 58px 0;
  }

  .hero {
    min-height: auto;
    padding: 36px 0 32px;
  }

  .publication-title {
    margin-bottom: 26px;
    font-size: clamp(2.05rem, 8.7vw, 3.6rem);
  }

  .content-text,
  .tldr {
    font-size: 1.13rem;
  }

  .contribution-list,
  .method-grid,
  .equation-row {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .publication-authors {
    font-size: 1.05rem;
  }

  .publication-title .gradient-text,
  .publication-title .title-subline {
    white-space: normal;
  }

  .affiliations {
    font-size: 0.98rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .equation {
    font-size: 0.82rem;
  }
}
