@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Instrument+Sans:wght@400;500;600&display=swap");

:root {
  --bg: #f6f4ef;
  --paper: #fffdf8;
  --ink: #1d2833;
  --muted: #58656f;
  --line: #d7dde2;
  --accent: #0f5f6f;
  --accent-soft: #d8eef2;
  --shadow: 0 10px 30px rgba(20, 37, 46, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Instrument Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(165deg, var(--bg) 0%, #eef2f4 55%, #e8f0f3 100%);
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-top: 0;
}

.background-shape {
  position: fixed;
  pointer-events: none;
  z-index: -1;
  filter: blur(40px);
}

.shape-a {
  top: -40px;
  left: -80px;
  width: 360px;
  height: 300px;
  background: rgba(116, 181, 196, 0.3);
}

.shape-b {
  right: -100px;
  bottom: -90px;
  width: 420px;
  height: 360px;
  background: rgba(109, 157, 198, 0.2);
}

.site-header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(246, 244, 239, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(124, 140, 150, 0.2);
  z-index: 20;
}

.brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

.container {
  max-width: 1050px;
  margin: 0 auto;
  padding: 1.5rem;
}

.section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  padding: 1.5rem;
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.55s ease forwards;
}

.section:nth-of-type(2) {
  animation-delay: 0.08s;
}

.section:nth-of-type(3) {
  animation-delay: 0.14s;
}

.section:nth-of-type(4) {
  animation-delay: 0.2s;
}

.section:nth-of-type(5) {
  animation-delay: 0.26s;
}

.section:nth-of-type(6) {
  animation-delay: 0.32s;
}

.section:nth-of-type(7) {
  animation-delay: 0.38s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  margin-bottom: 0.7rem;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-content {
  flex: 1;
}

#abstract {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

#abstract .hero-content {
  flex: 1;
}

#abstract .media-slot {
  flex: 1;
  max-width: 350px;
}

#abstract .media-slot img {
  width: 100%;
  height: auto;
}


.eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.authors {
  margin: 0 0 0.35rem;
}

.authors a {
    color: var(--ink);
    text-decoration: none;
}

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

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

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.btn {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  color: var(--ink);
  background: #fff;
  font-size: 0.92rem;
}

.btn:hover {
  border-color: #8da1b0;
}

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

.grid {
  display: grid;
  gap: 0.9rem;
}

.span-2 {
  grid-column: span 2;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
  background: #fff;
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.card p {
  margin: 0;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0 0 0.95rem;
}

.metric {
  border: 1px dashed #aac1cb;
  border-radius: 12px;
  padding: 0.85rem;
  text-align: center;
  background: #fafdfd;
}

.metric-value {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.9rem;
  color: #0b4b57;
}

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

.media-slot {
  flex: 1;
  max-width: 100%;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.media-slot img {
  display: block;
  width: 100%;
  height: auto;
}

.media-slot figcaption {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--line);
  text-align: justify;
}

.media-slot video {
  width: 100%;
  height: auto;
  display: block;
}

pre {
  margin: 0;
  background: #18222b;
  color: #eef4f8;
  border-radius: 10px;
  padding: 0.9rem;
  overflow-x: auto;
}

code {
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .grid-2,
  .grid-3,
  .metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #abstract {
    flex-direction: column;
    align-items: center;
  }
  .media-slot {
    order: 2; /* forces image below text */
  }
  .hero-content {
    order: 1;
  }

  .container {
    padding: 0.8rem;
  }

  .section {
    padding: 1rem;
  }

  .site-header {
    padding: 0.75rem 0.9rem;
  }

  .site-nav {
    gap: 0.6rem;
  }
}
