/* Shared text-link treatment for the static pages and the Next portfolio.
   Visual cards, the site mark, skip links, and controls keep their own styling. */
:root {
  --portfolio-link-rule: #85868b;
}

:is(
  .portfolio-home :is(.intro, .today-copy, .activity-list, .reading-list, .learning-item, .footer-links) a[href],
  .portfolio-home a.subtle-link[href],
  .portfolio-static-project :is(.links, .intro, .secondary, .notes) a[href],
  .portfolio-static-project a.back[href],
  .portfolio-experiments main a[href],
  .rebuild-route :is(main, .work-story) a[href]:not(:where(.work-feature, .work-directory-item, [role="button"])),
  .editorial-page a[href]:not(:where([role="button"])),
  :is(.desktop-nav, .mobile-nav, .site-footer-inner) a[href]
) {
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-color: var(--portfolio-link-rule);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  text-decoration-skip-ink: auto;
}

:is(
  .portfolio-home :is(.intro, .today-copy, .activity-list, .reading-list, .learning-item, .footer-links) a[href],
  .portfolio-home a.subtle-link[href],
  .portfolio-static-project :is(.links, .intro, .secondary, .notes) a[href],
  .portfolio-static-project a.back[href],
  .portfolio-experiments main a[href],
  .rebuild-route :is(main, .work-story) a[href]:not(:where(.work-feature, .work-directory-item, [role="button"])),
  .editorial-page a[href]:not(:where([role="button"])),
  :is(.desktop-nav, .mobile-nav, .site-footer-inner) a[href]
):is(:hover, :focus-visible) {
  text-decoration-color: currentColor;
}

.portfolio-home :is(.contact-email > span, .contact-socials .contact-label) {
  text-decoration: underline solid var(--portfolio-link-rule) 1px;
  text-underline-offset: .2em;
}

.portfolio-home :is(.contact-email:is(:hover, :focus-visible) > span, .contact-socials a:is(:hover, :focus-visible) .contact-label) {
  text-decoration-color: currentColor;
}
