:root {
  color-scheme: light;
  --ink: #151823;
  --muted: #626b7b;
  --soft: #f5f7fb;
  --line: #dde3ee;
  --accent: #2458a6;
  --accent-strong: #2563eb;
  --accent-soft: #eaf2ff;
  --success: #10b981;
  --max: 960px;
  --wide: 1040px;
  --results-wide: 1040px;
  --narrow: 860px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #ffffff;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.68;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.narrow {
  width: min(var(--narrow), calc(100% - 40px));
  margin: 0 auto;
}

/* -----------------------------
   Typography
----------------------------- */

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 760;
}

h1 {
  max-width: 920px;
  margin: 0 auto;
  font-size: clamp(2.1rem, 4vw, 3rem);
}

h1 span {
  color: #2f3a4f;
  font-size: 0.78em;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(1.75rem, 2.7vw, 2.35rem);
}

h3 {
  margin-bottom: 10px;
  font-size: 1.12rem;
}

p {
  margin: 0 0 16px;
}

/* -----------------------------
   Hero
----------------------------- */

.hero {
  padding: 56px 0 34px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
  border-bottom: 1px solid var(--line);
}

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

.authors {
  margin: 20px 0 4px;
  font-size: 1.05rem;
}

.affiliation {
  margin: 0;
  color: var(--muted);
}

.button-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 106px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(30, 41, 59, 0.08);
}

.button:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.button.primary {
  color: #ffffff;
  border-color: var(--ink);
  background: var(--ink);
}

.teaser {
  margin: 0 auto;
  padding: 0;
  max-width: 936px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.teaser img {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(28, 42, 72, 0.08);
}

.teaser-blank {
  min-height: 360px;
  box-shadow: none;
}

figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.45;
}

/* -----------------------------
   Generic Sections
----------------------------- */

.section {
  padding: 58px 0;
}

.abstract-section,
.attribution-section {
  background: var(--soft);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 34px;
  align-items: center;
}

.figure-panel {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.figure-panel img {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(28, 42, 72, 0.07);
}

/* -----------------------------
   Core Idea
   Normal text wrapping + medium large figure
----------------------------- */

.core-section {
  padding: 62px 0 66px;
}

.core-section .core-wide {
  width: min(100% - 40px, var(--wide));
  max-width: var(--wide);
  margin: 0 auto;
}

.core-text-row {
  display: block;
  max-width: var(--narrow);
  margin: 0 auto 28px;
  text-align: center;
}

.core-heading-block {
  max-width: var(--narrow);
}

.core-heading-block h2 {
  max-width: var(--narrow);
  margin: 0 0 22px;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.core-paragraph-block {
  max-width: var(--narrow);
}

.core-paragraph-block p {
  max-width: var(--narrow);
  margin-bottom: 16px;
  font-size: 1.02rem;
  line-height: 1.72;
  text-align: justify;
}

.core-paragraph-block p:last-child {
  margin-bottom: 0;
}

.core-figure-panel {
  width: 100%;
  max-width: 936px;
  margin: 22px auto 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.core-figure-panel a,
.image-zoom-link {
  display: block;
  cursor: zoom-in;
}

.core-figure-panel img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  border-radius: 12px;
}

/* -----------------------------
   Key Results
   Large readable cards
----------------------------- */

.results-section {
  padding: 62px 0 68px;
}

.results-section .results-wide {
  width: min(100% - 40px, var(--results-wide));
  max-width: var(--results-wide);
  margin: 0 auto;
}

.results-section h2 {
  max-width: var(--narrow);
  margin: 0 auto 30px;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: 0;
  text-align: center;
}

.results-section .section-kicker {
  text-align: center;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  margin-top: 0;
}

.result-card {
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.result-image-link {
  display: block;
  width: min(100%, 936px);
  min-height: auto;
  margin: 0 auto;
  padding: 0;
  background: transparent;
}

.result-card img {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(28, 42, 72, 0.06);
}

.result-copy {
  display: block;
  width: min(100%, 840px);
  margin: 0 auto;
  padding: 15px 10px 0;
  text-align: center;
}

.result-copy h3 {
  margin: 0 0 8px;
  font-size: 1.18rem;
  line-height: 1.2;
}

.result-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.62;
}

/* -----------------------------
   Attribution
----------------------------- */

.attribution-split {
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 1.14fr);
  max-width: var(--wide);
}

.attribution-section h2 {
  font-size: clamp(1.75rem, 2.5vw, 2.3rem);
}

.attribution-section p {
  font-size: 1rem;
  line-height: 1.68;
}

/* -----------------------------
   BibTeX
----------------------------- */

.citation-section .container {
  position: relative;
}

.citation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 1rem;
}

.citation-header h2 {
  margin-bottom: 0;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 12px;
  color: #ffffff;
  background: var(--accent-strong);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.copy-button::before {
  content: "";
  display: inline-block;
  width: 1.05rem;
  height: 1.05rem;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") center / contain no-repeat;
}

.copy-button:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.copy-button.copied {
  background: var(--success);
}

.citation-section pre {
  overflow-x: auto;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fd;
  color: #172033;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* -----------------------------
   Footer
----------------------------- */

.footer {
  padding: 38px 0;
  color: #5d6675;
  background: #f8fafc;
  border-top: 1px solid var(--line);
  font-size: 0.93rem;
}

.footer p {
  margin: 0 0 10px;
}

/* -----------------------------
   Responsive
----------------------------- */

@media (max-width: 1180px) {
  .result-image-link {
    border-right: 0;
  }
}

@media (max-width: 860px) {
  .hero {
    padding-top: 48px;
  }

  .split,
  .attribution-split {
    grid-template-columns: 1fr;
  }

  .core-section .core-wide {
    width: min(100% - 36px, 100%);
  }

  .core-heading-block h2 {
    font-size: clamp(1.85rem, 6vw, 2.5rem);
  }

  .core-paragraph-block p {
    font-size: 1.05rem;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .container,
  .narrow {
    width: min(100% - 28px, var(--max));
  }

  .section {
    padding: 48px 0;
  }

  .hero {
    padding-top: 48px;
  }

  .teaser,
  .figure-panel {
    padding: 10px;
  }

  .teaser-blank {
    min-height: 220px;
  }

  .core-section,
  .results-section {
    padding: 56px 0;
  }

  .core-section .core-wide,
  .results-section .results-wide {
    width: min(100% - 28px, 100%);
  }

  .core-heading-block h2 {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    line-height: 1.08;
  }

  .core-paragraph-block p,
  .result-copy p {
    font-size: 1rem;
  }

  .core-figure-panel,
  .result-image-link {
    padding: 10px;
  }

  .result-copy {
    padding: 16px 18px 20px;
  }

  .citation-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* -----------------------------
   Hero Icon Buttons
----------------------------- */

.icon-button-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 28px 0 30px;
  flex-wrap: wrap;
}

.icon-button-row .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 158px;
  min-height: 54px;
  padding: 14px 26px;
  border: 1.5px solid #d8deea;
  border-radius: 999px;
  background: #fffdfa;
  color: #151823;
  text-decoration: none !important;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 18px rgba(30, 41, 59, 0.07);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.icon-button-row .icon-button:hover {
  transform: translateY(-2px);
  border-color: #bac6d9;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
  text-decoration: none !important;
}

.icon-button-row .icon-button:visited {
  color: #151823;
}

.icon-button-row .icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.icon-button-row .project-icon {
  display: block;
  width: 100%;
  height: 100%;
  color: currentColor;
}

.icon-button-row .arxiv-icon {
  width: 25px;
  height: 34px;
  fill: currentColor;
  stroke: none;
}

.icon-button-row .github-icon {
  fill: currentColor;
  width: 30px;
  height: 30px;
}

@media (max-width: 640px) {
  .hero {
    padding-top: 48px;
  }

  .eyebrow {
    max-width: 18rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    line-height: 1.55;
  }

  h1 {
    max-width: 18rem;
    font-size: clamp(1.72rem, 7.2vw, 2rem);
    line-height: 1.08;
  }

  h1 span {
    font-size: 0.72em;
  }

  .authors {
    max-width: 18rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.98rem;
    line-height: 1.45;
  }

  .affiliation {
    max-width: 18rem;
    margin-left: auto;
    margin-right: auto;
  }

  .icon-button-row {
    gap: 10px;
  }

  .icon-button-row .icon-button {
    min-width: 132px;
    min-height: 48px;
    padding: 11px 16px;
    font-size: 0.94rem;
  }

  .icon-button-row .icon-wrap {
    width: 27px;
    height: 27px;
  }
}
