:root {
  --paper: #f5f2ea;
  --paper-deep: #e9e4d8;
  --ink: #15231f;
  --muted: #66706b;
  --line: rgba(21, 35, 31, 0.16);
  --orange: #ef6c35;
  --orange-soft: #f8cdb7;
  --blue: #176b87;
  --green: #184d40;
  --white: #fffdf8;
  --radius: 22px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 90px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.section-shell {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid transparent;
  background: rgba(245, 242, 234, 0.88);
  backdrop-filter: blur(16px);
  transition: border-color 180ms ease;
}

.site-header.scrolled {
  border-color: var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  color: var(--white);
  border-radius: 50%;
  background: var(--orange);
  place-items: center;
}

nav {
  display: flex;
  gap: 28px;
  font-size: 13px;
  font-weight: 650;
}

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

nav a:hover {
  color: var(--orange);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.7fr);
  gap: 72px;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding-block: 90px 110px;
}

.hero > *,
.gate-grid > *,
.real-grid > *,
.citation-grid > * {
  min-width: 0;
}

.eyebrow,
.section-index {
  margin: 0 0 18px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 28px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(52px, 7.2vw, 96px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h1 span {
  color: var(--orange);
}

.subtitle {
  max-width: 740px;
  margin-bottom: 30px;
  color: #46504c;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.5;
}

.authors {
  margin-bottom: 2px;
  font-weight: 750;
}

.venue {
  color: var(--muted);
  font-size: 14px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
}

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

.button.primary:hover {
  background: var(--orange);
  border-color: var(--orange);
}

.button.disabled {
  color: #929892;
  cursor: default;
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  min-height: 480px;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: var(--line);
  box-shadow: 0 24px 70px rgba(21, 35, 31, 0.09);
}

.metric {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 220px;
  padding: 28px;
  background: var(--white);
}

.metric-main {
  grid-column: span 2;
  background: var(--green);
  color: var(--white);
}

.metric strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 5vw, 76px);
  font-weight: 500;
  line-height: 1;
}

.metric strong span {
  font-size: 0.42em;
}

.metric:not(.metric-main) {
  padding-inline: 22px;
}

.metric:not(.metric-main) strong {
  font-size: clamp(42px, 3.6vw, 58px);
  white-space: nowrap;
}

.metric p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-main p {
  color: rgba(255, 255, 255, 0.65);
}

.abstract-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 56px;
  align-items: start;
  padding-block: 110px;
}

.abstract-section > * {
  min-width: 0;
}

.abstract-copy h2 {
  max-width: 760px;
  margin-bottom: 26px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 4.8vw, 64px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.abstract-copy p:not(.section-index) {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.abstract-copy p:last-child {
  margin-bottom: 0;
}

.contribution-panel,
.implementation-grid {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.contribution-panel > div,
.implementation-grid > div {
  padding: 26px;
  background: var(--white);
}

.contribution-panel span,
.implementation-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contribution-panel strong,
.implementation-grid strong {
  display: block;
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.2;
}

.contribution-panel p,
.implementation-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.signal {
  position: absolute;
  z-index: 0;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 6px;
  align-items: flex-start;
  height: 100px;
  transform: rotate(180deg);
  opacity: 0.28;
}

.signal i {
  width: 7px;
  height: 35%;
  border-radius: 99px;
  background: var(--orange-soft);
}

.signal i:nth-child(2) { height: 44%; }
.signal i:nth-child(3) { height: 51%; }
.signal i:nth-child(4) { height: 58%; }
.signal i:nth-child(5) { height: 62%; }
.signal i:nth-child(6) { height: 70%; }
.signal i:nth-child(7) { height: 82%; }
.signal i:nth-child(8) { height: 96%; }

.thesis-band {
  padding-block: 100px;
  color: var(--white);
  background: var(--green);
}

.thesis-grid {
  display: grid;
  grid-template-columns: 0.45fr 1.55fr;
  gap: 60px;
}

.thesis-grid h2,
.section-heading h2,
.citation-grid h2 {
  margin-bottom: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 5vw, 66px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.thesis-grid p:last-child {
  max-width: 800px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 20px;
}

.content-section {
  padding-block: 120px;
}

.section-heading {
  max-width: 850px;
  margin-bottom: 64px;
}

.section-heading > p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.paper-figure {
  margin: 0 0 34px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.paper-figure img {
  width: 100%;
  border-radius: 12px;
}

.mechanism-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.72fr;
  gap: 18px;
  margin-bottom: 18px;
}

.mechanism-figure {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.mechanism-figure img {
  width: 100%;
  max-height: 330px;
  object-fit: contain;
}

.mechanism-figure figcaption {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

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

figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.method-card {
  min-height: 270px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.5);
}

.method-card.accent {
  background: var(--orange-soft);
}

.card-number {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 52px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  place-items: center;
}

.method-card h3 {
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
}

.method-card p {
  margin-bottom: 0;
  color: #59635e;
}

.implementation-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
}

.formula-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-top: 18px;
  padding: 36px;
  color: var(--white);
  border-radius: var(--radius);
  background: var(--ink);
}

.formula-strip span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.formula-strip strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 500;
}

.formula-strip p {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
}

.gate-section {
  padding-block: 120px;
  border-block: 1px solid var(--line);
  background: var(--paper-deep);
}

.gate-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 70px;
  align-items: center;
}

.gate-grid .section-heading {
  margin-bottom: 0;
}

.takeaway {
  margin-top: 34px;
  padding-left: 18px;
  border-left: 3px solid var(--orange);
}

.takeaway span {
  display: block;
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.takeaway strong {
  display: block;
  margin-top: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
}

.gate-figure {
  margin: 0;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--white);
}

.gate-figure img {
  border-radius: 10px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.result-card {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.result-card.dark {
  color: var(--white);
  background: var(--green);
}

.result-card > p {
  margin-bottom: 34px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.result-card > strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 5vw, 70px);
  font-weight: 500;
  line-height: 1;
}

.result-card > span {
  color: var(--muted);
  font-size: 13px;
}

.result-card.dark > span {
  color: rgba(255, 255, 255, 0.58);
}

.result-card dl {
  margin: 42px 0 0;
}

.result-card dl div {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.result-card.dark dl div {
  border-color: rgba(255, 255, 255, 0.15);
}

.result-card dt,
.result-card dd {
  margin: 0;
  font-size: 13px;
}

.result-card dt {
  color: var(--muted);
}

.result-card.dark dt {
  color: rgba(255, 255, 255, 0.58);
}

.result-card dd {
  font-weight: 800;
}

.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.benchmark-panel,
.data-panel,
.ablation-section {
  min-width: 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.panel-heading {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 30px;
}

.panel-heading span {
  display: block;
  margin-bottom: 4px;
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-heading h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 500;
  line-height: 1.15;
}

.panel-heading small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
}

.bar-list {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px minmax(80px, 1fr) 38px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.bar-row > span {
  overflow: hidden;
  color: var(--muted);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row > strong {
  font-size: 12px;
  text-align: right;
}

.bar-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: var(--paper-deep);
}

.bar-track i {
  display: block;
  width: var(--score);
  height: 100%;
  border-radius: inherit;
  background: #a8b2ad;
}

.bar-row.highlight > span,
.bar-row.highlight > strong {
  color: var(--orange);
}

.bar-row.highlight .bar-track i {
  background: var(--orange);
}

.panel-note {
  margin: 28px 0 0;
  padding-top: 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.simulation-detail-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 18px;
  margin-top: 18px;
}

.table-scroll {
  overflow-x: auto;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.result-table th,
.result-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.result-table th:first-child {
  text-align: left;
}

.result-table thead th {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-table tbody th {
  font-weight: 750;
}

.result-table tbody tr:last-child th,
.result-table tbody tr:last-child td {
  border-bottom: 0;
}

.result-table .highlight-row {
  background: #fff2e9;
}

.result-table .highlight-row th {
  color: var(--orange);
}

.shift-grid {
  display: grid;
  gap: 12px;
}

.shift-grid > div {
  display: grid;
  grid-template-columns: 88px 42px minmax(90px, 1fr);
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.shift-grid span {
  color: var(--muted);
}

.shift-grid strong {
  font-size: 12px;
  text-align: right;
}

.shift-grid i {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--orange) var(--score), var(--paper-deep) var(--score));
}

.ablation-section {
  margin-top: 18px;
  background: var(--paper-deep);
}

.ablation-section > .panel-heading {
  align-items: flex-end;
}

.ablation-section > .panel-heading p {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.ablation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.ablation-grid > div {
  min-width: 0;
  overflow-x: auto;
  padding: 22px;
  border-radius: 16px;
  background: var(--white);
}

.ablation-grid h4 {
  margin: 0 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 500;
}

.result-table.compact th,
.result-table.compact td {
  padding: 10px 8px;
  font-size: 10px;
}

.real-section {
  padding-block: 120px;
  color: var(--white);
  background: #102b25;
}

.section-heading.light > p:last-child {
  color: rgba(255, 255, 255, 0.62);
}

.real-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

.real-photo {
  overflow: hidden;
  margin: 0;
  border-radius: var(--radius);
  background: #0b201b;
}

.real-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.real-photo figcaption {
  padding: 0 18px 16px;
  color: rgba(255, 255, 255, 0.5);
}

.real-metrics {
  display: grid;
  gap: 20px;
}

.real-metrics > div {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 290px;
  padding: 34px;
  color: var(--ink);
  border-radius: var(--radius);
  background: var(--orange-soft);
}

.real-metrics > div:last-child {
  background: var(--white);
}

.real-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.real-metrics strong {
  margin: 10px 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 500;
  line-height: 1.1;
}

.real-metrics strong i {
  color: var(--orange);
  font-size: 0.5em;
  font-style: normal;
}

.real-metrics em {
  color: var(--orange);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.limitation {
  max-width: 880px;
  margin: 50px 0 0;
  color: rgba(255, 255, 255, 0.56);
}

.limitation strong {
  color: var(--white);
}

.takeaway-section blockquote {
  max-width: 1030px;
  margin: 0 0 70px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 6.5vw, 82px);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.takeaway-section blockquote span {
  color: var(--orange);
}

.takeaway-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
}

.takeaway-grid p {
  padding-top: 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.takeaway-grid strong {
  color: var(--ink);
}

.citation-section {
  padding-block: 100px;
  background: var(--paper-deep);
}

.citation-grid {
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  gap: 70px;
}

.citation-grid h2 {
  margin-bottom: 12px;
}

.citation-grid p:last-child {
  color: var(--muted);
}

.code-wrap {
  position: relative;
  min-width: 0;
}

pre {
  overflow-x: auto;
  max-width: 100%;
  margin: 0;
  padding: 32px;
  color: #d7e4df;
  border-radius: var(--radius);
  background: var(--ink);
  font: 13px/1.7 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

#copy-citation {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 7px 11px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

#copy-citation:hover {
  border-color: var(--orange);
  color: var(--orange-soft);
}

footer {
  padding-block: 32px;
  color: rgba(255, 255, 255, 0.55);
  background: var(--ink);
}

footer .section-shell {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 900px) {
  nav {
    display: none;
  }

  .hero,
  .abstract-section,
  .gate-grid,
  .real-grid,
  .citation-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 50px;
    padding-block: 70px;
  }

  .hero-panel {
    min-height: auto;
  }

  .thesis-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .method-grid,
  .implementation-grid,
  .results-grid,
  .takeaway-grid,
  .benchmark-grid,
  .simulation-detail-grid,
  .ablation-grid,
  .mechanism-grid {
    grid-template-columns: 1fr;
  }

  .mechanism-figure img {
    max-height: 420px;
  }

  .method-card {
    min-height: 220px;
  }

  .card-number {
    margin-bottom: 30px;
  }

  .formula-strip {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 580px) {
  .section-shell {
    width: min(100% - 30px, var(--max));
  }

  .site-header {
    height: 62px;
    padding-inline: 15px;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: 46px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .metric-main {
    grid-column: auto;
  }

  .metric {
    min-height: 180px;
  }

  .content-section,
  .gate-section,
  .real-section {
    padding-block: 88px;
  }

  .paper-figure {
    padding: 9px;
  }

  .formula-strip {
    padding: 26px;
  }

  .benchmark-panel,
  .data-panel,
  .ablation-section {
    padding: 22px;
  }

  .panel-heading,
  .ablation-section > .panel-heading {
    gap: 10px;
    align-items: flex-start;
    flex-direction: column;
  }

  .ablation-section > .panel-heading p {
    text-align: left;
  }

  .bar-row {
    grid-template-columns: 82px minmax(70px, 1fr) 36px;
  }

  .shift-grid > div {
    grid-template-columns: 78px 38px minmax(70px, 1fr);
  }

  footer .section-shell {
    gap: 10px;
    flex-direction: column;
  }
}
