@tailwind base;
@tailwind components;
@tailwind utilities;
.typewriter {
  overflow: hidden; /* Ensures the text doesn't overflow */
  white-space: nowrap; /* Prevents the text from wrapping */
  border-right: 3px solid white; /* The caret */
  animation: typing 4s steps(40, end), blink-caret 0.75s step-end infinite;
  animation-fill-mode: forwards; /* Retain the end state of typing */
}

/* Typewriter effect */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* Blinking caret effect */
@keyframes blink-caret {
  0%, 100% {
    border-color: transparent; /* Hide at the start and end */
  }
  50% {
    border-color: white; /* Show caret in the middle */
  }
}

/* Hide caret after typing */
.typewriter-complete {
  border-right: none; /* Remove the caret after typing */
}
.typewriter {
  overflow: hidden; /* Ensures the text doesn't overflow */
  white-space: nowrap; /* Prevents the text from wrapping */
  border-right: 3px solid white; /* The caret */
  animation: typing 3.5s steps(40, end) forwards, blink-caret 0.75s step-end infinite; /* Animation chaining */
}

/* Typewriter effect */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%; /* Fully type the text */
  }
}

/* Blinking caret effect */
@keyframes blink-caret {
  0%, 100% {
    border-color: transparent; /* Hide at the start and end */
  }
  50% {
    border-color: white; /* Show caret in the middle */
  }
}

/* Hide caret after typing */
.typewriter-complete {
  border-right: none; /* Remove the caret after typing */
  animation: none; /* Stop any further animations */
}
