/* AI for Biology — dark biotech aesthetic */
:root {
  --bg: #060b14;
  --bg-elevated: #0c1524;
  --bg-card: #101b2e;
  --bg-card-hover: #152338;
  --border: rgba(45, 212, 191, 0.14);
  --border-strong: rgba(45, 212, 191, 0.28);
  --text: #e8eef7;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --teal: #14b8a6;
  --teal-bright: #2dd4bf;
  --emerald: #34d399;
  --sky: #38bdf8;
  --accent-glow: rgba(20, 184, 166, 0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --max: 1120px;
  --narrow: 720px;
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--teal-bright);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
a:hover { color: var(--emerald); }
a:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--teal);
  color: #042f2e;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}
.wrap.narrow { width: min(100% - 2.5rem, var(--narrow)); }

/* Background DNA motif */
.bg-motif {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-motif::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(20, 184, 166, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(56, 189, 248, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 50% at 70% 90%, rgba(52, 211, 153, 0.06), transparent 50%);
}
.helix {
  position: absolute;
  right: -2%;
  top: 8%;
  width: min(280px, 28vw);
  height: 85vh;
  opacity: 0.55;
  filter: blur(0.2px);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(6, 11, 20, 0.78);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1.5rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--teal), var(--emerald) 55%, var(--sky));
  box-shadow: 0 0 18px var(--accent-glow);
  position: relative;
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1.5px solid rgba(6, 11, 20, 0.55);
  border-radius: 3px;
  border-top-color: transparent;
  border-left-color: transparent;
  transform: rotate(45deg);
}
.nav {
  display: flex;
  gap: 1.75rem;
}
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.nav a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 18px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1.25rem 1.25rem;
  background: rgba(6, 11, 20, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.mobile-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.75rem 0.5rem;
  border-radius: 8px;
  font-weight: 500;
}
.mobile-nav a:hover { background: var(--bg-card); }
.mobile-nav:not([hidden]) { display: flex; }

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

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  padding: clamp(4rem, 12vw, 8rem) 0 clamp(5rem, 10vw, 7rem);
  min-height: calc(88vh - var(--header-h));
  display: flex;
  align-items: center;
}
.hero-inner { max-width: 760px; }
.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin: 0 0 1.25rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.08);
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(3rem, 9vw, 5.25rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  background: linear-gradient(120deg, #f0fdfa 10%, var(--teal-bright) 45%, var(--emerald) 70%, var(--sky));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline {
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  color: var(--text-muted);
  max-width: 36em;
  margin: 0 0 2rem;
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--teal), #0d9488);
  color: #042f2e;
  border: none;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.3), 0 8px 28px rgba(20, 184, 166, 0.25);
}
.btn-primary:hover {
  color: #022c26;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.5), 0 10px 36px rgba(20, 184, 166, 0.35);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--teal-bright);
  background: rgba(20, 184, 166, 0.06);
  color: var(--text);
}
.hero-note {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0;
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}
.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.75rem;
  font-weight: 500;
}
.section h2 {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--text);
}
.section-intro {
  color: var(--text-muted);
  margin: 0 0 2.5rem;
  max-width: 40em;
}
.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0 0 2.5rem;
}

/* Why / flow */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
}
.flow-step {
  flex: 1 1 120px;
  padding: 1.1rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}
.flow-step span {
  display: block;
  font-weight: 600;
  color: var(--teal-bright);
  margin-bottom: 0.25rem;
}
.flow-step small {
  color: var(--text-dim);
  font-size: 0.8rem;
}
.flow-arrow {
  display: flex;
  align-items: center;
  color: var(--text-dim);
  font-size: 1.1rem;
  padding: 0 0.15rem;
}
@media (max-width: 600px) {
  .flow-arrow { display: none; }
  .flow-step { flex: 1 1 calc(50% - 0.5rem); }
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid rgba(20, 184, 166, 0.25);
  margin-left: 0.35rem;
}
.tl-item {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1.25rem 1.5rem;
  padding: 0 0 2.25rem 1.5rem;
  position: relative;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.2), 0 0 16px var(--accent-glow);
}
.tl-year {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--teal-bright);
  padding-top: 0.2rem;
  letter-spacing: 0.02em;
}
.tl-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem 1.4rem;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.tl-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}
.tl-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.tl-card p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}
.tl-card p:last-child { margin-bottom: 0; }
.cite {
  font-family: var(--mono);
  font-size: 0.72rem !important;
  color: var(--text-dim) !important;
  letter-spacing: 0.02em;
}
.mini-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.mini-cards span {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid var(--border);
  color: var(--teal-bright);
}
@media (max-width: 640px) {
  .tl-item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .tl-year { padding-top: 0; }
}

/* Frontiers cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-top: 0.5rem;
}
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .card-grid { grid-template-columns: 1fr; }
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.6rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.card-icon {
  font-size: 1.35rem;
  color: var(--teal-bright);
  margin-bottom: 0.85rem;
  line-height: 1;
}
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}
.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* Numbers */
.numbers {
  background: linear-gradient(180deg, transparent, rgba(20, 184, 166, 0.04), transparent);
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
}
.stat {
  padding: 1.6rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat-value {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1.1;
  color: var(--teal-bright);
  margin-bottom: 0.65rem;
  letter-spacing: -0.02em;
}
.stat-label {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Sources */
.source-list {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
  counter-reset: src;
}
.source-list li {
  counter-increment: src;
  display: grid;
  gap: 0.25rem;
  padding: 1.1rem 0 1.1rem 2.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  position: relative;
}
.source-list li::before {
  content: counter(src);
  position: absolute;
  left: 0;
  top: 1.15rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--teal);
  width: 1.5rem;
}
.source-list a {
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
}
.source-list a:hover {
  color: var(--teal-bright);
  text-decoration: underline;
}
.src-meta {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-family: var(--mono);
}
.disclaimer {
  font-size: 0.88rem;
  color: var(--text-dim);
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(148, 163, 184, 0.25);
  background: rgba(12, 21, 36, 0.6);
  margin: 0;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding: 2.25rem 0 3rem;
  margin-top: 1rem;
}
.footer-inner {
  text-align: center;
}
.footer-inner p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.footer-meta {
  margin-top: 0.5rem !important;
  font-size: 0.8rem !important;
  color: var(--text-dim) !important;
  font-family: var(--mono);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card:hover, .tl-card:hover { transform: none; }
}
