/* Additional animations and effects */

/* Typing text animation */
.typing-text {
  border-right: .15em solid var(--ai-primary);
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  animation: typing 3.5s steps(40, end) forwards;
  margin-bottom: 0.5rem;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--ai-primary) }
}

/* Highlighted text */
.highlight {
  color: var(--ai-primary);
  font-weight: 500;
}

/* Skill visibility animation */
.skill-visible {
  animation: skill-appear 0.8s ease forwards;
}

@keyframes skill-appear {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Publication item animation */
.publication-item {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Pulse icon animation */
.pulse-icon {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Article hover effect */
.article-hover {
  box-shadow: 0 5px 15px rgba(58, 134, 255, 0.2);
}

/* Custom AI cursor */
.ai-cursor {
  width: 20px;
  height: 20px;
  border: 2px solid var(--ai-primary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  mix-blend-mode: difference;
  transition: transform 0.2s ease, width 0.2s ease, height 0.2s ease, border-color 0.2s ease;
}

.cursor-active {
  width: 40px;
  height: 40px;
  border-color: var(--ai-accent);
  transform: translate(-50%, -50%) scale(0.8);
}

/* AI background */
.ai-background {
  position: relative;
}

.ai-background:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(58, 134, 255, 0.1) 0%, transparent 80%);
  pointer-events: none;
  z-index: -1;
}

/* Nav links with icons */
#header nav ul li a span {
  margin-right: 0.5rem;
  font-size: 0.9em;
}

/* Make nav ripple effect */
.nav-ripple {
  position: absolute;
  background: rgba(58, 134, 255, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: ripple 0.6s linear;
  width: 100%;
  height: 100%;
}

@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

/* Fix for WebKit */
.typing-text {
  background-clip: text;
}
