/*
 * MVLoMa project page - base layout.
 * Visual language follows the Kosmo Research UniQuery4R page
 * (Academic Project Page Template / Nerfies lineage).
 */
:root {
  color-scheme: light;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #6456c7;
  --accent-hover: #4b3eb2;
  --ink: #172033;
  --text: #1e293b;
  --muted: #64748b;
  --muted-2: #657086;
  --light: #94a3b8;
  --surface: #fff;
  --surface-alt: #f8fafc;
  --surface-soft: #f1f5f9;
  --border: #e2e8f0;
  --ours-tint: #eff6ff;
  --series-ours: #2563eb;
  --series-other: #7c8799;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px #0000000d;
  --shadow-md: 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;
  --shadow-xl: 0 20px 25px -5px #0000001a, 0 8px 10px -6px #0000001a;
  --transition: all .3s cubic-bezier(.4, 0, .2, 1);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--surface);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--primary); }
sup { color: var(--muted); font-size: .7em; }
code, pre { font-family: var(--mono); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container { width: calc(100% - 3rem); margin-inline: auto; }
.is-max-desktop { max-width: 960px; }
.is-wide { max-width: 1180px; }
.has-text-centered { text-align: center; }
.section { padding: 5rem 1.5rem; }
.hero { position: relative; }
.hero.is-light {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}
section[id] { scroll-margin-top: 64px; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 64px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(223, 227, 235, .88);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.site-header .wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-self: start;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.035em;
  text-decoration: none;
}
.site-header .wordmark img { width: 22px; height: 22px; }
.site-header nav {
  display: flex;
  gap: clamp(14px, 2vw, 26px);
  color: #4c566c;
  font-size: 13px;
  font-weight: 650;
}
.site-header nav a,
.site-header .header-paper {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease;
}
.site-header nav a:hover,
.site-header nav a.is-active,
.site-header .header-paper:hover { color: var(--primary); }
.site-header .header-paper {
  justify-self: end;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

/* ------------------------------------------------------------------ hero */
.publication-header {
  padding: clamp(84px, 11vw, 142px) 0 clamp(72px, 9vw, 116px);
  overflow: hidden;
  color: var(--ink);
  text-align: center;
  background:
    radial-gradient(circle at 50% -18%, rgba(37, 99, 235, .17), transparent 48%),
    linear-gradient(180deg, #f7faff 0%, #fff 72%);
}
.publication-header .container { width: min(100% - 40px, 1180px); }
.publication-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  color: var(--ink);
}
.publication-brand img { width: 112px; height: auto; display: block; }
.publication-brand span {
  padding-left: 12px;
  border-left: 1px solid #cfd5e1;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.publication-title {
  margin: 0 auto;
  max-width: 1180px;
  color: var(--ink);
  /* Two lines on desktop: the break sits after "Matching". */
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.publication-title .title-accent { color: var(--primary); }
.publication-authors {
  margin: 28px auto 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 0;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.55;
}
.author-block { margin-right: 8px; white-space: nowrap; }
.publication-header sup {
  margin-left: 2px;
  color: var(--accent);
  font-size: .68em;
  font-weight: 800;
}
.publication-affiliations {
  max-width: 960px;
  margin: 12px auto 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 20px;
  color: var(--muted-2);
  font-size: 1.1rem;
}
.publication-links {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.button {
  min-width: 116px;
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--ink);
  border: 1px solid #dfe3eb;
  border-radius: 9px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.6;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.button svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.button.is-primary { color: #fff; border-color: var(--accent); background: var(--accent); }
.button:hover:not(.is-disabled) {
  transform: translateY(-2px);
  border-color: #beb7ec;
  box-shadow: 0 8px 20px rgba(62, 53, 137, .1);
}
.button.is-primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); }
.button.is-disabled { color: #7d8493; background: #f5f6f8; cursor: not-allowed; }
.button .soon {
  padding: 1px 6px;
  border-radius: 99px;
  background: #e7e9ef;
  color: #687083;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- teaser */
.teaser { padding: 0 1.5rem 4.5rem; }
.publication-banner {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-xl);
}
.publication-banner img {
  width: 100%;
  height: auto;
  display: block;
  /* White margin like the gallery viewer, so the outer views don't touch the frame. */
  padding: 2% 5%;
  box-sizing: border-box;
}
.subtitle {
  max-width: 940px;
  margin: 0 auto 2rem;
  color: #334155;
  font-size: 1.32rem;
  font-weight: 500;
  line-height: 1.6;
}
.subtitle strong { color: var(--ink); }
.metrics {
  margin-top: 2.6rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.metric {
  padding: 1.35rem 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.metric strong {
  display: block;
  color: var(--primary);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.15;
}
.metric span { display: block; margin: .35rem 0 .2rem; color: var(--text); font-weight: 700; font-size: .95rem; }
.metric small { color: var(--muted); font-size: .8rem; line-height: 1.45; display: block; }

/* --------------------------------------------------------------- section */
.section-kicker {
  margin: 0 0 15px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.6;
  text-align: center;
  text-transform: uppercase;
}
.title.is-3 {
  position: relative;
  margin: 0 auto 46px;
  padding-bottom: 18px;
  color: var(--ink);
  font-size: clamp(32px, 4.4vw, 46px);
  font-weight: 760;
  line-height: 1.15;
  letter-spacing: -.04em;
  text-align: center;
}
.title.is-3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 54px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, #2563eb, #78a6ff);
  transform: translateX(-50%);
}
.title.is-3:has(+ .section-intro) { margin-bottom: 0; }
.section-intro {
  max-width: 760px;
  margin: 20px auto 46px;
  color: var(--muted-2);
  font-size: 16px;
  line-height: 1.7;
  text-align: center;
}
.sub-title {
  margin: 0 0 .5rem;
  color: var(--text);
  font-size: 1.35rem;
  text-align: center;
}
.sub-title + .chart-card { margin-top: 1.2rem; }
.sub-intro {
  max-width: 760px;
  margin: 0 auto 1.4rem;
  color: var(--muted);
  font-size: .92rem;
  text-align: center;
}

/* -------------------------------------------------------------- abstract */
.content.has-text-justified {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.85;
  text-align: justify;
  hyphens: auto;
}
.content p { margin: 0 0 1.5rem; }
.content p:last-child { margin-bottom: 0; }
.content strong { color: var(--text); }
.keywords {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
}
.keywords span {
  padding: .3rem .75rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: #fff;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
}

/* ---------------------------------------------------------------- method */
.publication-figure {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}
.publication-figure img { width: 100%; height: auto; display: block; border-radius: var(--radius); }
.publication-figure figcaption {
  padding: 1rem .4rem .15rem;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.65;
  text-align: center;
}
.publication-figure figcaption strong { color: var(--text); }
.zoomable { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.zoomable .zoom-badge {
  position: absolute;
  right: .7rem;
  bottom: .7rem;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(23, 32, 51, .78);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  opacity: .85;
  transition: opacity .2s;
}
.zoomable:hover .zoom-badge { opacity: 1; }
.zoomable .zoom-badge svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2px; }

.feature-columns {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}
.feature-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-alt);
}
.feature-number { color: var(--primary); font-size: .85rem; font-weight: 800; letter-spacing: .1em; }
.feature-card h3 { margin: .55rem 0 .65rem; color: var(--ink); font-size: 1.3rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
#method .publication-figure figcaption { font-size: 1.05rem; }
.feature-card .formula {
  margin-top: auto;
  padding: .5rem .65rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: .76rem;
  line-height: 1.5;
}

.details-card {
  margin-top: 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.details-card summary {
  padding: 1rem 1.25rem;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.details-card summary::-webkit-details-marker { display: none; }
.details-card summary::after { content: "+"; color: var(--primary); font-size: 1.3rem; line-height: 1; }
.details-card[open] summary::after { content: "\2212"; }
.details-card .details-body { padding: 0 1.25rem 1.25rem; color: var(--muted); font-size: .92rem; }
.details-card .details-body ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.details-card .details-body li { margin: .25rem 0; }
