/* DynamicWAM project page — classic academic project-page style
   (Nerfies-family look: Google Sans / Noto Sans, centered sections,
    dark rounded buttons, white background, one blue accent).
   The page holds text and figures only. */

:root {
  --ink: #363636;
  --text: #4a4a4a;
  --muted: #7a7a7a;
  --line: #dbdbdb;
  --bg-soft: #f5f5f5;
  --accent: #3273dc;          /* classic academic link blue */

  --font-display: "Google Sans", "Noto Sans", sans-serif;
  --font-body: "Noto Sans", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  /* Wide text column with little side whitespace; figures KEEP their original
     size (54rem, do not shrink them), so the wider prose overhangs the images. */
  --w-measure: 68rem;
  --w-section: calc(var(--w-measure) + 2.8rem);
  --w-figure: 54rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: #ffffff;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.16rem;
  font-weight: 500;
  letter-spacing: 0.008em;
  /* Long lines need extra leading so the eye finds the next one. */
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #205cbc; text-decoration: underline; }

b, strong { color: var(--ink); font-weight: 700; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--ink);
}

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.4rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #ededed;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}
.wordmark span { color: var(--accent); }
.wordmark:hover { text-decoration: none; }

.topbar-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
}
.topbar-links a { color: var(--text); }
.topbar-links a:hover { color: var(--accent); text-decoration: none; }
.topbar-gh { display: inline-flex; align-items: center; }

/* ---------- hero ---------- */

.hero {
  max-width: var(--w-section);
  margin: 0 auto;
  padding: 3.8rem 1.4rem 1rem;
  text-align: center;
}

.hero-banner {
  display: block;
  width: min(620px, 90%);
  height: auto;
  margin: 0 auto 2rem;
}

.publication-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 4.4vw, 2.85rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
  max-width: 36ch;
  margin: 0 auto 1.4rem;
}

.authors {
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--accent);
  max-width: 46rem;
  margin: 0 auto 0.4rem;
}
.authors sup { font-size: 0.68em; }
.author-note {
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  border: 1px solid var(--ink);
}
.btn:hover {
  background: #4a4a4a;
  color: #fff;
  text-decoration: none;
}
.btn-icon { display: inline-flex; align-items: center; font-size: 0.95em; opacity: 0.9; }

.btn-disabled {
  background: #b5b5b5;
  border-color: #b5b5b5;
  cursor: default;
}
.btn-disabled:hover { background: #b5b5b5; }

/* ---------- sections ---------- */

.content {
  max-width: var(--w-section);
  margin: 0 auto;
  padding: 3.6rem 1.4rem 0;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.1rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-align: center;
  text-wrap: balance;
  margin-bottom: 1.5rem;
}

.prose {
  text-align: left;
  text-wrap: pretty;
}
.content p + p { margin-top: 1.1rem; }

/* ---------- figures ---------- */

.fig {
  max-width: var(--w-figure);
  margin: 2.4rem auto 0;
  text-align: center;
}
.fig img {
  max-width: 100%;
  height: auto;
}
.fig-narrow { max-width: 38rem; }
.fig-col { max-width: 30rem; }

.fig figcaption {
  margin: 0.9rem auto 0;
  font-size: 0.96rem;
  line-height: 1.68;
  color: var(--muted);
  text-align: left;
}
.fig figcaption b { color: var(--ink); }

/* ---------- bibtex ---------- */

.bib-box {
  position: relative;
  margin-top: 0.4rem;
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 1.2rem 1.3rem;
  overflow-x: auto;
}
.bib-box pre {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink);
}
.bib-copy {
  position: absolute;
  top: 0.7rem;
  right: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3em 0.9em;
  cursor: pointer;
}
.bib-copy:hover { color: var(--ink); border-color: var(--muted); }
.bib-copy.copied { color: var(--accent); border-color: var(--accent); }

/* ---------- footer ---------- */

.footer {
  margin-top: 4.5rem;
  border-top: 1px solid #ededed;
  padding: 1.5rem 1.4rem 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
.footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.footer a:hover { color: var(--ink); }
.footer-sep { opacity: 0.5; }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .topbar-links a:not(.topbar-gh) { display: none; }
  .topbar-links .topbar-gh { display: inline-flex; }

  .hero { padding-top: 2.6rem; }
}

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