:root {
  --bg: #fbf9fe;
  --bg-accent: #fbf9fe;
  --ink: #17212b;
  --muted: #54606b;
  --card: rgba(255, 255, 255, 0.9);
  --line: rgba(23, 33, 43, 0.12);
  --gold: #ff4fa0;
  --teal: #41b0e3;
  --coral: #ff5ca9;
  --wine: #bf4bcf;
  --shadow: 0 20px 50px rgba(87, 112, 156, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Avenir Next", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg) 0%, #ffffff 16%, #ffffff 100%);
}

a {
  color: inherit;
}

.page-shell {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 60px;
}

.hero,
.section,
.footer {
  margin-bottom: 28px;
}

.topbar,
.copy-card,
.process-card,
.insight-card,
.sample-card,
.emotion-group,
.footer,
.figure-card {
  backdrop-filter: blur(20px);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 22px;
  border-radius: var(--radius-xl);
}

.brand-block {
  display: grid;
  gap: 6px;
}

.brand-title {
  font-weight: 700;
}

.topbar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  align-items: center;
}

.topbar-links a {
  text-decoration: none;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.icon-link-text {
  width: auto;
  min-width: 60px;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.icon-link svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding: 36px 0 0;
}

.hero-copy {
  padding: 24px 8px 24px 4px;
  text-align: center;
}

.hero-kicker,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal);
}

.hero h1,
.section h2 {
  margin: 12px 0 16px;
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.02;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.55rem);
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.hero-authors,
.hero-affiliations {
  margin: 0 auto;
  max-width: 90%;
  color: var(--ink);
  line-height: 1.45;
}

.hero-authors {
  font-size: clamp(1rem, 1.55vw, 1.55rem);
  font-weight: 500;
}

.hero-affiliations {
  margin-top: 10px;
  font-size: clamp(0.9rem, 1.35vw, 1.2rem);
  color: var(--muted);
}

.hero-copy sup {
  font-size: 0.65em;
  line-height: 0;
}

.section-subtitle,
.copy-card p,
.insight-card p,
.process-step p,
.sample-summary,
.footer p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.button.primary {
  background: #ef5aa6;
  color: white;
}

.button.secondary {
  border: 1px solid rgba(23, 33, 43, 0.08);
  background: #53a8e6;
  color: white;
}

.section {
  scroll-margin-top: 20px;
}

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

.section h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.copy-card,
.process-card,
.emotion-group,
.sample-card,
.footer,
.figure-card {
  border-radius: var(--radius-xl);
}

.copy-card {
  padding: 24px;
}

.process-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
  align-items: stretch;
}

.figure-card {
  margin-top: 18px;
  padding: 18px;
}

.figure-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

.process-step {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(239, 247, 252, 0.82));
}

.step-index {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(65, 176, 227, 0.14);
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 700;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.insight-card {
  padding: 20px;
  border-radius: var(--radius-xl);
}

.sample-stack {
  display: grid;
  gap: 18px;
}

.sample-card,
.emotion-group {
  padding: 22px;
}

.sample-card {
  overflow: hidden;
}

.mismatch-card.mismatch-happy {
  background: linear-gradient(180deg, rgba(255, 248, 196, 0.9), rgba(255, 252, 232, 0.96));
}

.mismatch-card.mismatch-sad {
  background: linear-gradient(180deg, rgba(223, 238, 255, 0.9), rgba(243, 248, 255, 0.96));
}

.mismatch-card.mismatch-angry {
  background: linear-gradient(180deg, rgba(255, 225, 225, 0.9), rgba(255, 244, 244, 0.96));
}

.sample-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.sample-title {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.transcript {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.72;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.emotion-badge,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(23, 33, 43, 0.05);
  font-size: 0.9rem;
}

.emotion-badge .emoji {
  font-size: 1rem;
}

.audio-grid-wrap {
  overflow-x: auto;
  padding-bottom: 8px;
}

.audio-grid {
  min-width: 1080px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.audio-tile {
  display: grid;
  gap: 10px;
  min-height: 156px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(239, 247, 252, 0.72));
  border: 1px solid rgba(23, 33, 43, 0.08);
}

.audio-tile h4 {
  margin: 0;
  font-size: 0.98rem;
}

.audio-meta {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

audio {
  width: 100%;
  height: 38px;
}

.dataset-link {
  text-decoration: none;
  color: var(--teal);
  font-weight: 700;
}

.missing-tile {
  justify-content: center;
  background: linear-gradient(180deg, rgba(255, 92, 169, 0.06), rgba(65, 176, 227, 0.12));
  border-style: dashed;
}

.missing-pill {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 92, 169, 0.14);
  color: var(--wine);
  font-size: 0.8rem;
  font-weight: 700;
}

.footer {
  padding: 22px;
}

@media (max-width: 1080px) {
  .hero-grid,
  .insight-grid {
    grid-template-columns: 1fr;
  }

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

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

  .topbar,
  .sample-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-links {
    gap: 10px 14px;
  }

  .hero h1 {
    max-width: none;
  }

  .audio-grid {
    min-width: 860px;
  }
}
