/* From: https://codepen.io/thisanimus/pen/OJpaqWz */
:root {
  --crt-red: rgb(218, 49, 49);
  --crt-green: rgb(112, 159, 115);
  --crt-blue: rgb(40, 129, 206);
}
/* Global */
html {
  font-size: 1.5rem;
  font-family: "Courier New", monospace;
  min-height: 100%;
}
main {
  color: rgba(25, 205, 55, 0.75);
}

h2,h1 {
  color: rgb(211, 89, 109);
}
a {
  color: rgba(255, 151, 5, 0.608);
  text-decoration: none;
}

a:hover {
  color: yellow;
  text-decoration: underline;
}
a :visited{
  color: rgba(155, 51, 5, 0.4);
}

.code {
  color: attr(data-color);
}
.wrapper {
  padding-top: 2rem;
  padding-left: 1rem;
  display: inline-block;
  white-space: nowrap;
}
.code {
  animation: typewriter 1s steps(14) 1s 1 normal both;
  line-height: 1.2;
  margin: 0;
  display: block;
  width: 100%;
  white-space: normal;
  overflow: hidden;
}
.cursor {
  display: inline-block;
  animation: blinkTextCursor 800ms infinite normal;
}

/* Animation */
@keyframes typewriter {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes blinkTextCursor {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.crt {
  background-color: rgb(25, 25, 30);
  text-shadow: 0 0 0.2em currentColor, 1px 1px rgba(255, 0, 255, 0.5),
    -1px -1px rgba(0, 255, 255, 0.4);
  position: relative;
  &:before,
  &:after {
    content: "";
    transform: translateZ(0);
    pointer-events: none;
    /*opacity: 0.5;*/
    mix-blend-mode: overlay;
    position: absolute;
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
    z-index: 1;
  }

  &:before {
    background: repeating-linear-gradient(
      var(--crt-red) 0px,
      var(--crt-green) 2px,
      var(--crt-blue) 4px
    );
  }
  &:after {
    background: repeating-linear-gradient(
      90deg,
      var(--crt-red) 1px,
      var(--crt-green) 2px,
      var(--crt-blue) 3px
    );
  }
}
