body {
  isolation: isolate;
  background-color: #1b1c1a;
}

/* Offset ink dots form the diagonal lattice of a printed screentone. */
body::before {
  content: '';
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse at center, transparent 58%, rgb(0 0 0 / .06) 82%, rgb(0 0 0 / .24) 100%),
    radial-gradient(circle, rgb(0 0 0 / .56) .84px, transparent 1.2px),
    radial-gradient(circle, rgb(0 0 0 / .56) .84px, transparent 1.2px);
  background-size: 100% 100%, 6px 6px, 6px 6px;
  background-position: center, 0 0, 3px 3px;
  background-repeat: no-repeat, repeat, repeat;
}

/* The avatar changes the ink tone on the same dot lattice as the background. */
.home-screentone-portrait::after {
  content: '';
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgb(170 156 139 / .16) .84px, transparent 1.2px),
    radial-gradient(circle, rgb(170 156 139 / .16) .84px, transparent 1.2px);
  background-size: 6px 6px;
  background-position: 0 0, 3px 3px;
  mask-image: url('assets/previews/avatar-screentone.webp');
  mask-mode: luminance;
  mask-size: clamp(19rem, 45vw, 39rem);
  mask-position: 89% 47%;
  mask-repeat: no-repeat;
}

@media (max-width: 700px) {
  .home-screentone-portrait::after {
    mask-size: min(75vw, 19rem);
    mask-position: 94% 60%;
    opacity: .68;
  }
}
