/* Shared tweaks that apply in both light and dark mode. */

h1, h2, h3 {
  letter-spacing: -0.015em;
}

h2 {
  margin-top: 2.2rem;
  margin-bottom: 0.9rem;
}

/* Subtle divider under section headings on content pages. */
main h2 {
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(128, 128, 128, 0.25);
}

/* Publication / project list items. */
.pub-list ul {
  list-style: none;
  padding-left: 0;
}

.pub-list li {
  margin-bottom: 1.4rem;
  padding-left: 1rem;
  border-left: 3px solid rgba(128, 128, 128, 0.3);
}

.pub-list li:hover {
  border-left-color: var(--bs-primary);
}

.pub-title {
  font-weight: 600;
}

.pub-venue {
  font-style: italic;
}

.pub-links a {
  font-size: 0.85em;
  text-decoration: none;
  margin-right: 0.6rem;
  white-space: nowrap;
}

.pub-links a:hover {
  text-decoration: underline;
}

/* Year headers inside listings. */
.year-label {
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
  font-size: 0.9em;
}

/* Year groupings in the generated publication list. */
.csl-bib-body {
  margin-bottom: 0.5rem;
}

.csl-entry {
  margin-bottom: 0.85rem;
  padding-left: 1.6em;
  text-indent: -1.6em;
}

.csl-entry a {
  text-decoration: none;
  overflow-wrap: anywhere;
}

.csl-entry a:hover {
  text-decoration: underline;
}

/* Zotero brace-protection leaves stray spans; keep them inheriting normally. */
.csl-entry span {
  font: inherit;
}

/* ORCID has no Bootstrap Icons glyph, so draw the official mark instead.
   It is a two-tone image (black disc, white "iD"), not a single-colour path,
   so it cannot be a CSS mask that inherits currentColor. */
.about-link[href*="orcid.org"]::before {
  content: "";
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.18em;
  margin-right: 0.35em;
  background: url("ORCID-iD_icon_BW_vector.svg") center / contain no-repeat;
}

/* The black disc would vanish against the dark theme; invert to white-on-black. */
.quarto-dark .about-link[href*="orcid.org"]::before {
  filter: invert(1);
}

/* Open data / code / preregistration links, from links.csv. */
.pub-badge {
  display: inline-block;
  text-indent: 0;
  font-size: 0.74em;
  line-height: 1.5;
  padding: 0.10em 0.62em;
  margin: 0.28em 0.3em 0 0;
  border-radius: 999px;
  border: 1px solid var(--bs-primary);
  color: var(--bs-primary);
  text-decoration: none;
  white-space: nowrap;
}

.pub-badge:hover,
.pub-badge:focus {
  background: var(--bs-primary);
  color: var(--bs-body-bg);
  text-decoration: none;
}

/* Featured papers on the home page. */
.featured p {
  padding-left: 1rem;
  border-left: 3px solid rgba(128, 128, 128, 0.3);
  margin-bottom: 1.3rem;
}

.featured p:hover {
  border-left-color: var(--bs-primary);
}

.featured-links {
  font-size: 0.85em;
  white-space: nowrap;
}

/* Talks list — same left-rule treatment as the featured papers on the home page,
   so the two read as one system. */
.talks h3 {
  font-variant-numeric: tabular-nums;
  margin-top: 2rem;
  margin-bottom: 0.9rem;
}

.talks p {
  padding-left: 1rem;
  border-left: 3px solid rgba(128, 128, 128, 0.3);
  margin-bottom: 1.1rem;
}

.talks p:hover {
  border-left-color: var(--bs-primary);
}

.talk-links {
  font-size: 0.85em;
  white-space: nowrap;
}

/* Tighter about-page image. */
.about-image {
  border-radius: 50%;
}
