

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

html {
  margin: 0;
  padding: 0;
  background: #020617; /* deep base */
}

/* Global scroll-driven dark academic wave + base body styles */

body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: transparent; /* important so the wave shows */
  color: #f9fafb;
  scroll-behavior: smooth;
  position: relative;

  /* controlled from JS */
  --wave-progress: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: -1;

  background: linear-gradient(
    120deg,
    #000000 0%,
    #0b0221 12%,
    #1a0b3a 28%,
    #3b0a41 40%,
    #6b0f58 52%,
    #1a0b3a 68%,
    #0b0221 85%,
    #000000 100%
  );

  background-size: 220% 220%;
  opacity: 0.85;

  /* wave position is controlled by CSS var (no keyframes) */
  will-change: background-position;
  background-position: calc(var(--wave-progress) * 100%) 50%;
}

/* (Kept bg-shift keyframes in case you use them elsewhere) */
@keyframes bg-shift {
  0% {
    transform: translate3d(-10px, -20px, 0) scale(1);
  }
  50% {
    transform: translate3d(10px, 10px, 0) scale(1.06);
  }
  100% {
    transform: translate3d(-15px, 5px, 0) scale(1.02);
  }
}

/* ===========================
   Global elements
   =========================== */

a {
  color: #a5b4fc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

/* Layout helpers */

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

/* ===========================
   Sections: alternating static overlays
   (motion comes from body::before only)
   =========================== */

/* Base section style (odd sections) */
.section {
  position: relative;
  padding: 4.5rem 0;
  background: radial-gradient(
    circle at top,
    rgba(24, 35, 62, 0.82),   /* slate / indigo, semi-transparent */
    rgba(7, 12, 26, 0.96)     /* deep navy */
  );
}

/* Every second section: darker overlay */
.section:nth-of-type(even) {
  background: radial-gradient(
    circle at top,
    rgba(8, 11, 22, 0.9),     /* near-black indigo */
    rgba(2, 6, 23, 0.98)      /* almost your base #020617 */
  );
}

/* Section that should visually match the "Project Snapshot" vibe */
.section-snapshot-match {
  background: radial-gradient(
    circle at top left,
    rgba(79, 70, 229, 0.22),
    rgba(2, 6, 23, 0.96)
  );
  backdrop-filter: blur(8px);

  /* ensure no section-level borders or shadows show */
  border: 0;
  box-shadow: none;
}

/* Muted variant, matching the darker look */
.section-muted {
  background: radial-gradient(
    circle at top,
    rgba(8, 11, 22, 0.9),
    rgba(2, 6, 23, 0.98)
  );
}

h1,
h2,
h3 {
  font-weight: 700;
  color: #f9fafb;
}

p {
  color: #e5e7eb;
  line-height: 1.7;
}

.section-lead {
  max-width: 720px;
  font-size: 0.98rem;
  color: #e5e7eb;
}

/* ===========================
   Header / Nav
   =========================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.65));
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
}

.logo {
  display: flex;
  flex-direction: column;
}

.logo-accent {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.logo-sub {
  font-size: 0.75rem;
  color: #9ca3af;
}

.nav {
  display: flex;
  gap: 1.1rem;
  font-size: 0.85rem;
}

.nav a {
  color: #e5e7eb;
  opacity: 0.8;
}

.nav a:hover {
  opacity: 1;
}

/* ===========================
   Hero (CourtShadow)
   =========================== */

.hero {
  position: relative;
  padding-top: 5.2rem;
  padding-bottom: 4.2rem;
  overflow: hidden;
}

/* Full-width shimmer + tile grid behind content (static) */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Deep violet + wine glow — static */
.hero::before {
  background:
    radial-gradient(circle at 0% 0%, rgba(72, 0, 122, 0.55), transparent 60%),
    radial-gradient(circle at 100% 15%, rgba(128, 0, 80, 0.45), transparent 70%);
  opacity: 0.75;
}

/* Subtle dark academic grid (very faint), also static */
.hero::after {
  background-image:
    linear-gradient(
      90deg,
      rgba(68, 51, 102, 0.22) 1px,
      transparent 1px
    ),
    linear-gradient(
      0deg,
      rgba(90, 55, 80, 0.25) 1px,
      transparent 1px
    );
  background-size: 48px 48px;
  mix-blend-mode: soft-light;
  opacity: 0.14;
}

/* Old hero animations kept here but unused (safe to delete if desired) */
@keyframes heroSweep {
  0% {
    transform: translate3d(-10px, -20px, 0) scale(1.02);
  }
  100% {
    transform: translate3d(20px, 10px, 0) scale(1.06);
  }
}

@keyframes heroTiles {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 80px 40px;
  }
}

@keyframes hero-shift {
  0% {
    transform: translate3d(-10px, -10px, 0) scale(1.05);
  }
  100% {
    transform: translate3d(20px, 15px, 0) scale(1.08);
  }
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-left {
  max-width: 620px;
}

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* pill */

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.22rem 0.8rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #e5e7eb;
  margin-bottom: 0.9rem;
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4ade80, #22c55e);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

/* title */

.hero-title {
  margin: 0 0 0.6rem;
}

.hero-title-main {
  display: block;
  font-size: clamp(2.5rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(
    120deg,
    #e5e7eb,
    #a5b4fc,
    #fb7185,
    #e5e7eb
  );
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation:
    title-gradient 16s ease-in-out infinite alternate,
    title-float 6s ease-in-out infinite alternate;
}

.hero-title-sub {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.05rem;
  color: rgba(80, 150, 255, 0.75);
}

@keyframes title-gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes title-float {
  0% {
    transform: translate3d(0, 0, 0);
    text-shadow: 0 0 18px rgba(15, 23, 42, 0.8);
  }
  50% {
    transform: translate3d(0, -4px, 0);
    text-shadow: 0 0 28px rgba(148, 163, 184, 0.7);
  }
  100% {
    transform: translate3d(0, -2px, 0);
    text-shadow: 0 0 22px rgba(79, 70, 229, 0.8);
  }
}

.hero-subtitle {
  color: #d1d5db;
  line-height: 1.7;
  margin: 0.9rem 0 1.4rem;
}

.hero-note {
  font-size: 0.84rem;
  color: #9ca3af;
  max-width: 640px;
}

/* buttons */

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.14s ease-out,
    color 0.14s ease-out,
    border-color 0.14s ease-out,
    transform 0.1s ease-out,
    box-shadow 0.1s ease-out;
}

.primary-btn {
  background: radial-gradient(circle at top left, #4f46e5, #7c3aed);
  color: #f9fafb;
  box-shadow: 0 14px 35px rgba(55, 65, 81, 0.9);
}

.primary-btn:hover {
  background: rgba(15, 23, 42, 0.98);
  transform: translateY(-1px);
  box-shadow: 0 18px 45px rgba(55, 65, 81, 1);
}

.secondary-btn {
  background: radial-gradient(circle at top left, #4f46e5, #7c3aed);
  color: #f9fafb;
  box-shadow: 0 14px 35px rgba(55, 65, 81, 0.9);
}

.secondary-btn:hover {
  background: rgba(15, 23, 42, 0.98);
  transform: translateY(-1px);
}

/* hero cards */

.hero-card {
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.4), transparent 65%),
    rgba(2, 6, 23, 0.96);
  border-radius: 1.25rem;
  padding: 1.4rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px);
}

.hero-card-main {
  position: relative;
  overflow: hidden;
}

.hero-card-secondary {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.9rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.hero-card-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-card-badge {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

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

.metric-label {
  font-size: 0.78rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.metric-value {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 0.1rem;
}

.metric-caption {
  font-size: 0.78rem;
  color: #9ca3af;
}

.hero-mini-caption {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: #9ca3af;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.pill-soft {
  display: inline-flex;
  padding: 0.16rem 0.6rem;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #e5e7eb;
}

/* floating cards */

.floating-card {
  animation: float-card 12s ease-in-out infinite alternate;
}

.floating-card.delay-1 {
  animation-delay: 2.5s;
}

@keyframes float-card {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -6px, 0);
  }
  100% {
    transform: translate3d(0, -3px, 0);
  }
}

/* ===========================
   Generic cards, grids, etc.
   =========================== */

.card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 1.1rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
  transition:
    transform 0.12s ease-out,
    box-shadow 0.12s ease-out,
    border-color 0.12s ease-out;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.95);
  border-color: rgba(209, 213, 219, 0.75);
}

/* ===========================
   Feature slider
   =========================== */

.features-card {
  margin-top: 1.5rem;
}

/* Make the "Feature families" heading match the accent */
.features-card h3 {
  color: #bfdbfe;
}

.feature-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.2rem;
}

.feature-tab {
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  cursor: pointer;
  transition:
    background-color 0.15s ease-out,
    color 0.15s ease-out,
    border-color 0.15s ease-out,
    transform 0.1s ease-out;
}

.feature-tab.active {
  background: radial-gradient(circle at top left, #4f46e5, #7c3aed);
  border-color: transparent;
  color: #f9fafb;
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.9);
}

.feature-slides {
  margin-top: 0.4rem;
}

.feature-slide {
  display: none;
  opacity: 0;
  transform: translate3d(0, 6px, 0);
  transition:
    opacity 0.25s ease-out,
    transform 0.25s ease-out;
}

.feature-slide.active {
  display: block;
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.feature-slide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.4rem;
  align-items: stretch; /* make both columns same height */
}

/* Make ALL feature slide titles (overview + length + others) the same blue */
.feature-slide h4 {
  color: #bfdbfe;
}

/* Breathing room above any feature visuals (all slides) */
.feature-visual {
  margin-top: 0.9rem;
}

/* Length slide examples (shared style used on other slides too) */

.length-examples {
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.length-example {
  padding: 0.75rem 0.9rem;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.example-title {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #e5e7eb;
}

.example-quote {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  font-style: italic;
  color: #e5e7eb;
}

.example-metrics {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: #9ca3af;
}

.example-metrics span {
  display: block;
}

.length-note {
  margin-top: 0.9rem;
}

/* Right-hand side card on feature slides */

.length-sidecard {
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(129, 140, 248, 0.45);
}

/* Read-more CTA */

.feature-cta {
  margin-top: 0.85rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.feature-cta-label {
  margin: 0;
  font-size: 0.78rem;
  color: #9ca3af;
}

.feature-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.7);
  font-size: 0.78rem;
  color: #e5e7eb;
  text-decoration: none;
  transition:
    background-color 0.15s ease-out,
    border-color 0.15s ease-out,
    transform 0.1s ease-out,
    box-shadow 0.15s ease-out;
}

.feature-cta-link:hover {
  background: rgba(37, 99, 235, 0.3);
  border-color: rgba(191, 219, 254, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.9);
}

.feature-cta-arrow {
  font-size: 0.85rem;
}

/* ===========================
   Bar chart (overview slide)
   =========================== */

.feature-bars {
  height: 200px;
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 0.5rem 0.25rem 0;
}

.feature-bar {
  flex: 1;
  display: flex;
  flex-direction: column;      /* stack bar + label vertically */
  align-items: stretch;
  justify-content: flex-end;
  gap: 0.25rem;
  height: 100%;                /* fill the 200px container */
}

/* The bar itself */
.feature-bar-inner {
  position: relative;
  width: 100%;
  height: 0;
  border-radius: 0.9rem 0.9rem 0.25rem 0.25rem;
  background: linear-gradient(180deg, #a5b4fc, #4f46e5);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.9);
  transition: height 0.7s ease-out;
  overflow: hidden;

  display: flex;               /* center the count inside the bar */
  align-items: center;
  justify-content: center;
}

.feature-bar-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f9fafb;
  margin: 0;
}

/* Label sits under the bar, centered */
.feature-bar-label {
  display: block;
  font-size: 0.8rem;
  color: #e5e7eb;
  text-align: center;
}

/* JS sets height; bars grow, count stays centered */
.feature-bar-inner.filled {
  /* height is set via JS */
}

/* Distinct colors per bar (1–4) */
.feature-bar:nth-child(1) .feature-bar-inner {
  background: linear-gradient(180deg, #a5b4fc, #4f46e5); /* Length */
}

.feature-bar:nth-child(2) .feature-bar-inner {
  background: linear-gradient(180deg, #fb7185, #be123c); /* Framing */
}

.feature-bar:nth-child(3) .feature-bar-inner {
  background: linear-gradient(180deg, #34d399, #065f46); /* Pronouns */
}

.feature-bar:nth-child(4) .feature-bar-inner {
  background: linear-gradient(180deg, #fbbf24, #b45309); /* Topics */
}

/* Feature family legend text that matches bar colors */

.feature-key {
  font-weight: 600;
}

/* match bar 1: length */
.feature-key-length {
  color: #a5b4fc;
}

/* match bar 2: framing */
.feature-key-framing {
  color: #fb7185;
}

/* match bar 3: pronouns */
.feature-key-pronouns {
  color: #34d399;
}

/* match bar 4: topics */
.feature-key-topics {
  color: #fbbf24;
}

/* ===========================
   Layout grids
   =========================== */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
  margin-top: 1.5rem;
}

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

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

.plots-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.8rem;
}

.plot-card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 1.1rem;
  padding: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
}

.plot-card img {
  border-radius: 0.8rem;
}

.plot-card figcaption {
  margin-top: 0.55rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* nice lists */

.nice-list {
  list-style: none;
  padding-left: 0;
  margin: 0.4rem 0 0;
}

.nice-list li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.nice-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0.04rem;
  font-size: 0.9rem;
  color: #a5b4fc;
}

.nice-list.compact li {
  margin-bottom: 0.25rem;
}

.small-muted {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 0.5rem;
}

/* highlight cards in findings */

.highlight-card {
  position: relative;
  overflow: hidden;
}

.highlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.22), transparent 55%);
  opacity: 0;
  transition: opacity 0.18s ease-out;
}

.highlight-card:hover::before {
  opacity: 1;
}

.highlight-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.highlight-card p {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
  color: #e5e7eb;
}
/* ===========================
   MODEL PIPELINE LAYOUT
   =========================== */

/* Outer card */
.pipeline-card {
  margin-top: 1.25rem;
  padding: 1.6rem 1.7rem 1.7rem;
  border-radius: 1.25rem;
  background: radial-gradient(circle at top left,
              rgba(148, 163, 184, 0.10),
              rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

/* Grid of steps: 3 per row on large screens */
.pipeline-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 1.75rem; /* row / column gap */
  align-items: stretch;
}

/* Each step = comfy card */
.pipeline-step {
  height: 100%;
  padding: 1.05rem 1.15rem 1.15rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.85);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Pretty circular numbers */
.pipeline-step-number {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: radial-gradient(circle at 30% 20%, #22d3ee, #0f172a);
  color: #e5f9ff;
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.7),
    0 8px 20px rgba(15, 23, 42, 0.95);
  margin-bottom: 0.3rem;
}

.pipeline-step-title {
  margin: 0.05rem 0 0.18rem;
  font-size: 0.98rem;
}

.pipeline-step-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #e5e7eb;
}

/* Hide the old arrow elements in grid layout */
.pipeline-arrow {
  display: none;
}

/* Mobile: stack steps in a single column */
@media (max-width: 900px) {
  .pipeline-flow {
    grid-template-columns: minmax(0, 1fr);
  }
}



/* ===========================
   Methods: header + cards
   =========================== */

.methods-header {
  margin-bottom: 2.4rem;
  text-align: left;
}

.methods-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.12rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.9);
  margin-bottom: 0.65rem;
}

.methods-header h2 {
  margin: 0 0 0.6rem;
  font-size: 1.7rem;
}

.methods-lead {
  margin: 0;
  font-size: 0.96rem;
  color: #cbd5e1;
}

.methods-grid {
  align-items: flex-start;
}

.methods-card {
  position: relative;
}

.methods-subtitle {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #9ca3af;
  margin-bottom: 0.4rem;
}

.methods-card--first {
  margin-bottom: 2.25rem;   /* adjust to taste (2–3rem usually perfect) */
}

/* ===========================
   Transcript → score band
   =========================== */

.methods-animation-band {
  margin-top: 1.8rem;
}

.methods-animation-inner {
  border-radius: 1.1rem;
  padding: 1.35rem 1.4rem 1.5rem;
  background: radial-gradient(
      circle at top left,
      rgba(79, 70, 229, 0.25),
      rgba(15, 23, 42, 0.98)
    );
  border: 1px solid rgba(129, 140, 248, 0.65);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.98);
}

/* Label + description row */
.methods-rail-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.methods-pill {
  display: inline-flex;
  padding: 0.16rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, 0.8);
  background: rgba(15, 23, 42, 0.95);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #e5e7eb;
}

.methods-rail-text {
  margin: 0;
  font-size: 0.86rem;
  color: #cbd5e1;
}

/* Three-column rail */
.methods-rail {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(0, 1.3fr);
  gap: 1.2rem;
  align-items: stretch;
}

/* Transcript column */

.transcript-stream {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.transcript-line {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  padding: 0.35rem 0.55rem;
  border-radius: 0.7rem;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.role-tag {
  flex: 0 0 auto;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
}

.line-text {
  font-size: 0.85rem;
  color: #e5e7eb;
}

/* Feature chips column */

.methods-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.methods-chip {
  font-size: 0.78rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
}

.chip-length,
.chip-structure,
.chip-questions {
  border-color: rgba(165, 180, 252, 0.8);
}

.chip-framing {
  border-color: rgba(251, 113, 133, 0.75);
}

.chip-framing-negative {
  border-color: rgba(239, 68, 68, 0.8);
}

.chip-pronouns {
  border-color: rgba(52, 211, 153, 0.75);
}

.chip-topic {
  border-color: rgba(96, 165, 250, 0.8);
}

/* Output card column */

.methods-output-card {
  border-radius: 0.9rem;
  padding: 0.9rem 1rem;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.95);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.methods-output-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.methods-output-tag {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.methods-output-score {
  font-weight: 600;
  color: #bfdbfe;
}

.methods-output-text {
  font-size: 0.85rem;
  color: #e5e7eb;
  margin: 0;
}

.methods-output-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.methods-output-badge {
  font-size: 0.75rem;
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.98);
}

/* ===========================
   Math Snapshot section
   =========================== */

.math-snapshot {
  margin-top: 2rem;
}

/* Main math card */
.math-card {
  position: relative;
  overflow: hidden;
  background: radial-gradient(
      circle at top left,
      rgba(79, 70, 229, 0.32),
      rgba(15, 23, 42, 0.98)
    );
  border: 1px solid rgba(129, 140, 248, 0.7);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.98);
}

/* subtle glow overlay */
.math-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 0% 0%, rgba(94, 234, 212, 0.25), transparent 60%);
  opacity: 0.45;
  mix-blend-mode: screen;
  pointer-events: none;
}

/* keep content above glow */
.math-card > * {
  position: relative;
  z-index: 1;
}

/* subtitle alignment tweak */
.math-card .methods-subtitle {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  color: #c7d2fe;
  margin-bottom: 0.3rem;
}

/* title */
.math-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #e5e7eb;
}

/* intro text */
.math-card .section-lead.small-muted {
  margin-top: 0;
  margin-bottom: 1.3rem;
  max-width: 42rem;
}

/* grid layout for math blocks */
.math-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem 1.6rem;
}

/* individual block */
.math-block {
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.95);
}

/* block headings */
.math-block h4 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #bfdbfe;
}

/* math text body */
.math-block p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.7;
  color: #e5e7eb;
}

/* if using MathJax/KaTeX, tighten inline formulas a bit */
.math-block p mjx-container {
  font-size: 0.94em;
}

/* small screens: stack the blocks */
@media (max-width: 900px) {
  .math-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===========================
   Gavel "shadow" section
   =========================== */

.gavel-card {
  height: 360px; /* or 420px depending on how big you want it */
}

.gavel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr);
  gap: 2.5rem;
  align-items: center;
}

.gavel-visual {
  perspective: 1400px;
}

.gavel-card {
  position: relative;
  width: 100%;
  border-radius: 1.3rem;
  overflow: hidden;
  transform-style: preserve-3d;
  transition:
    transform 1s cubic-bezier(0.19, 1, 0.22, 1),
    box-shadow 0.6s ease-out,
    border-color 0.6s ease-out;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.95);
}

.gavel-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}

.gavel-front {
  transform: rotateY(0deg);
}

.gavel-back {
  transform: rotateY(180deg);
  background: radial-gradient(circle at top left, #111827, #020617 60%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* the image itself, zoomed into shadow */
.gavel-image {
  position: absolute;
  inset: 0;
  background-image: url("images/gavel-shadow.jpg");
  background-size: 115%;
  background-position: 35% 65%;
  background-repeat: no-repeat;
  filter: brightness(0.9) contrast(1.15);
  transition:
    transform 1s cubic-bezier(0.19, 1, 0.22, 1),
    filter 0.7s ease-out;
}

/* back text */

.gavel-back-inner {
  padding: 1.8rem 1.6rem;
  max-width: 420px;
}

.gavel-back-inner h2 {
  margin: 0 0 0.2rem;
}

.gavel-tagline {
  margin: 0 0 0.8rem;
  font-size: 0.9rem;
  color: #a5b4fc;
}

/* flipped state triggered via JS */

.gavel-visual.in-view .gavel-card {
  transform: rotateY(180deg) scale(1.04);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 1);
  border-color: rgba(209, 213, 219, 0.9);
}

.gavel-visual.in-view .gavel-image {
  transform: scale(1.12);
  filter: brightness(0.75) contrast(1.3);
}

/* right-side text */

.gavel-text h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.gavel-text p {
  color: #e5e7eb;
}

/* ===========================
   Case table
   =========================== */

.case-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.case-table th,
.case-table td {
  padding: 0.55rem 0.6rem;
  text-align: left;
}

.case-table thead th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
  border-bottom: 1px solid rgba(55, 65, 81, 0.9);
}

.case-table tbody tr:nth-child(odd) {
  background: rgba(15, 23, 42, 0.8);
}

.case-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.95);
}

/* ===========================
   Video placeholder
   =========================== */

.video-placeholder {
  border-radius: 0.9rem;
  border: 1px dashed rgba(148, 163, 184, 0.7);
  padding: 2.5rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #9ca3af;
  background: rgba(15, 23, 42, 0.9);
}

/* ===========================
   Footer
   =========================== */

.site-footer {
  border-top: 1px solid rgba(31, 41, 55, 0.95);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.96), #020617);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.5rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.footer-right {
  opacity: 0.75;
}

/* ===========================
   Scroll reveal animations
   =========================== */

.reveal-on-scroll {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
  will-change: opacity, transform;
}

.reveal-on-scroll.in-view {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.reveal-flip {
  /* gavel-visual also uses .in-view */
}

/* ===========================
   Responsiveness
   =========================== */

@media (max-width: 900px) {
  .nav {
    display: none;
  }

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

  .hero-right {
    order: -1;
  }

  .grid-2,
  .grid-3,
  .two-column,
  .plots-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .section {
    padding: 3.2rem 0;
  }

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

  .gavel-visual {
    order: -1;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.3rem;
    text-align: center;
  }

  /* Methods rail stack */
  .methods-rail {
    grid-template-columns: minmax(0, 1fr);
  }

  .methods-animation-inner {
    padding: 1.1rem 1rem 1.3rem;
  }
}

@media (max-width: 600px) {
  .hero-subtitle {
    font-size: 0.92rem;
  }

  .hero-note {
    font-size: 0.78rem;
  }

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

/* ===========================
   RESULTS SECTION
   =========================== */

.section-results {
  position: relative;
  overflow: hidden;
}

/* Subtle dark pink/indigo gradient background band */
.section-results::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at top left, rgba(244, 114, 182, 0.20), transparent 55%),
              radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.17), transparent 55%);
  opacity: 0.9;
  pointer-events: none;
  z-index: -1;
}

.results-header h2 {
  font-size: 2.3rem;
  margin-bottom: 0.5rem;
}

.results-header .section-lead {
  max-width: 52rem;
}

/* Metric strip */

.results-metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0 2.75rem;
}

.results-metric-card {
  position: relative;
  padding: 1.4rem 1.5rem;
  border-radius: 1rem;
  background: radial-gradient(circle at top left, rgba(248, 250, 252, 0.06), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(248, 250, 252, 0.05);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.55);
}

.results-metric-card--glow {
  border-color: rgba(244, 114, 182, 0.65);
  box-shadow:
    0 0 30px rgba(244, 114, 182, 0.55),
    0 18px 40px rgba(15, 23, 42, 0.85);
}

.results-metric-card--glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.65), rgba(94, 234, 212, 0.3));
  opacity: 0.35;
  filter: blur(6px);
}

.results-metric-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(209, 213, 219, 0.9);
  margin-bottom: 0.35rem;
}

.results-metric-main {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.metric-number {
  font-size: 1.9rem;
  font-weight: 700;
  color: #f9a8d4;
}

.metric-tag {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}

.results-metric-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: rgba(209, 213, 219, 0.9);
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.metric-chip--gold {
  border-color: rgba(250, 204, 21, 0.9);
  color: #facc15;
}

.results-metric-note {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.95);
}

/* Explanation cards */

.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 900px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
}

.results-card {
  position: relative;
}

.results-card--accent {
  background: radial-gradient(circle at top right, rgba(244, 114, 182, 0.16), rgba(15, 23, 42, 0.96));
  border-color: rgba(244, 114, 182, 0.45);
}

/* Visual diagnostics layout */

.results-visuals-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1100px) {
  .results-visuals-grid {
    grid-template-columns: 1fr;
  }
}

.plot-card {
  position: relative;
  padding: 1.1rem 1.1rem 1.3rem;
  border-radius: 1rem;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 1));
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.85);
}

.plot-card-glow {
  border-color: rgba(236, 72, 153, 0.85);
  box-shadow:
    0 0 30px rgba(236, 72, 153, 0.4),
    0 22px 50px rgba(15, 23, 42, 0.9);
}

/* Glitter / shimmer effect */

.plot-card-glitter {
  border-color: rgba(190, 242, 100, 0.7);
  box-shadow:
    0 0 22px rgba(190, 242, 100, 0.35),
    0 22px 50px rgba(15, 23, 42, 0.95);
  position: relative;
  overflow: hidden;
}

.plot-card-glitter::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 20% 0%, rgba(244, 114, 182, 0.24), transparent 55%),
    radial-gradient(circle at 80% 100%, rgba(129, 140, 248, 0.32), transparent 55%);
  mix-blend-mode: screen;
  animation: glitter-slow 9s ease-in-out infinite alternate;
  opacity: 0.9;
  pointer-events: none;
}

@keyframes glitter-slow {
  0% {
    transform: translate3d(-4%, 2%, 0) scale(1.02);
  }
  100% {
    transform: translate3d(4%, -3%, 0) scale(1.04);
  }
}

.plot-card-les {
  border-color: rgba(129, 140, 248, 0.75);
}

.plot-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.plot-title-row h3 {
  font-size: 1.05rem;
}

.plot-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.16rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: rgba(209, 213, 219, 0.95);
}

.plot-inner {
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.8));
  border-radius: 0.8rem;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
}

.plot-inner img {
  display: block;
  width: 100%;
  border-radius: 0.6rem;
}

.plot-card figcaption {
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.95);
}

/* ===========================
   CONFUSION MATRIX VISUAL
   =========================== */

.cm-tabs {
  display: inline-flex;
  gap: 0.25rem;
  margin-bottom: 0.65rem;
  border-radius: 999px;
  padding: 0.15rem;
  background: rgba(15, 23, 42, 0.8);
}

.cm-tab {
  border: none;
  background: transparent;
  color: rgba(156, 163, 175, 0.9);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
}

.cm-tab-active {
  background: linear-gradient(135deg, #f472b6, #a855f7);
  color: #020617;
  font-weight: 600;
}

.confusion-wrapper {
  display: none;
}

.confusion-wrapper.cm-active {
  display: block;
}

.confusion-caption {
  font-size: 0.8rem;
  color: rgba(209, 213, 219, 0.95);
  margin-bottom: 0.4rem;
}

.confusion-matrix {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr 1.1fr;
  grid-template-rows: auto 1.1fr 1.1fr;
  gap: 0.1rem;
  margin-bottom: 0.45rem;
  border-radius: 0.75rem;
  padding: 0.4rem;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 1));
}

.confusion-matrix--compact {
  max-width: 270px;
}

.cm-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  text-align: center;
  color: rgba(148, 163, 184, 0.95);
}

.cm-label-top {
  padding-bottom: 0.25rem;
}

.cm-label-side {
  padding-right: 0.25rem;
}

.cm-label-empty {
  background: transparent;
}

.cm-cell {
  position: relative;
  border-radius: 0.6rem;
  padding: 0.45rem 0.45rem 0.35rem;
  text-align: center;
  overflow: hidden;
}

.cm-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.9;
  z-index: -1;
}

/* Color scales */
.cm-cold::before {
  background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.9), rgba(15, 23, 42, 0.85));
}

.cm-warm::before {
  background: radial-gradient(circle at top right, rgba(248, 250, 252, 0.06), rgba(15, 23, 42, 1));
}

.cm-hot::before {
  background: radial-gradient(circle at center, rgba(244, 114, 182, 0.8), rgba(236, 72, 153, 0.9));
}

.cm-hot-strong::before {
  background: radial-gradient(circle at center, #f472b6, #db2777);
}

.cm-empty::before {
  background: rgba(15, 23, 42, 0.7);
}

.cm-value {
  font-weight: 700;
  font-size: 1rem;
}

.cm-sub {
  font-size: 0.7rem;
  color: rgba(15, 23, 42, 0.12);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cm-note {
  font-size: 0.78rem;
}

/* ===========================
   TABS JS HOOK (RESULTS)
   =========================== */

/* (No extra CSS needed beyond above; JS below handles the interaction) */
/* RESULTS LAYOUT */

.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 900px) {
  .results-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Metrics card styling */

.results-metrics-card {
  background:
    radial-gradient(circle at top left, rgba(148, 163, 255, 0.2), transparent 55%),
    radial-gradient(circle at bottom right, rgba(244, 114, 182, 0.18), transparent 60%),
    rgba(15, 23, 42, 0.9);
  border-radius: 1.5rem;
  border: 1px solid rgba(148, 163, 255, 0.35);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.9);
}


.results-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin-block: 1.25rem 0.5rem;
}

.results-metric-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a5b4fc;
  margin-bottom: 0.15rem;
}

.results-metric-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.results-metric-caption {
  font-size: 0.9rem;
  color: #cbd5f5;
}

/* VISUALS GRID */

/* RESULTS VISUALS LAYOUT */
.results-visuals-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.75rem;
  margin-top: 2.5rem;
}

@media (min-width: 1024px) {
  .results-visuals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Plot card aesthetic: dark + pink aura */
.plot-card-dark {
  background:
    radial-gradient(circle at top, rgba(236, 72, 153, 0.20), transparent 60%),
    rgba(15, 23, 42, 0.98);
  border-radius: 1.4rem;
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.25),
    0 24px 70px rgba(15, 23, 42, 0.95);
  position: relative;
}

.plot-card-header h3 {
  margin: 0 0 0.25rem;
}

.plot-card-subtitle {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: #9ca3af;
}

/* Make the images big and cinematic */
.results-plot-img {
  display: block;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  border-radius: 1rem;
  box-shadow:
    0 0 0 1px rgba(248, 250, 252, 0.08),
    0 20px 60px rgba(15, 23, 42, 0.9);
}

.plot-image-wrapper {
  margin-bottom: 0.4rem;
}

/* For the two side-by-side confusion matrices */
.plot-card-images {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 1024px) {
  .plot-card-images {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.plot-caption {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #9ca3af;
  text-align: center;
}

/* ===========================
   RESULTS METRIC TILES
   =========================== */

/* Base tile: soft, subtle, same font system */
.results-metric {
  background: rgba(10, 16, 34, 0.9);
  border-radius: 18px;
  padding: 1.2rem 1.35rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  margin-bottom: 1rem;

  box-shadow:
    0 0 10px rgba(15, 23, 42, 0.6),
    0 0 24px rgba(15, 23, 42, 0.9); /* dark, neutral glow */

  backdrop-filter: blur(10px);
  transition: box-shadow 0.25s ease, transform 0.25s ease;

  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Gentle hover for ALL tiles */
.results-metric:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 18px rgba(15, 23, 42, 0.8),
    0 0 32px rgba(15, 23, 42, 1);
}

/* Shared typography */
.results-metric-label {
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.82);
  margin-bottom: 0.25rem;
}

.results-metric-value {
  font-size: 1.7rem;
  font-weight: 650;
  color: #f9fafb;
  margin-bottom: 0.25rem;
  text-shadow: none; /* important: remove extra glow here */
}

.results-metric-caption {
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(203, 213, 225, 0.8);
}

/* ===== Highlighted tile (100% ONLY) ===== */
.results-metric--highlight {
  background:
    radial-gradient(circle at top left,
      rgba(236, 72, 153, 0.18),
      rgba(10, 16, 34, 0.96) 60%);

  border: 1px solid rgba(248, 187, 247, 0.7);

  box-shadow:
    0 0 30px rgba(236, 72, 153, 0.3),
    0 0 70px rgba(236, 72, 153, 0.18);
}

/* Slightly stronger but still classy type on the highlight tile */
.results-metric--highlight .results-metric-value {
  font-weight: 750;
  color: #fdf2ff;
  text-shadow:
    0 0 10px rgba(236, 72, 153, 0.7),
    0 0 20px rgba(236, 72, 153, 0.5);
}

.results-metric--highlight .results-metric-label {
  color: rgba(252, 231, 243, 0.95);
}

.results-metric--highlight .results-metric-caption {
  color: rgba(250, 240, 252, 0.85);
}

/* === Results metric glows === */
.results-metric--glow {
  position: relative;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  background: radial-gradient(circle at top left, rgba(236, 72, 153, 0.10), transparent 55%)
              , #020617;
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.35),
    0 18px 40px rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
}

/* subtle variants for each stat, same palette but slightly different hue */
.results-metric--chunk-acc {
  box-shadow:
    0 0 0 1px rgba(248, 250, 252, 0.14),
    0 0 40px rgba(236, 72, 153, 0.45);
}

.results-metric--chunk-auc {
  box-shadow:
    0 0 0 1px rgba(199, 210, 254, 0.35),
    0 0 38px rgba(129, 140, 248, 0.45);
}

.results-metric--case-acc {
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.55),
    0 0 45px rgba(56, 189, 248, 0.70);
}

.results-metric--case-auc {
  box-shadow:
    0 0 0 1px rgba(45, 212, 191, 0.55),
    0 0 42px rgba(34, 197, 94, 0.50);
}

/* keep the highlight style but let glow dominate slightly */
.results-metric--highlight {
  transform: translateY(-1px);
}

/* === How to read these numbers card === */
.results-metrics-card--howto {
  position: relative;
  border-radius: 1.5rem;
  padding: 2rem 2.25rem;
  background:
    radial-gradient(circle at top right, rgba(129, 140, 248, 0.25), transparent 60%),
    radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.18), transparent 55%),
    #020617;
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.45),
    0 24px 60px rgba(15, 23, 42, 0.95);
}

/* more breathable text */
.results-metrics-card--howto p,
.results-metrics-card--howto li {
  line-height: 1.8;
  font-size: 0.98rem;
}

.results-metrics-card--howto ul {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

.results-metrics-card--howto li + li {
  margin-top: 0.85rem;
}

/* title styling */
.results-metrics-card--howto h3 {
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: #e5e7eb;
  margin-bottom: 0.75rem;
}

/* a tiny pill in the corner if you want it */
.results-metrics-card--howto::before {
  content: "Reading LES";
  position: absolute;
  top: 1.1rem;
  right: 1.4rem;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #cbd5f5;
}

/* === Big gorgeous plots === */
.results-visuals-grid--wide {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr);
  gap: 2rem;
  max-width: 1120px;
  margin: 2rem auto 0 auto;
}

/* make each plot card stretch and feel substantial */
.plot-card--large {
  max-width: 100%;
}

.plot-card--large .results-plot-img {
  display: block;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

/* slightly larger headings/subtitles in plot cards */
.plot-card--large .plot-card-header h3 {
  font-size: 1.1rem;
}

.plot-card--large .plot-card-subtitle {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===========================
   Interpretability section
   =========================== */

.interpret-grid {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  margin-top: 1.9rem;
}

.interpret-card {
  position: relative;
  border-radius: 1.4rem;
  padding: 1.7rem 1.8rem;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.26), transparent 60%),
    radial-gradient(circle at bottom right, rgba(236, 72, 153, 0.18), transparent 65%),
    rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.8),
    0 24px 70px rgba(15, 23, 42, 1);
}

.interpret-card--wilmington {
  border-color: rgba(129, 140, 248, 0.8);
}

.interpret-card--cohen {
  border-color: rgba(248, 250, 252, 0.6);
  background:
    radial-gradient(circle at top left, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.98));
}

.interpret-header {
  margin-bottom: 1rem;
}

.interpret-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.96);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #cbd5e1;
}

.interpret-title {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.interpret-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: #cbd5e1;
  max-width: 32rem;
}

.interpret-body {
  margin-top: 0.9rem;
}

.interpret-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
  gap: 1.75rem;
  align-items: flex-start;
}

@media (max-width: 980px) {
  .interpret-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.interpret-text p {
  font-size: 0.92rem;
}

.interpret-feature-stack {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.interpret-feature-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.interpret-feature-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #a5b4fc;
}

.interpret-feature-bar {
  position: relative;
  width: 100%;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.5);
  overflow: hidden;
}

.interpret-feature-bar-inner {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #a5b4fc, #f472b6);
  box-shadow: 0 0 20px rgba(244, 114, 182, 0.6);
  transition: width 0.8s ease-out;
}

.interpret-feature-caption {
  margin: 0;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Aside images & links */

.interpret-aside {
  font-size: 0.8rem;
}

.interpret-aside .small-muted {
  font-size: 0.78rem;
}

.case-links-title {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
}

.case-links .nice-list li {
  font-size: 0.8rem;
}

/* ===========================
   Patterns across all test cases
   =========================== */

.interpret-summary-card {
  margin-top: 2.1rem;
  border-radius: 1.5rem;
  padding: 1.7rem 1.8rem;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 60%),
    radial-gradient(circle at bottom right, rgba(236, 72, 153, 0.16), transparent 60%),
    rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.95);
}

.interpret-summary-card h3 {
  margin-top: 0;
  margin-bottom: 1.1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: #e5e7eb;
}

.interpret-patterns-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
  margin-bottom: 1rem;
}

@media (min-width: 900px) {
  .interpret-patterns-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.interpret-pattern {
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.interpret-pattern-title {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  color: #bfdbfe;
}

.interpret-pattern-body {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.7;
  color: #d1d5db;
}

.interpret-summary-footnote {
  margin: 0.4rem 0 0;
}

/* ===========================
   How to read these numbers (Results)
   =========================== */

.results-metrics-card--howto-explainer {
  position: relative;
  border-radius: 1.5rem;
  padding: 1.9rem 2rem;
  background:
    radial-gradient(circle at top left, rgba(129, 140, 248, 0.22), transparent 60%),
    radial-gradient(circle at bottom right, rgba(45, 212, 191, 0.18), transparent 55%),
    rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.8),
    0 24px 70px rgba(15, 23, 42, 1);
}

.results-metrics-card--howto-explainer h3 {
  margin-top: 0;
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #e5e7eb;
}

.results-how-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-top: 0.6rem;
  margin-bottom: 1.1rem;
}

@media (min-width: 900px) {
  .results-how-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.results-how-item {
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.results-how-title {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  color: #bfdbfe;
}

.results-how-body {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.8;
  color: #d1d5db;
}

.results-how-footnote {
  margin-top: 0.5rem;
}

/* ===========================
   Cases section visuals
   =========================== */

.case-card {
  margin-top: 1.7rem;
  border-radius: 1.5rem;
  padding: 1.6rem 1.7rem;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.22), transparent 55%),
    rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.8),
    0 22px 65px rgba(15, 23, 42, 0.98);
}

.case-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.case-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.case-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.96);
  color: #e5e7eb;
}

.case-pill--poc {
  border-color: rgba(244, 114, 182, 0.9);
  color: #f9a8d4;
}

.case-pill--white {
  border-color: rgba(96, 165, 250, 0.9);
  color: #bfdbfe;
}

.case-name-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.case-name-cell strong {
  font-size: 0.9rem;
}

.case-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.case-tag--poc {
  border-color: rgba(244, 114, 182, 0.8);
  color: #fb7185;
}

.case-tag--white {
  border-color: rgba(96, 165, 250, 0.8);
  color: #93c5fd;
}

.case-table-footnote {
  margin-top: 0.7rem;
}
/* INTERPRETABILITY TWO-COLUMN LAYOUT */

.interpret-meta {
  /* remove ALL flex behavior */
  display: block;
  margin: 1.75rem 0 2rem;
  position: relative;
}

/* IMAGE WRAPPER FLOATS LEFT */
.interpret-image-wrapper {
  float: left;
  width: 330px;              /* adjust size here */
  margin: 0 1.75rem 1.25rem 0;
}

.interpret-image {
  width: 100%;
  height: auto;
  border-radius: 0.9rem;
  object-fit: cover;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.9),
    0 14px 38px rgba(15, 23, 42, 0.85);
}

.interpret-meta-text {
  /* now text naturally wraps around the floated image */
  overflow: hidden; /* ensure container expands properly */
}

/* MOBILE VERSION — REMOVE FLOAT */
@media (max-width: 900px) {
  .interpret-image-wrapper {
    float: none;
    width: 100%;
    margin: 0 0 1rem 0;
  }
}

.interpret-links-heading {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.interpret-links {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
}

.interpret-links a {
  color: #93c5fd; /* soft academic blue */
  text-decoration: none;
}

.interpret-links a:hover {
  text-decoration: underline;
}


/* Reduce indentation for the Wilmington Ten + Cohen link lists */
.interpret-image-wrapper .interpret-links {
  padding-left: 0.25rem !important;   /* was ~1.1rem */
  margin-left: 0 !important;
}

/* Optional: shift the heading left slightly too */
.interpret-image-wrapper .interpret-links-heading {
  margin-left: 0 !important;
}

/* ==== Model evaluation flipbook + accordion styling ==== */

.results-eval-card {
  border-radius: 1.25rem;
}

/* Tabs already exist, but make them breathe a bit */
.results-eval-tabs {
  display: inline-flex;
  gap: 0.4rem;
  padding: 0.75rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
}

.results-eval-tab {
  border: none;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.results-eval-tab.active {
  background: radial-gradient(circle at top left, #4f46e5, #14b8a6);
  color: #020617;
  transform: translateY(-1px);
}

/* Flipbook / stepper */
.results-stepper {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.results-step-nav {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-start;
}

.results-step-dot {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: transparent;
  color: #e5e7eb;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.results-step-dot.active {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  border-color: transparent;
  color: #020617;
  transform: translateY(-1px);
}

.results-step-cards {
  position: relative;
  min-height: 180px;
}

.results-step-card {
  display: none;
  padding: 1.1rem 1.25rem;
  border-radius: 0.9rem;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.05), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.6);
}

.results-step-card.active {
  display: block;
}

.results-step-title {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1rem;
}

.results-step-arrows {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.results-step-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.results-step-btn:hover {
  background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.4), rgba(15, 23, 42, 1));
  border-color: transparent;
  transform: translateY(-1px);
}

/* Accordion */
.results-accordion {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.results-accordion-item {
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  overflow: hidden;
}

.results-accordion-header {
  width: 100%;
  border: none;
  background: transparent;
  color: #e5e7eb;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  cursor: pointer;
}

.results-accordion-header span:first-child {
  font-weight: 500;
}

.results-accordion-icon {
  font-size: 1rem;
  opacity: 0.8;
}

.results-accordion-body {
  max-height: 0;
  overflow: hidden;
  padding: 0 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  transition: max-height 0.25s ease;
}

.results-accordion-item.open .results-accordion-body {
  padding-bottom: 0.9rem;
}

/* Make the L2 section breathe a bit */
.results-eval-section--l2 > h4 {
  margin-bottom: 0.5rem;
}

.results-eval-summary {
  margin-top: 1.25rem;
}

/* Make inline LaTeX smaller inside the Model Evaluation card,
   but keep standalone display equations the same size */
.results-eval-card mjx-container:not([display="true"]) {
  font-size: 1em;   /* tweak 0.9–1.0 until it visually matches */
  vertical-align: baseline;
}

/* === Tame MathJax sizes JUST inside the Model Evaluation card === */

/* Make inline math in the Model Evaluation card match surrounding text,
   but keep big display equations as-is. */

/* Shrink ONLY inline MathJax inside the results-eval-card */
.results-eval-card mjx-container:not([display="true"]):not([display="block"]) {
  font-size: 0.9em !important; /* tweak 0.7–0.8 as needed */
}

/* (Optional) If display math ever gets touched, keep it at full size */
.results-eval-card mjx-container[display="true"],
.results-eval-card mjx-container[display="block"] {
  font-size: 1em !important;
}
/* Make MathJax a bit smaller just inside the CS109 concepts card */
/* Shrink inline MathJax only inside the "CS109 concepts in action" card */
.cs109-math-small mjx-container:not([display="true"]) {
  font-size: 0.9em !important;   /* adjust 0.72–0.9 depending on taste */
  vertical-align: baseline !important;
}

/* (Optional) keep display math normal size—but you don't use display math here */
.cs109-math-small mjx-container[display="true"] {
  font-size: 1em !important;
}

/* ============= MAIN TAKEAWAYS LAYOUT ============= */

.takeaways-grid {
  gap: 2.25rem;
  align-items: flex-start;
}

/* Make each column stack its cards with space between them */
.two-column.takeaways-grid > div {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Extra breathing room on the whole section */
#findings {
  position: relative;
  z-index: 1;
}

#findings .section-lead {
  max-width: 58rem;
  line-height: 1.8;
  margin-bottom: 2.25rem;
}

/* ============= HIGHLIGHT CARDS: COLORS + SPACING + ANIMATIONS ============= */

.highlight-card {
  position: relative;
  border-radius: 1.25rem;
  padding: 1.75rem 1.75rem 1.5rem;
  margin: 0;                         /* no weird extra margins */
  background: radial-gradient(circle at top left,
              rgba(56, 189, 248, 0.10), transparent 55%)
              , radial-gradient(circle at bottom right,
              rgba(168, 85, 247, 0.10), transparent 55%)
              , rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.82);
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 260ms ease-out,
    transform 260ms ease-out,
    box-shadow 220ms ease-out,
    border-color 220ms ease-out,
    background 350ms ease-out;
}

/* When the section scrolls into view, gently fade/slide cards in */
.section.in-view .highlight-card {
  opacity: 1;
  transform: translateY(0);
}

/* Soft glow + lift on hover */
.highlight-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.9);
  border-color: rgba(96, 165, 250, 0.75);
  background: radial-gradient(circle at top left,
              rgba(56, 189, 248, 0.16), transparent 60%)
              , radial-gradient(circle at bottom right,
              rgba(236, 72, 153, 0.16), transparent 65%)
              , rgba(15, 23, 42, 0.98);
}

/* Subtle accent strip on the left edge of each card */
.highlight-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(56, 189, 248, 0.0),
    rgba(56, 189, 248, 0.85),
    rgba(236, 72, 153, 0.85),
    rgba(168, 85, 247, 0.0)
  );
  opacity: 0.9;
}

/* Typography inside cards: more air, less cram */

.highlight-card h3 {
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  margin: 0 0 0.75rem;
}

.highlight-card p {
  margin: 0.35rem 0 0.5rem;
  line-height: 1.7;
  color: #e5e7eb;
}

.highlight-card .small-muted {
  font-size: 0.86rem;
  color: #9ca3af;
  margin-top: 0.5rem;
}

/* Lists inside cards */
.highlight-card .nice-list {
  margin: 0.35rem 0 0.25rem;
  padding-left: 1.25rem;
}

.highlight-card .nice-list li {
  line-height: 1.7;
  margin-bottom: 0.25rem;
}

/* Optional: tiny label vibe for "CS109 concepts in action" card */
.cs109-math-small h3 {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cs109-math-small h3::after {
  content: "· CS109 toolkit";
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a5b4fc;
  opacity: 0.9;
}

/* Make sure cards never physically touch on small screens */
@media (max-width: 900px) {
  .two-column.takeaways-grid {
    gap: 2rem;
  }
  .two-column.takeaways-grid > div {
    gap: 1.5rem;
  }
}

/* Dark theme wrapper for the L2 plot */
.l2-plot-wrapper {
  background: #0f172a;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.45);
}

/* The image itself: slightly darkened + high contrast so it fits the theme */
.results-plot-img--l2 {
  display: block;
  width: 100%;
  border-radius: 0.75rem;
  filter: brightness(0.78) contrast(1.15);
}

/* ===========================
   REAL-WORLD APPLICATIONS
   =========================== */

.applications-section {
  position: relative;
  overflow: hidden;
}

/* Background layers behind the section */
.applications-bg {
  position: absolute;
  inset: -40%;
  pointer-events: none;
  z-index: -1;
}

/* Soft orbit ring that slowly rotates */
.applications-bg-ring {
  position: absolute;
  inset: 10% 5%;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background:
    radial-gradient(circle at 10% 0%, rgba(56, 189, 248, 0.35), transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(236, 72, 153, 0.25), transparent 55%);
  opacity: 0.55;
  filter: blur(2px);
  transform: translateY(calc(var(--wave-progress, 0) * -40px));
  animation: applications-orbit 36s linear infinite;
}

/* Glowing gradient haze behind the cards */
.applications-bg-gradient {
  position: absolute;
  inset: 25% 10%;
  background:
    radial-gradient(circle at 0% 20%, rgba(56, 189, 248, 0.32), transparent 55%),
    radial-gradient(circle at 100% 80%, rgba(236, 72, 153, 0.32), transparent 55%),
    radial-gradient(circle at 50% 50%, rgba(94, 234, 212, 0.12), transparent 60%);
  opacity: 0.9;
  filter: blur(60px);
  mix-blend-mode: screen;
  animation: applications-pulse 18s ease-in-out infinite alternate;
}

/* Layout / header */

.applications-inner {
  position: relative;
}

.applications-header {
  max-width: 54rem;
  margin: 0 auto 2.5rem auto;
  text-align: left;
}

.applications-kicker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.applications-kicker-pill {
  padding: 0.18rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.8);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.applications-kicker-pill::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: radial-gradient(circle, #22d3ee, transparent 60%);
}

.applications-kicker-pill--accent {
  border-color: rgba(96, 165, 250, 0.8);
  background: linear-gradient(
    120deg,
    rgba(56, 189, 248, 0.16),
    rgba(129, 140, 248, 0.08),
    rgba(236, 72, 153, 0.16)
  );
}

.applications-title {
  margin-bottom: 0.75rem;
}

.applications-sublead {
  margin-top: 0.5rem;
}

/* Grid of cards */

.applications-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr);
  gap: 1.75rem;
  margin-top: 2.25rem;
}

@media (max-width: 960px) {
  .applications-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Cards: glassy, glowing border on hover */

.applications-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.9), #020617);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow:
    0 20px 40px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  padding: 1.4rem 1.5rem 1.6rem 1.5rem;
  backdrop-filter: blur(14px);
  transform-origin: center;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    background 0.35s ease;
}

.applications-card-glow {
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 200deg,
    rgba(56, 189, 248, 0.0),
    rgba(56, 189, 248, 0.4),
    rgba(236, 72, 153, 0.6),
    rgba(129, 140, 248, 0.4),
    rgba(56, 189, 248, 0.0)
  );
  opacity: 0;
  mix-blend-mode: screen;
  filter: blur(32px);
  transform: translate3d(0, 8px, 0);
  pointer-events: none;
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

.applications-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(148, 163, 184, 0.9);
  box-shadow:
    0 28px 60px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(56, 189, 248, 0.3);
  background: radial-gradient(
    circle at top right,
    rgba(15, 23, 42, 0.9),
    #020617
  );
}

.applications-card:hover .applications-card-glow {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.applications-card-header {
  margin-bottom: 0.75rem;
}

.applications-card h3 {
  margin-top: 0.25rem;
  margin-bottom: 0.7rem;
  position: relative;
}

.applications-card h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.45rem;
  width: 42%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(56, 189, 248, 0.0),
    rgba(56, 189, 248, 0.9),
    rgba(236, 72, 153, 0.0)
  );
  opacity: 0.9;
}

/* Card variants (subtle tint differences) */

.applications-card--rja {
  background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.55), #020617);
}

.applications-card--support {
  background: radial-gradient(circle at top right, rgba(8, 47, 73, 0.65), #020617);
}

.applications-card--history {
  background: radial-gradient(circle at bottom right, rgba(76, 29, 149, 0.55), #020617);
}

/* Tag + mini pills */

.applications-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.16rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.9);
}

.applications-tag::before {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: radial-gradient(circle, #22d3ee, transparent 60%);
}

.applications-tag--accent {
  border-color: rgba(56, 189, 248, 0.9);
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.25), rgba(15, 23, 42, 0.9));
}

.applications-list {
  margin-top: 0.6rem;
}

.applications-reference {
  margin-top: 0.9rem;
}

.applications-mini-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.applications-mini-pill {
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

/* Ribbon at the bottom of the section */

.applications-ribbon {
  position: relative;
  margin-top: 2.5rem;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: radial-gradient(circle at 0% 50%, rgba(56, 189, 248, 0.08), rgba(15, 23, 42, 0.95));
  display: flex;
  align-items: center;
  overflow: hidden;
}

.applications-ribbon-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(56, 189, 248, 0.0),
    rgba(56, 189, 248, 0.7),
    rgba(129, 140, 248, 0.0),
    rgba(236, 72, 153, 0.6),
    rgba(56, 189, 248, 0.0)
  );
  opacity: 0.4;
  mix-blend-mode: screen;
  transform: translateX(-40%);
  animation: applications-ribbon-wave 14s linear infinite;
}

.applications-ribbon-text {
  position: relative;
}

/* Animations */

@keyframes applications-orbit {
  from {
    transform: translateY(calc(var(--wave-progress, 0) * -40px)) rotate(0deg);
  }
  to {
    transform: translateY(calc(var(--wave-progress, 0) * -40px)) rotate(360deg);
  }
}

@keyframes applications-pulse {
  0% {
    opacity: 0.5;
    transform: scale(1);
  }
  100% {
    opacity: 0.9;
    transform: scale(1.08);
  }
}

@keyframes applications-ribbon-wave {
  0% {
    transform: translateX(-40%);
  }
  100% {
    transform: translateX(40%);
  }
}

/* ===========================
   Real-world Applications Section
   =========================== */
/* ===========================
   Real-world Applications Section
   =========================== */

.applications-section {
  position: relative;
  overflow: hidden;
}

/* Background layer */
.applications-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
}

.applications-bg-ring {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  top: 10%;
  right: -12%;
  box-shadow:
    0 0 40px rgba(56, 189, 248, 0.15),
    0 0 120px rgba(129, 140, 248, 0.15);
  transform: translate3d(0, 0, 0);
}

.applications-bg-gradient {
  position: absolute;
  width: 80%;
  height: 280px;
  left: 10%;
  bottom: -12%;
  background: radial-gradient(
      circle at 20% 0%,
      rgba(56, 189, 248, 0.18),
      transparent 55%
    ),
    radial-gradient(
      circle at 80% 100%,
      rgba(248, 113, 113, 0.2),
      transparent 50%
    );
  filter: blur(12px);
  opacity: 0.8;
}

@keyframes applications-ring-drift {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(-10px, 8px, 0) rotate(2deg);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
}

.applications-bg-ring {
  animation: applications-ring-drift 24s ease-in-out infinite;
}

/* Ensure content sits above background */
.applications-inner {
  position: relative;
  z-index: 1;
}

/* Header */
.applications-header {
  text-align: left;
  margin-bottom: 1.75rem;
}

.applications-title {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  background: linear-gradient(90deg, #22d3ee, #818cf8, #fb7185);
  -webkit-background-clip: text;
  color: transparent;
}

/* INTRO BLOCK (FULL WIDTH) */
.applications-intro-block {
  margin-bottom: 2rem;
  padding: 2.25rem 2rem;
  border-radius: 1.25rem;
  background: radial-gradient(
      circle at 0% 0%,
      rgba(34, 211, 238, 0.14),
      transparent 55%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(248, 113, 113, 0.12),
      transparent 60%
    ),
    rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.85),
    0 0 0 1px rgba(15, 23, 42, 0.85);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.applications-intro-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(34, 211, 238, 0.06),
    transparent 35%,
    rgba(248, 113, 113, 0.08)
  );
  opacity: 0.9;
  pointer-events: none;
}

.applications-intro-block:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow:
    0 24px 50px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(30, 64, 175, 0.8);
}

.applications-intro-kicker {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: #94a3b8;
  margin-bottom: 0.4rem;
  position: relative;
}

.applications-intro-title {
  position: relative;
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(90deg, #22d3ee, #fb7185);
  -webkit-background-clip: text;
  color: transparent;
}

.applications-intro-lead {
  position: relative;
  font-size: 1.02rem;
  line-height: 1.6;
  color: #e2e8f0;
  margin-bottom: 0.9rem;
}

.applications-intro-text {
  position: relative;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #cbd5e1;
}

/* CARDS GRID (3 ON A LINE) */
.applications-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  align-items: stretch;
}

/* Cards */
.applications-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.28);
  padding: 1.75rem 1.6rem 1.7rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.9);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.applications-card-glow {
  position: absolute;
  inset: -40%;
  opacity: 0.18;
  background: radial-gradient(
      circle at 15% 0%,
      rgba(34, 211, 238, 0.5),
      transparent 60%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(248, 113, 113, 0.45),
      transparent 60%
    );
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* Hover glow for ALL cards */
.applications-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.85);
  box-shadow:
    0 26px 60px rgba(15, 23, 42, 0.98),
    0 0 0 1px rgba(30, 64, 175, 0.85);
}

.applications-card:hover .applications-card-glow {
  opacity: 0.32;
}

.applications-card-header {
  position: relative;
  margin-bottom: 0.9rem;
}

.applications-card-header h3 {
  margin: 0.2rem 0 0.7rem;
  font-size: 1.1rem;
}

/* Tag pills */
.applications-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
}

.applications-tag--accent {
  border-color: rgba(56, 189, 248, 0.9);
  color: #22d3ee;
}

/* Card text */
.applications-card p {
  position: relative;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e5e7eb;
}

.applications-card p.small-muted {
  color: #9ca3af;
}

/* Lists inside cards */
.applications-list {
  margin-top: 0.75rem;
}

.applications-list li {
  font-size: 0.92rem;
}

/* Mini footer pills */
.applications-mini-footer {
  position: relative;
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.applications-mini-pill {
  padding: 0.22rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #cbd5e1;
}

/* Reference link line */
.applications-reference a {
  color: #38bdf8;
  text-decoration: none;
}

.applications-reference a:hover {
  text-decoration: underline;
}

/* Ribbon at bottom */
.applications-ribbon {
  position: relative;
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.applications-ribbon-gradient {
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(34, 211, 238, 0.9),
    rgba(129, 140, 248, 0.9),
    rgba(248, 113, 113, 0.9)
  );
  opacity: 0.95;
}

.applications-ribbon-text {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* Responsive */
@media (max-width: 1000px) {
  .applications-cards-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===========================
   Ethics section
   =========================== */

.ethics-section {
  position: relative;
}

.ethics-grid {
  gap: 1.75rem;
  margin-top: 1.75rem;
  margin-bottom: 2.5rem;
}

.ethics-card {
  background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.15), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

/* Tradeoff block */

.ethics-tradeoff {
  margin-top: 2.75rem;
}

.ethics-tradeoff-header {
  max-width: 720px;
  margin-bottom: 1.75rem;
}

/* Coin layout */

.ethics-coin-block {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  align-items: flex-start;
}

.ethics-coin-wrapper {
  flex: 0 0 240px;
  text-align: center;
}

.ethics-coin-caption {
  margin-top: 0.9rem;
}

/* Coin visual */

.ethics-coin {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
  border-radius: 50%;
  transform-style: preserve-3d;
  cursor: pointer;
  transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1);
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.4),
    0 18px 40px rgba(15, 23, 42, 0.95);
  background: radial-gradient(circle at 30% 20%, #1f2937, #020617);
}

.ethics-coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  text-align: center;
}

.ethics-coin-front {
  background: radial-gradient(circle at 25% 20%, #22c55e, #0f172a);
}

.ethics-coin-back {
  background: radial-gradient(circle at 25% 20%, #f97316, #0f172a);
  transform: rotateY(180deg);
}

.ethics-coin-label {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.ethics-coin-sub {
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.9;
}

/* Coin states */

.ethics-coin.is-flipping {
  animation: ethics-coin-flip 1s linear;
}

.ethics-coin.show-fp {
  transform: rotateY(0deg);
}

.ethics-coin.show-fn {
  transform: rotateY(180deg);
}

@keyframes ethics-coin-flip {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(720deg);
  }
}

/* Outcome panels */

.ethics-outcome-panels {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ethics-outcome-panel {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  display: none;
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.ethics-outcome-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ethics-outcome-panel h4 {
  margin-top: 0;
}

/* Threshold card + banner */

.ethics-threshold-card {
  margin-top: 2rem;
  background: radial-gradient(circle at top, rgba(79, 70, 229, 0.3), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(129, 140, 248, 0.5);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.ethics-banner {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px dashed rgba(148, 163, 184, 0.6);
}

/* Responsive adjustments */

@media (max-width: 800px) {
  .ethics-coin-block {
    flex-direction: column;
  }

  .ethics-coin-wrapper {
    align-self: center;
  }
}

/* ===========================
   Ethics section
   =========================== */

.ethics-section {
  position: relative;
  overflow: hidden;
}

.ethics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr);
  gap: 2rem;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .ethics-grid {
    grid-template-columns: 1fr;
  }
}

.ethics-card {
  position: relative;
  background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.08), transparent),
              radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.08), transparent),
              rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.8);
}

.ethics-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

/* Tradeoff card layout */

.ethics-tradeoff-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ethics-tradeoff-header {
  margin-bottom: 0.5rem;
}

/* Slider container */

.ethics-slider {
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.12), transparent),
              rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.5);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.ethics-slider-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.85rem;
  color: #e5e7eb;
}

.ethics-focus-label strong,
.ethics-threshold-label strong {
  font-weight: 600;
}

.ethics-focus-label span,
.ethics-threshold-label span {
  font-weight: 600;
}

.ethics-threshold-label {
  font-family: "Inter", system-ui, sans-serif;
}

/* Slider control */

.ethics-slider-control {
  display: grid;
  grid-template-columns: max-content 1fr max-content;
  gap: 0.75rem;
  align-items: center;
}

.ethics-slider-end-label {
  font-size: 0.8rem;
  color: #9ca3af;
  max-width: 7rem;
}

/* Range input styling */

.ethics-slider-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(248, 250, 252, 0.08),
    rgba(248, 250, 252, 0.18)
  );
  outline: none;
  cursor: pointer;
  position: relative;
}

.ethics-slider-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #e5e7eb, #cbd5f5);
  border: 1px solid rgba(148, 163, 184, 0.8);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ethics-slider-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #e5e7eb, #cbd5f5);
  border: 1px solid rgba(148, 163, 184, 0.8);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ethics-slider-range::-webkit-slider-thumb:hover,
.ethics-slider-range::-moz-range-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 5px rgba(56, 189, 248, 0.4);
}

/* Slider caption */

.ethics-slider-caption {
  margin: 0;
}

/* Panels */

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

@media (max-width: 900px) {
  .ethics-panels {
    grid-template-columns: 1fr;
  }
}

.ethics-panel {
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(30, 64, 175, 0.7);
  font-size: 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    transform 0.2s ease;
}

.ethics-panel h4 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.ethics-panel-primary {
  background: radial-gradient(circle at top, rgba(59, 130, 246, 0.25), transparent),
              rgba(15, 23, 42, 0.98);
  border-color: rgba(96, 165, 250, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.9);
  transform: translateY(-2px);
}

/* Formalization block */

.ethics-formalization {
  border-top: 1px dashed rgba(148, 163, 184, 0.5);
  padding-top: 0.65rem;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

.ethics-formalization ul {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
}

/* ===========================
   Ethics section layout
   =========================== */

.ethics-section {
  position: relative;
  z-index: 1;
}

.ethics-header {
  max-width: 820px;
  margin: 0 auto 2.5rem auto;
  text-align: left;
}

.ethics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr);
  gap: 2.5rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  .ethics-grid {
    grid-template-columns: 1fr;
  }
}

.ethics-card {
  position: relative;
  padding: 1.75rem 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ethics-card-header {
  margin-bottom: 0.5rem;
}

.ethics-card-header h3 {
  margin: 0.35rem 0 0.4rem;
}

.ethics-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(148, 163, 184, 0.18);
  color: #e5e7eb;
}

.ethics-tag--accent {
  background: rgba(248, 250, 252, 0.1);
}

/* ===========================
   Limitations flipbook
   =========================== */

.ethics-stepper {
  margin-top: 0.75rem;
}

.ethics-step-dots {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.ethics-step-dot {
  border: none;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.7rem;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5f5;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.ethics-step-dot.active {
  background: radial-gradient(circle at 0% 0%, #38bdf8, #6366f1);
  color: #0b1020;
  transform: translateY(-1px);
}

.ethics-step-cards {
  position: relative;
  min-height: 10.5rem;
}

.ethics-step-card {
  display: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 200ms ease-out, transform 200ms ease-out;
}

.ethics-step-card.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.ethics-step-title {
  margin-bottom: 0.5rem;
}

/* ===========================
   Error tradeoffs + slider
   =========================== */

.ethics-slider-block {
  margin: 0.75rem 0 1.25rem;
}

.ethics-slider-label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
}

.ethics-slider {
  width: 100%;
}

.ethics-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  margin-top: 0.25rem;
  opacity: 0.75;
}

.ethics-slider-status {
  margin-top: 0.4rem;
}

.ethics-slider-emphasis {
  font-weight: 600;
}

/* Error panels side by side */

.ethics-errors-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  margin-top: 0.25rem;
}

@media (max-width: 800px) {
  .ethics-errors-grid {
    grid-template-columns: 1fr;
  }
}

.ethics-error-panel {
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  background: radial-gradient(circle at top left,
    rgba(148, 163, 184, 0.20),
    rgba(15, 23, 42, 0.9)
  );
  border: 1px solid rgba(148, 163, 184, 0.25);
  transition: box-shadow 220ms ease, transform 220ms ease, border-color 220ms ease;
}

.ethics-error-panel h4 {
  margin-top: 0;
  margin-bottom: 0.45rem;
}

.ethics-error-panel ul {
  margin-top: 0.4rem;
}

.ethics-math.tiny {
  font-size: 0.7rem;
  opacity: 0.75;
  margin-top: 0.5rem;
}

/* Emphasis highlighting depending on slider */

.ethics-error-panel--fp.emphasis {
  border-color: rgba(248, 250, 252, 0.65);
  box-shadow: 0 0 0 1px rgba(248, 250, 252, 0.16),
              0 18px 35px rgba(15, 23, 42, 0.85);
  transform: translateY(-2px);
}

.ethics-error-panel--fn.emphasis {
  border-color: rgba(52, 211, 153, 0.7);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.18),
              0 18px 35px rgba(6, 78, 59, 0.65);
  transform: translateY(-2px);
}

.ethics-errors-note {
  margin-top: 1.25rem;
}

/* ===========================
   ETHICS LAYOUT TWEAKS
   =========================== */

.ethics-section .ethics-header {
  text-align: left;
  max-width: 800px;
  margin: 0 auto 2.5rem auto;
}

.ethics-section .ethics-header h2 {
  margin-bottom: 0.75rem;
}

.ethics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: flex-start;
}

.ethics-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ethics-card-header h3 {
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
}

/* Condense first card a bit */
.ethics-card--limits .ethics-stepper {
  margin-top: 0.25rem;
}

/* Pill-style tabs for limitations flipbook */
.ethics-step-dots {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.ethics-step-dot {
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 160ms ease,
    box-shadow 180ms ease;
  white-space: nowrap;
}

.ethics-step-dot:hover {
  border-color: #22d3ee;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.3);
  transform: translateY(-1px);
}

.ethics-step-dot.active {
  background: radial-gradient(circle at top left, #22d3ee, #4c1d95);
  border-color: transparent;
  color: #0b1120;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.8);
}

/* Step cards fade between each other */
.ethics-step-cards {
  position: relative;
  min-height: 190px;
}

.ethics-step-card {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  inset: 0;
  transition: opacity 220ms ease;
}

.ethics-step-card.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

/* Slider emphasis styling */
.ethics-slider-block {
  margin: 1rem 0 1.25rem;
}

.ethics-slider {
  width: 100%;
}

.ethics-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-top: 0.35rem;
  color: #9ca3af;
}

.ethics-slider-emphasis {
  font-weight: 600;
}

/* Emphasis class for FP/FN panels */
.ethics-error-panel {
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.35);
  transition: border-color 160ms ease, box-shadow 180ms ease, transform 160ms ease,
    background 160ms ease;
}

.ethics-error-panel.emphasis {
  border-color: #22d3ee;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.3), 0 14px 40px rgba(15, 23, 42, 0.9);
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), #020617);
  transform: translateY(-2px);
}

/* Lay out FP / FN panels side by side instead of stacked */
.ethics-errors-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.85rem;
  align-items: flex-start;
}

/* Stack them on small screens so it's still readable */
@media (max-width: 900px) {
  .ethics-errors-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Slightly tighter spacing inside the errors card */
.ethics-card--errors > p:first-of-type {
  margin-bottom: 0.75rem;
}

.ethics-slider-block {
  margin: 0.75rem 0 1rem;
}

.ethics-error-panel h4 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.ethics-error-panel ul {
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
}

.ethics-errors-note {
  margin-top: 1rem;
}


/* ===========================
   APPLICATIONS GRID
   =========================== */

.applications-section {
  position: relative;
  overflow: hidden;
}

.applications-inner {
  position: relative;
  z-index: 1;
}

.applications-header {
  max-width: 820px;
  margin: 0 auto 2.5rem auto;
  text-align: left;
}

.applications-title {
  margin-bottom: 0.75rem;
}

.applications-sublead {
  margin-top: 0.5rem;
}

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

/* Make sure all three cards stay in one row on large screens,
   but wrap nicely on mobile */
@media (max-width: 900px) {
  .applications-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .applications-cards-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Slightly taller min-height to visually align */
.applications-card {
  min-height: 100%;
  position: relative;
}

/* ===========================
   ABOUT SECTION – CUTE CARD
   =========================== */

.about-section {
  position: relative;
}

.about-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: center;
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), #020617);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.about-left {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.about-title {
  margin: 0.4rem 0;
}

.about-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
}

.about-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.about-avatar {
  width: 90px;
  height: 90px;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(250, 250, 250, 0.8);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.9);
}

.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  transform: scale(0.75);   /* ZOOM OUT slightly */
}



.about-meta-title {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.about-mini-note {
  max-width: 260px;
}

/* Stack on small screens */
@media (max-width: 768px) {
  .about-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-right {
    flex-direction: row;
    align-items: center;
  }

  .about-mini-note {
    max-width: none;
  }
}

/* ===========================
   ETHICS – ERROR ACCORDION
   =========================== */
/* ===========================
   ETHICS – ERROR TRADEOFF CARD
   =========================== */

.ethics-card--errors {
  background:
    radial-gradient(circle at top left, rgba(148, 163, 184, 0.10), transparent),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.08), transparent),
    rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

/* Slider block */

.ethics-slider-block {
  margin: 0.75rem 0 1rem;
}

.ethics-slider-label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
  color: #e5e7eb;
}

/* Labels under the slider as two distinct pills */

.ethics-slider-labels {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.ethics-slider-labels span {
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: 0.9rem;
  font-size: 0.78rem;
  line-height: 1.4;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

/* Left pill = more tolerant / more FPs (warm) */
.ethics-slider-labels span:first-child {
  border-color: rgba(248, 113, 113, 0.8);
  background: radial-gradient(
    circle at top left,
    rgba(248, 113, 113, 0.25),
    rgba(15, 23, 42, 0.95)
  );
}

/* Right pill = more cautious / more FNs (green) */
.ethics-slider-labels span:last-child {
  border-color: rgba(52, 211, 153, 0.8);
  background: radial-gradient(
    circle at top left,
    rgba(52, 211, 153, 0.25),
    rgba(15, 23, 42, 0.95)
  );
}

/* If you still have a status line in HTML, it will look subtle;
   otherwise this just sits unused. */
.ethics-slider-status {
  margin-top: 0.4rem;
  font-size: 0.8rem;
}

.ethics-slider-emphasis {
  font-weight: 600;
}

/* ===========================
   ETHICS – ERROR ACCORDION
   =========================== */

.ethics-accordion {
  margin-top: 0.9rem;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.35);
  overflow: hidden;
}

/* Accordion triggers (FP / FN headers) */

.ethics-accordion-trigger {
  width: 100%;
  padding: 0.8rem 1rem;
  border: none;
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  text-align: left;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 140ms ease;
}

.ethics-accordion-trigger:last-of-type {
  border-bottom: none;
}

.ethics-accordion-trigger-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ethics-accordion-label {
  font-size: 0.86rem;
  font-weight: 500;
}

.ethics-accordion-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
  color: #9ca3af;
}

.ethics-accordion-chevron {
  font-size: 0.9rem;
  opacity: 0.8;
  transition: transform 160ms ease, opacity 160ms ease;
}

/* Open state for a trigger (panel visible) */

.ethics-accordion-trigger.active {
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), #020617);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.9);
}

.ethics-accordion-trigger.active .ethics-accordion-chevron {
  transform: rotate(180deg);
}

/* 🔥 Glow when emphasized by the slider (even while closed) */

.ethics-accordion-trigger.emphasis {
  border-color: #22d3ee;
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.3),
    0 14px 34px rgba(15, 23, 42, 0.9);
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), #020617);
  transform: translateY(-1px);
}

/* Accordion panels */

.ethics-accordion-panel {
  display: none;
  padding: 0.9rem 1rem 1rem;
  font-size: 0.88rem;
  line-height: 1.6;
  border-top: 1px solid rgba(15, 23, 42, 0.95);
  background: radial-gradient(
    circle at top left,
    rgba(148, 163, 184, 0.15),
    rgba(15, 23, 42, 0.97)
  );
}

.ethics-accordion-panel.active {
  display: block;
}

.ethics-accordion-panel ul {
  margin-top: 0.45rem;
  margin-bottom: 0.4rem;
  padding-left: 1.1rem;
}

.ethics-accordion-panel li {
  margin-bottom: 0.12rem;
}

/* Optional divider for FP panel if you like */
.ethics-accordion-panel--fp {
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

/* Note text under accordion */

.ethics-errors-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Make each pipeline step a left-right layout */
.pipeline-step {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  row-gap: 0.25rem;
  align-items: start;
}

/* PRETTY CIRCLE NUMBER (keeps original theme) */
.pipeline-step-number {
  grid-row: 1 / span 2;      /* spans title + body */
  grid-column: 1;

  width: 42px;
  height: 42px;
  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1rem;
  font-weight: 700;
  color: #e0f2fe;

  background: radial-gradient(
      circle at 35% 30%,
      rgba(56, 189, 248, 0.65),
      rgba(15, 23, 42, 0.9)
    );
  border: 1px solid rgba(148, 163, 184, 0.45);

  box-shadow:
    0 4px 12px rgba(56, 189, 248, 0.35),
    0 0 0 1px rgba(56, 189, 248, 0.3);
}

/* Title next to the circle */
.pipeline-step-title {
  grid-row: 1;
  grid-column: 2;
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
}

/* Body under title */
.pipeline-step-body {
  grid-row: 2;
  grid-column: 2;
  margin: 0;
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.55;
}

/* Optional: glow on hover (looks SO good) */
.pipeline-step:hover .pipeline-step-number {
  box-shadow:
    0 0 0 2px rgba(56, 189, 248, 0.4),
    0 0 20px rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
  transition: 180ms ease;
}

.methods-column {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ============================================
   ABOUT SECTION – full-width, centered block
   ============================================ */

.about-section {
  max-width: 1100px;
  margin: 3.5rem auto 0;
  padding: 0 1.5rem;
}

/* ============================================
   ABOUT CARD – horizontally aligned, premium
   ============================================ */

.about-card {
  display: flex;
  align-items: center;
  gap: 2.2rem;

  padding: 2.2rem 2.6rem;
  border-radius: 1.2rem;

  background: rgba(10, 15, 28, 0.92);
  border: 1px solid rgba(150, 160, 255, 0.25);

  box-shadow:
    0 25px 45px rgba(0, 0, 0, 0.65),
    0 0 35px rgba(70, 65, 150, 0.45);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  transition: transform 220ms ease, box-shadow 220ms ease;
}

.about-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 32px 55px rgba(0, 0, 0, 0.75),
    0 0 45px rgba(120, 100, 255, 0.55);
}

.about-text {
  flex: 1 1 0;
  min-width: 260px;
  font-size: 1.05rem;
  line-height: 1.52;
}

/* Responsive for mobile */
@media (max-width: 780px) {
  .about-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-avatar {
    margin-bottom: 0.75rem;
  }
}

/* ============================================
   ABOUT SECTION – centered with wave gradient
   ============================================ */

.about-section {
  position: relative;
  max-width: 1100px;
  margin: 3.5rem auto 0;
  padding: 0 1.5rem;
}

/* animated wave gradient behind the about card */
.about-section::before {
  content: "";
  position: absolute;
  inset: -40% -15%;
  z-index: -1;
  pointer-events: none;

  background: linear-gradient(
    120deg,
    rgba(15, 23, 42, 0.9) 0%,
    rgba(56, 189, 248, 0.22) 22%,
    rgba(139, 92, 246, 0.32) 45%,
    rgba(244, 114, 182, 0.24) 70%,
    rgba(15, 23, 42, 0.95) 100%
  );
  opacity: 0.75;
  filter: blur(32px);
  transform: translate3d(0, 0, 0);
  animation: aboutWave 26s ease-in-out infinite;
}

/* ============================================
   ABOUT CARD – horizontally aligned, premium
   ============================================ */

.about-card {
  display: flex;
  align-items: center;
  gap: 2rem;

  padding: 2.1rem 2.4rem;
  border-radius: 1.2rem;

  background: rgba(10, 15, 28, 0.94);
  border: 1px solid rgba(150, 160, 255, 0.25);

  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.65),
    0 0 28px rgba(70, 65, 150, 0.45);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  transition: transform 220ms ease, box-shadow 220ms ease;
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 30px 54px rgba(0, 0, 0, 0.78),
    0 0 40px rgba(129, 140, 248, 0.6);
}

.about-text {
  flex: 1 1 0;
  min-width: 260px;
  font-size: 1.05rem;
  line-height: 1.52;
}

/* Responsive for mobile */
@media (max-width: 780px) {
  .about-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-avatar {
    margin-bottom: 0.75rem;
  }
}

/* ============================================
   AVATAR – smaller rectangle, thin border,
   shimmer + float animation
   ============================================ */

.about-avatar {
  position: relative;

  /* 🔹 smaller rectangle, closer to image */
  width: 180px;
  height: 235px;
  border-radius: 0.8rem;

  overflow: hidden;
  border: 0.6px solid rgba(230, 225, 255, 0.45);

  background: linear-gradient(
    145deg,
    rgba(35, 45, 80, 0.55),
    rgba(15, 19, 38, 0.9)
  );

  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.6),
    0 0 16px rgba(160, 140, 255, 0.22);

  animation: avatarFloat 22s ease-in-out infinite;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

/* ✨ Subtle shimmering light streak */
.about-avatar::before {
  content: "";
  position: absolute;
  inset: -60%;
  pointer-events: none;

  background: conic-gradient(
    from 200deg,
    rgba(255, 182, 255, 0.0),
    rgba(255, 150, 220, 0.32),
    rgba(129, 140, 248, 0.2),
    rgba(244, 114, 182, 0.26),
    rgba(240, 200, 255, 0.0)
  );

  mix-blend-mode: screen;
  opacity: 0.2;
  animation: avatarShimmer 20s linear infinite;
}

/* Rectangular photo, zoomed slightly OUT */
.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  border-radius: inherit;

  transform: scale(0.62);         /* zoomed OUT; more of you visible */
  transform-origin: 50% 40%;
  transition: transform 220ms ease;
}

/* Hover effect */
.about-avatar:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow:
    0 24px 46px rgba(0, 0, 0, 0.72),
    0 0 24px rgba(185, 165, 255, 0.45);
  border-color: rgba(235, 220, 255, 0.8);
}

.about-avatar:hover img {
  transform: scale(0.68) rotate(-0.8deg);
}

/* ============================================
   CLEAN BADGE / PILL – replace old ugly button
   ============================================ */
/* Layout: left text + right avatar */
.about-card {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 2rem;
}

/* LEFT SIDE: move pill closer to top, tidy spacing */
.about-left {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.about-pill {
  align-self: flex-start;
  margin-top: -0.2rem;   /* nudges it closer to top of card */
  margin-bottom: 0.35rem;
}

.about-title {
  margin: 0.1rem 0 0.1rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.about-email {
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
  color: rgba(191, 219, 254, 0.9);  /* soft light blue */
}

/* RIGHT SIDE: center meta text directly under avatar */
.about-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  text-align: center;
}

.about-meta {
  text-align: center;         /* 1) align directly under image */
  max-width: 220px;
}

.about-mini-note {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(203, 213, 225, 0.95);
}

/* AVATAR box: same size, equal top/bottom, but bigger image inside */
.about-avatar {
  position: relative;
  width: 180px;               /* keep same box size */
  height: 235px;
  border-radius: 0.8rem;

  overflow: hidden;
  border: 0.6px solid rgba(230, 225, 255, 0.45);

  background: linear-gradient(
    145deg,
    rgba(35, 45, 80, 0.55),
    rgba(15, 19, 38, 0.9)
  );

  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.6),
    0 0 16px rgba(160, 140, 255, 0.22);

  display: flex;              /* 2) ensure image is centered top/bottom */
  align-items: center;
  justify-content: center;

  animation: avatarFloat 22s ease-in-out infinite;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

/* 3) Make the image larger but keep the box the same size */
.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  border-radius: inherit;

  transform: scale(0.78);          /* bigger image inside same box */
  transform-origin: 50% 50%;       /* equal distance top & bottom */
  transition: transform 220ms ease;
}

.about-avatar:hover img {
  transform: scale(0.85) rotate(-0.8deg);
}

/* Responsive: stack on mobile */
@media (max-width: 780px) {
  .about-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-right {
    align-items: flex-start;
    text-align: left;
  }

  .about-meta {
    text-align: left;
  }
}

/* PROJECT DOCS SECTION */
.docs-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 2rem;
}

.doc-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 1rem;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
}

.pdf-frame {
  width: 100%;
  height: 320px;
  margin-top: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
}

.doc-download {
  margin-top: 1rem;
  color: #a5b4fc;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: 0.2s ease;
}

.doc-download:hover {
  border-bottom: 1px solid #a5b4fc;
}


