/* =====================================================================
   Data Pollination — project page styles
   Clean minimal academic, single-column, ~760px content width.
   ===================================================================== */

:root {
  --max-width: 760px;
  --fg:        #1a1a1a;
  --fg-muted:  #555;
  --bg:        #fdfdfd;
  --accent:    #1f6feb;
  --accent-2:  #e36209;
  --soft:      #f4f6fa;
  --border:    #e4e7eb;
  --code-bg:   #f7f8fa;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Liberation Sans", sans-serif;
  --font-mono: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --font-serif: "Charter", "Source Serif Pro", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 64px;
}

/* ----- Hero (title, authors, buttons) -------------------------------- */
.hero {
  text-align: center;
  margin-bottom: 40px;
}

.language-switch {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 0 0 24px;
  font-size: 13px;
}

.language-switch a,
.language-switch span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg-muted);
  text-decoration: none;
}

.language-switch span {
  background: var(--fg);
  border-color: var(--fg);
  color: #fff;
}

.language-switch a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.venue {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.title {
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.subtitle {
  font-family: var(--font-serif);
  font-size: 22px;
  font-style: italic;
  color: var(--fg-muted);
  font-weight: 400;
  margin: 0 0 28px;
  line-height: 1.3;
}

.authors {
  margin: 0 0 8px;
  line-height: 1.8;
}
.author { margin: 0 8px; white-space: nowrap; }
.author sup { font-size: 0.7em; color: var(--fg-muted); }

.affiliations {
  font-size: 14px;
  color: var(--fg-muted);
  margin: 4px 0;
}
.affiliations.small { font-size: 13px; }
.affiliations a { color: inherit; text-decoration: underline; }
.affiliations sup { font-size: 0.85em; }

/* ----- Resource buttons ---------------------------------------------- */
.buttons {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--fg);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn:hover    { background: var(--accent); }
.btn:active   { transform: translateY(1px); }
.btn-icon     { font-size: 14px; line-height: 1; }

/* ----- Teaser -------------------------------------------------------- */
.teaser {
  margin: 0 0 48px;
  text-align: center;
}
.teaser img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
}
.teaser figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
  text-align: left;
}

/* ----- TL;DR --------------------------------------------------------- */
.tldr {
  background: var(--soft);
  border-left: 4px solid var(--accent);
  padding: 18px 22px;
  border-radius: 6px;
  margin: 0 0 48px;
}
.tldr-title {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.tldr p { margin: 0; }

/* ----- Sections ------------------------------------------------------ */
section {
  margin: 0 0 48px;
}
section > h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.005em;
}
section > h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--fg);
}
section p,
section ul {
  margin: 0 0 14px;
}
section ul { padding-left: 22px; }
section li { margin-bottom: 6px; }
section em { font-style: italic; }
section strong { font-weight: 600; }
.note {
  color: var(--fg-muted);
  font-size: 15px;
  border-left: 3px solid var(--border);
  padding-left: 14px;
}

/* ----- Figures ------------------------------------------------------- */
figure {
  margin: 24px 0;
  text-align: center;
}
figure img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  background: #fff;
}
figure figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
  text-align: left;
}

/* ----- Figure grids -------------------------------------------------- */
.figgrid {
  display: grid;
  gap: 18px;
  margin: 24px 0;
}
.figgrid.two { grid-template-columns: repeat(2, 1fr); }
.figgrid figure { margin: 0; }
.figgrid figcaption {
  font-size: 13px;
  text-align: center;
}
@media (max-width: 560px) {
  .figgrid.two { grid-template-columns: 1fr; }
}

/* ----- BibTeX -------------------------------------------------------- */
#bibtex pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
}
#bibtex code { font-family: inherit; }

/* ----- Footer -------------------------------------------------------- */
footer {
  margin-top: 64px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--fg-muted);
}
footer a { color: inherit; }

/* ----- Responsive tweaks --------------------------------------------- */
@media (max-width: 600px) {
  .page { padding: 32px 18px 48px; }
  .title { font-size: 32px; }
  .subtitle { font-size: 18px; }
  section > h2 { font-size: 22px; }
  body { font-size: 16px; }
}
