/* ============================================================
   PLaW-VLA — project page styles.
   Editorial palette inspired by Figure 1: deep pine green +
   refined gold on warm cream. Designed to feel like a Nature /
   π0-style high-end paper page rather than a generic SaaS site.
   ============================================================ */

:root {
  /* Surfaces */
  --bg:            #F8F5EE;   /* warm cream page background */
  --bg-soft:       #F1ECE0;   /* hero-light section tint */
  --surface:       #FFFFFF;   /* cards / video / table backgrounds */
  --border:        #E3DBC8;   /* warm beige hairline */

  /* Ink */
  --ink:           #14201D;   /* deep forest-ink for headings */
  --ink-soft:      #2E3E3A;   /* body text */
  --muted:         #5F6F6A;   /* secondary text */

  /* Brand */
  --pine:          #1E4F46;   /* primary deep pine green */
  --pine-strong:   #143A33;   /* hover / active */
  --moss:          #2F6B5C;   /* lighter accent */
  --gold:          #B98A1B;   /* refined gold */
  --gold-soft:     #D9B65D;   /* gold highlight */
  --cream-pill:    #EFE6CF;   /* venue-badge fill */

  /* Code */
  --code-bg:       #0F1F1B;
  --code-fg:       #E9E2CB;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: "Inter", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

::selection {
  background: rgba(185, 138, 27, 0.28);
  color: var(--ink);
}

a { color: var(--pine); transition: color .15s ease; }
a:hover { color: var(--gold); }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ------------------------------------------------------------
   HERO
   ------------------------------------------------------------ */
.hero {
  background: var(--bg);
}

.hero .hero-body {
  padding-top: 5.5rem;
  padding-bottom: 2.2rem;
}

.publication-title {
  font-family: "Inter", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin-bottom: 1.1rem !important;
  line-height: 1.15;
  font-feature-settings: "ss01", "cv11";
  font-size: 3.1rem;
}

.publication-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(430px, 82vw);
  margin-bottom: 0.25rem;
}

.publication-logo img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(20, 32, 29, 0.08));
  transition: transform .22s ease,
              filter .22s ease;
}

.publication-logo:hover img {
  transform: translateY(-1px);
  filter: drop-shadow(0 12px 22px rgba(20, 32, 29, 0.12));
}

.publication-title .acronym {
  background: linear-gradient(135deg, var(--pine) 0%, var(--moss) 55%, var(--gold) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.publication-title .title-sep {
  color: var(--gold);
  margin-left: 0.02em;
  font-weight: 700;
}

.publication-title .title-rest {
  font-size: 0.6em;
  font-weight: 500;
  color: var(--ink);
  display: inline-block;
  margin-top: 0.65rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.publication-venue {
  margin: 0.4rem 0 1.6rem;
}

.venue-badge {
  display: inline-block;
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--cream-pill);
  color: var(--pine);
  border: 1px solid rgba(185, 138, 27, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* Authors */
.publication-authors {
  margin: 0.4rem auto 0.45rem;
  max-width: 880px;
  line-height: 1.75;
  color: var(--ink);
  font-family: "Inter", "Noto Sans SC", sans-serif;
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: -0.005em;
}

.publication-authors .author-block {
  display: inline-block;
  margin: 0 0.3rem;
  white-space: nowrap;
}

.publication-authors a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  text-decoration: none;
}

.publication-authors a:hover {
  color: var(--pine);
  border-bottom-color: var(--gold);
}

.publication-authors sup,
.publication-affiliations sup,
.publication-corresponding sup {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.7em;
  padding: 0 0.05em 0 0.03em;
}

/* Affiliations */
.publication-affiliations {
  color: var(--muted);
  margin: 0 auto 0.25rem;
  max-width: 880px;
  line-height: 1.6;
  font-size: 0.92rem;
  font-style: italic;
  font-weight: 400;
}

.publication-affiliations .aff-block {
  display: inline-block;
  margin: 0 0.2rem;
  white-space: nowrap;
}

.publication-corresponding {
  color: var(--muted);
  margin: 0.45rem 0 1.6rem;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  font-weight: 400;
}

.publication-corresponding span,
.publication-affiliations .aff-block {
  white-space: nowrap;
}

.aff-sep {
  color: rgba(185, 138, 27, 0.55);
  margin: 0 0.55rem;
  font-weight: 500;
}

/* ------------------------------------------------------------
   Action button row
   ------------------------------------------------------------ */
.publication-links {
  position: relative;
  margin-top: 1.6rem;
  padding-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.publication-links .link-block {
  position: relative;
  display: inline-flex;
}

.publication-links::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(185, 138, 27, 0.45) 50%, transparent 100%);
}

.publication-links .button.is-dark {
  background: var(--ink);
  border: 1px solid var(--ink);
  color: #F6F1E1;
  font-family: "Inter", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.5rem 1.05rem;
  height: auto;
  border-radius: 999px;
  transition: background .18s ease,
              transform .18s ease,
              box-shadow .18s ease,
              border-color .18s ease,
              color .18s ease;
}

.publication-links .button.is-dark:hover {
  background: var(--pine);
  border-color: var(--pine);
  color: #FBF6E2;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(20, 58, 51, 0.25),
              0 0 0 1px var(--gold-soft) inset;
}

.publication-links .button .icon {
  margin-right: 0.45rem;
  color: var(--gold-soft);
}

.publication-links .button.is-dark:hover .icon {
  color: #FBE7A8;
}

.publication-links .button.is-muted-release {
  cursor: default;
  opacity: 0.56;
  background: #20302B;
  border-color: rgba(20, 32, 29, 0.72);
  color: rgba(246, 241, 225, 0.82);
  box-shadow: none;
}

.publication-links .button.is-muted-release:hover {
  opacity: 0.82;
  background: #20302B;
  border-color: rgba(185, 138, 27, 0.34);
  color: #F6F1E1;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(20, 32, 29, 0.14);
}

.brand-button-icon {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  object-fit: contain;
}

.huggingface-icon {
  width: 1.12rem;
  height: 1.12rem;
}

.has-release-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.7rem);
  z-index: 30;
  width: max-content;
  max-width: 250px;
  padding: 0.5rem 0.65rem;
  border-radius: 9px;
  background: rgba(15, 31, 27, 0.96);
  color: #F8F5EE;
  box-shadow: 0 12px 28px rgba(20, 32, 29, 0.24);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: opacity .16s ease,
              transform .16s ease;
}

.has-release-tooltip::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.35rem);
  z-index: 31;
  width: 0.6rem;
  height: 0.6rem;
  background: rgba(15, 31, 27, 0.96);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) rotate(45deg);
  transition: opacity .16s ease;
}

.has-release-tooltip:hover::after,
.has-release-tooltip:focus-within::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.has-release-tooltip:hover::before,
.has-release-tooltip:focus-within::before {
  opacity: 1;
}

/* ------------------------------------------------------------
   Teaser
   ------------------------------------------------------------ */
.hero.teaser {
  background: var(--bg);
}

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

.hero.teaser figure.image {
  --teaser-tilt-x: 0deg;
  --teaser-tilt-y: 0deg;
  --teaser-lift: 0px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  perspective: 1200px;
  transform-style: preserve-3d;
}

.hero.teaser picture,
.method-figure picture {
  display: block;
}

.hero.teaser img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  filter: drop-shadow(0 20px 32px rgba(20, 32, 29, 0.10));
  transform: rotateX(var(--teaser-tilt-x)) rotateY(var(--teaser-tilt-y)) translate3d(0, var(--teaser-lift), 0);
  transform-origin: center;
  will-change: transform;
  transition: transform .32s cubic-bezier(.2,.8,.2,1),
              filter .32s ease;
}

.hero.teaser figure.image:hover img,
.hero.teaser figure.image.is-depth-active img {
  filter: drop-shadow(0 26px 40px rgba(20, 32, 29, 0.13));
}

.hero.teaser .subtitle {
  margin-top: 1.4rem;
  color: var(--ink-soft);
  font-family: "Inter", "Noto Sans SC", sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.65;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.hero.teaser .subtitle strong {
  color: var(--pine);
}

.hero.teaser .subtitle em {
  color: var(--gold);
  font-style: italic;
}

/* ------------------------------------------------------------
   Section
   ------------------------------------------------------------ */
.section {
  padding: 4rem 1.5rem;
  background: var(--bg);
}

.section.hero.is-light,
.hero.is-light {
  background: var(--bg-soft) !important;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section .title.is-3 {
  margin-bottom: 0.6rem;
  font-family: "Inter", "Noto Sans SC", sans-serif;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.022em;
  position: relative;
  display: inline-block;
  font-size: 2rem;
}

.section .title.is-3::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: 0.55rem auto 0;
  background: linear-gradient(90deg, var(--pine) 0%, var(--gold) 100%);
  border-radius: 2px;
}

.section .title.is-3.has-text-centered {
  display: table;
  margin-left: auto;
  margin-right: auto;
}

.section-subtitle {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 760px;
  margin: 0 auto 2rem;
}

.section .content {
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.section .content strong { color: var(--pine); }
.section .content em     { color: var(--gold); font-style: italic; }

.section .content ul {
  margin-left: 1.4rem;
}

.section .content ul li {
  margin-bottom: 0.4rem;
}

/* ------------------------------------------------------------
   Keyword pills
   ------------------------------------------------------------ */
.keywords-line {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.keyword-pill {
  display: inline-block;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--cream-pill);
  color: var(--pine);
  border: 1px solid rgba(185, 138, 27, 0.32);
}

/* ------------------------------------------------------------
   Video embed
   ------------------------------------------------------------ */
.publication-video {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
  border-radius: 14px;
  background: var(--ink);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(20, 32, 29, 0.14);
  transition: transform .22s ease,
              box-shadow .22s ease,
              border-color .22s ease;
}

.publication-video:hover {
  transform: translateY(-3px);
  border-color: rgba(185, 138, 27, 0.42);
  box-shadow: 0 24px 56px rgba(20, 32, 29, 0.18);
}

.publication-video iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ------------------------------------------------------------
   Web results
   ------------------------------------------------------------ */
.results-section .section-subtitle {
  margin-bottom: 2rem;
}

.results-section {
  overflow-x: hidden;
}

.results-section .container,
.results-section .columns {
  max-width: 100%;
  min-width: 0;
}

.results-section .column,
.experiment-block,
.chart-card {
  min-width: 0;
}

.experiment-block {
  margin-top: 2.1rem;
}

.experiment-block:first-of-type {
  margin-top: 0;
}

.experiment-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  max-width: 860px;
  margin: 0 auto 1.15rem;
  text-align: left;
}

.section-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  background: var(--pine);
  color: #FFF7DE;
  box-shadow: 0 8px 20px rgba(20, 58, 51, 0.22);
  font-size: 0.95rem;
  font-weight: 700;
}

.experiment-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.28rem;
  font-weight: 760;
  line-height: 1.2;
}

.experiment-heading p {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

.result-video {
  max-width: 860px;
  margin: 0 auto;
}

.chart-card {
  margin-top: 1.2rem;
  padding: 1.3rem;
  border-radius: 20px;
  background: linear-gradient(180deg, #FFFDF8 0%, #F7EFDE 100%);
  border: 1px solid rgba(185, 138, 27, 0.28);
  box-shadow: 0 18px 44px rgba(20, 32, 29, 0.12),
              0 1px 0 rgba(255, 255, 255, 0.74) inset;
  overflow: hidden;
  transition: transform .22s ease,
              box-shadow .22s ease,
              border-color .22s ease;
}

.chart-card:hover {
  transform: translateY(-2px);
  border-color: rgba(185, 138, 27, 0.38);
  box-shadow: 0 24px 54px rgba(20, 32, 29, 0.15),
              0 1px 0 rgba(255, 255, 255, 0.74) inset;
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.subsection-kicker {
  display: inline-block;
  margin-bottom: 0.22rem;
  color: var(--pine);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chart-card-header h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 760;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.chart-meta {
  display: grid;
  justify-items: end;
  gap: 0.5rem;
}

.chart-note {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  margin: 0;
  padding: 0.26rem 0.58rem;
  border-radius: 999px;
  background: rgba(185, 138, 27, 0.10);
  border: 1px solid rgba(185, 138, 27, 0.24);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.chart-note span {
  color: var(--gold);
  font-weight: 800;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 620;
}

.chart-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  white-space: nowrap;
}

.chart-legend > span::before {
  content: "";
  width: 0.72rem;
  height: 0.72rem;
  flex: 0 0 0.72rem;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(20, 32, 29, 0.14);
}

.legend-model-name {
  font-family: "Times New Roman", "Nimbus Roman No9 L", serif;
  font-size: 1.08em;
  font-weight: 600;
  line-height: 1;
}

.legend-model-name sub {
  position: relative;
  bottom: -0.12em;
  font-size: 0.72em;
  line-height: 0;
  vertical-align: baseline;
}

.legend-pi0::before {
  background: linear-gradient(180deg, #F3B1B2 0%, #D87479 100%);
}

.legend-pi05::before {
  background: linear-gradient(180deg, #EE817C 0%, #BE3F48 100%);
}

.legend-ours::before {
  background: linear-gradient(180deg, #FFE38A 0%, #D7A51D 100%);
}

.grouped-column-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(7.6rem, 1fr));
  gap: 0.82rem;
  min-height: 310px;
  padding: 1.1rem 0.75rem 0.7rem;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.38)),
    repeating-linear-gradient(
      to top,
      rgba(20, 58, 51, 0.08) 0,
      rgba(20, 58, 51, 0.08) 1px,
      transparent 1px,
      transparent 52px
    );
  border: 1px solid rgba(227, 219, 200, 0.9);
  width: 100%;
  max-width: 100%;
}

.chart-group {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0.55rem;
  min-width: 0;
  height: 100%;
  padding: 0.35rem 0.1rem 0.2rem;
  border-radius: 12px;
  transition: background .18s ease,
              transform .18s ease,
              opacity .18s ease;
}

.chart-columns {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 0.25rem;
  height: 220px;
}

.chart-group .chart-columns i {
  position: relative;
  display: block;
  width: 1.1rem;
  height: var(--h);
  min-height: 12px;
  border-radius: 8px 8px 3px 3px;
  box-shadow: 0 8px 14px rgba(20, 32, 29, 0.14),
              0 1px 0 rgba(255, 255, 255, 0.55) inset;
  transform-origin: bottom;
  animation: growBar 850ms cubic-bezier(.2,.8,.2,1) both;
  cursor: default;
  transition: filter .18s ease,
              box-shadow .18s ease,
              translate .18s ease,
              width .18s ease;
}

.grouped-column-chart:hover .chart-group {
  opacity: 0.62;
}

.grouped-column-chart:hover .chart-group:hover {
  opacity: 1;
}

.chart-group:hover > span {
  color: var(--pine);
}

.chart-group .chart-columns i:hover,
.chart-group .chart-columns i:focus {
  outline: none;
  filter: saturate(1.18) brightness(1.04);
  translate: 0 -5px;
  box-shadow: 0 15px 24px rgba(20, 32, 29, 0.20),
              0 1px 0 rgba(255, 255, 255, 0.70) inset;
}

.chart-group .chart-columns i:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
}

.chart-group.is-replaying .chart-columns i {
  animation: growBar 620ms cubic-bezier(.2,.8,.2,1) both;
}

.chart-group .chart-columns i:nth-child(2) {
  animation-delay: 90ms;
}

.chart-group .chart-columns i:nth-child(3) {
  animation-delay: 180ms;
}

.chart-columns i b {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.28rem);
  transform: translateX(-50%);
  color: var(--ink);
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 760;
  white-space: nowrap;
  display: none;
  opacity: 0;
  animation: fadeValue 450ms ease 500ms forwards;
  pointer-events: none;
}

.chart-columns i.show-value b {
  display: block;
}

.chart-columns i.second-best b {
  left: 45%;
}

.chart-columns i.ours b {
  left: 55%;
}

.chart-group > span {
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.chart-group.zero-shot {
  padding: 0.45rem 0.18rem 0.25rem;
  border-radius: 12px;
  background: rgba(217, 182, 93, 0.12);
}

.pi0 {
  background: linear-gradient(180deg, #F6BDBD 0%, #D87479 100%);
}

.pi05 {
  background: linear-gradient(180deg, #F18B84 0%, #BE3F48 100%);
}

.ours {
  background: linear-gradient(180deg, #FFE58C 0%, #D8A51B 100%);
}

@keyframes growBar {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@keyframes fadeValue {
  from { opacity: 0; transform: translateX(-50%) translateY(4px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .chart-columns i b {
    opacity: 1;
  }
}

/* ------------------------------------------------------------
   Method summary
   ------------------------------------------------------------ */
.method-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

.method-point {
  position: relative;
  overflow: hidden;
  padding: 1rem;
  border-radius: 14px;
  background: #FFFDF7;
  border: 1px solid rgba(185, 138, 27, 0.24);
  box-shadow: 0 10px 26px rgba(20, 32, 29, 0.07);
  transition: transform .2s ease,
              box-shadow .2s ease,
              border-color .2s ease;
}

.method-point::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1rem;
  width: 2.4rem;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--pine);
  transition: width .2s ease;
}

.method-point:nth-child(2)::before {
  background: var(--gold-soft);
}

.method-point:nth-child(3)::before {
  background: #D85B61;
}

.method-point:hover {
  transform: translateY(-3px);
  border-color: rgba(185, 138, 27, 0.38);
  box-shadow: 0 16px 34px rgba(20, 32, 29, 0.11);
}

.method-point:hover::before {
  width: 3.4rem;
}

.method-point strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--pine);
  font-size: 0.95rem;
}

.method-point span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ------------------------------------------------------------
   Figures
   ------------------------------------------------------------ */
.method-figure,
.results-figure {
  margin: 0 auto 1.8rem auto;
  padding: 16px;
  text-align: center;
  max-width: 100%;
  border-radius: 18px;
  background: linear-gradient(180deg, #FFFDF7 0%, #F4EDDD 100%);
  border: 1px solid rgba(185, 138, 27, 0.28);
  box-shadow: 0 18px 42px rgba(20, 32, 29, 0.12),
              0 1px 0 rgba(255, 255, 255, 0.72) inset;
}

.method-figure img,
.results-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid rgba(20, 58, 51, 0.16);
  box-shadow: 0 8px 20px rgba(20, 32, 29, 0.08);
}

.method-figure {
  transition: transform .24s ease,
              box-shadow .24s ease,
              border-color .24s ease;
}

.method-figure:hover {
  transform: translateY(-3px);
  border-color: rgba(185, 138, 27, 0.4);
  box-shadow: 0 26px 58px rgba(20, 32, 29, 0.15),
              0 1px 0 rgba(255, 255, 255, 0.72) inset;
}

.figure-caption {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: center;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

.figure-caption strong { color: var(--pine); }
.figure-caption em     { color: var(--gold); font-style: italic; }

/* ------------------------------------------------------------
   Qualitative carousel
   ------------------------------------------------------------ */
.results-carousel {
  padding: 0 2rem;
}

.results-carousel .item {
  margin: 0 1rem;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, #FFFDF7 0%, #F4EDDD 100%);
  border: 1px solid rgba(185, 138, 27, 0.24);
  box-shadow: 0 10px 28px rgba(20, 32, 29, 0.10);
  text-align: center;
}

.results-carousel img {
  display: block;
  border-radius: 11px;
  max-height: 360px;
  object-fit: cover;
  width: 100%;
  background: var(--surface);
  border: 1px solid rgba(20, 58, 51, 0.16);
  box-shadow: 0 6px 16px rgba(20, 32, 29, 0.08);
}

.results-carousel .figure-caption {
  margin-top: 0.6rem;
  font-size: 0.92rem;
}

/* bulma-carousel arrow / dot overrides */
.slider-navigation-next,
.slider-navigation-previous {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 4px 14px rgba(20, 32, 29, 0.10) !important;
}

.slider-navigation-next svg,
.slider-navigation-previous svg {
  stroke: var(--pine) !important;
}

.slider-pagination .slider-page.is-active {
  background: var(--pine) !important;
}

.slider-pagination .slider-page {
  background: rgba(20, 58, 51, 0.25) !important;
}

/* ------------------------------------------------------------
   BibTeX
   ------------------------------------------------------------ */
.bibtex-wrapper {
  position: relative;
  background: linear-gradient(180deg, #F3F5EF 0%, #E9EFE8 100%);
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1.5rem 1.5rem;
  box-shadow: 0 12px 28px rgba(20, 32, 29, 0.08),
              0 1px 0 rgba(255, 255, 255, 0.72) inset;
  border: 1px solid rgba(30, 79, 70, 0.16);
}

.bibtex-wrapper pre {
  background: transparent;
  color: #29453F;
  padding: 0;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
}

.bibtex-wrapper code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-family: "JetBrains Mono", "Fira Code", "Menlo", "Consolas", monospace;
}

.bibtex-copy-button {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  background: rgba(255, 255, 255, 0.68) !important;
  color: var(--pine) !important;
  border: 1px solid rgba(30, 79, 70, 0.20) !important;
  font-weight: 500;
}

.bibtex-copy-button:hover {
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--pine-strong) !important;
  border-color: rgba(30, 79, 70, 0.34) !important;
}

.bibtex-copy-button:focus-visible {
  outline: 2px solid var(--gold) !important;
  outline-offset: 3px;
}

.bibtex-copy-button.is-copied {
  background: var(--moss) !important;
  border-color: var(--moss) !important;
  color: #F8F5EE !important;
}

/* ------------------------------------------------------------
   Acknowledgements + footer
   ------------------------------------------------------------ */
.ack-text {
  max-width: 760px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.ack-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin: 0 0.08rem;
  color: var(--pine);
  text-decoration: none;
  border-bottom: 1px solid rgba(185, 138, 27, 0.34);
}

.ack-contact-link .icon {
  width: 0.92rem;
  height: 0.92rem;
  color: var(--gold);
  font-size: 0.72rem;
}

.ack-contact-link:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem 3rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer a {
  color: var(--pine);
  border-bottom: 1px solid transparent;
}

.footer a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ------------------------------------------------------------
   Mobile tweaks
   ------------------------------------------------------------ */
@media screen and (max-width: 768px) {
  .publication-title              { font-size: 2rem !important; }
  .publication-logo               { max-width: min(320px, 86vw); margin-bottom: 0.35rem; }
  .publication-title .title-rest  { font-size: 0.82em; margin-top: 0.4rem; }
  .hero .hero-body                { padding-top: 3rem; }
  .section                        { padding: 2.5rem 1rem; }

  .publication-authors            { font-size: 0.95rem; line-height: 1.7; }
  .publication-affiliations       { font-size: 0.86rem; }
  .publication-corresponding      { font-size: 0.78rem; }
  .publication-affiliations .aff-sep,
  .publication-corresponding .aff-sep { margin: 0 0.35rem; }

  .publication-links .button {
    font-size: 0.82rem;
    padding: 0.45rem 0.85rem;
  }

  .experiment-heading {
    gap: 0.7rem;
  }

  .section-index {
    width: 1.9rem;
    height: 1.9rem;
    font-size: 0.85rem;
  }

  .experiment-heading h3 {
    font-size: 1.08rem;
  }

  .experiment-heading p {
    font-size: 0.88rem;
  }

  .chart-card {
    padding: 1rem;
    border-radius: 16px;
  }

  .chart-card-header {
    display: block;
  }

  .chart-meta {
    justify-items: start;
    margin-top: 0.75rem;
  }

  .grouped-column-chart {
    display: flex;
    gap: 0.82rem;
    overflow-x: auto;
    overflow-y: hidden;
    height: 285px;
    min-height: 285px;
    padding-bottom: 0.9rem;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(185, 138, 27, 0.48) transparent;
  }

  .grouped-column-chart::-webkit-scrollbar {
    height: 5px;
  }

  .grouped-column-chart::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(185, 138, 27, 0.48);
  }

  .grouped-column-chart::-webkit-scrollbar-track {
    background: transparent;
  }

  .grouped-column-chart .chart-group {
    flex: 0 0 8rem;
    height: 250px;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
  }

  .result-video {
    max-width: 100%;
  }

  .chart-columns {
    height: 190px;
  }

  .chart-group .chart-columns i {
    width: 1rem;
  }

  .method-summary {
    grid-template-columns: 1fr;
  }

  .method-figure,
  .results-figure {
    padding: 9px;
    border-radius: 13px;
  }

  .method-figure img,
  .results-figure img {
    border-radius: 9px;
  }

  .results-carousel { padding: 0 0.5rem; }

  .results-carousel .item {
    margin: 0 0.5rem;
    padding: 9px;
  }
}
