.home-body,
:root,
html[data-theme="dark"] {
  --global-theme-color: #c8102e;
  --global-hover-color: #9f0d25;
  --global-code-bg-color: rgba(200, 16, 46, 0.06);
  --global-highlight-color: #c8102e;
}

a,
a:hover,
a:focus,
.publication-title-extra,
.publication-title-extra:hover,
.publication-title-link:hover,
.publication-control.active,
.publication-control:hover,
.citation,
.citation-number {
  color: #c8102e !important;
}

.publication-control.active,
.publication-control:hover {
  border-color: #c8102e !important;
}

.home-body a,
.home-body a:hover,
.home-body a:focus,
.navbar .navbar-nav .nav-item .nav-link:hover,
.navbar .navbar-nav .nav-item.active > .nav-link,
footer.fixed-bottom a,
footer.fixed-bottom a:hover {
  color: #c8102e !important;
}

.publication-venue,
.publication-venue em {
  color: var(--global-text-color-light) !important;
  font-style: italic;
}

.home-links .home-text-link:hover,
.home-links .home-icon-link:hover {
  border-color: #c8102e !important;
  color: #c8102e !important;
}

.project-updated,
.project-meta {
  color: var(--global-text-color-light) !important;
}

.project-updated {
  font-size: 0.95rem;
  margin-bottom: 1.8rem;
}

.project-meta {
  font-size: 0.95rem;
  font-style: italic;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  margin: 0.75rem 0 2.25rem;
}

.project-card {
  border: 1px solid var(--global-divider-color);
  border-radius: 6px;
  background: var(--global-bg-color);
  overflow: hidden;
}

.project-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.project-card-body {
  padding: 0.95rem 1rem 1.05rem;
}

.project-card h3 {
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.project-card p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

.project-card p:last-child {
  margin-bottom: 0;
}

@media (max-width: 575.98px) {
  .project-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ---- home page blocks ---- */
.home-body h2 {
  font-size: 1.3rem;
  font-weight: 500;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.home-research li,
.home-projects li,
.home-pubs li {
  margin-bottom: 0.45rem;
  line-height: 1.55;
}

.home-research li strong {
  font-weight: 600;
}

.home-completed-projects {
  margin-top: 0.75rem;
}

.home-completed-projects summary {
  display: list-item;
  list-style-position: inside;
  width: fit-content;
  max-width: 100%;
  padding: 0.25rem 0;
  color: var(--global-theme-color);
  font-weight: 500;
  cursor: pointer;
}

.home-completed-projects summary:focus-visible {
  outline: 2px solid var(--global-theme-color);
  outline-offset: 4px;
}

.home-completed-projects .home-projects {
  margin-top: 0.6rem;
  margin-bottom: 0;
}

.home-line {
  margin-top: 1.5rem;
  margin-bottom: 0;
  line-height: 1.6;
}

.home-line strong {
  font-weight: 600;
}

.home-sep {
  color: var(--global-text-color-light);
  padding: 0 0.3rem;
}

.home-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.home-section-head h2 {
  margin: 0;
}

.home-more {
  font-size: 0.95rem;
  font-weight: 400;
  white-space: nowrap;
}

.home-pubs {
  margin-top: 0.6rem;
}

.home-openings {
  margin-top: 1.4rem;
  padding: 0.85rem 1.1rem;
  background: rgba(200, 16, 46, 0.06);
  border-left: 4px solid var(--global-theme-color);
  border-radius: 0 6px 6px 0;
}

.home-openings strong {
  color: var(--global-theme-color);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.9em;
}

html[data-theme="dark"] .home-openings {
  background: rgba(200, 16, 46, 0.14);
}

/* ---- publications page ---- */
.pub-doi {
  font-weight: 400;
  white-space: nowrap;
  margin-left: 0.2rem;
}

.pub-nav,
.pub-year-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.pub-nav {
  margin-top: 0.75rem;
}

.pub-year-nav {
  margin-top: 0.4rem;
  margin-bottom: 1.5rem;
}

.pub-year-nav a,
.pub-nav a {
  text-decoration: none;
}

.post h2 {
  font-size: 1.35rem;
  font-weight: 500;
  margin-top: 2.2rem;
  margin-bottom: 0.4rem;
}

.pub-year {
  border-top: 1px solid var(--global-divider-color);
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  scroll-margin-top: 4.5rem;
}

.pub-year-label {
  color: var(--global-text-color-light) !important;
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
}

.pub-list {
  padding-left: 1.3rem;
  margin: 0.6rem 0 0;
}

.pub-list li {
  margin-bottom: 0.6rem;
  line-height: 1.55;
}

/* ---- funder logos ---- */
.funder-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem 2.4rem;
  list-style: none;
  padding: 0.4rem 0 0.6rem;
  margin: 0 0 1.2rem;
}

.funder-logos li {
  margin: 0;
}

.funder-logos img {
  display: block;
  height: 84px;
  width: auto;
  max-width: 240px;
}

.funder-logos img.funder-logo-wide {
  height: 40px;
  max-width: 300px;
}

.funder-logos img[src$="nist.svg"] {
  height: 34px;
}

html[data-theme="dark"] .funder-logos li {
  background: #fff;
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
}

@media (max-width: 575.98px) {
  .funder-logos {
    gap: 0.9rem 1.5rem;
  }
  .funder-logos img {
    height: 60px;
  }
  .funder-logos img.funder-logo-wide {
    height: 30px;
  }
  .funder-logos img[src$="nist.svg"] {
    height: 26px;
  }
}


.funder-logos img[src$="fluor.svg"] {
  height: 30px;
}

.funder-logos img[src$="thecb.png"] {
  height: 44px;
}
