* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #f2f3f5;
  color: #222;
}

/* =========================
   Header / Hero
========================= */

.hero {
  padding: 62px 20px 72px;
  text-align: center;
  border-bottom: 1px solid #d8d8d8;
  background: #f2f3f5;
}

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.hero h1 {
  margin: 0;
  font-size: 3rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.subtitle {
  max-width: none;
  margin: 28px auto 0;
  font-size: 1.2rem;
  line-height: 1.6;
  font-weight: 300;
  color: #8f8f8f;
  white-space: nowrap;
}

.authors {
  margin-top: 50px;
  font-size: 1.5rem;
  line-height: 1.65;
  font-weight: 300;
  color: #555;
}

.affiliation {
  margin-top: 20px;
  font-size: 1.08rem;
  color: #444;
}

.note {
  margin-top: 10px;
  font-size: 0.95rem;
  color: #777;
}

.buttons {
  margin-top: 46px;
}

.btn {
  display: inline-block;
  margin: 6px 8px;
  padding: 13px 28px;
  background: #0b7cff;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.08rem;
  font-weight: 400;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: #005fd1;
  transform: translateY(-1px);
}

.btn-disabled,
.btn-disabled:hover {
  background: #9aa0a6;
  cursor: default;
  transform: none;
}

/* =========================
   Main Layout
========================= */

main {
  background: #ffffff;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 22px 10px;
}

.figure-section {
  padding-top: 56px;
  padding-bottom: 24px;
}

.text-block {
  max-width: 980px;
  margin: 0 auto;
}

.section h2 {
  margin: 0;
  text-align: center;
  font-size: 2.2rem;
  font-weight: 600;
  color: #222;
}

.section-divider {
  width: 72px;
  height: 3px;
  margin: 18px auto 30px;
  background: #0b7cff;
  border-radius: 999px;
}

.section p {
  margin: 0 0 20px;
  font-size: 1.06rem;
  line-height: 1.78;
  color: #333;
}

/* =========================
   Shared Caption Block
   All captions use page text width
========================= */

.paper-figure figcaption,
.algorithm-figure figcaption,
.result-figure figcaption {
  width: 100%;
  max-width: 980px;
  margin: 18px auto 0;
  text-align: left;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.paper-figure figcaption p,
.algorithm-figure figcaption p,
.result-figure figcaption p {
  margin: 0 0 12px;
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 300;
  color: #444;
  text-align: left;
}

.paper-figure figcaption strong,
.algorithm-figure figcaption strong,
.result-figure figcaption strong {
  font-weight: 700;
  color: #333;
}

.caption-extra {
  margin-top: 10px !important;
}

/* =========================
   Figure 1
========================= */

.paper-figure {
  max-width: 980px;
  margin: 0 auto 36px;
  text-align: center;
}

.wide-figure {
  max-width: 980px;
}

.paper-figure img {
  display: block;
  width: 100%;
  max-width: 780px;
  height: auto;
  margin: 0 auto;
  border: none;
  outline: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.paper-figure figcaption em {
  font-style: italic;
}

.math {
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
}

.blue {
  color: blue;
  font-weight: 400;
}

.orange {
  color: #d97706;
  font-weight: 400;
}

.red {
  color: red;
  font-weight: 400;
}

/* =========================
   Algorithm Figures
========================= */

.algorithm-figure {
  max-width: 980px;
  margin: 30px auto 36px;
  text-align: center;
}

.algorithm-figure img {
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  margin: 0 auto;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
}

/* =========================
   Result Figures
========================= */

.result-figure {
  max-width: 980px;
  margin: 32px auto 36px;
  text-align: center;
}

.result-figure img {
  display: block;
  width: 100%;
  max-width: 980px;
  height: auto;
  margin: 0 auto;
  border: none;
  border-radius: 6px;
  background: #fff;
}

/* Smaller Figure 4 image, but caption remains 980px */
.compact-result-figure img {
  max-width: 760px;
}

/* Center only Figure 4 caption */
.compact-result-figure figcaption {
  text-align: center;
}

.compact-result-figure figcaption p {
  text-align: center;
}

/* =========================
   Math Box
========================= */

.math-box {
  margin: 26px 0;
  padding: 22px 26px;
  background: #f5f7fa;
  border-left: 4px solid #0b7cff;
  border-radius: 6px;
}

.math-box p {
  margin-bottom: 6px;
}

.equation {
  text-align: center;
  font-family: "Times New Roman", Times, serif;
  font-size: 1.35rem !important;
  margin-top: 8px;
}

/* =========================
   BibTeX
========================= */

pre {
  margin: 22px 0 40px;
  padding: 22px;
  overflow-x: auto;
  background: #f5f7fa;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.55;
  border: 1px solid #e5e5e5;
}

code {
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
}

/* =========================
   Footer
========================= */

footer {
  padding: 36px 20px 44px;
  text-align: center;
  background: #f2f3f5;
  color: #777;
  border-top: 1px solid #d8d8d8;
  margin-top: 40px;
}

footer p {
  margin: 6px 0;
  font-size: 0.95rem;
}

/* =========================
   Responsive
========================= */

@media (max-width: 900px) {
  .paper-figure,
  .wide-figure,
  .paper-figure img,
  .paper-figure figcaption,
  .algorithm-figure,
  .algorithm-figure img,
  .algorithm-figure figcaption,
  .result-figure,
  .result-figure img,
  .result-figure figcaption {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 46px 18px 58px;
  }

  .hero h1 {
    font-size: 2.15rem;
  }

  .subtitle {
    font-size: 1.02rem;
    margin-top: 22px;
  }

  .authors {
    font-size: 1.18rem;
    margin-top: 38px;
  }

  .affiliation {
    font-size: 1rem;
  }

  .btn {
    font-size: 1rem;
    padding: 12px 22px;
  }

  .section {
    padding-top: 42px;
  }

  .figure-section {
    padding-top: 42px;
  }

  .section h2 {
    font-size: 1.85rem;
  }

  .section-divider {
    margin: 16px auto 26px;
  }

  .section p {
    font-size: 1rem;
  }

  .equation {
    font-size: 1.2rem !important;
  }

  .paper-figure figcaption p,
  .algorithm-figure figcaption p,
  .result-figure figcaption p {
    font-size: 1rem;
    line-height: 1.5;
  }

  .compact-result-figure figcaption p {
    text-align: center;
  }
}