/* Stanford-inspired theme: official Cardinal, Black, White, Fog and Poppy.
   Source: identity.stanford.edu/design-elements/color/ and /typography/.
   Microscopy pixels, target coordinates and animation timing stay unchanged. */
:root {
  --ink: #2e2d29;
  --muted: #53565a;
  --dark: #2e2d29;
  --dark-deep: #23221f;
  --paper: #ffffff;
  --pale: #f4f4f4;
  --line: #d5d5d4;
  --accent: #8c1515;
  --light-text: #dad7cb;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

::selection { background: #8c1515; color: #fff; }
a:focus-visible, summary:focus-visible, button:focus-visible {
  outline-color: #b83a4b;
}
h1, h2 { font-family: var(--serif); font-weight: 400; }
h2 { letter-spacing: -.035em; }
h2 em { color: #8c1515; }
.eyebrow, .small-heading { font-size: .875rem; letter-spacing: .1em; }
.section-number, .research-index, .timeline-date { color: #767674; }

.site-header {
  background: #fff;
  color: var(--ink);
  border-top: 4px solid #8c1515;
  border-bottom: 1px solid #d5d5d4;
}
.header-inner { min-height: 84px; }
.wordmark { color: #8c1515; font-size: 1.4rem; font-weight: 600; }
.wordmark-degree { color: #53565a; font-size: .875rem; }
nav a { color: #43423e; font-size: 1rem; }
nav a:hover, nav a[aria-current="location"] { color: #8c1515; }
nav .nav-contact { border-color: #8c1515; color: #8c1515; }
nav .nav-contact:hover { background: #f4f4f4; border-color: #820000; }

.hero { background: var(--pale); color: var(--ink); }
.hero-grid { padding-top: 4rem; padding-bottom: 4rem; gap: 3.5rem; }
.light-eyebrow { color: #8c1515; }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.75rem, 4.35vw, 4.75rem);
  letter-spacing: -.045em;
  line-height: 1.13;
}
.hero h1 em { color: #8c1515; letter-spacing: -.04em; line-height: 1.17; }
.hero-description { color: #53565a; font-size: 1.125rem; line-height: 1.7; }
.hero-role { color: #585754; font-size: 1rem; }
.hero-role span { color: #979694; }
.primary-button {
  background: #8c1515;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: .9rem 1.4rem;
}
.primary-button:hover { background: #820000; }
.hero-bottom { border-color: #d5d5d4; color: #585754; font-size: .875rem; }
.section-coordinate { color: #6d6c69; }

.hero-figure {
  --accent: #f9a44a;
  width: min(100%, 470px);
  padding: 1.6rem 1.5rem 1.35rem;
  background: #2e2d29;
  color: #fff;
  border-top: 4px solid #8c1515;
}
.demo-heading { margin-bottom: 1.45rem; }
.demo-heading h2 {
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 2.6vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.2;
}
.demo-heading p { color: #dad7cb; font-size: 1rem; line-height: 1.5; margin-top: .45rem; }
.demo-topline { color: #d5d5d4; font-size: .875rem; }
.opto-frame { border-color: #585754; }
.demo-stage { color: #fff; }
.demo-stage strong { font-size: 1rem; }
.demo-stage > span { color: #dad7cb; font-size: .875rem; }
.demo-timeline { color: #d5d5d4; font-size: .875rem; gap: .75rem; }
.demo-timeline i { background: #6d6c69; }
.demo-timeline > span.is-active { color: #f9a44a; }
.demo-timeline > span.is-active i { background: #f9a44a; }
.demo-timeline > span.is-done i { background: #dad7cb; }
.demo-controls { flex-wrap: wrap; border-color: #585754; }
.demo-control {
  color: #fff;
  border-color: #979694;
  min-height: 44px;
  font-size: 1rem;
}
.demo-control:hover { background: #43423e; border-color: #dad7cb; }
.demo-count { color: #dad7cb; font-size: .8125rem; }
.time-jump { background: #2e2d29; color: #fff; }
.time-jump small { color: #dad7cb; font-size: 1rem; }
.hero-figure figcaption { color: #dad7cb; }
.figure-title { color: #fff; font-size: 1.125rem; }
.figure-credit { color: #d5d5d4; font-size: .875rem; }
.animation-note { color: #dad7cb; font-size: .875rem; }
.figure-details { border-color: #585754; }
.figure-details summary { color: #fff; font-size: 1rem; min-height: 44px; }
.figure-details p { color: #dad7cb; }
.figure-details strong { color: #fff; }
.figure-source { color: #f9a44a; font-size: 1rem; }

.inline-link { border-color: #b83a4b; color: #8c1515; font-size: 1rem; }
.inline-link:hover { color: #820000; border-color: #820000; }
.method-list li, .publication-heading .publication-name-note { color: #53565a; }
.method-list li:before { color: #b83a4b; }
.publication-list, .publication, .earlier-publications[open] summary { border-color: #d5d5d4; }
.publication-meta { color: #8c1515; font-size: .875rem; }
.publication-meta time { color: #53565a; border-color: #b6b1a9; }
.publication-meta .preprint-tag { background: #fff; border-color: #b6b1a9; color: #544948; }
.publication-meta .tool-tag { border-color: #b83a4b; color: #8c1515; }
.publication h3 a:hover { text-decoration-color: #8c1515; }
.publication h3 a > span { color: #8c1515; }
.authors, .publication-note { color: #53565a; }
.authors strong { color: #2e2d29; }
.publication-featured:before { background: #8c1515; }
.earlier-publications summary { color: #8c1515; }
.earlier-publications summary:hover { color: #820000; }
.profile-heading h2 span, .profile-role { color: #53565a; }
.profile-role { font-size: 1rem; }
.timeline li { border-color: #d5d5d4; }
.timeline li:before { background: #8c1515; }
.timeline li > .timeline-detail { color: #53565a !important; }

.contact { --accent: #fff; background: #820000; color: #fff; }
.contact .light-eyebrow, .contact h2 em { color: #fff; }
.contact p:not(.eyebrow):not(.small-heading), .contact .section-number,
.contact-details .small-heading { color: #eaeaea; }
.email-link { border-color: #ffffff80; color: #fff; }
.email-link:hover { color: #fff; border-color: #fff; }
address, .contact-links a { color: #fff; }
.site-footer { color: #d5d5d4; }
.footer-top > a { color: #fff; }
.footer-top > a:hover { color: #dad7cb; }
.credits a { text-decoration-color: #979694; }

@media (max-width: 1100px) {
  .hero-grid { gap: 2.5rem; }
  .hero-figure { padding: 1.35rem 1.15rem 1.2rem; }
}
@media (max-width: 800px) {
  .hero-grid { padding-top: 3rem; gap: 3rem; }
  .hero h1 { font-size: clamp(2.85rem, 7.2vw, 4.4rem); }
  .hero-figure { width: min(100%, 510px); padding: 1.6rem; }
  .demo-heading h2 { font-size: 2.25rem; }
  .hero-description { max-width: 540px; }
  .contact-details { border-top-color: #ffffff50; }
}
@media (max-width: 520px) {
  .header-inner { min-height: 0; }
  .wordmark { font-size: 1.3rem; }
  nav a { font-size: .9375rem; }
  .hero-grid { padding-block: 2.5rem; gap: 2.5rem; }
  .hero h1 { font-size: clamp(2.35rem, 9.2vw, 3.4rem); }
  .hero-description { font-size: 1.0625rem; }
  .hero-role { font-size: .9375rem; }
  .hero-figure { padding: 1.2rem 1rem; }
  .demo-heading h2 { font-size: clamp(1.75rem, 7.5vw, 2.25rem); }
  .demo-heading p { font-size: .9375rem; }
  .demo-topline { font-size: .8125rem; gap: .6rem; flex-wrap: wrap; }
  .demo-timeline { font-size: .8125rem; gap: .5rem; }
  .demo-controls { row-gap: .65rem; }
  .demo-count { flex-basis: 100%; margin-left: 0; }
  .hero-bottom { font-size: .8125rem; }
}
