/* PINE project page. One blue theme, taken from the paper figures (#2B64A0 and the block fills #E7EFF7 and
   #D3E2F1 of the overview), and its scale for every colour on the page: text, lines, buttons, tags and panels. */
:root {
  --blue-50: #F3F7FB;
  --blue-100: #E7EFF7;
  --blue-200: #D3E2F1;
  --blue-300: #B9CDE0;
  --blue-400: #7FA4CB;
  --blue-500: #367DBD;
  --blue-600: #2B64A0;
  --blue-700: #234F80;
  --blue-800: #1D3D61;
  --blue-900: #17304B;
  --text: #253446;
  --mute: #657487;
  --line: #E0E8F0;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html,
body {
  background: #fff;
}

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue-600);
}

a:hover {
  color: var(--blue-700);
}

.title,
.subtitle {
  font-family: var(--font);
}

.title {
  color: var(--blue-900);
}

.subtitle {
  color: var(--text);
}

/* ---------- header ---------- */

.hero:first-of-type {
  background: linear-gradient(180deg, var(--blue-50) 0%, #fff 100%);
}

.publication-title {
  color: var(--blue-900);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.publication-title .pine {
  color: var(--blue-600);
}

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

.publication-authors a {
  color: var(--blue-600) !important;
}

.publication-authors a:hover {
  text-decoration: underline;
}

.author-block {
  display: inline-block;
}

.link-block a {
  margin-top: 5px;
  margin-bottom: 5px;
}

.publication-links .button {
  height: auto;
  padding: 0.5rem 1.15rem;
  border: 1px solid var(--blue-300);
  border-radius: 8px;
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.publication-links .button:hover {
  border-color: var(--blue-600);
  background: var(--blue-600);
  color: #fff;
}

.teaser .hero-body {
  padding-top: 0;
  padding-bottom: 3rem;
}

.teaser .subtitle {
  margin-top: 0.5rem;
  font-size: 1.15rem;
  line-height: 1.6;
}

.teaser .subtitle b {
  color: var(--blue-600);
}

/* ---------- sections ---------- */

.section + .section {
  border-top: 1px solid var(--line);
}

.section h2.title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--blue-800);
  letter-spacing: -0.01em;
}

.section h2.title::after {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  margin: 0.7rem auto 0;
  border-radius: 2px;
  background: var(--blue-600);
}

.section h3.title {
  margin-top: 2.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--blue-700);
}

.content {
  color: var(--text);
}

.abstract-card {
  padding: 1.5rem 2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--blue-50);
}

.abstract-card b {
  color: var(--blue-700);
}

/* ---------- paper figures ---------- */

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

.paper-figure-block {
  margin: 1.5rem 0 2.5rem;
}

.figure-caption {
  color: var(--mute);
  font-size: 0.92rem;
  line-height: 1.55;
}

.figure-caption b {
  color: var(--blue-800);
}

/* ---------- comparison with baselines ---------- */

.compare-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.compare-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--blue-50);
}

.compare-pills button {
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 1rem;
  background: transparent;
  color: var(--blue-800);
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.compare-pills button:hover {
  background: var(--blue-100);
}

.compare-pills.is-small button {
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
}

.compare-pills button.is-active {
  background: var(--blue-600);
  color: #fff;
}

.compare-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--blue-50);
  box-shadow: 0 4px 14px rgba(43, 100, 160, 0.08);
}

.compare-panel img {
  display: block;
  width: 100%;
}

.compare-cloud {
  display: none;
  aspect-ratio: 1 / 1;
  cursor: grab;
  touch-action: none;
}

.compare-cloud canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.compare-panel.is-3d img {
  display: none;
}

.compare-panel.is-3d .compare-cloud {
  display: block;
}

.compare-loading {
  display: none;
  position: absolute;
  bottom: 10px;
  right: 12px;
  color: var(--mute);
  font-size: 0.8rem;
}

.compare-panel.is-loading .compare-loading {
  display: block;
}

.compare-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--blue-900);
  font-size: 0.85rem;
}

.compare-tag.is-ours {
  border-color: var(--blue-600);
  background: var(--blue-600);
  color: #fff;
}

.compare-tag select {
  border: 0;
  background: transparent;
  color: var(--blue-900);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.compare-tag .is-best {
  font-weight: 700;
}

.compare-thumbs {
  display: grid;
  justify-content: center;
  gap: 10px;
  margin: 1.25rem auto 0.75rem;
}

.compare-thumbs img {
  height: 84px;
  width: auto;
  border: 2px solid transparent;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(23, 48, 75, 0.15);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s, transform 0.15s;
}

.compare-thumbs img:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.compare-thumbs img.is-active {
  border-color: var(--blue-600);
  opacity: 1;
}

/* ---------- BibTeX and footer ---------- */

#BibTeX pre {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--blue-50);
  color: var(--blue-900);
  font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.85rem;
}

#BibTeX pre code {
  background: transparent;
  color: inherit;
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--blue-50);
  color: var(--mute);
  font-size: 0.9rem;
}

.footer .content {
  color: var(--mute);
}

@media screen and (max-width: 768px) {
  .compare-thumbs {
    display: flex;
    flex-wrap: wrap;
  }

  .compare-thumbs img {
    height: 56px;
  }

  .abstract-card {
    padding: 1.25rem;
  }

  .publication-title {
    font-size: 2rem !important;
  }
}
