/* Final foreground-color layer for reliable contrast in both themes. */
.skills-section .toolkit-status strong {
  color: #edc85f;
}

.skills-section .toolkit-status {
  background: rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .section:not(.skills-section):not(.contact-section) h2,
html[data-theme="light"] .section:not(.skills-section):not(.contact-section) h3,
html[data-theme="light"] .section:not(.skills-section):not(.contact-section) h4,
html[data-theme="light"] .section:not(.skills-section):not(.contact-section) strong,
html[data-theme="light"] .research-detail-hero h1,
html[data-theme="light"] .gallery-section h2 {
  color: #12211c;
}

html[data-theme="light"] .section-heading > p:not(.section-kicker),
html[data-theme="light"] .about-copy p,
html[data-theme="light"] .visual-card p,
html[data-theme="light"] .publication p,
html[data-theme="light"] .course-list span,
html[data-theme="light"] .timeline-item p,
html[data-theme="light"] .collaborator-card p,
html[data-theme="light"] .collaborator-card span,
html[data-theme="light"] .group-card p,
html[data-theme="light"] .research-detail-card p,
html[data-theme="light"] .early-work-card p,
html[data-theme="light"] .meta-list,
html[data-theme="light"] .gallery-preview-copy p {
  color: #536157;
}

html[data-theme="light"] .collaborator-links a,
html[data-theme="light"] .collaborator-links button,
html[data-theme="light"] .group-card > span,
html[data-theme="light"] .paper-title-link {
  color: #173f35;
}

html[data-theme="light"] :where(
  a,
  button,
  summary,
  input,
  .gallery-item,
  .collaborator-card,
  .group-card
):focus-visible {
  outline: 3px solid #9b3f2f;
  outline-offset: 4px;
}

html[data-theme="light"] .filter-button.active,
html[data-theme="light"] .filter-button:focus-visible {
  color: #ffffff;
  border-color: #173f35;
  background: #173f35 !important;
}

html[data-theme="light"] .nav-links a:focus-visible,
html[data-theme="light"] .nav-more summary:focus-visible,
html[data-theme="light"] .hero-social a:focus-visible,
html[data-theme="light"] .hero-links a:focus-visible,
html[data-theme="light"] .collaborator-links a:focus-visible,
html[data-theme="light"] .collaborator-links button:focus-visible {
  color: #ffffff;
  background: #173f35;
  box-shadow: 0 0 0 4px #f0a18a;
}

html[data-theme="light"] .theme-toggle:focus-visible,
html[data-theme="light"] .nav-toggle:focus-visible,
html[data-theme="light"] .dialog-close:focus-visible,
html[data-theme="light"] .gallery-lightbox-close:focus-visible {
  color: #ffffff;
  border-color: #173f35;
  background: #173f35;
}

html[data-theme="dark"] .section:not(.skills-section):not(.contact-section) h2,
html[data-theme="dark"] .section:not(.skills-section):not(.contact-section) h3,
html[data-theme="dark"] .section:not(.skills-section):not(.contact-section) h4,
html[data-theme="dark"] .section:not(.skills-section):not(.contact-section) strong,
html[data-theme="dark"] .research-detail-hero h1,
html[data-theme="dark"] .gallery-section h2 {
  color: #f4f0e6;
}

html[data-theme="dark"] .section-heading > p:not(.section-kicker),
html[data-theme="dark"] .about-copy p,
html[data-theme="dark"] .visual-card p,
html[data-theme="dark"] .publication p,
html[data-theme="dark"] .course-list span,
html[data-theme="dark"] .timeline-item p,
html[data-theme="dark"] .collaborator-card p,
html[data-theme="dark"] .collaborator-card span,
html[data-theme="dark"] .group-card p,
html[data-theme="dark"] .research-detail-card p,
html[data-theme="dark"] .early-work-card p,
html[data-theme="dark"] .meta-list,
html[data-theme="dark"] .gallery-preview-copy p {
  color: #c8cec6;
}

html[data-theme="dark"] .profile-card .profile-label,
html[data-theme="dark"] .timeline-item time,
html[data-theme="dark"] .mini-label {
  color: #f19a82;
}

html[data-theme="dark"] .hero .eyebrow {
  color: #f19a82;
}

html[data-theme="dark"] .hero .button.secondary {
  color: #f4f0e6;
  border-color: #789083;
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .hero .button.secondary:hover,
html[data-theme="dark"] .hero .button.secondary:focus-visible {
  color: #161816;
  border-color: #f19a82;
  background: #f19a82;
}

html[data-theme="dark"] .profile-card h2,
html[data-theme="dark"] .profile-card .profile-facts dd,
html[data-theme="dark"] .course-list strong {
  color: #f4f0e6;
}

html[data-theme="dark"] .profile-card .profile-facts dt,
html[data-theme="dark"] .toolkit-status,
html[data-theme="dark"] .module-head span,
html[data-theme="dark"] .toolkit-footer {
  color: #c8cec6;
}

html[data-theme="dark"] .filter-button {
  color: #d5dad2;
}

html[data-theme="dark"] .filter-button:hover,
html[data-theme="dark"] .filter-button:focus-visible,
html[data-theme="dark"] .filter-button.active {
  color: #ffffff;
  border-color: #f19a82;
}

html[data-theme="dark"] .collaborator-links a,
html[data-theme="dark"] .collaborator-links button,
html[data-theme="dark"] .group-card > span,
html[data-theme="dark"] .paper-title-link,
html[data-theme="dark"] .site-footer a {
  color: #f4f0e6;
}

html[data-theme="dark"] .publication:hover h3,
html[data-theme="dark"] .publication:hover p,
html[data-theme="dark"] .collaborator-card:hover h4,
html[data-theme="dark"] .collaborator-card:hover p,
html[data-theme="dark"] .collaborator-card:hover span,
html[data-theme="dark"] .group-card:hover h4,
html[data-theme="dark"] .group-card:hover p,
html[data-theme="dark"] .group-card:hover span {
  color: #ffffff;
}

html[data-theme="dark"] .research-compass text,
html[data-theme="dark"] .visual-card svg text,
html[data-theme="dark"] .decision-loop text {
  fill: #f4f0e6;
}

html[data-theme="dark"] .interests-section .visual-card:hover svg text,
html[data-theme="dark"] .research-compass {
  color: #f4f0e6;
}
