:root {
  --bg: #0b0f14;
  --bg-alt: #111820;
  --card: #151d28;
  --border: #243040;
  --text: #e8edf4;
  --muted: #8fa0b5;
  --accent: #3dd6c3;
  --accent2: #6ea8fe;
  --accent3: #f0a060;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0.85rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { font-weight: 700; color: var(--accent); font-size: 0.95rem; }
.nav-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-size: 0.875rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero {
  position: relative; padding: 5rem 0 4rem; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 40%, rgba(61, 214, 195, 0.08), transparent),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(110, 168, 254, 0.07), transparent),
    radial-gradient(ellipse 40% 30% at 60% 80%, rgba(240, 160, 96, 0.05), transparent);
}
.hero-content { position: relative; }
.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.75rem;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700; line-height: 1.25; margin-bottom: 1rem;
}
.lead { font-size: 1.05rem; color: var(--muted); max-width: 720px; margin-bottom: 2rem; }
.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}
.meta-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.85rem 1rem;
}
.meta-label { display: block; font-size: 0.75rem; color: var(--muted); margin-bottom: 0.2rem; }
.meta-value { font-weight: 600; font-size: 0.95rem; }

/* Sections */
.section { padding: 4rem 0; }
.section.alt { background: var(--bg-alt); }
.section h2 {
  font-size: 1.75rem; margin-bottom: 0.5rem;
  border-left: 3px solid var(--accent); padding-left: 0.75rem;
}
.section-intro { color: var(--muted); margin-bottom: 2rem; max-width: 720px; }
.subsection-title { font-size: 1.15rem; margin: 2rem 0 1rem; color: var(--accent2); }

/* Cards */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 1.05rem; margin-bottom: 0.75rem; }
.card p, .card li { color: var(--muted); font-size: 0.925rem; }
.card ul { padding-left: 1.2rem; }
.card li { margin-bottom: 0.35rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.note {
  margin-top: 1rem; padding: 0.85rem 1rem;
  background: rgba(61, 214, 195, 0.06); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9rem; color: var(--muted);
}

/* Tracks */
.track-list { list-style: none; padding: 0; }
.track-list li {
  display: flex; gap: 0.85rem; align-items: flex-start;
  margin-bottom: 1rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.track-list li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.track-badge {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem; font-weight: 600; padding: 0.25rem 0.5rem;
  border-radius: 4px; white-space: nowrap; margin-top: 0.15rem;
}
.track-badge.t1 { background: rgba(61, 214, 195, 0.15); color: var(--accent); }
.track-badge.t2 { background: rgba(240, 160, 96, 0.15); color: var(--accent3); }

/* Pipeline */
.pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.step {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  position: relative;
}
.step-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem; font-weight: 600; color: var(--accent);
  margin-bottom: 0.5rem;
}
.step h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.step ul { padding-left: 1.1rem; }
.step li { font-size: 0.875rem; color: var(--muted); margin-bottom: 0.25rem; }

.flow-diagram { margin-top: 0.5rem; }
.diagram {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem; color: var(--accent);
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem; border-radius: 8px;
  overflow-x: auto; white-space: pre;
  line-height: 1.5;
}

/* Resources */
.resource-card .big-num {
  font-size: 2rem; font-weight: 700; color: var(--accent);
  margin: 0.25rem 0 0.75rem;
}
.tool-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tool-tags span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem; padding: 0.35rem 0.7rem;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 6px; color: var(--muted);
}

/* Results */
.result-card ul { padding-left: 1.2rem; }
.result-card li { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.4rem; }
.deliverables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem; margin-top: 1rem;
}
.deliverable {
  display: flex; gap: 0.85rem; align-items: flex-start;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem;
}
.del-icon { font-size: 1.4rem; }
.deliverable strong { display: block; margin-bottom: 0.2rem; }
.deliverable p { font-size: 0.85rem; color: var(--muted); }

/* Table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead { background: rgba(61, 214, 195, 0.08); }
th, td { padding: 0.7rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--accent); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
td { color: var(--muted); }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
td code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem; color: var(--text);
}

/* Analysis findings */
.finding-banner {
  border-left: 4px solid var(--accent);
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
}
.finding-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.finding-text {
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 0.5rem;
  color: var(--text);
}

.variant-card { position: relative; }
.variant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.variant-rank {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  color: var(--muted);
}
.impact-badge {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}
.impact-badge.high { background: rgba(255, 90, 90, 0.15); color: #ff6b6b; }
.impact-badge.moderate { background: rgba(240, 160, 96, 0.15); color: var(--accent3); }
.variant-consequence {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  color: var(--accent2);
  margin-bottom: 0.75rem;
  text-transform: capitalize;
}
.variant-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}
.variant-details dt { color: var(--muted); font-weight: 500; }
.variant-details dd { color: var(--text); margin: 0; }
.variant-card.impact-high { border-color: rgba(255, 90, 90, 0.3); }
.variant-card.impact-moderate { border-color: rgba(240, 160, 96, 0.3); }
.compound-het { margin: 1.5rem 0; }
.highlight-row { background: rgba(61, 214, 195, 0.06); }
.highlight-row td:first-child { color: var(--accent); }

/* Drug repurposing */
.protein-map { margin-bottom: 1.5rem; }
.domain-track {
  position: relative; height: 36px; background: rgba(255,255,255,0.05);
  border-radius: 6px; margin: 1rem 0; border: 1px solid var(--border);
}
.domain-bar {
  position: absolute; top: 4px; height: 28px;
  background: rgba(110, 168, 254, 0.25); border: 1px solid var(--accent2);
  border-radius: 4px; font-size: 0.65rem; display: flex; align-items: center;
  justify-content: center; color: var(--accent2); overflow: hidden; white-space: nowrap;
}
.variant-marker {
  position: absolute; top: -8px; font-size: 0.9rem; color: #ff6b6b;
  transform: translateX(-50%); cursor: help;
}
.variant-marker.v2 { color: var(--accent3); }
.mechanism-card { margin-bottom: 1rem; }
.effect-tag {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  padding: 0.2rem 0.6rem; border-radius: 4px; margin-bottom: 0.75rem;
  background: rgba(61, 214, 195, 0.12); color: var(--accent);
}
.domain-ctx { font-size: 0.875rem; color: var(--accent2); margin-bottom: 0.75rem; }
.mech-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0.75rem;
}
.mech-grid p { font-size: 0.875rem; color: var(--muted); margin-top: 0.25rem; }
@media (max-width: 640px) { .mech-grid { grid-template-columns: 1fr; } }

.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0; text-align: center;
}
.footer p { color: var(--muted); font-size: 0.875rem; margin-bottom: 0.35rem; }

/* HPO match & Track 1 */
.coverage-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.coverage-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.coverage-stat .num { font-size: 1.75rem; font-weight: 700; display: block; }
.coverage-stat.direct .num { color: var(--accent); }
.coverage-stat.related .num { color: var(--accent3); }
.coverage-stat.mechanistic .num { color: var(--accent2); }
.coverage-stat .lbl { font-size: 0.8rem; color: var(--muted); }

.cov-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}
.cov-badge.direct { background: rgba(61, 214, 195, 0.15); color: var(--accent); }
.cov-badge.related { background: rgba(240, 160, 96, 0.15); color: var(--accent3); }
.cov-badge.mechanistic { background: rgba(110, 168, 254, 0.15); color: var(--accent2); }
.cov-badge.gap { background: rgba(255, 100, 100, 0.15); color: #ff8888; }

.btn-download {
  display: inline-block;
  margin: 0.75rem 0;
  padding: 0.65rem 1.25rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
}
.btn-download:hover { filter: brightness(1.1); text-decoration: none; }

.csv-preview {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  overflow-x: auto;
  white-space: pre;
  color: var(--muted);
  margin-top: 0.75rem;
}

.submission-dl { display: grid; gap: 0.5rem; }
.submission-dl dt { font-size: 0.75rem; color: var(--muted); }
.submission-dl dd { font-weight: 500; margin-bottom: 0.5rem; }

.workflow-ol {
  margin: 0.5rem 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.workflow-ol li { margin-bottom: 0.35rem; }

.gene-scan-card { margin-bottom: 0.75rem; }
.gene-scan-card ul { margin: 0.5rem 0 0 1rem; font-size: 0.875rem; }
.gene-scan-card li { margin-bottom: 0.25rem; }

@media (max-width: 640px) {
  .nav-inner { flex-direction: column; align-items: flex-start; }
  .hero { padding: 3rem 0 2.5rem; }
  .section { padding: 2.5rem 0; }
}
