:root {
  --ink: #1e293b;
  --muted: #64748b;
  --green: #0b7f4c;
  --bright-green: #18c775;
  --soft: #f6f9f8;
  --line: #dde6e2;
  --shadow: 0 14px 36px rgba(30, 41, 59, 0.075);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

::selection {
  color: #fff;
  background: var(--green);
}

.section {
  padding: clamp(60px, 7vw, 84px) 24px;
  border-bottom: 1px solid var(--line);
}

.soft,
.teaser {
  background: var(--soft);
}

.hero {
  padding-top: clamp(64px, 7vw, 88px);
  padding-bottom: clamp(68px, 7vw, 88px);
  background:
    radial-gradient(circle at 50% -18%, rgba(24, 199, 117, 0.13), transparent 42%),
    linear-gradient(180deg, #fbfffd 0%, #ffffff 72%);
  border-bottom: 0;
}

.hero-inner,
.content-container,
.text-container,
.wide-container {
  width: 100%;
  margin: 0 auto;
}

.hero-inner {
  max-width: 1140px;
}

.content-container {
  max-width: 1060px;
}

.text-container {
  max-width: 860px;
}

.wide-container {
  max-width: 1500px;
}

.hero-inner {
  text-align: center;
}

h1 {
  margin: 0 auto 32px;
  font-size: clamp(2.05rem, 3.9vw, 3.45rem);
  font-weight: 830;
  letter-spacing: -0.045em;
  line-height: 1.08;
  text-wrap: balance;
}

.title-line {
  display: block;
  white-space: nowrap;
}

.brand {
  color: var(--green);
  background: linear-gradient(120deg, var(--green), var(--bright-green));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 1.48rem;
  font-weight: 700;
}

.authors a {
  color: #1769c2;
  text-decoration: none;
}

.authors a:hover,
.authors a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.authors sup {
  margin-left: 2px;
  color: var(--muted);
  font-size: 0.58em;
}

.affiliation {
  margin: 0;
  font-size: 1.32rem;
}

.corresponding {
  margin: 4px 0 20px;
  color: #94a3b8;
  font-size: 1rem;
  font-style: italic;
}

.venue {
  display: inline-block;
  margin: 0 0 28px;
  padding: 6px 14px;
  color: var(--green);
  background: #e8f8ef;
  border: 1px solid #b6e4c9;
  border-radius: 999px;
  box-shadow: 0 7px 18px rgba(11, 127, 76, 0.08);
  font-size: 1.05rem;
  font-weight: 800;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  color: #fff;
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  box-shadow: 0 7px 16px rgba(30, 41, 59, 0.16);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.button:hover,
.button:focus-visible {
  background: var(--green);
  box-shadow: 0 10px 22px rgba(11, 127, 76, 0.2);
  transform: translateY(-2px);
}

.button.disabled {
  color: #cbd5e1;
  background: #475569;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.button.disabled .button-icon {
  opacity: 0.72;
}

.teaser {
  padding-top: 54px;
  padding-bottom: 54px;
}

.figure-card {
  overflow: hidden;
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.figure-card > img {
  width: 100%;
}

.figure-card figcaption {
  padding: 16px 20px;
  color: #526174;
  background: #fbfcfc;
  border-top: 1px solid var(--line);
  font-size: 0.94rem;
  line-height: 1.62;
  text-wrap: pretty;
}

.figure-card figcaption strong {
  color: var(--ink);
  font-weight: 800;
}

.teaser figcaption {
  text-align: left;
}

.method-figure figcaption,
#qualitative-results figcaption {
  text-align: left;
}

.section-title {
  margin-bottom: 34px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-wrap: balance;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.95rem, 3.5vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-wrap: balance;
}

.section-title > span {
  display: block;
  width: 60px;
  height: 4px;
  margin: 17px auto 0;
  background: linear-gradient(90deg, #35c97f, var(--green));
  border-radius: 99px;
}

.abstract {
  margin: 0;
  color: #526174;
  font-size: 1.08rem;
  line-height: 1.82;
  text-align: left;
  text-wrap: pretty;
}

.abstract strong,
.abstract mark {
  color: var(--ink);
}

.abstract mark {
  margin: 0 2px;
  padding: 0 2px;
  font-weight: 720;
  background: linear-gradient(transparent 56%, rgba(91, 221, 145, 0.48) 56%);
}

.abstract u {
  text-decoration-color: var(--green);
  text-decoration-thickness: 0.11em;
  text-underline-offset: 0.12em;
}

.method-figure {
  margin-bottom: 30px;
}

.method-intro,
.component-grid {
  display: grid;
  gap: 24px;
}

.method-intro {
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 32px;
}

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

.method-intro p,
.component-card > p:not(.tag) {
  color: #526174;
}

.method-intro p {
  margin: 0;
  padding: 19px 22px;
  background: linear-gradient(135deg, #fbfdfc, #f7faf8);
  border: 1px solid var(--line);
  border-left: 4px solid rgba(11, 127, 76, 0.68);
  border-radius: 13px;
  line-height: 1.74;
  text-align: left;
  text-wrap: pretty;
}

.component-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  padding: 32px;
  border: 1px solid;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(30, 41, 59, 0.055);
}

.component-card.ifa {
  background: #fff1e9;
  border-color: #f1bda4;
}

.component-card.cgr {
  background: #eaf7f2;
  border-color: #96d0b8;
}

.number {
  position: absolute;
  top: 14px;
  right: 20px;
  color: rgba(30, 41, 59, 0.1);
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1;
}

.tag {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.component-card h3 {
  margin: 0 0 12px;
  font-size: 1.45rem;
  line-height: 1.25;
  text-wrap: balance;
}

.component-card > p:not(.tag) {
  margin: 0;
  line-height: 1.72;
  text-wrap: pretty;
}

.table-figure {
  padding: 16px;
}

.table-scroll {
  overflow-x: auto;
  border-radius: 8px;
  overscroll-behavior-inline: contain;
  scrollbar-color: #a7b4c4 transparent;
  -webkit-overflow-scrolling: touch;
}

.table-scroll img {
  width: 100%;
  min-width: 880px;
}

.code-block {
  position: relative;
  overflow: auto;
  color: #d8e7df;
  background: #111c2c;
  border: 1px solid #334155;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.15);
}

.code-block pre {
  margin: 0;
  padding: 52px 30px 30px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.65;
}

.code-block button {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 7px 11px;
  color: #d8e7df;
  background: #273449;
  border: 1px solid #475569;
  border-radius: 8px;
  min-width: 64px;
  font-size: 0.72rem;
  font-weight: 750;
  cursor: pointer;
}

.code-block button:hover,
.code-block button:focus-visible {
  color: #fff;
  background: var(--green);
}

.note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

footer {
  padding: 32px 24px 42px;
  color: #94a3b8;
  font-size: 0.8rem;
  text-align: center;
}

footer p {
  margin: 3px 0;
}

footer a {
  color: var(--green);
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 50%;
  box-shadow: 0 10px 22px rgba(30, 41, 59, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--green);
  transform: translateY(-2px);
}

:focus-visible {
  outline: 3px solid rgba(24, 199, 117, 0.34);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .section {
    padding: 60px 20px;
  }

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

@media (max-width: 720px) {
  .title-line {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 50px 16px;
  }

  .hero {
    padding-top: 42px;
  }

  h1 {
    font-size: clamp(2.15rem, 9.8vw, 2.85rem);
  }

  .authors {
    gap: 5px 7px;
    font-size: 1.15rem;
  }

  .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .button {
    width: 100%;
  }

  .teaser {
    padding: 26px 10px;
  }

  .figure-card {
    border-radius: 12px;
  }

  .figure-card figcaption {
    padding: 12px 14px;
    font-size: 0.82rem;
    line-height: 1.55;
  }

  .abstract,
  .method-intro p {
    font-size: 0.98rem;
    line-height: 1.75;
    text-align: left;
  }

  .component-card {
    min-height: 0;
    padding: 23px;
  }

  .component-card h3 {
    font-size: 1.3rem;
  }

  .number {
    font-size: 3.8rem;
  }

  .method-intro p {
    padding: 16px 17px;
  }

  .table-figure {
    padding: 8px;
  }

  .code-block pre {
    padding: 54px 18px 22px;
    font-size: 0.72rem;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
  }
}

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

  * {
    transition-duration: 0.01ms !important;
  }
}
