/* moved from inline <style> — no changes to selectors or values */

/* global */
html {
  scroll-behavior: smooth;
}

/* cursor */
.typing-cursor {
  position: relative;
}

.typing-cursor::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 0;
  width: 2px;
  height: 100%;
  background: currentColor; /* ← makes cursor same color as text */
  animation: blink 1s infinite;
}

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

/* HERO ANIMATIONS - Cloud/Data/ML Themed */

/* Cloud base breathing */
.cloud-base {
  animation: cloudBreath 4s ease-in-out infinite;
}

@keyframes cloudBreath {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(1);
  }
  50% {
    opacity: 0.25;
    transform: scale(1.05);
  }
}

/* Storage node pulse */
.storage-node {
  animation: nodePulse 3s ease-in-out infinite;
}

.processing-node {
  animation: nodePulse 3.5s ease-in-out infinite 0.5s;
}

.ml-node {
  animation: nodePulse 3s ease-in-out infinite 1s;
}

.database-node {
  animation: nodePulse 3.5s ease-in-out infinite 1.5s;
}

.api-node {
  animation: nodePulse 3s ease-in-out infinite 2s;
}

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

/* Data pipeline flow animation */
.pipeline-1 {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: flowPipeline 3s linear infinite;
}

.pipeline-2 {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: flowPipeline 3s linear infinite 0.75s;
}

.pipeline-3 {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: flowPipeline 3s linear infinite 1.5s;
}

.pipeline-4 {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: flowPipeline 3s linear infinite 2.25s;
}

@keyframes flowPipeline {
  to {
    stroke-dashoffset: 0;
  }
}

/* Connection dots pulse */
.dot-pulse {
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

/* Tech labels floating */
.tech-float-1 {
  animation: techFloat 5s ease-in-out infinite;
}

.tech-float-2 {
  animation: techFloat 6s ease-in-out infinite 1s;
}

.tech-float-3 {
  animation: techFloat 5.5s ease-in-out infinite 2s;
}

@keyframes techFloat {
  0%,
  100% {
    transform: translateY(0px);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-10px);
    opacity: 0.6;
  }
}

/* Terminal window subtle pulse */
.terminal-window {
  animation: terminalPulse 4s ease-in-out infinite;
}

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

/* glass-card effect */
.glass-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.6);
}

/* top-nav offset for anchors */
section {
  scroll-margin-top: 88px;
}

/* Hero left text reveal (initially hidden for JS reveal) */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* certs */
.badge-shimmer {
  background: linear-gradient(
    90deg,
    rgba(32, 201, 151, 0.06),
    rgba(255, 255, 255, 0.02),
    rgba(32, 201, 151, 0.06)
  );
  background-size: 200% 100%;
  animation: shine 3.5s linear infinite;
}

@keyframes shine {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* subtle floating background circles */
.bg-orb {
  position: absolute;
  filter: blur(40px) saturate(120%);
  opacity: 0.12;
  z-index: 0;
}

/* hero art sizing */
.hero-art {
  width: min(460px, 46vw);
  height: auto;
  display: block;
}

/* nice card border effect for projects & experience */
.glass-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.6);
}

/* small screen typography tweak */
@media (max-width: 640px) {
  h1 {
    font-size: 1.8rem;
  }
  .hero-art {
    width: 90%;
    max-width: 400px;
  }
}

/* typing cursor style */
#cursor {
  display: inline-block;
  margin-left: 6px;
  font-weight: 700;
  color: #cbd5e1;
}

/* subtle overlay on image to help it blend */
.hero-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}
.hero-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 12, 14, 0.18),
    rgba(10, 12, 14, 0.28)
  );
  pointer-events: none;
}

/* REMOVED: title-floating animation to fix the bounce issue */
/* The bounce was caused by this animation being applied when typewriter is blank */
/* We've commented it out in the JavaScript as well */

/* typed container — don't force min width; cursor will sit immediately after text */
.typed-container {
  display: inline-block;
  white-space: nowrap;
}

/* Responsive adjustments for hero animation */
@media (max-width: 768px) {
  .hero-art {
    width: 100%;
    max-width: 350px;
  }
}
