/* Custom Animations & Styles for Hamed Jalmoudy's Interactive Portfolio */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --font-fa: 'Vazirmatn', sans-serif;
  --font-en: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html[lang="fa"] {
  font-family: var(--font-fa);
  direction: rtl;
  text-align: right;
}

html[lang="en"] {
  font-family: var(--font-en);
  direction: ltr;
  text-align: left;
}

/* Base Body Styles */
body {
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

/* Background Ambient Orbs */
.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
  animation: floatOrb 12s infinite alternate ease-in-out;
}

.ambient-orb-1 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(168, 85, 247, 0.15) 100%);
  top: -80px;
  right: -50px;
}

.ambient-orb-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.35) 0%, rgba(16, 185, 129, 0.12) 100%);
  top: 40%;
  left: -100px;
  animation-duration: 16s;
  animation-delay: -4s;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(40px, 30px) scale(1.12);
  }
  100% {
    transform: translate(-30px, -20px) scale(0.95);
  }
}

/* Glassmorphism & Neon Borders */
.glass-panel {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

.dark .glass-panel {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5);
}

/* Gradient Shimmer Text */
.text-shimmer {
  background: linear-gradient(135deg, #4f46e5 0%, #9333ea 40%, #06b6d4 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 6s linear infinite;
}

.dark .text-shimmer {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 40%, #38bdf8 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 6s linear infinite;
}

@keyframes textShimmer {
  to {
    background-position: 200% center;
  }
}

/* Pulse Glow Keyframe */
@keyframes pulseBadge {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

.pulse-badge {
  animation: pulseBadge 2.2s infinite ease-in-out;
}

/* Typing Cursor Effect */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background-color: currentColor;
  margin-inline-start: 4px;
  vertical-align: middle;
  animation: blinkCursor 0.9s infinite;
}

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

/* Blog / Gallery Card Interactive Hover */
.gallery-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  overflow: hidden;
}

.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -15px rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.5);
}

.gallery-img-container {
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
}

.gallery-img-container img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.gallery-card:hover .gallery-img-container img {
  transform: scale(1.08);
}

/* Terminal Styling */
.terminal-window {
  font-family: var(--font-mono);
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.5);
  border-radius: 3px;
}
.dark ::-webkit-scrollbar-thumb {
  background: rgba(75, 85, 99, 0.6);
}
