:root {
  --bg: #f5efe4;
  --paper: #fffaf1;
  --ink: #1f2731;
  --muted: #57616d;
  --line: rgba(31, 39, 49, 0.12);
  --rust: #b44d2d;
  --teal: #1f6c6d;
  --gold: #b8861f;
  --slate: #41556b;
  --shadow: 0 24px 60px rgba(38, 32, 25, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(180, 77, 45, 0.14), transparent 32%),
    radial-gradient(circle at top right, rgba(31, 108, 109, 0.12), transparent 30%),
    linear-gradient(180deg, #f3ebdb 0%, #f7f1e6 30%, #f5efe4 100%);
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  line-height: 1.55;
}

.page-shell {
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.section,
.media-card,
.sidebar-card,
.pdf-frame {
  background: rgba(255, 250, 241, 0.82);
  backdrop-filter: blur(8px);
}

.section {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2 {
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin: 0 0 8px;
}

.eyebrow,
.panel-label {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--rust);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 24px rgba(31, 39, 49, 0.16);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border: 1px solid var(--line);
}

.button-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px dashed rgba(31, 39, 49, 0.25);
}

.button-block {
  width: 100%;
}

.media-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
}

.media-card video {
  display: block;
  width: 100%;
  max-height: 72vh;
  background: #111;
}

.media-links {
  margin-top: 10px;
  font-size: 0.95rem;
}

.media-links a {
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
}

.media-links a:hover,
.media-links a:focus-visible {
  text-decoration: underline;
}

.media-caption {
  padding: 12px 20px 14px;
  border-top: 1px solid var(--line);
}

.preprint-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.preprint-sidebar {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 20px;
}

.sidebar-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  display: grid;
  gap: 10px;
}

.pdf-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 78vh;
}

.pdf-frame object {
  display: block;
  width: 100%;
  min-height: 78vh;
  background: #fff;
}

.pdf-fallback {
  min-height: 78vh;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

@media (max-width: 1040px) {
  .preprint-layout {
    grid-template-columns: 1fr;
  }

  .preprint-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 18px, 100%);
    padding-top: 10px;
  }

  .section {
    padding: 20px 16px;
    border-radius: 22px;
  }
}
