/* Agentic Sciences — Quant-prop aesthetic
   Inspired by Jane Street + Hudson River Trading
   Serif display, sans body, paper background, subtle accents */

:root {
  --paper:        #fdfdfc;
  --paper-warm:   #f5f4f1;
  --paper-cool:   #f9f8f5;
  --ink:          #1a1a1a;
  --text:         #1a1a1a;
  --text-secondary: #3d3d3d;
  --text-muted:   #707070;
  --text-light:   #999;
  --rule:         #e8e6e0;
  --rule-strong:  #c9c5be;
  --accent:       #1a5276;
  --accent-warm:  #5e2750;
  --accent-deep:  #0d3556;
  --hairline:     0.5px;
  --radius:       2px;
  --max-width:    760px;
  --max-width-narrow: 640px;
  --serif:        'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --sans:         'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:         'IBM Plex Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;

  /* legacy aliases for sub-pages */
  --bg: var(--paper);
  --bg-subtle: var(--paper-cool);
  --border: var(--rule);
  --font: var(--sans);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1, 'liga' 1;
}
a { color: var(--text); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent); }

/* ---------- Nav ---------- */
.nav {
  border-bottom: var(--hairline) solid var(--rule);
  padding: 0 32px;
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
.nav-brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.2px;
  color: var(--ink);
}
.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  font-weight: 400;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  padding: 120px 32px 96px;
  text-align: center;
  max-width: var(--max-width);
  margin: 0 auto;
}
.hero-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 28px;
  font-weight: 500;
}
.hero h1 {
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 500;
  letter-spacing: -1.5px;
  color: var(--ink);
  line-height: 1.05;
  margin-bottom: 24px;
}
.hero-tagline {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  font-style: italic;
  color: var(--text-secondary);
  letter-spacing: -0.5px;
  margin-bottom: 32px;
}
.hero-prose {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.85;
}
.hero-prose strong { color: var(--ink); font-weight: 500; }
.hero-cta {
  margin-top: 40px;
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: baseline;
}
.hero-cta a {
  font-size: 14px;
  letter-spacing: 0.3px;
  border-bottom: var(--hairline) solid var(--text);
  padding-bottom: 2px;
  color: var(--ink);
}
.hero-cta a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Sections ---------- */
.section {
  padding: 128px 32px;
}
.section.section-warm, .section-alt { background: var(--paper-warm); }
.section.section-cool { background: var(--paper-cool); }
.container {
  max-width: var(--max-width);
  margin: 0 auto;
}
.container-narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
}
.section-eyebrow {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 16px;
}
.section h2 {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -1px;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 20px;
}
.section h2.center { text-align: center; }
.section .lede {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 72px;
  max-width: 600px;
}
.section .lede.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Pipeline ---------- */
.pipeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 24px auto 0;
  max-width: 580px;
}
.pipeline-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-bottom: var(--hairline) solid var(--rule);
  align-items: baseline;
}
.pipeline-step:last-child { border-bottom: none; }
.pipeline-step .step-num {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  color: var(--text-light);
  font-feature-settings: 'lnum' 1;
}
.pipeline-step .step-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.pipeline-step .step-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- Use Cases ---------- */
.usecase {
  padding: 36px 0;
  border-top: var(--hairline) solid var(--rule);
}
.usecase:last-child { border-bottom: var(--hairline) solid var(--rule); }
.usecase-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}
.usecase-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 500;
}
.usecase-status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}
.usecase h3 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.4px;
  line-height: 1.25;
  margin-bottom: 20px;
}
.usecase-source {
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 18px;
  padding-left: 20px;
  border-left: 2px solid var(--rule-strong);
}
.usecase-output {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}
.usecase-output strong, .usecase-source strong { color: var(--ink); font-weight: 500; }
.usecase-results {
  list-style: none;
  padding: 0;
  margin: 16px 0 24px;
  font-feature-settings: 'lnum' 1;
}
.usecase-results li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  padding: 8px 0;
  border-bottom: var(--hairline) dashed var(--rule);
}
.usecase-results li:last-child { border-bottom: none; }
.usecase-results strong { color: var(--ink); font-weight: 500; }
.usecase-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
}
.usecase-links a {
  color: var(--accent);
  border-bottom: var(--hairline) solid var(--accent);
  padding-bottom: 1px;
}
.usecase-links a:hover { color: var(--accent-deep); }
.usecase-disclaim {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 36px;
  text-align: center;
  font-style: italic;
  line-height: 1.7;
}

/* ---------- Numbers display (inline, JS style) ---------- */
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 36px 32px;
  margin-top: 32px;
}
.number {
  font-feature-settings: 'lnum' 1;
}
.number .num {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: -1px;
}
.number .num-suffix {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: -0.5px;
}
.number .num-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin-top: 6px;
  line-height: 1.5;
}

/* ---------- Credentials list ---------- */
.credentials {
  margin-top: 56px;
  padding-top: 32px;
  border-top: var(--hairline) solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.credential-line {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
}
.credential-line .cred-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding-top: 3px;
}
.credential-line .cred-body strong { color: var(--ink); font-weight: 500; }
.note {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.75;
  margin-top: 32px;
  padding-top: 24px;
  border-top: var(--hairline) solid var(--rule);
  max-width: 580px;
}

/* ---------- Live links list ---------- */
.live-list {
  list-style: none;
  padding: 0;
  margin-top: 8px;
}
.live-list li {
  border-bottom: var(--hairline) solid var(--rule);
  padding: 24px 0;
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 24px;
  align-items: baseline;
}
.live-list li:first-child { border-top: var(--hairline) solid var(--rule); }
.live-list .live-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding-top: 4px;
  text-transform: uppercase;
}
.live-list .live-body h4 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}
.live-list .live-body h4 a { color: var(--ink); }
.live-list .live-body h4 a:hover { color: var(--accent); }
.live-list .live-body p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}
.live-list .live-arrow {
  color: var(--text-muted);
  font-size: 14px;
  padding-top: 6px;
}

/* ---------- Research areas ---------- */
.areas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 48px;
  margin-top: 16px;
}
.area h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.area p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- Founder ---------- */
.founder {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  align-items: start;
}
.founder-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(0.15);
}
.founder-info h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: -0.4px;
}
.founder-info .role {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.founder-info p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 12px;
}
.founder-info p strong { color: var(--ink); font-weight: 500; }
.founder-links {
  margin-top: 20px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 13px;
}
.founder-links a {
  color: var(--text-secondary);
  border-bottom: var(--hairline) solid var(--rule);
  padding-bottom: 1px;
}
.founder-links a:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Contact ---------- */
.contact-block { text-align: center; padding: 16px 0 0; }
.contact-primary {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.5px;
  border-bottom: var(--hairline) solid var(--ink);
  padding-bottom: 4px;
  display: inline-block;
}
.contact-primary:hover { color: var(--accent); border-bottom-color: var(--accent); }
.contact-routing {
  margin: 48px auto 0;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
}
.contact-routing .row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: var(--hairline) solid var(--rule);
  align-items: baseline;
}
.contact-routing .row:first-child { border-top: var(--hairline) solid var(--rule); }
.contact-routing .row a {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}
.contact-routing .row a:hover { color: var(--accent); }
.contact-routing .row span {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* ---------- Page header (sub-pages) ---------- */
.page-header {
  padding: 96px 32px 48px;
  border-bottom: var(--hairline) solid var(--rule);
}
.page-header .container { text-align: left; }
.page-header h1 {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -1.2px;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 12px;
}
.page-header p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 580px;
}

/* ---------- Sub-page (Research / Architecture) ---------- */
.divider {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 56px 0 24px;
}
.divider h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.divider .line { flex: 1; height: var(--hairline); background: var(--rule); }
.project {
  padding: 28px 0;
  border-top: var(--hairline) solid var(--rule);
}
.project:last-child { border-bottom: var(--hairline) solid var(--rule); }
.project h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
  color: var(--ink);
}
.project .meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.project .desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 14px;
}
.project .finding {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
  padding: 14px 18px;
  border-left: 2px solid var(--rule-strong);
  background: var(--paper-cool);
}
.project .finding strong { color: var(--ink); font-weight: 500; }
.materials {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
}
.materials a {
  color: var(--accent);
  border-bottom: var(--hairline) solid var(--accent);
  padding-bottom: 1px;
}
.materials a:hover { color: var(--accent-deep); }
.media-list {
  list-style: none;
  padding: 0;
}
.media-list li {
  padding: 10px 0;
  border-bottom: var(--hairline) solid var(--rule);
}
.media-list li:last-child { border-bottom: none; }
.media-list a { font-size: 14px; color: var(--text-secondary); }
.media-list a:hover { color: var(--ink); }

/* ---------- Cards (legacy, simplified) ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 48px;
}
.card {
  padding: 0;
  border: none;
  box-shadow: none;
}
.card:hover { box-shadow: none; }
.card-icon { display: none; }
.card h3 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
  color: var(--ink);
}
.card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- Hero stats (legacy, simplified) ---------- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 32px;
  padding: 24px 0;
}
.stat { text-align: left; }
.stat-number {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.8px;
  color: var(--ink);
}
.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin-top: 4px;
}

/* ---------- Diagram (architecture page) ---------- */
.diagram-svg {
  width: 100%;
  max-width: 720px;
  margin: 32px auto 48px;
  display: block;
}

/* ---------- Architecture grid blocks ---------- */
.group-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.3px;
  margin: 48px 0 18px;
  padding-bottom: 8px;
  border-bottom: var(--hairline) solid var(--rule);
  color: var(--ink);
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 36px;
  margin-bottom: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 16px;
}
.item { padding: 0; border: none; }
.item h4 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.2px;
  margin-bottom: 6px;
  color: var(--ink);
}
.item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.75;
}
.item p strong { color: var(--ink); font-weight: 500; }

/* ---------- Footer ---------- */
.footer {
  padding: 48px 32px 32px;
  border-top: var(--hairline) solid var(--rule);
  background: var(--paper-warm);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -0.2px;
}
.footer-links {
  display: flex;
  gap: 24px;
  font-size: 13px;
}
.footer-links a {
  color: var(--text-muted);
  letter-spacing: 0.3px;
}
.footer-links a:hover { color: var(--ink); }
.footer-copy {
  max-width: var(--max-width);
  margin: 32px auto 0;
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
  letter-spacing: 0.2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.3px;
  padding-bottom: 2px;
  border-bottom: var(--hairline) solid var(--text);
  color: var(--ink);
  font-weight: 400;
  transition: all 0.15s;
  background: transparent;
  border-radius: 0;
  border-top: none;
  border-left: none;
  border-right: none;
}
.btn:hover { color: var(--accent); border-bottom-color: var(--accent); }
.btn-primary, .btn-secondary, .btn-sm {
  padding: 0 0 1px 0;
  background: transparent;
  border: none;
  border-bottom: var(--hairline) solid var(--text);
  color: var(--ink);
  border-radius: 0;
}
.btn-primary:hover, .btn-secondary:hover, .btn-sm:hover {
  color: var(--accent);
  background: transparent;
  border-bottom-color: var(--accent);
}
.more-link { margin-top: 24px; font-size: 13px; }
.more-link a { color: var(--accent); border-bottom: var(--hairline) solid var(--accent); padding-bottom: 1px; }
.section-desc { font-size: 15px; color: var(--text-muted); margin-bottom: 32px; line-height: 1.75; max-width: 580px; }
.section-title { /* alias for h2 used in older templates */ }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .hero { padding: 80px 24px 60px; }
  .hero h1 { font-size: 44px; }
  .hero-tagline { font-size: 22px; }
  .section { padding: 80px 24px; }
  .section h2 { font-size: 32px; }
  .nav { padding: 0 20px; }
  .nav-links { gap: 20px; }
  .pipeline-step { grid-template-columns: 60px 1fr; gap: 16px; }
  .pipeline-step .step-num { font-size: 24px; }
  .pipeline-step .step-name { font-size: 18px; }
  .live-list li { grid-template-columns: 1fr; gap: 8px; }
  .live-list .live-tag { padding-top: 0; }
  .live-list .live-arrow { display: none; }
  .areas { grid-template-columns: 1fr; gap: 32px; }
  .cards { grid-template-columns: 1fr; }
  .grid, .grid-3 { grid-template-columns: 1fr; gap: 24px; }
  .founder { grid-template-columns: 1fr; gap: 20px; text-align: center; }
  .founder-photo { margin: 0 auto; }
  .founder-links { justify-content: center; }
  .credential-line { grid-template-columns: 1fr; gap: 4px; }
  .contact-routing .row { grid-template-columns: 1fr; gap: 4px; }
  .contact-primary { font-size: 22px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
