:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-violet: #eef2ff;
  --surface-cyan: #ecfeff;
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --secondary: #0f172a;
  --accent: #06b6d4;
  --hero-bg: #0f172a;
  --hero-grid: rgba(148, 163, 184, 0.14);
  --hero-accent: #22d3ee;
  --hero-violet: #818cf8;
  --border: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
  --radius: 14px;
  --shadow: 0 18px 46px rgba(15, 23, 42, 0.10);
  --container: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 6%, rgba(79, 70, 229, 0.12), transparent 28%),
    radial-gradient(circle at 90% 12%, rgba(6, 182, 212, 0.13), transparent 30%),
    linear-gradient(rgba(79, 70, 229, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 70, 229, 0.04) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 36px 36px, 36px 36px, auto;
  color: var(--text);
  font-family: "Be Vietnam Pro", "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.container {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(203, 213, 225, 0.86);
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(14px);
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.24);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.2;
}

.brand strong {
  color: var(--secondary);
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}

.site-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: var(--surface-violet);
  color: var(--primary);
}

.hero {
  padding: 62px 0 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  gap: 26px;
  align-items: stretch;
}

.hero-grid > * {
  min-width: 0;
}

.lab-brief,
.stack-panel,
.profile-card,
.module-card,
.outcome-shell,
.module-dialog .dialog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lab-brief {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  padding: 34px;
  color: #e2e8f0;
  background:
    radial-gradient(circle at 86% 14%, rgba(34, 211, 238, 0.22), transparent 30%),
    radial-gradient(circle at 12% 88%, rgba(129, 140, 248, 0.24), transparent 34%),
    linear-gradient(135deg, var(--hero-bg), #111827 62%, #172554);
}

.lab-brief::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--hero-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-size: 30px 30px;
}

.lab-brief > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lab-brief h1 {
  max-width: 780px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.55rem, 5.5vw, 5rem);
  line-height: 1.02;
}

.lab-brief h1 span {
  display: block;
}

.tagline {
  max-width: 720px;
  margin: 20px 0 16px;
  color: #cffafe;
  font-size: 1.05rem;
  font-weight: 700;
}

.lead {
  max-width: 730px;
  margin: 0;
  color: #cbd5e1;
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.identity-grid div {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(203, 213, 225, 0.24);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.48);
}

.identity-grid span {
  display: block;
  margin-bottom: 4px;
  color: #67e8f9;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.identity-grid strong {
  display: block;
  color: #f8fafc;
  overflow-wrap: anywhere;
}

.stack-panel {
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(238, 242, 255, 0.82), rgba(255, 255, 255, 0.96)),
    var(--surface);
}

.neural-visual {
  position: relative;
  min-height: 190px;
  margin-bottom: 16px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background:
    radial-gradient(circle at 22% 25%, rgba(79, 70, 229, 0.18), transparent 18%),
    radial-gradient(circle at 78% 70%, rgba(6, 182, 212, 0.18), transparent 20%),
    #fff;
}

.neural-visual span {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--primary);
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.14);
}

.neural-visual span:nth-child(1) { left: 14%; top: 24%; }
.neural-visual span:nth-child(2) { left: 14%; bottom: 24%; border-color: var(--accent); }
.neural-visual span:nth-child(3) { left: 44%; top: 18%; border-color: var(--hero-violet); }
.neural-visual span:nth-child(4) { left: 44%; bottom: 18%; border-color: var(--accent); }
.neural-visual span:nth-child(5) { right: 14%; top: 30%; }
.neural-visual span:nth-child(6) { right: 14%; bottom: 24%; border-color: var(--hero-violet); }

.neural-visual i {
  position: absolute;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform-origin: left center;
  opacity: 0.5;
}

.neural-visual i:nth-of-type(1) { left: 22%; top: 34%; width: 56%; transform: rotate(12deg); }
.neural-visual i:nth-of-type(2) { left: 22%; top: 62%; width: 56%; transform: rotate(-13deg); }
.neural-visual i:nth-of-type(3) { left: 50%; top: 50%; width: 30%; transform: rotate(26deg); }

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 18px;
}

.stats-row article {
  min-height: 92px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.stats-row strong {
  display: block;
  color: var(--primary);
  font-size: 1.35rem;
  line-height: 1;
}

.stats-row span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.stack-heading {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.stack-heading h2,
.section-heading h2 {
  margin: 0 0 10px;
  color: var(--secondary);
  line-height: 1.12;
}

.stack-heading h2 {
  font-size: 1.5rem;
}

.stack-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.stack-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.stack-item b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-violet);
  color: var(--primary);
  font-size: 0.78rem;
}

.stack-item span {
  color: var(--secondary);
  font-size: 0.86rem;
  font-weight: 700;
}

.evidence-card {
  margin: 18px 0 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.evidence-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: center top;
}

.evidence-card figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.section {
  padding: 78px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 30px;
}

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

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.split-heading {
  max-width: none;
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 28px;
  align-items: end;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.profile-card {
  min-height: 285px;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.profile-card .label,
.module-type {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--surface-violet);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-card h3,
.module-card h3,
.outcome-card h3 {
  margin: 0 0 10px;
  color: var(--secondary);
  font-size: 1.06rem;
  line-height: 1.35;
}

.profile-card p,
.module-card p,
.outcome-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.pipeline-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(238, 242, 255, 0.46);
}

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

.module-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 370px;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.module-card.is-featured {
  border-color: rgba(79, 70, 229, 0.44);
  background:
    linear-gradient(180deg, rgba(236, 254, 255, 0.68), rgba(255, 255, 255, 0.98) 40%),
    #fff;
}

.module-number {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 11px;
  border-radius: 10px;
  background: var(--secondary);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.tag {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.module-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--secondary);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
}

.button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.button-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}

.button-primary:hover {
  color: #fff;
}

.outcome-shell {
  padding: 30px;
  background:
    linear-gradient(135deg, rgba(238, 242, 255, 0.82), rgba(236, 254, 255, 0.62)),
    #fff;
}

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

.outcome-card {
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.outcome-index {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--surface-violet);
  color: var(--primary);
  font-weight: 800;
}

.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
}

.footer-inner strong {
  color: var(--secondary);
}

.module-dialog {
  width: min(940px, calc(100% - 28px));
  max-height: min(820px, calc(100vh - 28px));
  padding: 0;
  border: 0;
  background: transparent;
}

.module-dialog::backdrop {
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(5px);
}

.dialog-card {
  position: relative;
  padding: 30px;
  color: var(--text);
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--secondary);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.dialog-card h2 {
  max-width: 760px;
  margin: 0 0 14px;
  color: var(--secondary);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.2;
}

.dialog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.model-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.model-note {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}

.model-note h3 {
  margin: 0 0 8px;
  color: var(--primary-dark);
  font-size: 0.88rem;
  text-transform: uppercase;
}

.model-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

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

  .lab-brief {
    min-height: auto;
  }

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

@media (max-width: 720px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .nav-shell {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 0;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .site-nav a {
    flex: 1;
    padding: 9px 8px;
    text-align: center;
  }

  .hero,
  .section {
    padding: 52px 0;
  }

  .lab-brief,
  .stack-panel,
  .outcome-shell,
  .dialog-card {
    padding: 20px;
  }

  .lab-brief h1 {
    font-size: clamp(1.78rem, 8vw, 2.35rem);
    line-height: 1.14;
  }

  .identity-grid,
  .stats-row,
  .profile-grid,
  .pipeline-grid,
  .outcome-grid,
  .model-card {
    grid-template-columns: 1fr;
  }

  .module-card,
  .profile-card,
  .outcome-card {
    min-height: auto;
  }

  .module-actions,
  .button {
    width: 100%;
  }

  .evidence-card img {
    height: 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
