/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--line-normal);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--charcoal);
  line-height: var(--line-tight);
  text-wrap: balance;
  margin: 0;
}
h2 { font-size: var(--fs-h2); font-weight: 500; }
h3 { font-size: var(--fs-h3); font-weight: 500; }
p { margin: 0 0 1em; max-width: 62ch; }
.wrap { max-width: var(--wrap-max); margin: 0 auto; padding: 0 1.5rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--charcoal); color: var(--white);
  padding: 0.75rem 1.25rem; border-radius: var(--radius);
}
.skip-link:focus { left: 1rem; top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Eyebrow / section labels ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 0.9rem; padding-bottom: 0.9rem;
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none;
}
.brand__mark { border-radius: 50%; }
.brand__word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: var(--charcoal);
}
.primary-nav {
  display: flex; align-items: center; gap: 1.9rem;
}
.primary-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--charcoal);
  padding: 0.3rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover { border-bottom-color: var(--accent); }
.primary-nav__cta {
  background: var(--accent);
  color: var(--white) !important;
  padding: 0.55rem 1.1rem !important;
  border-radius: 999px;
  border-bottom: none !important;
}
.primary-nav__cta:hover { background: var(--accent-deep); }

.nav-toggle {
  display: none;
  flex-direction: column; gap: 4px;
  width: 40px; height: 40px; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--rule); border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle__bar { width: 18px; height: 2px; background: var(--charcoal); }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--rule);
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 0.5rem 1.5rem 1.25rem;
    display: none;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { width: 100%; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
  .primary-nav__cta { margin-top: 0.75rem; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer;
  padding: 0.85rem 1.6rem; border-radius: 999px; border: 1px solid transparent;
}
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-deep); }
.btn--ghost { background: transparent; color: var(--charcoal); border-color: var(--rule); }
.btn--ghost:hover { border-color: var(--charcoal); }

/* ---------- Sections ---------- */
section { padding: var(--space-6) 0; }
.section--tight { padding: var(--space-5) 0; }
.section--shaded { background: var(--bg-section); }
.section-head { max-width: 46rem; margin-bottom: var(--space-4); }
.section-head p { font-size: var(--fs-body-lg); color: var(--text-muted); }

/* ---------- Hero ---------- */
.hero {
  padding: var(--space-5) 0 var(--space-6);
  overflow: hidden;
  position: relative;
}
.hero__grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-5);
  align-items: center;
}
.hero h1 { font-weight: 500; margin-bottom: 1.25rem; font-size: var(--fs-h1); }
.hero__lede { font-size: var(--fs-body-lg); color: var(--text-muted); max-width: 42ch; }
.hero__actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.hero__art { width: 100%; height: auto; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 420px; margin: 2rem auto 0; }
}

/* ---------- Stat row ---------- */
.stat-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule); border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: var(--white); padding: var(--space-3) var(--space-3);
}
.stat__value {
  font-family: var(--font-display); font-weight: 600; color: var(--accent);
  font-size: clamp(1.8rem, 1.5rem + 1vw, 2.4rem);
  display: block; margin-bottom: 0.35rem;
}
.stat__label { color: var(--text-muted); font-size: 0.95rem; }
@media (max-width: 760px) { .stat-row { grid-template-columns: 1fr; } }

/* ---------- Card grid ---------- */
.card-grid { display: grid; gap: var(--space-3); }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .card-grid--2, .card-grid--3 { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: var(--space-3); background: var(--white);
}
.card h3 { font-size: var(--fs-h3); margin-bottom: 0.6rem; }
.card p:last-child { margin-bottom: 0; }

/* ---------- Pillars / icon row ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
@media (max-width: 920px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }
.pillar__icon { width: 44px; height: 44px; margin-bottom: 1rem; color: var(--accent); }
.pillar h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.pillar p { font-size: 0.97rem; color: var(--text-muted); margin-bottom: 0; }

/* ---------- Quote / callout ---------- */
.callout {
  border-left: 3px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--charcoal);
  max-width: 48rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--charcoal); color: var(--white);
  border-radius: 8px; padding: var(--space-5) var(--space-4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); max-width: 28rem; }
.cta-band .btn--primary { background: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: var(--space-5) 0 var(--space-4);
  background: var(--gray-lighter);
}
.site-footer__inner {
  display: grid; grid-template-columns: 1fr 2fr 1.2fr; gap: var(--space-4);
}
.site-footer__brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; color: var(--charcoal); }
.site-footer__nav { display: flex; flex-direction: column; gap: 0.5rem; }
.site-footer__nav a { text-decoration: none; color: var(--text-muted); font-size: 0.95rem; }
.site-footer__nav a:hover { color: var(--accent); }
.site-footer__meta { font-size: 0.9rem; color: var(--text-muted); }
.site-footer__meta a { text-decoration: none; color: var(--charcoal); }
.site-footer__fine { font-size: 0.8rem; max-width: 34ch; }
@media (max-width: 760px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}

/* ---------- Split (art + text, alternating) ---------- */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); align-items: center;
}
.split--reverse .split__art { order: -1; }
.split__art img { width: 100%; height: auto; }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; gap: var(--space-4); }
  .split--reverse .split__art { order: 0; }
  .split__art { max-width: 380px; margin: 0 auto; }
}

/* ---------- Feature list (no cards; rule-separated) ---------- */
.feature-list { border-top: 1px solid var(--rule); }
.feature-item {
  display: grid; grid-template-columns: 11rem 1fr; gap: var(--space-3);
  padding: var(--space-3) 0; border-bottom: 1px solid var(--rule);
}
.feature-item h3 { font-size: 1.2rem; margin-bottom: 0; }
.feature-item p { margin-bottom: 0; color: var(--text-muted); }
@media (max-width: 700px) { .feature-item { grid-template-columns: 1fr; gap: 0.4rem; } }

/* ---------- Timeline (vertical, qualitative stages) ---------- */
.timeline { position: relative; padding-left: 2.25rem; border-left: 2px solid var(--rule); }
.timeline__item { position: relative; padding-bottom: var(--space-4); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: -2.56rem; top: 0.35rem;
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
  border: 3px solid var(--white); box-shadow: 0 0 0 1px var(--rule);
}
.timeline__item h3 { margin-bottom: 0.4rem; }
.timeline__item p { color: var(--text-muted); margin-bottom: 0; }

/* ---------- Domain list (paired with overlapping-circle art) ---------- */
.domain-list { display: flex; flex-direction: column; gap: 1.4rem; }
.domain-list dt { font-family: var(--font-display); font-size: 1.15rem; color: var(--charcoal); margin-bottom: 0.25rem; }
.domain-list dd { margin: 0; color: var(--text-muted); }

/* ---------- Software row ---------- */
.software-row {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--space-4);
  align-items: center; padding: var(--space-4) 0; border-bottom: 1px solid var(--rule);
}
.software-row:last-child { border-bottom: none; }
.software-row__art img { width: 100%; }
.software-row h3 { margin-bottom: 0.5rem; }
.software-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px; padding: 0.2rem 0.65rem;
  margin-bottom: 0.75rem;
}
@media (max-width: 820px) { .software-row { grid-template-columns: 1fr; } }

/* ---------- Simple inner-page section without heavy shading ---------- */
.prose { max-width: 60rem; }
.prose p { font-size: var(--fs-body-lg); color: var(--charcoal); }
.prose p.lede { color: var(--text-muted); }

/* ---------- Leadership ---------- */
.lead-note {
  border: 1px dashed var(--rule); border-radius: var(--radius);
  padding: var(--space-3); color: var(--text-muted); font-size: 0.95rem;
}

/* ---------- Contact ---------- */
.contact-card {
  border: 1px solid var(--rule); border-radius: 8px; padding: var(--space-4);
  max-width: 34rem;
}
.contact-card a.btn { margin-top: 1rem; }

/* ---------- Equations ---------- */
.equation-block {
  position: relative;
  border: 1px solid var(--rule); border-radius: 8px;
  padding: var(--space-4) var(--space-4) var(--space-3);
  background: var(--white);
  margin: var(--space-3) 0;
}
.equation-block__number {
  position: absolute; top: 1.1rem; right: 1.4rem;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent);
  letter-spacing: 0.04em;
}
.equation-block__name {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.75rem;
}
.equation-block .katex-display { margin: 0.5rem 0 1.25rem; overflow-x: auto; overflow-y: hidden; }
.equation-block .katex { color: var(--charcoal); font-size: 1.08em; }
.equation-defs { display: grid; grid-template-columns: 1fr; gap: 0.4rem 1.5rem; font-size: 0.92rem; }
.equation-defs dt { font-family: var(--font-mono); color: var(--accent); display: inline; }
.equation-defs dd { display: inline; margin: 0 0 0 0.4rem; color: var(--text-muted); }
.equation-defs div { padding: 0.15rem 0; border-bottom: 1px dotted var(--rule); }
.equation-cite { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.75rem; }
.equation-cite a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); }

/* Hero equation -- the Pennes bioheat centerpiece */
.equation-hero {
  position: relative; overflow: hidden;
  border-radius: 10px; border: 1px solid var(--rule);
  padding: var(--space-5) var(--space-4) var(--space-4);
  background: var(--white);
}
.equation-hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.14; pointer-events: none;
}
.equation-hero__inner { position: relative; z-index: 1; }
.equation-hero .katex-display { margin: 1.25rem 0 2rem; }
.equation-hero .katex { color: var(--charcoal); font-size: 1.3em; }
.equation-hero__terms {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem;
  margin-top: 1.5rem;
}
.equation-hero__term {
  border-top: 2px solid var(--accent); padding-top: 0.6rem;
}
.equation-hero__term h4 {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.02em;
  color: var(--charcoal); margin-bottom: 0.3rem; font-weight: 500;
}
.equation-hero__term p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0; }
@media (max-width: 820px) {
  .equation-hero__terms { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .equation-hero__terms { grid-template-columns: 1fr; }
}

/* ---------- References ---------- */
.ref-list { border-top: 1px solid var(--rule); }
.ref-list details {
  border-bottom: 1px solid var(--rule); padding: 1rem 0;
}
.ref-list summary {
  cursor: pointer; font-family: var(--font-display); font-size: 1.05rem;
  color: var(--charcoal); list-style: none;
}
.ref-list summary::-webkit-details-marker { display: none; }
.ref-list summary::before {
  content: "+"; color: var(--accent); font-family: var(--font-mono);
  margin-right: 0.6rem; font-weight: 700;
}
.ref-list details[open] summary::before { content: "\2212"; }
.ref-list__body { margin-top: 0.75rem; color: var(--text-muted); font-size: 0.95rem; }
.ref-list__body a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); }
.ref-list__cat { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Comparison table (measurement modalities) ---------- */
.modal-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.modal-table th, .modal-table td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.modal-table th { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); font-weight: 500; }
.modal-table td:first-child, .modal-table th:first-child { font-family: var(--font-display); color: var(--charcoal); white-space: nowrap; }
.table-scroll { overflow-x: auto; }

/* ---------- Page header (inner pages) ---------- */
.page-head {
  padding: var(--space-5) 0 var(--space-4);
  border-bottom: 1px solid var(--rule);
}
.page-head h1 { margin-bottom: 1rem; }
.page-head p { font-size: var(--fs-body-lg); color: var(--text-muted); max-width: 48rem; }
