:root {
  --ink: #12213d;
  --muted: #5d6b82;
  --line: #dce3ec;
  --paper: #fff;
  --canvas: #f6f8fb;
  --blue: #245fc7;
  --blue-deep: #173f8f;
  --blue-soft: #eaf1ff;
  --coral: #ef6b5d;
  --green: #14806a;
  --shadow: 0 18px 55px rgba(23, 63, 143, .11);
  --radius-lg: 28px;
  --content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 17px/1.65 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(36, 95, 199, .38); outline-offset: 3px; }

.skip-link {
  position: fixed;
  left: 20px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 20px; }
.shell { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(220, 227, 236, .86);
  background: rgba(246, 248, 251, .92);
  backdrop-filter: blur(18px);
}
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 26px; color: var(--muted); font-size: .91rem; font-weight: 700; }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--blue); }
main { overflow: clip; }
section { scroll-margin-top: 96px; }

.hero { position: relative; padding: 76px 0 64px; }
.hero::before { content: ""; position: absolute; width: 440px; height: 440px; top: -170px; right: -150px; z-index: -1; border: 95px solid var(--blue-soft); border-radius: 50%; }
.hero-grid { display: block; }
.hero-grid > div { max-width: 940px; }
.eyebrow { margin: 0 0 14px; color: var(--blue); font-size: .78rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 820px; margin-bottom: 22px; font: 500 clamp(2.75rem, 5.4vw, 5.1rem)/.99 Georgia, "Times New Roman", serif; letter-spacing: -.052em; }
.title-accent { color: var(--blue); }
.authors { margin-bottom: 12px; color: #283b5d; font-size: 1rem; font-weight: 720; line-height: 1.7; }
.authors span { white-space: nowrap; }
.affiliations, .author-note { color: var(--muted); font-size: .84rem; line-height: 1.6; }
.affiliations { margin-bottom: 3px; }
.author-note { margin-bottom: 28px; }
.hero-summary { max-width: 680px; margin-bottom: 28px; color: #41516a; font-size: 1.09rem; }
.button-row { display: flex; flex-wrap: wrap; gap: 11px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 17px; border: 1px solid #c9d3e2; border-radius: 12px; background: var(--paper); color: var(--ink); font-size: .87rem; font-weight: 780; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.button:hover { border-color: #9eb1ce; box-shadow: 0 9px 22px rgba(23, 63, 143, .1); transform: translateY(-2px); }
.button.primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.button.subtle { background: transparent; }

.section-pad { padding: 88px 0; }
.section-white { background: var(--paper); }
.section-heading { display: grid; grid-template-columns: .7fr 1.3fr; gap: 48px; align-items: end; margin-bottom: 52px; }
h2 { margin-bottom: 0; font: 500 clamp(2.2rem, 4vw, 3.65rem)/1.02 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
.section-lede { max-width: 700px; margin: 0; color: var(--muted); font-size: 1.08rem; }
.problem-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; gap: 30px; }
.problem-card, .method-card, .full-table-card, .explorer, .theory-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); }
.problem-card, .method-card { width: 100%; min-width: 0; overflow: hidden; }
.problem-card { padding: 36px; background: var(--blue-deep); color: #fff; }
.problem-card .eyebrow { color: #a9c4ff; }
.problem-card h3, .method-card h3, .theory-card h3 { margin-bottom: 14px; font-size: 1.33rem; letter-spacing: -.025em; line-height: 1.25; }
.problem-card > p:last-of-type { margin-bottom: 0; color: #d9e4fb; }
.noise-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.noise-type { min-width: 0; min-height: 118px; padding: 17px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px; background: rgba(255, 255, 255, .06); }
.noise-type strong { display: block; margin-bottom: 5px; font-size: .94rem; }
.noise-type span { color: #bfcdec; font-size: .78rem; line-height: 1.4; }
.method-card { padding: 36px; box-shadow: var(--shadow); }
.equation { overflow-x: auto; max-width: 100%; min-width: 0; margin: 24px 0; padding: 25px 22px; border-left: 4px solid var(--blue); background: var(--blue-soft); color: #163773; font: clamp(1.02rem, 2vw, 1.4rem) Georgia, serif; text-align: center; white-space: nowrap; }
.term-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.term { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: #fafbfe; }
.term strong { display: block; margin-bottom: 5px; color: var(--blue-deep); font-size: .9rem; }
.term span { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.algorithm { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 30px; }
.step { position: relative; padding: 22px; border-top: 3px solid var(--blue); background: #f8faff; }
.step-number { display: block; margin-bottom: 18px; color: var(--blue); font-size: .74rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.step strong { display: block; margin-bottom: 7px; font-size: .95rem; }
.step p { margin-bottom: 0; color: var(--muted); font-size: .79rem; line-height: 1.45; }
.theory-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.theory-card { padding: 28px; }
.theory-card p { margin-bottom: 0; color: var(--muted); font-size: .9rem; }
.theory-label { display: inline-flex; margin-bottom: 15px; padding: 5px 9px; border-radius: 7px; background: #e9f7f3; color: var(--green); font-size: .72rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }

.full-table-card { overflow: hidden; margin-bottom: 76px; box-shadow: 0 13px 35px rgba(18, 33, 61, .06); }
.table-heading { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 28px 30px 24px; }
.card-kicker { margin-bottom: 4px; color: var(--blue); font-size: .73rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.card-title { margin-bottom: 5px; font-size: 1.25rem; letter-spacing: -.025em; }
.card-note { flex: 0 0 auto; margin: 0; color: var(--muted); font-size: .77rem; text-align: right; white-space: nowrap; }
.full-table-wrap { overflow-x: hidden; overflow-y: auto; max-height: min(62vh, 620px); border-top: 1px solid var(--line); overscroll-behavior: contain; scrollbar-gutter: stable; }
.full-results-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: .68rem; font-variant-numeric: tabular-nums; }
.full-results-table th, .full-results-table td { padding: 11px 5px; border-bottom: 1px solid var(--line); text-align: right; }
.full-results-table th { position: sticky; top: 0; z-index: 2; background: #f1f4f9; color: var(--muted); font-size: .59rem; letter-spacing: .025em; line-height: 1.35; overflow-wrap: anywhere; text-transform: uppercase; }
.full-results-table td:not(:first-child) { white-space: nowrap; }
.full-results-table th:first-child, .full-results-table td:first-child { position: sticky; left: 0; z-index: 1; width: 14%; min-width: 0; padding-left: 14px; background: var(--paper); text-align: left; box-shadow: 1px 0 0 var(--line); }
.full-results-table th:first-child { z-index: 3; background: #f1f4f9; }
.full-results-table tbody tr:nth-child(even) td:not(:first-child, .ours) { background: #fafbfe; }
.full-results-table .ours { background: var(--blue-soft); color: var(--blue-deep); }
.full-results-table .best-score { font-weight: 850; }
.full-results-table tbody tr:last-child td { border-bottom: 0; }

.explorer { overflow: hidden; box-shadow: var(--shadow); }
.explorer-toolbar { display: grid; grid-template-columns: .62fr 1.38fr; gap: 34px; padding: 30px; border-bottom: 1px solid var(--line); background: #fbfcff; }
.control-label { display: block; margin-bottom: 11px; color: var(--muted); font-size: .7rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.benchmark-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.benchmark-tab, .noise-option, .icon-button { border: 1px solid #cad4e3; background: var(--paper); color: var(--ink); cursor: pointer; transition: border-color .18s ease, background .18s ease, color .18s ease; }
.benchmark-tab { padding: 10px 12px; border-radius: 10px; font-size: .78rem; font-weight: 760; }
.benchmark-tab:hover, .noise-option:hover { border-color: #8da8d5; }
.benchmark-tab[aria-selected="true"], .noise-option[aria-pressed="true"] { border-color: var(--blue); background: var(--blue); color: #fff; }
.noise-select { width: 100%; min-height: 45px; padding: 9px 40px 9px 13px; border: 1px solid #cad4e3; border-radius: 10px; background: var(--paper); color: var(--ink); font-family: inherit; font-size: .82rem; font-weight: 700; }
.noise-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.noise-option { padding: 6px 9px; border-radius: 8px; font-size: .68rem; font-weight: 730; }
.result-stage { padding: 30px; background: #eef2f8; }
.result-meta { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.result-meta h3 { margin-bottom: 2px; font-size: clamp(1.2rem, 2.5vw, 1.65rem); letter-spacing: -.025em; }
.result-kicker { margin-bottom: 0; color: var(--muted); font-size: .78rem; }
.result-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { width: 40px; height: 40px; border-radius: 10px; font-weight: 850; }
.icon-button:hover { border-color: var(--blue); color: var(--blue); }
.result-image-link { display: block; overflow: hidden; aspect-ratio: 2400 / 1238; border: 1px solid #ccd6e4; border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgba(18, 33, 61, .08); }
.result-image { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.result-caption { display: flex; justify-content: space-between; gap: 20px; margin: 15px 3px 0; color: var(--muted); font-size: .73rem; }
.result-caption a { color: var(--blue); font-weight: 780; text-decoration: none; }
.gallery-details { border-top: 1px solid var(--line); background: var(--paper); }
.gallery-details summary { padding: 22px 30px; color: var(--blue-deep); cursor: pointer; font-size: .85rem; font-weight: 800; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; padding: 0 30px 30px; }
.gallery-grid figure { overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.gallery-grid a { display: block; aspect-ratio: 2400 / 1238; }
.gallery-grid img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.gallery-grid figcaption { padding: 10px 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; font-weight: 720; }
.benchmarks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 44px; }
.benchmark-card { overflow: hidden; margin: 0; border-radius: 18px; background: #e8edf5; }
.benchmark-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.benchmark-card figcaption { padding: 11px 14px; background: var(--paper); color: var(--muted); font-size: .76rem; font-weight: 760; }

.citation-layout { display: grid; grid-template-columns: .72fr 1.28fr; gap: 34px; align-items: start; }
.citation-copy p { color: var(--muted); }
.citation-card { overflow: hidden; border: 1px solid #2b426c; border-radius: 20px; background: #13213b; color: #dce8ff; }
.citation-bar { display: flex; align-items: center; justify-content: space-between; padding: 13px 17px; border-bottom: 1px solid rgba(255, 255, 255, .12); color: #9db3da; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.copy-button { padding: 6px 9px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 7px; background: rgba(255, 255, 255, .06); color: #fff; cursor: pointer; font-size: .68rem; font-weight: 800; }
pre { overflow-x: auto; margin: 0; padding: 24px; font: .75rem/1.65 "SFMono-Regular", Consolas, monospace; white-space: pre; }
.site-footer { padding: 48px 0; border-top: 1px solid var(--line); background: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; }
.footer-grid p { max-width: 780px; margin-bottom: 0; color: var(--muted); font-size: .75rem; }
.footer-links { display: flex; gap: 17px; color: var(--blue); font-size: .78rem; font-weight: 780; }
.footer-links a { text-decoration: none; }

@media (max-width: 960px) {
  .hero-grid, .section-heading, .problem-grid, .citation-layout { grid-template-columns: 1fr; }
  .algorithm { grid-template-columns: repeat(2, 1fr); }
  .explorer-toolbar { grid-template-columns: 1fr; gap: 23px; }
  .benchmark-tabs { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .shell { width: min(calc(100% - 28px), var(--content)); }
  .nav { min-height: 62px; }
  .nav-links a:not(:last-child) { display: none; }
  .nav-links { gap: 0; }
  .hero { padding-top: 51px; }
  h1 { font-size: clamp(2.55rem, 13vw, 4rem); }
  .section-pad { padding: 64px 0; }
  .section-heading { gap: 20px; margin-bottom: 36px; }
  .method-card, .problem-card { padding: 25px; }
  .table-heading { align-items: flex-start; flex-direction: column; padding: 23px 20px 20px; }
  .card-note { text-align: left; white-space: normal; }
  .full-results-table { font-size: .56rem; }
  .full-results-table th, .full-results-table td { padding: 8px 2px; }
  .full-results-table th { font-size: .49rem; letter-spacing: 0; }
  .full-results-table th:first-child, .full-results-table td:first-child { width: 16%; padding-left: 6px; }
  .term-grid, .theory-row, .algorithm { grid-template-columns: 1fr; }
  .explorer-toolbar, .result-stage { padding: 20px; }
  .benchmark-tabs { grid-template-columns: repeat(2, 1fr); }
  .noise-chips { display: none; }
  .result-meta, .result-caption { align-items: flex-start; flex-direction: column; }
  .gallery-details summary { padding-inline: 20px; }
  .gallery-grid { grid-template-columns: 1fr; padding: 0 20px 20px; }
  .benchmarks { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; align-items: start; }
}

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