/* Shared by the main site, blog, and standalone project pages. */
::selection {
  color: inherit;
  background-color: var(--link-highlight, #fbe3df);
}

html body a[href]:any-link:not(:has(img, video, canvas)) {
  transition: color 150ms ease, background-color 150ms ease, text-decoration-color 150ms ease;
}

html body a[href]:any-link:not(:has(img, video, canvas)):not(.social-icons a, .site-nav a, .post-preview h2 a, .footnote-ref, .note-number) {
  color: var(--accent, #ab2317);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent, #ab2317) 35%, transparent);
  text-underline-offset: 3px;
}

html body .site-nav a[href]:any-link:is(:hover, :focus-visible):not(.social-icons a) {
  text-decoration: none;
}

html body a[href]:any-link:is(:hover, :focus-visible):not(:has(img, video, canvas)):not(.site-nav a, .post-preview h2 a) {
  color: var(--accent-hover, #8a1c12);
  background-color: var(--link-highlight, #fbe3df);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

html body .site-nav .nav-links a:is(:hover, :focus-visible) {
  color: var(--accent);
}

html body .publications-section .pub-links a[href]:any-link:is(:link, :visited, :hover, :focus-visible) {
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  html body a[href]:any-link:not(:has(img, video, canvas)) {
    transition: none;
  }
}
