/* Enhanced Typing Animation Styles */
.typing-text {
  position: relative;
  color: var(--secondary);
  font-weight: 700;
  min-height: 1.2em;
  display: inline-block;
  min-width: 10px; /* Ensure there's always some space */
}

.typing-text::after {
  content: "|";
  position: absolute;
  right: -8px;
  top: 0;
  color: var(--secondary);
  animation: blink 0.7s infinite;
  font-weight: 700;
  font-size: 1.05em;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Make cursor invisible during deletion/typing transition */
.typing-text.deleting::after {
  animation: none;
  opacity: 0;
}

/* Make the hero text stand out more with enhanced glow effect */
.hero-section h1 {
  text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.1);
  margin-bottom: 0.5em;
}

.typing-text {
  text-shadow: 0 0 15px rgba(var(--secondary-rgb), 0.3);
  border-right: 2px solid transparent; /* Ensure consistent spacing */
}

/* Add highlight effect to the currently typed text */
@keyframes highlightText {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

/* Make sure cursor positioning works across browsers */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .typing-text::after {
    top: 1px;
  }
}

/* Better spacing for the hero section with typing animation */
.hero-content h1 {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3em;
}