@keyframes heartbeat {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

div.ball {
  transform: translate(-50%, -50%);

  display: inline-block;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border-style: solid;
  border-width: 1px;
  border-color: #333;
  background-color: rgba(0, 0, 0, 0);
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;

/*   mix-blend-mode: difference;
 */
}
div.inner-ball {
  background-color: #333;
  width: 8px;
  height: 8px;
  border-radius: 50%;

  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;

  transform: translate(-50%, -50%);

/*   mix-blend-mode: difference;
 */
 z-index: 1;
}

/* h1:hover.inner-ball {
  animation: heartbeat 2s infinite;
}

a h1:hover ~ .inner-ball {
  transform: scale(5);
} */

/* The balls replace the native cursor, so the cursor is only hidden where the
   balls are shown: a mouse (or similar) on a screen larger than 600px in both
   directions. The two queries below are exact complements, so there is never
   a state with no cursor at all. */
@media (hover: hover) and (pointer: fine) and (min-width: 601px) and (min-height: 601px) {
  * {
    cursor: none;
  }
}

@media not all and (hover: hover) and (pointer: fine) and (min-width: 601px) and (min-height: 601px) {
  div.ball,
  div.inner-ball {
    display: none;
  }
}

/* Kept invisible until the first mouse movement, so they don't sit in the
   top-left corner on page load. */
html:not(.ball-ready) div.ball,
html:not(.ball-ready) div.inner-ball {
  visibility: hidden;
}
