:root {
  --text: #303238;
  --muted: #666b73;
  --link: #2368d8;
  --accent: #d7192d;
  --accent-dark: #a90f1f;
  --accent-soft: #fff1f3;
  --light: #f6f7f9;
  --lighter: #fafbfc;
  --white: #ffffff;
  --dark: #303238;
  --border: #dfe2e7;
  --shadow: 0 16px 42px rgba(31, 35, 43, 0.09);
  --max-width: 1060px;
  --wide-width: 1320px;
  --narrow-width: 850px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.58;
  text-rendering: optimizeLegibility;
}
body.lightbox-open { overflow: hidden; }
a { color: var(--link); text-underline-offset: 3px; }
img { max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(calc(100% - 36px), var(--max-width));
  margin-inline: auto;
}
.container.wide { width: min(calc(100% - 36px), var(--wide-width)); }
.container.narrow { width: min(calc(100% - 36px), var(--narrow-width)); }

.hero { display: flex; align-items: stretch; }
.hero-body { width: 100%; padding: 3rem 0; }

.publication-header {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 8%, rgba(215, 25, 45, 0.055), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(35, 104, 216, 0.05), transparent 25%),
    linear-gradient(180deg, #fff 0%, #fcfcfd 100%);
}
.publication-header::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(90%, 900px);
  height: 1px;
  background: linear-gradient(90deg, transparent, #d9dce1, transparent);
  transform: translateX(-50%);
}
.publication-header .hero-body { padding-top: 52px; padding-bottom: 38px; text-align: center; }
.venue {
  display: inline-block;
  margin: 0 0 19px;
  padding: 6px 13px;
  border: 1px solid #cbd9eb;
  border-radius: 999px;
  color: #315a8b;
  background: #f5f9fd;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .045em;
}
.publication-title {
  max-width: 1150px;
  margin: 0 auto;
  font-size: clamp(2.7rem, 6.4vw, 5.2rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -.055em;
}
.publication-subtitle {
  max-width: 970px;
  margin: 18px auto 0;
  color: #43464c;
  font-size: clamp(1.25rem, 2.8vw, 1.85rem);
  font-weight: 400;
  line-height: 1.32;
}
.publication-authors { margin-top: 31px; font-size: 19px; }
.author-block { display: inline-block; margin: 3px 8px; }
.author-block sup { margin-left: 2px; color: #000000; font-size: 12px; font-weight: 800; }
.publication-authors a { text-decoration: none; font-weight: 520; }
.publication-authors a:hover { text-decoration: underline; }
.publication-affiliations { margin-top: 8px; color: var(--muted); font-size: 15px; }
.publication-affiliations > span { display: block; margin-top: 2px; }
.publication-affiliations .equal-contribution { margin-top: 5px; font-size: 13px; font-style: italic; }
.publication-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}
.button:hover { transform: translateY(-2px); }
.button.is-dark { background: var(--dark); color: var(--white); }
.button.is-dark:hover { color: var(--white); background: var(--accent); box-shadow: 0 8px 20px rgba(215, 25, 45, .21); }
.button.is-rounded { border-radius: 999px; }
.button-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tldr {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 850px;
  margin: 25px auto 0;
  padding: 13px 17px;
  border: 1px solid #f0c8ce;
  border-radius: 12px;
  background: var(--accent-soft);
  color: #4a3237;
  text-align: left;
  font-size: 15px;
}
.tldr strong {
  flex: 0 0 auto;
  color: var(--accent-dark);
  letter-spacing: .025em;
}

.teaser { background: var(--white); }
.teaser .hero-body { padding-top: 34px; padding-bottom: 56px; }
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
.figure-surface {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  padding: 12px !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px;
  background: var(--white) !important;
  box-shadow: 0 7px 20px rgba(31, 35, 43, .045);
}
.teaser-grid img { display: block; width: 100%; height: auto; max-height: 430px; object-fit: contain; }
.teaser-caption {
  max-width: 950px;
  margin: 24px auto 0;
  text-align: center;
  font-size: clamp(1.13rem, 2vw, 1.4rem);
  font-weight: 400;
  line-height: 1.48;
}
.teaser-caption strong { color: var(--accent-dark); }

.section { padding: 62px 0; }
.light-section { background: var(--light); }
.results-section { background: var(--white); }
.section-title {
  position: relative;
  margin: 0 0 31px;
  padding-bottom: 14px;
  text-align: center;
  font-size: clamp(1.9rem, 3.2vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -.025em;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 48px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  transform: translateX(-50%);
}
.section-title.aligned-left { text-align: left; }
.section-title.aligned-left::after { left: 0; transform: none; }
.section-lead {
  max-width: 850px;
  margin: -14px auto 29px;
  color: var(--muted);
  text-align: center;
  font-size: 17px;
}
.content p { margin: 0 0 17px; }
.abstract-text { text-align: justify; }

.contribution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contribution-card {
  position: relative;
  min-height: 245px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 7px 20px rgba(31, 35, 43, .035);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.contribution-card:hover { transform: translateY(-3px); border-color: #edb0b9; box-shadow: var(--shadow); }
.card-index { display: block; margin-bottom: 18px; color: var(--accent); font-size: 14px; font-weight: 850; letter-spacing: .08em; }
.contribution-card h3 { margin: 0 0 10px; font-size: 20px; line-height: 1.25; }
.contribution-card p { margin: 0; color: var(--muted); }

.figure-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.figure-button img { display: block; width: 100%; height: auto; }
.figure-button.framed {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(31, 35, 43, .045);
}
.research-image { display: block; width: 100%; height: auto; }
.method-image, .simplex-image { max-height: 545px; object-fit: contain; }
.figure-caption { max-width: 900px; margin: 17px auto 0; color: var(--muted); text-align: center; font-size: 14px; }

.method-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 29px; }
.method-steps article {
  padding: 21px;
  border-top: 3px solid var(--accent);
  border-radius: 0 0 8px 8px;
  background: rgba(255, 255, 255, .78);
}
.method-steps h3 { margin: 0 0 8px; font-size: 19px; }
.method-steps p { margin: 0; color: var(--muted); }

.benchmark-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.benchmark-grid article { padding: 21px; border: 1px solid var(--border); border-radius: 9px; background: rgba(255,255,255,.5); }
.benchmark-grid h3 { margin: 0 0 7px; font-size: 18px; }
.benchmark-grid p { margin: 0; color: var(--muted); }

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 34px; justify-content: center; }
.metric-card {
  position: relative;
  overflow: hidden;
  padding: 23px 17px 20px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--white);
  text-align: center;
}
.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
}
.metric-value { margin: 0; color: var(--accent-dark); font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 850; letter-spacing: -.04em; }
.metric-label { min-height: 48px; margin: 7px 0 0; font-weight: 750; line-height: 1.3; }
.metric-comparison { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.38; }

.primary-results-grid,
.additional-results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.primary-results-grid figure,
.additional-results-grid figure {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--white);
}
.primary-results-grid img { width: 100%; height: 390px; object-fit: contain; }
.additional-results-grid img { width: 100%; height: 340px; object-fit: contain; }
.primary-results-grid figcaption,
.additional-results-grid figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}
.results-copy { max-width: 880px; margin: 27px auto 0; text-align: justify; }

.additional-results {
  max-width: 1040px;
  margin: 28px auto 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--lighter);
}
.additional-results summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
}
.additional-results summary::-webkit-details-marker { display: none; }
.additional-results summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--dark);
  font-size: 19px;
  font-weight: 500;
}
.additional-results[open] summary::after { content: "−"; background: var(--accent); }
.additional-results summary small { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 500; }
.additional-results-grid { padding: 0 18px 18px; }

.three-figure-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.three-figure-grid figure { margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--white); }
.three-figure-grid img { width: 100%; height: 330px; object-fit: contain; }
.three-figure-grid figcaption { margin-top: 11px; color: var(--muted); font-size: 13px; line-height: 1.42; }

.split-section { display: grid; grid-template-columns: 1.15fr .85fr; gap: 38px; align-items: center; }
.split-figure { padding: 13px; border: 1px solid var(--border); border-radius: 11px; background: var(--white); }
.split-copy p { color: #4f535a; }

.citation-intro { margin-top: -10px; }
.bibtex-wrapper { position: relative; }
.bibtex-wrapper pre {
  margin: 0;
  overflow-x: auto;
  padding: 23px 72px 23px 23px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
  font-size: 13px;
  line-height: 1.55;
}
.copy-button {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 7px 13px;
  border: 1px solid #bcbfc5;
  border-radius: 999px;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}
.copy-button:hover { border-color: var(--accent); color: var(--accent-dark); }
.copy-status { min-height: 20px; margin: 6px 0 0; color: #23763c; text-align: right; font-size: 13px; }

.acknowledgements p { margin: 0; text-align: justify; }
.acknowledgement-logos { display: flex; align-items: center; justify-content: center; gap: 35px; margin-top: 29px; }
.acknowledgement-logo { display: block; width: auto; max-width: min(100%, 280px); height: 72px; object-fit: contain; }
.trail-logo { height: 78px; }
.multitel-logo { height: 74px; }

.footer { padding: 39px 0; background: var(--lighter); color: var(--muted); text-align: center; font-size: 13px; }
.footer p { margin: 5px 0; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 64px 24px 28px;
  background: rgba(12, 13, 16, .92);
}
.lightbox[hidden] { display: none; }
.lightbox-content { max-width: min(96vw, 1550px); text-align: center; }
.lightbox img { display: block; max-width: 100%; max-height: 82vh; margin: 0 auto; padding: 10px; background: var(--white); object-fit: contain; }
.lightbox-caption { max-width: 950px; margin: 13px auto 0; color: #e8e9eb; font-size: 14px; }
.lightbox-close {
  position: fixed;
  top: 15px;
  right: 19px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  color: var(--white);
  background: rgba(255,255,255,.09);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}
.lightbox-close:hover { background: var(--accent); }

@media (max-width: 980px) {
  .contribution-grid,
  .method-steps,
  .benchmark-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .three-figure-grid { grid-template-columns: 1fr; }
  .three-figure-grid img { height: auto; max-height: 560px; }
  .split-section { grid-template-columns: 1fr; }
  .section-title.aligned-left { text-align: center; }
  .section-title.aligned-left::after { left: 50%; transform: translateX(-50%); }
}

@media (max-width: 720px) {
  body { font-size: 15px; }
  .container, .container.wide, .container.narrow { width: min(calc(100% - 26px), var(--max-width)); }
  .publication-header .hero-body { padding-top: 38px; padding-bottom: 30px; }
  .publication-title { font-size: clamp(2.45rem, 12vw, 4rem); }
  .publication-subtitle { font-size: 1.2rem; }
  .publication-authors { font-size: 17px; }
  .publication-links { gap: 8px; }
  .button { flex: 1 1 calc(50% - 8px); max-width: 210px; }
  .tldr { display: block; text-align: center; }
  .tldr strong { display: block; margin-bottom: 4px; }
  .teaser-grid,
  .primary-results-grid,
  .additional-results-grid { grid-template-columns: 1fr; }
  .figure-surface { min-height: 0; }
  .section { padding: 49px 0; }
  .abstract-text, .results-copy, .acknowledgements p { text-align: left; }
  .contribution-grid,
  .method-steps,
  .benchmark-grid,
  .metric-grid { grid-template-columns: 1fr; }
  .contribution-card { min-height: 0; }
  .metric-label { min-height: 0; }
  .primary-results-grid img, .additional-results-grid img { height: auto; max-height: 520px; }
  .additional-results summary { align-items: flex-start; }
  .additional-results summary small { display: none; }
  .acknowledgement-logos { flex-direction: column; gap: 22px; }
  .bibtex-wrapper pre { padding-top: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
