/* RePO project-page custom CSS.
   Designed to sit on top of the Nerfies/Bulma template while keeping the visual style close to a clean academic project page. */

:root {
  --paper-ink: #202124;
  --paper-muted: #5f6368;
  --paper-rule: #1f1f1f;
  --paper-hairline: #cfcfcf;
  --paper-soft: #f7f7f7;
  --paper-card: #ffffff;
  --paper-link: #2368b8;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans', 'Google Sans', Arial, sans-serif;
  color: var(--paper-ink);
  background: #ffffff;
}

.navbar-center {
  flex-grow: 1;
  justify-content: center;
}

.publication-hero .hero-body {
  padding-top: 3rem;
  padding-bottom: 1.75rem;
}

.publication-title {
  font-family: 'Google Sans', 'Noto Sans', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 1.25rem !important;
}

.gradient-text {
  background: linear-gradient(90deg, #60A5FA 0%, #C084FC 50%, #F472B6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
}

.publication-authors,
.affiliations {
  line-height: 1.6;
}

.publication-authors a {
  color: var(--paper-link);
}

.footnote-authors {
  margin-top: 0.45rem;
  color: var(--paper-muted);
}

.publication-venue {
  width: auto;
  margin: 0.9rem auto 0.75rem auto;
  font-family: 'Castoro', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #c2185b;
  text-align: center;
}

.publication-links {
  margin-top: 1rem;
  text-align: center;
}

.link-block {
  margin: 0.25rem;
  display: inline-block;
}

.section-title {
  font-family: 'Google Sans', 'Noto Sans', Arial, sans-serif;
  margin-bottom: 1.35rem !important;
}

.subsection-title {
  margin-top: 2.2rem;
  margin-bottom: 0.6rem !important;
  font-family: 'Google Sans', 'Noto Sans', Arial, sans-serif;
}

.compact-section {
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

.paper-text {
  font-size: 1.02rem;
  line-height: 1.72;
}

.paper-text p {
  margin-bottom: 0.9rem;
}

.teaser .hero-body {
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}

.teaser-sentence {
  max-width: 940px;
  margin: 1.45rem auto 0.15rem auto;
  padding: 1.05rem 1.35rem;
  font-family: 'Google Sans', 'Noto Sans', Arial, sans-serif;
  font-size: 1.36rem !important;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: #1f1f1f;
  background: #fafafa;
  border-top: 1.5px solid var(--paper-rule);
  border-bottom: 1.5px solid var(--paper-rule);
}

.figure-block {
  margin: 1.1rem auto 1.4rem auto;
  text-align: center;
}

.figure-block figcaption {
  max-width: 880px;
  margin: 0.55rem auto 0 auto;
  font-family: 'Castoro', Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #333;
  text-align: left;
}

.teaser-block figcaption {
  max-width: 980px;
  text-align: left;
}

.figure-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.png-figure-frame {
  width: 100%;
  margin: 0 auto;
  line-height: 0;
  background: #ffffff;
  border: 1px solid #eeeeee;
  overflow: hidden;
}

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

.png-figure-frame-small {
  max-width: 520px;
}

.figure-image-wide,
.figure-image-card {
  object-fit: contain;
  background: #ffffff;
}

.figure-card .png-figure-frame {
  border-color: #f0f0f0;
}

.figure-card {
  background: var(--paper-card);
  border: 1px solid #ebedf3;
  border-radius: 10px;
  padding: 1.4rem 1.3rem 1.15rem 1.3rem;
  height: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20, 30, 60, 0.04), 0 8px 24px rgba(20, 30, 60, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.figure-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2368b8 0%, #5f9ee8 100%);
}

.figure-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(20, 30, 60, 0.06), 0 18px 36px rgba(20, 30, 60, 0.08);
}

.motivation-columns .column:nth-child(2) .figure-card::before {
  background: linear-gradient(90deg, #6f3ab8 0%, #9a78d1 100%);
}

.card-title {
  position: relative;
  display: inline-block;
  padding-bottom: 0.45rem;
  margin-bottom: 0.55rem !important;
}

.card-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--paper-link);
  border-radius: 1px;
}

.motivation-columns .column:nth-child(2) .card-title::after {
  background: #6f3ab8;
}

.card-copy {
  color: #3d3d3d;
  line-height: 1.55;
  font-size: 0.98rem;
  margin-bottom: 0.8rem;
}

.motivation-columns {
  margin-top: 0.5rem;
}

.equation-block {
  width: 100%;
  max-width: 100%;
  margin: 1.1rem auto 1.35rem auto;
  padding: 0.35rem 0;
  overflow-x: visible;
  text-align: center;
  font-family: 'Castoro', Georgia, serif;
  color: #111111;
}

.compact-equation {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, calc(100vw - 2rem));
  max-width: none;
}

.equation-block mjx-container[jax="CHTML"][display="true"] {
  margin: 0.5rem 0 !important;
  font-size: 118% !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  max-width: 100%;
}

.method-cards {
  margin-top: 1.4rem;
  margin-bottom: 0.5rem;
}

.mini-card {
  height: 100%;
  background: #ffffff;
  border: 1px solid #ebedf3;
  border-radius: 10px;
  padding: 1.6rem 1.3rem 1.35rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20, 30, 60, 0.04), 0 8px 24px rgba(20, 30, 60, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.mini-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2368b8 0%, #5f9ee8 100%);
}

.mini-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(20, 30, 60, 0.06), 0 18px 36px rgba(20, 30, 60, 0.08);
}

.method-cards .column:nth-child(2) .mini-card::before {
  background: linear-gradient(90deg, #b86323 0%, #e88e5f 100%);
}

.method-cards .column:nth-child(3) .mini-card::before {
  background: linear-gradient(90deg, #2c9e75 0%, #5fbf9e 100%);
}

.mini-card-title {
  font-family: 'Google Sans', 'Noto Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--paper-ink);
  margin-bottom: 0.65rem;
  letter-spacing: -0.005em;
  position: relative;
  display: inline-block;
  padding-bottom: 0.45rem;
}

.mini-card-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: var(--paper-link);
  border-radius: 1px;
}

.method-cards .column:nth-child(2) .mini-card-title::after {
  background: #b86323;
}

.method-cards .column:nth-child(3) .mini-card-title::after {
  background: #2c9e75;
}

.mini-card p {
  color: #4a4a4a;
  font-size: 0.96rem;
  line-height: 1.6;
  margin: 0;
}

.table-note {
  font-size: 0.92rem;
  color: #555;
  margin-bottom: 0.55rem;
}

.second,
.second-best {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.paper-table-container {
  margin: 0.8rem auto 1.85rem auto;
}

.paper-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--paper-rule);
  border-bottom: 2px solid var(--paper-rule);
  background: #ffffff;
  font-family: 'Castoro', Georgia, serif;
  font-size: 0.92rem;
  line-height: 1.25;
}

.paper-table caption {
  caption-side: top;
  text-align: left;
  font-size: 0.96rem;
  line-height: 1.35;
  margin-bottom: 0.35rem;
  color: #222;
}

.paper-table th,
.paper-table td {
  padding: 0.36rem 0.55rem;
  text-align: center !important;
  vertical-align: middle;
  border: none;
}

.paper-table thead th {
  font-weight: 700;
  text-align: center !important;
  vertical-align: middle;
  border-bottom: 1.5px solid var(--paper-rule);
}

.paper-table thead tr th {
  text-align: center !important;
}

.paper-table tbody td {
  border-top: 1px solid #e8e8e8;
}

.paper-table tbody tr:first-child td {
  border-top: none;
}

.paper-table .group-start td {
  border-top: 1.6px solid var(--paper-rule) !important;
}

.paper-table .backbone-cell {
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.paper-table tbody .backbone-cell + td,
.paper-table tbody tr td:first-child:not(.backbone-cell) {
  text-align: left !important;
}

.method-row {
  background: #e8f1fc;
}

.method-row td {
  font-weight: 500;
}

.compact-paper-table {
  font-size: 0.9rem;
}

.split-figure {
  max-width: 900px;
}

.split-figure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.subfigure {
  background: #ffffff;
  border: 1px solid #eeeeee;
  padding: 0.55rem;
}

.subfigure img {
  width: 100%;
  height: auto;
}

.subcaption {
  margin-top: 0.35rem;
  font-family: 'Castoro', Georgia, serif;
  font-size: 0.93rem;
  color: #333;
}

.bibtex-block {
  background: #fbfbfb !important;
  border: 1px solid #e5e5e5;
  border-radius: 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.footer {
  padding: 2rem 1.5rem;
}

.footer-copy {
  font-size: 0.92rem;
  color: #555;
}

code {
  color: #333;
  background: #f5f5f5;
}

@media screen and (max-width: 768px) {
  .publication-title {
    font-size: 2rem !important;
  }

  .desktop-break {
    display: none;
  }

  .paper-text {
    font-size: 0.98rem;
    line-height: 1.65;
  }


  .teaser-sentence {
    padding: 0.9rem 1rem;
    font-size: 1.08rem !important;
    line-height: 1.45;
  }

  .equation-block {
    font-size: 0.86rem;
    padding-left: 0;
    padding-right: 0;
  }

  .png-figure-frame-wide,
  .png-figure-frame-small {
    max-width: 100%;
  }

  .split-figure-grid {
    grid-template-columns: 1fr;
  }

  .paper-table {
    font-size: 0.78rem;
  }

  .paper-table th,
  .paper-table td {
    padding: 0.28rem 0.35rem;
  }

  .figure-block figcaption {
    font-size: 0.88rem;
  }
}
