* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}
body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

h1 {
  position: relative;
  border-right: solid 1px black;
  animation: typing steps(24) 3s 1 normal both,
    blinkingCursor steps(24) 400ms infinite normal;
}

/* h1.typing::before {
  content: "";
  position: absolute;
  right: -0.25rem;
  top: 0;
  width: 2px;
  background-color: black;
  height: 100%;
  animation: cursoring 0.9s infinite;
} */

h1.typing {
  border-right: solid 1px black;
  padding-right: 0.25rem;
  animation: cursoring 0.9s infinite;
}

@keyframes cursoring {
  0%,
  100% {
    border-color: white;
  }
  50% {
    border-color: black;
  }
}

h2 {
  margin-top: 2rem;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  transition: 2s;
}

h2.show {
  animation: blinkingCursor 5s;
  width: 20rem;
}
@keyframes blinkingCursor {
  from {
    border-right: solid 1px black;
  }
  to {
    border-right-color: transparent;
  }
}
