:root {
  --ink: #1f2528;
  --muted: #677176;
  --line: #dde3e6;
  --paper: #fbfaf7;
  --white: #ffffff;
  --peach: #f3ddd2;
  --blue: #dfe9ed;
  --red: #ba3f37;
  --green: #2f7b46;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}

a {
  color: inherit;
}

.site-nav {
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgb(251 250 247 / 88%);
  border-bottom: 1px solid rgb(31 37 40 / 8%);
  display: flex;
  height: 4.25rem;
  justify-content: space-between;
  padding: 0 4vw;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-weight: 700;
  gap: 0.65rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  background: linear-gradient(135deg, var(--red) 0 48%, var(--green) 52% 100%);
  border-radius: 50%;
  display: inline-block;
  height: 0.85rem;
  width: 0.85rem;
}

.nav-links {
  display: flex;
  font-size: 0.88rem;
  font-weight: 600;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--ink);
}

.publication-hero {
  background:
    radial-gradient(circle at 8% 8%, rgb(223 233 237 / 80%), transparent 28%),
    radial-gradient(circle at 92% 20%, rgb(243 221 210 / 80%), transparent 32%),
    var(--paper);
}

.publication-hero .hero-body {
  padding: 6.5rem 1.5rem 3.5rem;
}

.eyebrow,
.section-kicker {
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.publication-title {
  margin: 0 auto 2rem !important;
  max-width: 65rem;
}

.title-mark {
  display: block;
  font-family: "Source Serif 4", serif;
  font-size: clamp(4.5rem, 11vw, 8.5rem);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 0.9;
}

.title-detail {
  display: block;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin: 1.6rem auto 0;
  max-width: 55rem;
}

.publication-authors {
  display: flex;
  flex-wrap: wrap;
  font-size: 1rem;
  gap: 0.4rem 1.15rem;
  justify-content: center;
  margin: 0 auto 0.8rem;
  max-width: 54rem;
}

.author-block {
  white-space: nowrap;
}

.author-block sup,
.publication-affiliations sup {
  color: var(--red);
  font-size: 0.68em;
  font-weight: 700;
  margin-left: 0.08em;
}

.publication-affiliations {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82rem;
  gap: 0.3rem 1rem;
  justify-content: center;
  margin: 0 auto 1.7rem;
  max-width: 64rem;
}

.publication-affiliations small {
  display: block;
  flex-basis: 100%;
  font-size: 0.72rem;
  margin-top: 0.2rem;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.resource-pill {
  align-items: center;
  background: var(--ink);
  border-radius: 999px;
  color: var(--white);
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 600;
  gap: 0.45rem;
  padding: 0.7rem 1.05rem;
  transition: transform 160ms ease, background-color 160ms ease;
}

.resource-pill small {
  color: #adb4b7;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resource-pill.is-disabled {
  cursor: default;
  opacity: 0.72;
}

a.resource-pill:hover,
a.resource-pill:focus-visible {
  background: var(--red);
  color: var(--white);
  transform: translateY(-2px);
}

.teaser-section {
  padding-top: 1rem;
}

.teaser-frame {
  background: #e8ecee;
  border: 1px solid rgb(31 37 40 / 12%);
  border-radius: 1.4rem;
  box-shadow: 0 1.8rem 4rem rgb(66 70 71 / 12%);
  overflow: hidden;
}

.teaser-frame img {
  display: block;
  height: auto;
  width: 100%;
}

.teaser-caption {
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.6;
  margin: 1.65rem auto 0;
  max-width: 58rem;
  text-align: center;
}

.paper-section,
.highlight-section,
.method-section,
.results-section,
.citation-section {
  padding-bottom: 5.5rem;
  padding-top: 5.5rem;
}

.section-title {
  font-family: "Source Serif 4", serif;
  letter-spacing: -0.04em;
}

.abstract-copy {
  font-size: 1.08rem;
  line-height: 1.75;
}

.highlight-section {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.highlight-grid {
  margin-top: 2.4rem;
}

.highlight-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
  height: 100%;
  padding: 1.6rem;
}

.card-index {
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.highlight-card h3 {
  font-family: "Source Serif 4", serif;
  font-size: 1.45rem;
  margin: 1.3rem 0 0.65rem;
}

.highlight-card p {
  color: var(--muted);
  line-height: 1.65;
}

.section-intro {
  margin: 0 auto 2.8rem;
  max-width: 48rem;
}

.section-intro > p:last-child {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.paper-figure {
  margin: 0;
}

.paper-figure img {
  display: block;
  height: auto;
  width: 100%;
}

.paper-figure figcaption {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-top: 1rem;
}

.pipeline-figure {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 0 1.5rem 3.5rem rgb(66 70 71 / 10%);
  overflow: hidden;
  padding: 1rem;
}

.pipeline-figure img {
  border-radius: 0.65rem;
}

.pipeline-figure figcaption {
  padding: 0 0.35rem 0.15rem;
  text-align: center;
}

.method-steps {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2rem;
}

.method-steps article {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0.5rem 0;
}

.method-steps article > span {
  align-items: center;
  background: var(--peach);
  border-radius: 50%;
  color: var(--red);
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  height: 1.75rem;
  justify-content: center;
  width: 1.75rem;
}

.method-steps h3,
.result-copy h3 {
  font-family: "Source Serif 4", serif;
  font-size: 1.25rem;
  margin: 1rem 0 0.55rem;
}

.method-steps p,
.result-copy p {
  color: var(--muted);
  line-height: 1.65;
}

.results-section {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.metric-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-grid article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1.2rem 0.9rem;
  text-align: center;
}

.metric-grid strong {
  display: block;
  font-family: "Source Serif 4", serif;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.metric-grid span {
  color: var(--muted);
  display: block;
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 0.65rem;
}

.metric-note {
  color: var(--muted);
  font-size: 0.72rem;
  margin: 0.65rem 0 2.8rem;
  text-align: center;
}

.result-figures {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

.result-figure {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  overflow: hidden;
  padding: 1.2rem;
}

.result-label {
  color: var(--red);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0.1rem 0.25rem 0.9rem;
  text-transform: uppercase;
}

.result-image-wrap {
  align-items: center;
  background: var(--white);
  border: 1px solid rgb(31 37 40 / 7%);
  border-radius: 0.75rem;
  display: flex;
  overflow: hidden;
  padding: 0.6rem;
}

.result-figure figcaption {
  font-size: 0.93rem;
  padding: 0 0.25rem 0.2rem;
}

.result-figure figcaption strong {
  color: var(--ink);
}

.result-copy {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2.5rem;
}

.result-copy article {
  border-left: 3px solid var(--peach);
  padding-left: 1rem;
}

.result-copy h3 {
  margin-top: 0;
}

.citation-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.copy-button {
  background: transparent;
  border: 1px solid #bcc4c7;
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
}

.copy-button:hover,
.copy-button:focus-visible {
  border-color: var(--ink);
}

pre {
  background: #23292c;
  border-radius: 1rem;
  color: #f5f2ec;
  font-size: 0.86rem;
  line-height: 1.55;
  overflow-x: auto;
  padding: 1.5rem;
}

.site-footer {
  background: #202629;
  color: #bdc4c6;
  font-size: 0.82rem;
  line-height: 1.65;
  padding: 2.6rem 1.5rem;
  text-align: center;
}

.site-footer a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (max-width: 768px) {
  .site-nav {
    height: 3.75rem;
    padding: 0 1rem;
  }

  .nav-links {
    gap: 0.8rem;
  }

  .nav-links a:nth-child(2) {
    display: none;
  }

  .publication-hero .hero-body {
    padding: 4.5rem 1rem 2.5rem;
  }

  .title-mark {
    font-size: clamp(3.8rem, 22vw, 6rem);
  }

  .teaser-section,
  .paper-section,
  .highlight-section,
  .method-section,
  .results-section,
  .citation-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .teaser-frame {
    border-radius: 0.8rem;
  }

  .method-steps,
  .metric-grid,
  .result-copy {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-steps article {
    padding-left: 0;
    padding-right: 0;
  }

  pre {
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  .nav-links a:nth-child(3) {
    display: none;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
