@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700&family=DM+Sans:wght@300;400;500&family=DM+Mono:wght@300;400;500&display=swap');

:root {
  --bg:        #f5f4f9;
  --surface:   #ffffff;
  --surface2:  #edeef5;
  --ink:       #22202e;
  --muted:     #6a6880;
  --rule:      #dcdaf0;
  --pink:      #c97fa8;
  --blue:      #6a8fc8;
  --pink-lt:   rgba(201,127,168,0.12);
  --blue-lt:   rgba(106,143,200,0.12);
  --pink-line: rgba(201,127,168,0.30);
  --blue-line: rgba(106,143,200,0.30);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 17px;         /* ← base size up from 16px */
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background-image: radial-gradient(circle, rgba(106,143,200,0.09) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* ── NAV ── */
nav {
  transition: background 0.3s ease;
  position: sticky; top: 0; z-index: 100;
  background: rgba(245,244,249,0.90);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  padding: 0.75rem 2rem;
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  /* text-transform: uppercase; */
  color: var(--ink);
  text-decoration: none;
}

.nav-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  margin-right: 0.5em;
  border-radius: 6px;
  margin-bottom: 6px;       /* logo 上移，相当于文字相对下移 */
}
.nav-brand span { color: var(--pink); }
.nav-links { display: flex; gap: 1.8rem; margin-left: auto; }
.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 0.80rem;        /* ← bigger */
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--pink); }

/* ── HERO ── */
header {
  position: relative;
  padding: 5rem 2rem 4.5rem;
  text-align: center;
  overflow: hidden;
  background: #f0eef8;
  border-bottom: 1px solid var(--rule);
}

.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.22; pointer-events: none; }
.blob-1 { width: 380px; height: 380px; background: #c8b0d8; top: -80px; left: -80px; }
.blob-2 { width: 300px; height: 300px; background: #b0c4e8; bottom: -60px; right: -60px; }
.blob-3 { width: 200px; height: 200px; background: #d0c0e0; top: 30%; left: 60%; }

.conference-tag {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--pink);
  color: #fff;
  padding: 0.35em 1.2em;
  border-radius: 2rem;
  margin-bottom: 1.8rem;
  position: relative; z-index: 1;
  box-shadow: 0 3px 12px rgba(201,127,168,0.22);
  animation: fadeUp 0.6s ease both;
}

h1 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  position: relative; z-index: 1;
  animation: fadeUp 0.7s 0.1s ease both;
  color: var(--ink);
}
h1 .pink {
  color: var(--pink);
  background: none;
  -webkit-text-fill-color: var(--pink);
}

.tagline {
  font-family: 'DM Sans', sans-serif;
  font-style: italic;
  font-size: clamp(0.95rem, 1.8vw, 1.25rem);
  color: var(--muted);
  margin-top: 1rem;
  position: relative; z-index: 1;
  animation: fadeUp 0.7s 0.2s ease both;
  max-width: 560px; margin-left: auto; margin-right: auto;
}

.authors {
  margin-top: 2.2rem;
  position: relative; z-index: 1;
  animation: fadeUp 0.7s 0.3s ease both;
}
.authors p { font-size: 0.95rem; color: var(--ink); }
.author-name { font-weight: 500; }
.affil {
  font-size: 0.82rem;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  margin-top: 0.4rem;
}
a.author-name {
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;  /* 默认透明 */
  transition: color 0.2s, border-color 0.2s;
}

a.author-name:hover {
  color: var(--pink);
  border-bottom-color: var(--pink);      /* hover 时才出现 */
  cursor: pointer;
}
sup.corr { font-size: 0.7em; color: var(--pink); }

.btn-row {
  margin-top: 2.2rem;
  display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center;
  position: relative; z-index: 1;
  animation: fadeUp 0.7s 0.45s ease both;
}

.btn {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.65em 1.5em;
  border-radius: 2rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
  font-weight: 400;
}
.btn:hover { transform: translateY(-2px); opacity: 0.88; }

.btn-primary {
  background: var(--pink);
  color: #fff;
  border: none;
  box-shadow: 0 3px 12px rgba(201,127,168,0.25);
}
.btn-secondary {
  background: var(--blue);
  color: #fff;
  border: none;
  box-shadow: 0 3px 12px rgba(106,143,200,0.22);
}
.btn-ghost {
  background: rgba(255,255,255,0.7);
  color: var(--ink);
  border: 1.5px solid var(--rule);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { border-color: var(--pink); color: var(--pink); }

/* ── LAYOUT ── */
main { position: relative; z-index: 1; }

section {
  max-width: 960px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 0.8rem;
  display: flex; align-items: center; gap: 0.6em;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 24px; height: 2px;
  background: var(--pink);
  border-radius: 1px;
}

h2 {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);   /* ← bigger */
  line-height: 1.2;
  margin-bottom: 1.4rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

p {
  margin-bottom: 1rem;
  color: #38364a;
  font-size: 1.05rem;      /* ← bigger */
  font-weight: 400;
}

/* ── DIVIDERS ── */
.wave-divider {
  width: 100%;
  height: 1px;
  background: var(--rule);
  border: none;
  margin: 0;
}
/* 
/* ── ABSTRACT SPLIT ── */
/* .abstract-split {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2.5rem;
  align-items: start;
} */

.abstract-left {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  /* same reveal animation as parent section */
}

.abstract-left h2 {
  margin-bottom: 0;
}

.abstract-right {
  max-width: 100%;
  overflow: hidden;
}

.abstract-right img {
  width: 100%;
  height: auto;
  max-height: 380px;        /* 从 320px 调大 */
  object-fit: contain;
  display: block;
  border-radius: 8px;
}
/* 
.abstract-right .fig-tall > img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: var(--surface);
} */

/* ── ABSTRACT CARD ── */
.abstract-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 2rem 1rem 2rem 2.2rem;   /* 右侧 padding 改为 0 */
  box-shadow: 0 2px 16px rgba(106,143,200,0.07);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1rem;                      /* gap 也可以稍微缩小 */
  align-items: center;            /* 垂直居中 */
}
.abstract-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--pink);
}
.abstract-text {
  font-style: italic;
  font-size: 1.05rem;        /* ← bigger */
  line-height: 1.9;
  color: #38364a;
  font-weight: 400;
}
.abstract-card .fig-container {
  margin: 0;
  border: none;
  box-shadow: none;
  background: transparent;
} */
/* ── FIGURE CONTAINERS ── */
.fig-container {
  margin: 2rem 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(106,143,200,0.07);
}
.fig-container > img {
  width: 100%;
  height: auto;
  display: block;           /* kills inline whitespace gap */
  vertical-align: top;
  line-height: 0;
}
.fig-caption {
  padding: 1rem 1.4rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
  border-top: 1px solid var(--rule);
  background: #f7f6fc;
}
.fig-caption strong { color: var(--ink); }

/* tall figure (teaser, vertical) */
.fig-tall { margin: 0; }
.fig-tall > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;        /* fills the container edge-to-edge */
  object-position: center;
}

/* ── STATS ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.4rem 1rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(106,143,200,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(106,143,200,0.12); }
.stat-card:hover::after { transform: scaleX(1); }
.stat-num {
  font-family: 'Sora', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--blue);
}
.stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.4rem;
  line-height: 1.4;
}

/* ── LOSS CARDS ── */
.loss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
  margin: 2rem 0;
}
.loss-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.4rem 1.3rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.loss-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(106,143,200,0.10); }
.loss-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.loss-card:nth-child(odd)::before  { background: var(--pink); }
.loss-card:nth-child(even)::before { background: var(--blue); }

.loss-title {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.loss-card:nth-child(odd)  .loss-title { color: var(--pink); }
.loss-card:nth-child(even) .loss-title { color: var(--blue); }

.loss-math {
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  background: var(--bg);
  padding: 0.3em 0.7em;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 0.6rem;
  border: 1px solid var(--rule);
  color: var(--ink);
}
.loss-desc {
  font-size: 0.97rem;        /* ← bigger */
  color: #38364a;
  font-weight: 400;
  line-height: 1.65;
}

/* ── INFO BOX ── */
.info-box {
  border-radius: 12px;
  padding: 1.3rem 1.5rem;
  margin: 1.5rem 0;
  border-left: 3px solid;
}
.info-box.pink   { background: var(--pink-lt); border-color: var(--pink); }
.info-box.blue   { background: var(--blue-lt); border-color: var(--blue); }
.info-box.purple { background: var(--pink-lt); border-color: var(--pink); }
.info-box-title {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.info-box.pink   .info-box-title { color: var(--pink); }
.info-box.blue   .info-box-title { color: var(--blue); }
.info-box.purple .info-box-title { color: var(--pink); }

/* ── RESULTS TABLE ── */
.results-scroll {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(106,143,200,0.08);
}
table { width: 100%; border-collapse: collapse; font-size: 0.82rem; font-family: 'DM Mono', monospace; }
thead tr { background: var(--ink); color: #fff; }
th, td { padding: 0.6rem 1rem; text-align: center; border-bottom: 1px solid var(--rule); }
th { font-weight: 400; letter-spacing: 0.06em; font-size: 0.75rem; }
tbody tr { background: var(--surface); transition: background 0.15s; }
tbody tr:hover { background: var(--surface2); }
tbody tr.ours { background: var(--pink-lt); }
tbody tr.ours td:first-child { font-weight: 700; color: var(--pink); }
td.best { font-weight: 700; }
.delta-row td { font-size: 0.73rem; color: #4a8a6a; background: rgba(74,138,106,0.05) !important; }

/* ── CONTRIBUTIONS ── */
.contrib-list { list-style: none; margin: 1.2rem 0; }
.contrib-list li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 1.02rem;        /* ← bigger */
  color: #38364a;
  font-weight: 400;
}
.contrib-list li:last-child { border-bottom: none; }
.contrib-num {
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* ── CITATION ── */
.citation-block {
  background: var(--ink);
  color: #c8c6e0;
  padding: 1.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.8;
  position: relative;
  border-radius: 12px;
  border: 1px solid #38365a;
}
.copy-btn {
  position: absolute; top: 1rem; right: 1rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 0.3em 0.9em;
  border-radius: 4px;
  border: 1px solid rgba(201,127,168,0.35);
  background: transparent;
  color: rgba(201,127,168,0.7);
  cursor: pointer;
  text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s;
}
.copy-btn:hover { border-color: var(--pink); color: var(--pink); }
pre { white-space: pre-wrap; }

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 2.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  border-top: 1px solid var(--rule);
  background: var(--bg);
  position: relative; z-index: 1;
}

/* ── SCROLL REVEAL ── */
/* All direct children of .reveal also fade in together */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

code {
  font-family: 'DM Mono', monospace;
  font-size: 0.85em;
  background: var(--surface2);
  padding: 0.1em 0.45em;
  border-radius: 4px;
  border: 1px solid var(--rule);
}

/* ── UTILITY ── */
.authors .affil-main { margin-top: 0.5rem; }
.authors .affil-note { margin-top: 0.2rem; font-size: 0.75rem; }
.h2-compact {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.mono-compact { font-family: 'DM Mono', monospace; font-size: 0.95rem; margin: 0; }
.info-compact { font-size: 1rem; margin: 0; font-weight: 400; line-height: 1.7; }
.footer-note { margin-top: 0.4rem; opacity: 0.6; }

/* ── RESPONSIVE ── */
@media (max-width: 760px) {
  .abstract-split {
    grid-template-columns: 1fr;
  }
  .abstract-right {
    position: static;
  }
  .fig-tall img {
    max-height: 360px;
  }
  .abstract-card {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  h1 { font-size: 2.4rem; }
}