:root {
  --bg: #ffffff;
  --bg-subtle: #f7f7f9;
  --text: #0a0a0b;
  --text-muted: #5f6473;
  --border: #e6e7eb;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --max-content: 850px;
  --max-hero: 1060px;

  --nav-height: 56px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
  border-bottom-color: currentColor;
}

/* ---------- Sticky nav ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.topnav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topnav-brand {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  border: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.topnav-brand:hover {
  color: var(--text);
  border: none;
}

.topnav-links {
  display: flex;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
}

.topnav-links a {
  color: var(--text-muted);
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.topnav-links a:hover {
  color: var(--text);
  border: none;
}

.topnav-links a.active,
.topnav-links a.active:hover {
  background: var(--accent-soft);
  color: var(--text);
}

@media (max-width: 640px) {
  .topnav-brand {
    display: none;
  }
  .topnav-inner {
    display: block;
    padding: 0;
    height: var(--nav-height);
  }
  .topnav-links {
    display: flex;
    height: 100%;
    align-items: center;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 0 20px;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, transparent 0, black 20px, black calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 20px, black calc(100% - 24px), transparent 100%);
  }
  .topnav-links::-webkit-scrollbar {
    display: none;
  }
  .topnav-links a {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  max-width: var(--max-hero);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 800px 360px at 50% -10%, var(--accent-soft) 0%, transparent 70%),
    var(--bg);
}

.hero-title {
  font-size: 36px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 24px;
  text-align: center;
}

.authors {
  text-align: center;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 8px;
}

.authors .author-block {
  display: inline-block;
  margin: 0 4px;
}

.authors a {
  color: inherit;
  border: none;
}

.authors a:hover {
  color: var(--accent);
  border: none;
}

.affiliations {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.affiliations .author-block {
  display: inline-block;
  margin: 0 6px;
}

.venues {
  text-align: center;
  font-size: 13.5px;
  margin-bottom: 36px;
}

.venues > div {
  margin: 4px 0;
}

.venues a {
  color: var(--text-muted);
  border: none;
}

.venues a:hover {
  color: var(--accent);
  border: none;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: #1f2030;
  color: var(--bg);
  border: 1px solid var(--text);
}

.btn .icon {
  font-size: 13px;
}

.btn.btn-soon,
.btn.btn-soon:hover {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: not-allowed;
}

/* ---------- Teaser ---------- */
.teaser {
  max-width: 1200px;
  margin: 56px auto 0;
  padding: 0 24px;
}

.teaser img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.teaser-frame {
  aspect-ratio: 16 / 7;
  border-radius: 14px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, var(--accent-soft) 0%, #fafaff 60%, #f7f7f9 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
}

.teaser-frame .teaser-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
}

.teaser-frame .teaser-text {
  font-size: 14px;
}

/* ---------- Section content ---------- */
.eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

h2.section-title {
  font-size: 26px;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 28px;
}

.prose p {
  margin: 0 0 18px;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

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

.prose ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}

.prose ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 14px;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.prose strong {
  font-weight: 600;
  color: var(--text);
}

/* ---------- Code / BibTeX ---------- */
pre {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

pre code {
  font-family: inherit;
  background: none;
  padding: 0;
}

/* ---------- Placeholder sections ---------- */
.placeholder {
  color: var(--text-muted);
  font-style: italic;
  background: var(--bg-subtle);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 32px;
  text-align: center;
  font-size: 14px;
}

/* ---------- Inline figure placeholder ---------- */
.fig {
  margin: 28px 0 8px;
}

.fig.fig-narrow {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.fig-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 28px 0 8px;
}

.fig-row .fig {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}

@media (max-width: 640px) {
  .fig-row {
    flex-direction: column;
    gap: 24px;
  }
}

.fig-frame {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, var(--accent-soft) 0%, #fafaff 60%, #f7f7f9 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  padding: 24px;
  text-align: center;
}

.fig-label {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
}

.fig-text {
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 520px;
}

.fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.fig figcaption {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.55;
}

/* Inline binding-status tags (color-keyed to the BindSplit figure) */
.bind-tag {
  padding: 0.1em 0.45em;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.bind-tag.seen {
  background: #c4e0dc;
}

.bind-tag.unseen {
  background: #f3d5b1;
}

/* ---------- Subsections (Findings) ---------- */
h3.subsection-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 40px 0 16px;
  color: var(--text);
}

h3.subsection-title:first-child {
  margin-top: 0;
}

h3.subsection-title .subsection-num {
  display: inline-block;
  width: 22px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ---------- Emphasis ---------- */
.prose em {
  font-style: italic;
}

/* ---------- Footer ---------- */
.footer {
  padding: 32px 24px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.footer a {
  color: var(--text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero-title { font-size: 28px; }
  h2.section-title { font-size: 22px; }
  section { padding: 56px 0; }
  .hero { padding: 48px 0 40px; }
}
