@keyframes pulseSubtle {
  50% {
    opacity: 0.3;
  }
}
.animate-pulse-subtle {
  animation: pulseSubtle 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Mobile performance tweaks */
@media (max-width: 640px) {
  #mobile-menu {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  .animate-pulse-subtle {
    animation: none !important;
  }
  .svg-lightning {
    filter: none !important;
    opacity: 0.1 !important;
    stroke-width: 7px !important;
  }
  .hero-bg-blur {
    filter: none !important;
  }
}

/* Tablet performance tweaks */
@media (min-width: 641px) and (max-width: 1024px) {
  .animate-pulse-subtle {
    animation: none !important;
  }
  .svg-lightning {
    filter: none !important;
    opacity: 0.1 !important;
    stroke-width: 7px !important;
    shape-rendering: optimizeSpeed;
  }
}

/* Touch devices (covers large phones/tablets with coarse pointer) */
@media (hover: none) and (pointer: coarse) {
  .animate-pulse-subtle {
    animation: none !important;
  }
  .svg-lightning {
    filter: none !important;
    opacity: 0.1 !important;
    stroke-width: 7px !important;
    shape-rendering: optimizeSpeed;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.portfolio-item {
  text-decoration: none;
  color: inherit;
  display: block;
}

.portfolio-item:hover {
  text-decoration: none;
  color: inherit;
}

.portfolio-item:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

#mobile-menu {
  z-index: 40;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background-color: rgba(15, 23, 42, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
}
#mobile-menu .mobile-nav-link {
  color: rgba(255, 255, 255, 0.92);
}
#mobile-menu .mobile-nav-link:hover {
  color: #ffffff;
}
#mobile-menu.scrolled {
  background-color: rgba(255, 255, 255, 0.7);
  border-color: rgba(2, 6, 23, 0.1);
  color: #0f172a;
}
#mobile-menu.scrolled .mobile-nav-link {
  color: rgba(15, 23, 42, 0.92);
}
#mobile-menu.scrolled .mobile-nav-link:hover {
  color: #2563eb;
}

.mobile-nav-link {
  position: relative;
}
.mobile-nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, #3b82f6, #d946ef);
  transition: width 0.3s ease;
}
.mobile-nav-link:hover::after {
  width: 100%;
}

.nav-link {
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, #3b82f6, #d946ef);
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}
.nav-link.active::after {
  width: 100%;
}
.mobile-nav-link.active::after {
  width: 100%;
}
