/* The typed line above the title (desktop only; js/hero-typing.js): "Hi, I'm Marielle Bonifacio, a product designer" */
.hero-typing {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 28px); /* just above the blue frame around the title */
  transform: translateX(-50%);
  font-size: 1.05rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
  white-space: nowrap;
  color: var(--ink, #1c1b19);
  pointer-events: none;
}

/* the whole sentence is laid out invisibly first, so the line keeps its width (and its place) while it is typed */
.hero-typing__ghost {
  visibility: hidden;
}

.hero-typing__live {
  position: absolute;
  left: 0;
  top: 0;
}

.hero-typing b {
  font-weight: 700;
}

.hero-typing__caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -0.16em;
  background: var(--ink, #1c1b19);
  animation: hero-caret 1.05s steps(1) infinite;
}

@keyframes hero-caret {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0; }
}

.hero-typing__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .hero-typing__caret {
    animation: none;
  }
}

/* phones and tablets: no typing line */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  body.home .hero-typing {
    display: none;
  }
}
