a:after {
  line-height: 0.66em;
  display: inline-block;
  text-align: center;
  font-size: 50%;
  vertical-align: top;
  max-width: 3ch;
  color: var(--fg);
  opacity: var(--img-opacity);
  content: "";
  font-feature-settings: "c2sc";
}

a.no-icon:after {
  display: none;
}

/* doesn't work on firefox, but does on chrome. */
a:has(> .punct-swallow):after {
  transform: translateX(-0.45ch);
}

article a[href^="/"]:after,
article a[href^="#"]:after {
  -webkit-mask-image: url(/img/logo-monochrome.svg);
  mask-image: url(/img/logo-monochrome.svg);
  background-color: var(--off-fg);
  width: 2.75ch;
  height: 2.75ch;
}
article a[href^="//"]:after
{
  content: initial;
}

a[href$=".pdf"]:after {
  background-color: var(--off-fg);
  -webkit-mask-image: url(/img/icon/pdf.svg);
  mask-image: url(/img/icon/pdf.svg);
  width: 2.0625ch;
  height: 2.75ch;
  margin-left: 2px;
}

a[href^="https://arxiv.org/"]:after
{
  content: "𝝌﻿";
}

a[href^="https://jmlr.org/"]:after
{
  content: "JMLR";
}

a[href^="https://iclr.cc/"]:after
{
  content: "ICLR";
  word-break: break-all;
  max-width: 2.25ch;
}
a[href^="https://icml.cc/"]:after
{
  content: "ICML";
  max-width: 2.5ch;
}

a[href^="https://twitter.com/"]:after,
a[href^="https://n.0x0.st/"]:after
{
  background-color: var(--off-fg);
  -webkit-mask-image: url(/img/icon/twitter.svg);
  mask-image: url(/img/icon/twitter.svg);
  width: 2.75ch;
  height: 2.75ch;
}

a[href^="https://racket-lang.org"]:after,
a[href^="https://docs.racket-lang.org/"]:after
{
  background-color: var(--off-fg);
  -webkit-mask-image: url(/img/icon/racket.svg);
  mask-image: url(/img/icon/racket.svg);
  width: 2.75ch;
  height: 2.75ch;
}

a[href^="https://cr.yp.to/"]:after,
a[href^="http://cr.yp.to/"]:after
{
  content: "djb";
}

a[href^="https://github.com/"]:after,
a[href^="https://github.blog/"]:after
{
  background-color: var(--off-fg);
  -webkit-mask-image: url(/img/icon/github.svg);
  mask-image: url(/img/icon/github.svg);
  width: 2.75ch;
  height: 2.75ch;
}

a[href^="https://en.wikipedia.org/wiki/"]:after
{
  background-color: var(--off-fg);
  -webkit-mask-image: url(/img/icon/wikipedia.svg);
  mask-image: url(/img/icon/wikipedia.svg);
  width: 2.75ch;
  height: 2.2ch;
}
