:root {
  --bg: #fdfcf8;
  --fg: #2c2c24;
  --primary: #5d7052;
  --primary-fg: #f3f4f1;
  --secondary: #c18c5d;
  --accent: #e6dccd;
  --muted: #f0ebe5;
  --muted-fg: #78786c;
  --border: #ded8cf;
  --shadow-soft: 0 4px 20px -2px rgba(93, 112, 82, 0.15);
  --shadow-float: 0 10px 40px -10px rgba(193, 140, 93, 0.2);
  --radius-lg: 24px;
  --radius-md: 16px;
  --content: 86rem;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Nunito, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  color: var(--fg);
  background: var(--bg);
  line-height: 1.85;
  overflow-x: hidden;
  padding-top: 104px;
}

/* Global paper grain (very low opacity) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-size: 220px 220px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  z-index: 0;
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--muted-fg);
}

.tiny {
  font-size: 0.875rem;
}

.container {
  width: min(100% - 2rem, var(--content));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  border: 2px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  z-index: 999;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Topbar / Nav */
.topbar {
  position: fixed;
  top: 0.75rem;
  left: 0;
  right: 0;
  z-index: 20;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(222, 216, 207, 0.55);
  box-shadow: var(--shadow-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  height: 42px;
  width: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(93, 112, 82, 0.12);
  border: 1px solid rgba(93, 112, 82, 0.25);
  font-family: Fraunces, ui-serif, Georgia, serif;
  font-weight: 800;
  color: var(--primary);
}

.brand-title {
  font-family: Fraunces, ui-serif, Georgia, serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  line-height: 1.1;
  display: block;
}
.brand-sub {
  display: block;
  font-size: 0.85rem;
  color: var(--muted-fg);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.nav a {
  text-decoration: none;
  color: var(--fg);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  transition: transform 300ms ease, background 300ms ease, box-shadow 300ms ease;
}
.nav a:hover {
  background: rgba(93, 112, 82, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -18px rgba(93, 112, 82, 0.4);
}

.nav-cta {
  background: var(--primary);
  color: var(--primary-fg) !important;
  box-shadow: var(--shadow-soft);
}
.nav-cta:hover {
  background: color-mix(in srgb, var(--primary) 90%, #000);
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(222, 216, 207, 0.7);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}
.nav-toggle-bars {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--fg);
  position: relative;
  border-radius: 99px;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--fg);
  border-radius: 99px;
}
.nav-toggle-bars::before {
  top: -6px;
}
.nav-toggle-bars::after {
  top: 6px;
}

/* Hero */
.hero {
  position: relative;
  padding: 5.5rem 0 4rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 3rem;
  align-items: start;
}

.hero-left {
  padding-top: 0.35rem;
  text-align: left;
  max-width: none;
}

.hero-title {
  font-family: Fraunces, ui-serif, Georgia, serif;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 2rem;
}
.hero-title-strong {
  display: block;
  font-weight: 800;
  font-size: clamp(3.5rem, 7vw, 5.2rem);
  margin-bottom: 1.2rem;
}
.hero-title-soft {
  display: block;
  font-weight: 650;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  color: color-mix(in srgb, var(--fg) 85%, var(--primary));
  margin-top: 0.65rem;
}

.hero-lead {
  font-size: 1.1rem;
  max-width: none;
  line-height: 1.85;
  color: color-mix(in srgb, var(--fg) 92%, var(--muted-fg));
  margin-inline: 0;
}

.hero-meta {
  margin: 0.35rem 0 0.9rem;
  font-weight: 800;
}
.hero-meta a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dashed rgba(93, 112, 82, 0.35);
}
.hero-meta a:hover {
  border-bottom-color: rgba(93, 112, 82, 0.75);
}

.paper-authors {
  margin: 1rem 0 0.5rem;
  font-weight: 900;
  color: color-mix(in srgb, var(--fg) 92%, var(--muted-fg));
  max-width: 90ch;
  text-align: left;
}
.paper-affils {
  margin: 0 0 1.5rem;
  font-weight: 850;
  color: var(--muted-fg);
  max-width: 90ch;
  text-align: left;
}
.paper-authors br {
  display: none;
}

@media (min-width: 720px) {
  .paper-authors br {
    display: block;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(222, 216, 207, 0.6);
  background: rgba(255, 255, 255, 0.55);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  font-weight: 800;
  font-size: 0.92rem;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--secondary);
  box-shadow: 0 0 0 6px rgba(193, 140, 93, 0.14);
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.8rem 0;
  justify-content: flex-start;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 300ms ease, box-shadow 300ms ease, background 300ms ease, border-color 300ms ease;
  user-select: none;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(93, 112, 82, 0.25);
}
.btn:hover {
  transform: translateY(-1px) scale(1.03);
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover {
  box-shadow: 0 10px 30px -16px rgba(93, 112, 82, 0.45);
}
.btn-outline {
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(193, 140, 93, 0.85);
  color: var(--secondary);
  box-shadow: 0 10px 30px -20px rgba(193, 140, 93, 0.35);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--primary);
}
.btn-ghost:hover {
  background: rgba(93, 112, 82, 0.08);
}

.stats {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.35rem;
}
.stats-wide {
  grid-column: 1 / -1;
  margin-top: 2.2rem;
  text-align: left;
}
.stat-card {
  border: 1px solid rgba(222, 216, 207, 0.6);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 1.75rem;
  padding: 1.15rem 1.15rem 1.05rem;
  box-shadow: var(--shadow-soft);
  transition: transform 400ms ease, box-shadow 400ms ease;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px -25px rgba(93, 112, 82, 0.4);
}
.stat-card dt {
  font-weight: 900;
  color: var(--muted-fg);
  font-size: 0.92rem;
}
.stat-card dd {
  margin: 0.35rem 0 0;
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}
.stat-num {
  font-family: Fraunces, ui-serif, Georgia, serif;
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}
.stat-note {
  color: var(--muted-fg);
  font-size: 0.9rem;
  font-weight: 800;
}

.hero-right {
  position: relative;
  justify-self: end;
  width: 100%;
}
.hero-panel {
  border: 1px solid rgba(222, 216, 207, 0.65);
  background: rgba(254, 254, 250, 0.72);
  border-radius: 2.2rem;
  box-shadow: var(--shadow-float);
  overflow: hidden;
  transform: none;
  width: 100%;
}

/* On wide screens, keep hero content breathable */
@media (min-width: 1100px) {
  .hero-grid {
    grid-template-columns: 2.5fr 1fr;
    gap: 3.5rem;
    align-items: center;
  }
  .hero-lead {
    font-size: 1.15rem;
  }
}
.panel-header {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 1.1rem 1.2rem 0.8rem;
}
.pill {
  font-weight: 900;
  font-size: 0.85rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(222, 216, 207, 0.7);
  background: rgba(255, 255, 255, 0.6);
}
.pill-muted {
  color: var(--muted-fg);
}
.panel-body {
  padding: 0.2rem 1.2rem 1.2rem;
}
.mini-cards {
  display: grid;
  gap: 1rem;
}
.mini-card {
  border: 1px solid rgba(222, 216, 207, 0.6);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 1.6rem;
  padding: 1rem 1rem 0.95rem;
  box-shadow: var(--shadow-soft);
}
.mini-card h3 {
  margin: 0 0 0.2rem;
  font-family: Fraunces, ui-serif, Georgia, serif;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
}
.mini-card p {
  margin: 0;
  line-height: 1.7;
  color: var(--muted-fg);
  font-weight: 700;
}

/* Cover slider (horizontal scroll) */
.cover-slider {
  margin-top: 1.15rem;
}
.cover-track {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding: 0.25rem 0.1rem 0.75rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.cover-item {
  flex: 0 0 260px;
  scroll-snap-align: start;
  margin: 0;
}
.cover-item img {
  width: 100%;
  height: 165px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(222, 216, 207, 0.65);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-soft);
  display: block;
}

@media (min-width: 1100px) {
  .cover-item {
    flex-basis: 290px;
  }
  .cover-item img {
    height: 180px;
  }
}
.callout {
  margin-top: 1rem;
  padding: 1.1rem 1.1rem;
  border-radius: 2rem;
  border: 1px dashed rgba(193, 140, 93, 0.55);
  background: rgba(230, 220, 205, 0.25);
}
.callout p {
  margin: 0;
  font-weight: 800;
}

/* Blobs */
.hero-blobs {
  position: absolute;
  inset: -120px -80px auto -80px;
  height: 520px;
  pointer-events: none;
  z-index: 0;
}
.blob {
  position: absolute;
  filter: blur(42px);
  opacity: 0.65;
  transform: translateZ(0);
  animation: floaty 10s ease-in-out infinite;
}
.blob-a {
  width: 440px;
  height: 340px;
  left: 2%;
  top: 12%;
  background: rgba(93, 112, 82, 0.32);
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}
.blob-b {
  width: 420px;
  height: 360px;
  left: 38%;
  top: 8%;
  background: rgba(193, 140, 93, 0.28);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation-delay: -2.2s;
}
.blob-c {
  width: 360px;
  height: 280px;
  right: 2%;
  top: 20%;
  background: rgba(230, 220, 205, 0.6);
  border-radius: 55% 45% 55% 45% / 60% 35% 65% 40%;
  animation-delay: -4.2s;
}

@keyframes floaty {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(10px, -14px) scale(1.03);
  }
}

/* Sections */
.section {
  padding: 5.5rem 0;
  position: relative;
}
.section-alt {
  background: linear-gradient(180deg, rgba(240, 235, 229, 0.25), rgba(240, 235, 229, 0.05) 65%, rgba(253, 252, 248, 0));
}
.section-head {
  max-width: 70ch;
  margin-bottom: 2.2rem;
}
.section-head h2 {
  margin: 0 0 0.65rem;
  font-family: Fraunces, ui-serif, Georgia, serif;
  letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 2.9vw, 2.4rem);
}
.section-sub {
  margin: 0;
  color: var(--muted-fg);
  font-weight: 700;
}

/* Storytelling blocks (image + explanation) */
.bullets {
  margin: 0.9rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted-fg);
  font-weight: 800;
}
.bullets li {
  margin: 0.45rem 0;
}

.media-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.9rem;
  align-items: start;
  margin-top: 2.2rem;
}
.media-split:first-of-type {
  margin-top: 0;
}
.media-split-reverse {
  grid-template-columns: 0.95fr 1.05fr;
}
.media-split-reverse > .media-text {
  order: 2;
}
.media-split-reverse > .media-figure,
.media-split-reverse > .media-figure-pair {
  order: 1;
}
.media-text h3 {
  margin: 0 0 0.5rem;
  font-family: Fraunces, ui-serif, Georgia, serif;
  letter-spacing: -0.015em;
  font-size: 1.55rem;
}
.media-text p {
  margin: 0.8rem 0 0;
  font-weight: 750;
  line-height: 1.8;
  color: color-mix(in srgb, var(--fg) 85%, var(--muted-fg));
}

.media-figure {
  margin: 0;
}
.media-figure-pair {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}
.tni-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.tni-grid figure {
  margin: 0;
}
.tni-grid .figcap {
  text-align: center;
}
.media-figure-pair figure {
  margin: 0;
}

.number-steps {
  margin-top: 1.15rem;
  display: grid;
  gap: 0.85rem;
}
.nstep {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 1rem 0.95rem;
  border-radius: 2rem;
  border: 1px solid rgba(222, 216, 207, 0.6);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow-soft);
}
.n {
  width: 46px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 1.2rem;
  font-weight: 950;
  letter-spacing: 0.02em;
  color: var(--primary);
  background: rgba(93, 112, 82, 0.12);
  border: 1px solid rgba(93, 112, 82, 0.22);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.65rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.65rem;
}

.card {
  border: 1px solid rgba(222, 216, 207, 0.65);
  background: rgba(254, 254, 250, 0.75);
  border-radius: 2rem;
  padding: 1.7rem 1.7rem 1.55rem;
  box-shadow: var(--shadow-soft);
  transition: transform 500ms ease, box-shadow 500ms ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 55px -35px rgba(93, 112, 82, 0.42);
}
.card h3 {
  margin: 0 0 0.25rem;
  font-family: Fraunces, ui-serif, Georgia, serif;
  letter-spacing: -0.01em;
}
.card p {
  margin: 0.6rem 0 0;
  font-weight: 700;
  line-height: 1.75;
  color: color-mix(in srgb, var(--fg) 86%, var(--muted-fg));
}
.card-tilt {
  border-radius: 2rem;
}
.card-rotate {
  transform: none;
}
.card-rotate:hover {
  transform: translateY(-6px);
}

.checklist {
  margin: 0.9rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted-fg);
  font-weight: 800;
}
.checklist li {
  margin: 0.4rem 0;
}

.method-steps {
  margin-top: 1rem;
  display: grid;
  gap: 0.8rem;
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
}
.step-k {
  height: 36px;
  width: 36px;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: rgba(93, 112, 82, 0.12);
  border: 1px solid rgba(93, 112, 82, 0.28);
  color: var(--primary);
  font-weight: 900;
}

.bigline {
  font-size: 1.02rem;
}

/* Feature grid with varied radii */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.65rem;
}
.feature-card {
  border: 1px solid rgba(222, 216, 207, 0.65);
  background: rgba(254, 254, 250, 0.78);
  padding: 1.6rem 1.6rem 1.45rem;
  box-shadow: var(--shadow-soft);
  transition: transform 450ms ease, box-shadow 450ms ease;
  overflow: hidden;
  position: relative;
}

/* Figures */
.figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.65rem;
  align-items: start;
}
.figure-grid-2 {
  margin-top: 1.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.figure-card {
  margin: 0;
}
.figure-frame {
  border: 1px solid rgba(222, 216, 207, 0.65);
  background: rgba(254, 254, 250, 0.85);
  border-radius: 2.2rem;
  box-shadow: var(--shadow-float);
  padding: 0.9rem;
  overflow: hidden;
}
.figure-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.6rem;
}
.figure-tilt-a {
  transform: none;
}
.figure-tilt-b {
  transform: none;
}
.figure-mask img {
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}
.figcap {
  margin-top: 0.75rem;
  color: var(--muted-fg);
  font-weight: 800;
  max-width: 72ch;
}

/* Tables (readable, not cramped) */
.table-wrap {
  margin-top: 0.9rem;
  overflow: auto;
  border-radius: 1.4rem;
  border: 1px solid rgba(222, 216, 207, 0.65);
  background: rgba(255, 255, 255, 0.5);
}
.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}
.table th,
.table td {
  text-align: left;
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid rgba(222, 216, 207, 0.55);
  font-weight: 800;
  color: color-mix(in srgb, var(--fg) 88%, var(--muted-fg));
}
.table th {
  position: sticky;
  top: 0;
  background: rgba(253, 252, 248, 0.95);
  font-family: Fraunces, ui-serif, Georgia, serif;
  letter-spacing: -0.01em;
}
.table tr:last-child td {
  border-bottom: none;
}
.row-strong td {
  color: var(--fg);
}
.row-strong td:first-child {
  font-family: Fraunces, ui-serif, Georgia, serif;
}
.feature-card::after {
  content: none;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -38px rgba(93, 112, 82, 0.45);
}
.feature-card h3 {
  position: relative;
  z-index: 1;
  margin: 0.6rem 0 0.3rem;
  font-family: Fraunces, ui-serif, Georgia, serif;
}
.feature-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted-fg);
  font-weight: 800;
}
.icon-chip {
  height: 56px;
  width: 56px;
  display: grid;
  place-items: center;
  border-radius: 1.4rem;
  background: rgba(93, 112, 82, 0.1);
  border: 1px solid rgba(93, 112, 82, 0.22);
  position: relative;
  z-index: 1;
  transition: background 300ms ease, transform 300ms ease;
}
.feature-card:hover .icon-chip {
  background: rgba(93, 112, 82, 0.9);
  color: #fff;
  transform: scale(1.02);
}

/* Keep a consistent, symmetric radius */
.feature-card {
  border-radius: 2.2rem;
}

/* Paper section */
.accordion {
  margin-top: 0.9rem;
  border-top: 1px solid rgba(222, 216, 207, 0.65);
  padding-top: 0.85rem;
}
.accordion summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--primary);
}
.accordion[open] summary {
  margin-bottom: 0.6rem;
}

.code {
  margin: 0.8rem 0 0.8rem;
  padding: 1rem 1rem;
  border-radius: 1.4rem;
  background: rgba(44, 44, 36, 0.94);
  color: #f7f4ee;
  overflow: auto;
  box-shadow: 0 18px 40px -30px rgba(44, 44, 36, 0.8);
}
.code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.55;
}
.copy-btn {
  width: fit-content;
}
.card-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

/* HuggingFace Mini CTA */
.hf-mini {
  padding: 4rem 0;
}
.hf-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.cta-shell {
  position: relative;
  border-radius: 3rem;
  border: 1px solid rgba(222, 216, 207, 0.65);
  background: linear-gradient(180deg, rgba(93, 112, 82, 0.92), rgba(93, 112, 82, 0.86));
  color: var(--primary-fg);
  padding: 3rem 2.1rem 2.2rem;
  overflow: hidden;
  box-shadow: 0 40px 80px -60px rgba(93, 112, 82, 0.85);
}
.cta-shell h2 {
  margin: 0 0 0.6rem;
  font-family: Fraunces, ui-serif, Georgia, serif;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 3vw, 2.5rem);
}
.cta-shell .section-sub {
  color: rgba(243, 244, 241, 0.9);
}

.cta-blobs .blob-d,
.cta-blobs .blob-e {
  position: absolute;
  filter: blur(50px);
  opacity: 0.55;
}
.blob-d {
  width: 420px;
  height: 320px;
  top: -120px;
  left: -120px;
  background: rgba(193, 140, 93, 0.5);
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: floaty 12s ease-in-out infinite;
}
.blob-e {
  width: 420px;
  height: 320px;
  bottom: -130px;
  right: -130px;
  background: rgba(230, 220, 205, 0.55);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: floaty 13s ease-in-out infinite;
  animation-delay: -3.2s;
}

.hf-grid {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.hf-card {
  position: relative;
  border-radius: 2rem;
  background: rgba(253, 252, 248, 0.12);
  border: 1px solid rgba(243, 244, 241, 0.22);
  padding: 1.25rem 1.25rem 1.15rem;
  backdrop-filter: blur(10px);
}
.hf-card h3 {
  margin: 0 0 0.35rem;
  font-family: Fraunces, ui-serif, Georgia, serif;
}
.hf-card .muted {
  color: rgba(243, 244, 241, 0.8);
  font-weight: 800;
}
.hf-card .btn {
  margin-top: 0.9rem;
}
.hf-card .btn-outline {
  color: #fff;
  border-color: rgba(243, 244, 241, 0.5);
  background: rgba(253, 252, 248, 0.1);
}
.hf-card .btn-ghost {
  color: rgba(243, 244, 241, 0.95);
}

/* Footer */
.footer {
  padding: 3.5rem 0 4.5rem;
  border-top: 1px solid rgba(222, 216, 207, 0.6);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.4rem;
  align-items: start;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.footer-title {
  font-family: Fraunces, ui-serif, Georgia, serif;
  font-weight: 800;
}
.footer-links {
  display: grid;
  gap: 0.55rem;
}
.footer-links a {
  color: var(--muted-fg);
  text-decoration: none;
  font-weight: 900;
}
.footer-links a:hover {
  color: var(--primary);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats-wide {
    margin-top: 1.5rem;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tni-grid {
    grid-template-columns: 1fr;
  }
  .figure-grid,
  .figure-grid-2 {
    grid-template-columns: 1fr;
  }
  .hf-grid {
    grid-template-columns: 1fr;
  }
  .media-split,
  .media-split-reverse {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    left: 0;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(222, 216, 207, 0.65);
    border-radius: 2rem;
    box-shadow: var(--shadow-float);
    backdrop-filter: blur(12px);
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .nav.open {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blob {
    animation: none;
  }
  .btn,
  .nav a,
  .stat-card,
  .card,
  .feature-card,
  .reveal {
    transition: none !important;
  }
}
