:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --text: #111113;
  --text-2: #55565c;
  --text-3: #8a8b91;
  --border: #e6e6e9;
  --accent: #2563eb;
  --accent-soft: #eef3fe;
  --btn-dark-bg: #111113;
  --btn-dark-fg: #ffffff;
  --radius: 10px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f11;
    --bg-soft: #17181b;
    --text: #f2f2f3;
    --text-2: #a9aab0;
    --text-3: #75767c;
    --border: #26272b;
    --accent: #6b9bff;
    --accent-soft: #172036;
    --btn-dark-bg: #f2f2f3;
    --btn-dark-fg: #0e0f11;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.accent { color: var(--accent); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 600; text-decoration: none; font-size: 15px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { text-decoration: none; font-size: 14px; color: var(--text-2); transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: var(--text); margin: 5px 0; transition: transform .2s; }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 64px; align-items: center;
  padding-top: 88px; padding-bottom: 72px;
}
.eyebrow { color: var(--text-3); font-size: 15px; margin: 0 0 14px; }
.hero h1 { font-size: clamp(36px, 5.2vw, 56px); font-weight: 600; letter-spacing: -0.035em; }
.lede { font-size: 18px; color: var(--text-2); max-width: 540px; margin: 22px 0 32px; }
.hero-photo img {
  width: 100%; height: auto; max-width: 380px; margin-left: auto;
  aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%;
  border-radius: 18px;
}

.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 11px 20px; border-radius: 8px; transition: transform .15s, opacity .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--btn-dark-bg); color: var(--btn-dark-fg); }
.btn-dark:hover { opacity: .88; }
.btn-ghost { border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text-3); }

/* Stats */
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding-top: 28px; padding-bottom: 28px; gap: 24px;
}
.stats strong { display: block; font-size: 30px; font-weight: 600; letter-spacing: -0.03em; }
.stats span { font-size: 13px; color: var(--text-2); }

/* Sections */
.section { padding-top: 104px; }
.section-head { margin-bottom: 40px; }
.kicker { font-size: 13px; color: var(--accent); font-weight: 500; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .08em; }
.section h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 600; }
.section-sub { color: var(--text-2); max-width: 620px; margin: 14px 0 0; }
.col-title { font-size: 13px; font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 20px; }
.col-title:not(:first-child) { margin-top: 44px; }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 56px; }
.prose p { margin: 0 0 18px; color: var(--text-2); font-size: 17px; }
.prose p:first-child { color: var(--text); }
.facts { background: var(--bg-soft); border-radius: 14px; padding: 26px 28px; align-self: start; }
.facts dl { margin: 0; }
.facts dt { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 2px 0 18px; font-size: 15px; }
.facts dd:last-child { margin-bottom: 0; }

/* Timeline */
.two-col { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 64px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline { position: relative; --p: 1; }
.timeline::before, .timeline::after {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 0; width: 1px; background: var(--border);
}
.timeline::after { background: var(--accent); transform-origin: top; transform: scaleY(var(--p)); }
.timeline li { position: relative; padding: 0 0 30px 24px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: 6px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  z-index: 1; transition: background-color .3s, transform .3s;
}
.timeline li.passed::before { background: var(--accent); transform: scale(1.15); }
.when { font-size: 13px; color: var(--text-3); }
.timeline h4 { font-size: 17px; font-weight: 600; margin: 2px 0 2px; }
.where { margin: 0 0 6px; font-size: 14px; color: var(--accent); }
.timeline p:not(.where) { margin: 0; font-size: 15px; color: var(--text-2); }

.honors { list-style: none; margin: 0; padding: 0; }
.honors li { display: flex; align-items: baseline; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.honors strong { display: block; font-weight: 500; }
.honors small { display: block; font-size: 13px; color: var(--text-3); line-height: 1.45; margin-top: 2px; }
.honors em { margin-left: auto; padding-left: 12px; font-style: normal; font-size: 13px; color: var(--text-3); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; transform: translateY(-2px); }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: 13px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-2); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card {
  border: 1px solid var(--border); border-radius: 14px; padding: 24px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--text-3); transform: translateY(-2px); }
.card h4 { font-size: 17px; font-weight: 600; margin: 14px 0 8px; line-height: 1.35; }
.card p { margin: 0; font-size: 14px; color: var(--text-2); }
.tag-pill { display: inline-block; font-size: 12px; font-weight: 500; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; }

/* Full list */
.more { margin-top: 28px; border-top: 1px solid var(--border); }
.more summary {
  cursor: pointer; list-style: none; padding: 20px 0; font-weight: 500; font-size: 15px;
  display: flex; align-items: center; gap: 8px;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+"; display: inline-block; width: 16px; color: var(--accent); font-size: 18px; transition: transform .2s; }
.more[open] summary::before { transform: rotate(45deg); }
.count { color: var(--text-3); font-weight: 400; }
.pub-list { list-style: none; margin: 0; padding: 0 0 8px; columns: 2; column-gap: 48px; }
.pub-list li { break-inside: avoid; padding: 12px 0; border-bottom: 1px solid var(--border); }
.pub-list strong { display: block; font-weight: 500; font-size: 15px; line-height: 1.4; }
.pub-list span { font-size: 13px; color: var(--text-3); }

/* Roadmap */
.roadmap { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.roadmap li { background: var(--bg-soft); border-radius: 14px; padding: 24px; }
.roadmap h4 { font-size: 17px; font-weight: 600; margin: 14px 0 8px; line-height: 1.35; }
.roadmap p { margin: 0; font-size: 14px; color: var(--text-2); }
.status { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; }
.status.now { background: #e7f6ec; color: #17663a; }
.status.next { background: var(--accent-soft); color: var(--accent); }
.status.later { background: var(--border); color: var(--text-2); }
@media (prefers-color-scheme: dark) {
  .status.now { background: #12301f; color: #6fd99a; }
}

/* Contact */
.contact { text-align: center; padding-bottom: 104px; }
.contact .section-sub { margin: 14px auto 28px; }
.contact .cta { justify-content: center; }

/* Footer */
.footer { border-top: 1px solid var(--border); }
.footer-inner { display: flex; justify-content: space-between; padding-top: 24px; padding-bottom: 24px; font-size: 13px; color: var(--text-3); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* Card links */
.card { display: flex; flex-direction: column; }
.card-link { margin-top: auto; padding-top: 14px; font-size: 13px; font-weight: 500; color: var(--accent); text-decoration: none; }
.card-link:hover { text-decoration: underline; }

/* 3D heart feature */
.heart-feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: center;
  background: var(--bg-soft); border-radius: 18px; padding: 32px; margin-bottom: 48px;
}
.heart-copy h3 { font-size: 24px; font-weight: 600; margin: 14px 0 12px; letter-spacing: -0.02em; }
.heart-copy p { color: var(--text-2); margin: 0 0 12px; font-size: 15px; }
.heart-copy .hint { font-size: 13px; color: var(--text); font-weight: 500; }
.heart-copy .credit { font-size: 12px; color: var(--text-3); margin: 0; }
.heart-stage { position: relative; height: 400px; }
.heart-stage model-viewer { width: 100%; height: 100%; --poster-color: transparent; background: transparent; }
.heart-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-3); pointer-events: none; transition: opacity .4s;
}
.heart-stage.loaded .heart-loading { opacity: 0; }

/* Heartbeat underline */
.heart-word { position: relative; display: inline-block; }
.ecg { position: absolute; left: -4%; width: 108%; bottom: -0.3em; height: 0.45em; overflow: visible; }
.ecg path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ecg-base { opacity: .35; }
.ecg-pulse { stroke-dasharray: 0 100; opacity: 0; }
.js .ecg-base { stroke-dasharray: 100; stroke-dashoffset: 100; animation: ecgDraw 1.3s ease-out .9s forwards; }
.js .ecg-pulse { animation: ecgPulse 3.2s ease-in-out 2.4s infinite; }
@keyframes ecgDraw { to { stroke-dashoffset: 0; } }
@keyframes ecgPulse {
  0% { stroke-dasharray: 14 100; stroke-dashoffset: 14; opacity: 1; }
  55% { stroke-dasharray: 14 100; stroke-dashoffset: -100; opacity: 1; }
  56%, 100% { stroke-dasharray: 14 100; stroke-dashoffset: -100; opacity: 0; }
}

/* Live "Now" dot */
.status.now { display: inline-flex; align-items: center; gap: 6px; }
.status.now::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  animation: livePulse 2s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 50%, transparent); }
  70%, 100% { box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 0%, transparent); }
}

/* Hero intro on load */
.js .intro { opacity: 0; transform: translateY(14px); animation: introIn .8s cubic-bezier(.2, .7, .2, 1) var(--d, 0s) forwards; }
@keyframes introIn { to { opacity: 1; transform: none; } }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .intro { opacity: 1; transform: none; transition: none; animation: none; }
  .js .ecg-base { stroke-dashoffset: 0; animation: none; }
  .js .ecg-pulse, .status.now::before { animation: none; }
}

/* Responsive */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 48px; }
  .hero-photo { order: -1; }
  .hero-photo img { max-width: 200px; margin: 0; border-radius: 50%; aspect-ratio: 1; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid, .two-col { grid-template-columns: 1fr; gap: 40px; }
  .pub-list { columns: 1; }
  .section { padding-top: 80px; }

  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 24px 16px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links a { padding: 10px 0; font-size: 16px; }
  .nav.open .nav-links { display: flex; }
  .nav.open .nav-toggle span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .nav.open .nav-toggle span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
}
@media (max-width: 860px) {
  .heart-feature { grid-template-columns: 1fr; padding: 24px; gap: 8px; }
  .heart-stage { height: 320px; }
}
@media (max-width: 480px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .cards { grid-template-columns: 1fr; }
  .stats strong { font-size: 26px; }
}
