/* Reasoning4UP project page */
:root {
  --bg: #f6f4ef;
  --bg-elevated: #fffcf7;
  --ink: #161512;
  --muted: #5c5852;
  --accent: #0c5c5c;
  --accent-soft: rgba(12, 92, 92, 0.12);
  --border: rgba(22, 21, 18, 0.12);
  --radius: 6px;
  --font-display: "Newsreader", "Georgia", serif;
  --font-body: "Source Serif 4", "Georgia", serif;
  --font-ui: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "kern" 1, "liga" 1;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.wrap-wide {
  max-width: 58rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

header.hero {
  padding: 0 0 2.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
}

.hero-logos-bar {
  background: var(--ink);
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-logos-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
}

.hero-lab-title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.3;
  color: #ece8e0;
}

.hero-lab-title a {
  color: inherit;
  text-decoration: none;
}

.hero-lab-title a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-logos-icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.hero-logos-icons a {
  line-height: 0;
  opacity: 0.92;
}

.hero-logos-icons a:hover {
  opacity: 1;
}

.hero-logos-icons img {
  display: block;
  height: 34px;
  width: auto;
}

header.hero .hero-body {
  padding-top: 2.5rem;
  container-type: inline-size;
}

.venue {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  line-height: 1.15;
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}

/* Hero title: always one line; size scales with content column */
header.hero h1 {
  white-space: nowrap;
  font-size: clamp(0.75rem, 2.2vw + 0.7rem, 2.45rem);
}

@supports (font-size: 1cqi) {
  header.hero h1 {
    font-size: clamp(0.75rem, min(2.55rem, 3.95cqi), 2.55rem);
  }
}

.authors {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}

.affiliations {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.corresponding {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.75rem 0 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.75rem;
}

.btn {
  font-family: var(--font-ui);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: var(--accent-soft);
  border-color: rgba(12, 92, 92, 0.35);
  text-decoration: none;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn.primary:hover {
  filter: brightness(1.06);
  border-color: var(--accent);
}

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

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

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.abstract p {
  margin: 0 0 1rem;
}

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

.contributions {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contributions li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.85rem;
}

.contributions li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--accent);
  border-radius: 1px;
  transform: rotate(45deg);
}

.contributions li:last-child {
  margin-bottom: 0;
}

.figure-block {
  margin: 2rem 0;
}

.figure-block:first-child {
  margin-top: 0;
}

/* Figures section: wider column so the last (wide) diagram reads larger */
#figures .wrap {
  max-width: 58rem;
}

/* First two diagrams: same width */
#figures .wrap > .figure-block:nth-child(1),
#figures .wrap > .figure-block:nth-child(2) {
  max-width: 30rem;
  margin-left: auto;
  margin-right: auto;
}

/* Third diagram: use full figures column width */
#figures .wrap > .figure-block:nth-child(3) {
  max-width: none;
  width: 100%;
}

#figures > .wrap-wide > h2 {
  margin-bottom: 0.25rem;
}

.figure-block figure {
  margin: 0;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

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

.figure-block figcaption {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.75rem;
  line-height: 1.5;
}

.figure-block figcaption a {
  font-weight: 600;
  color: var(--accent);
}

.figure-desc {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink);
}

.figure-desc p {
  margin: 0 0 0.85rem;
}

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

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.pill {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.challenges {
  margin: 0;
  padding-left: 1.15rem;
}

.challenges li {
  margin-bottom: 0.65rem;
}

.challenges li:last-child {
  margin-bottom: 0;
}

.citation {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 1rem 1.1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0;
}

footer.site-footer {
  margin-top: 1rem;
  padding: 2rem 0 2.5rem;
  background: #1c1b18;
  color: #c9c4bc;
}

footer.site-footer .logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

footer.site-footer .logos a {
  line-height: 0;
}

footer.site-footer .logos a:hover img {
  opacity: 1;
}

footer.site-footer .logos img {
  height: 36px;
  width: auto;
  opacity: 0.92;
}

footer.site-footer p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  max-width: 40rem;
}

footer.site-footer a {
  color: #e8e4dc;
}

@media (max-width: 520px) {
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
  }
}
