/* AOS Overrides & Custom Animations */
[data-aos] {
  transition-duration: 800ms !important;
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-primary);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s ease;
}

/* Custom Cursor Glow */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out;
  mix-blend-mode: screen;
  display: none;
}

@media (min-width: 1024px) {
  .cursor-glow { display: block; }
}

/* Floating Tech Icons */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

.floating-icon {
  animation: float 6s ease-in-out infinite;
}
.floating-icon:nth-child(odd) { animation-duration: 8s; animation-direction: reverse; }

/* Gradient Text Animation */
@keyframes gradientText {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.text-gradient {
  background-size: 200% 200%;
  animation: gradientText 5s ease infinite;
}

/* Pulse Glow Effect */
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4); }
  70% { box-shadow: 0 0 0 20px rgba(0, 212, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
}

.pulse-button {
  animation: pulseGlow 2s infinite;
}

/* Gradient Border Animation */
.gradient-border-anim {
  position: relative;
  overflow: hidden;
}

.gradient-border-anim::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(45deg, var(--color-accent-primary), var(--color-accent-secondary), var(--color-accent-primary));
  z-index: -1;
  background-size: 200% auto;
  animation: gradientText 3s linear infinite;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.gradient-border-anim:hover::before {
  opacity: 1;
}

/* Card Shine / Shimmer Effect */
@keyframes cardShine {
  0% { transform: translateX(-100%) skewX(-15deg); }
  100% { transform: translateX(200%) skewX(-15deg); }
}

.card-shine {
  position: relative;
  overflow: hidden;
}

.card-shine::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.04),
    transparent
  );
  transform: translateX(-100%) skewX(-15deg);
  pointer-events: none;
  z-index: 1;
}

.card-shine:hover::after {
  animation: cardShine 0.8s ease-out forwards;
}

.dark .card-shine::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.06),
    transparent
  );
}

/* Dot Grid Background Pattern — adds visual depth in light mode */
.dot-grid-bg {
  background-image: radial-gradient(circle, rgba(0, 102, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

.dark .dot-grid-bg {
  background-image: radial-gradient(circle, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
}

/* Reveal Background */
@keyframes revealBg {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.reveal-bg {
  animation: revealBg 1s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

/* Particle effect container */
.particles-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 990;
  box-shadow: var(--shadow-glow);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
}

/* ===================================
   Process / Workflow Timeline
   =================================== */
.process-timeline {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  position: relative;
  padding: 2rem 0;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  position: relative;
  padding: 0 0.5rem;
}

/* Connector line between steps */
.process-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 28px;
  left: calc(50% + 30px);
  width: calc(100% - 60px);
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-secondary));
  opacity: 0.25;
  z-index: 0;
}

.process-step .step-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.process-step:hover .step-icon {
  transform: scale(1.15);
  box-shadow: 0 0 30px rgba(0, 102, 255, 0.3);
}

.process-step .step-number {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.process-step .step-title {
  font-weight: 700;
  font-size: 1rem;
}

.process-step .step-desc {
  font-size: 0.8rem;
  line-height: 1.5;
  max-width: 180px;
}

/* Responsive: Stack vertically on mobile */
@media (max-width: 768px) {
  .process-timeline {
    flex-direction: column;
    align-items: stretch;
    gap: 2rem;
  }

  .process-step {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    gap: 1rem;
    padding: 0;
  }

  .process-step:not(:last-child)::after {
    top: 56px;
    left: 27px;
    right: auto;
    width: 2px;
    height: calc(100% + 2rem);
  }

  .process-step .step-desc {
    max-width: none;
  }
}

/* ===================================
   Portfolio Card Overlay
   =================================== */
.portfolio-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  cursor: pointer;
}

.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-card:hover img {
  transform: scale(1.05);
}

.portfolio-card .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(5, 8, 22, 0.85) 75%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 1;
  transition: background 0.4s ease;
}

.portfolio-card:hover .card-overlay {
  background: linear-gradient(180deg, transparent 10%, rgba(5, 8, 22, 0.95) 65%);
}

.portfolio-card .card-overlay .card-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  width: fit-content;
  margin-bottom: 0.5rem;
}
