section {
  scroll-margin-top: 96px; /* نفس ارتفاع الهيدر تقريبا */
}




html, body {
  max-width: 100%;
  overflow-x: hidden; /* يمنع السحب يمين/شمال */
}
 /* Rotating Rings */
.animate-spin-slow {
  animation: spin 18s linear infinite;
}
.animate-spin-slower {
  animation: spin 28s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Floating Particles */
.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: floatUp 10s linear infinite;
}

.particle:nth-child(1) {
  left: 20%;
  bottom: -10px;
  animation-duration: 12s;
  animation-delay: 0s;
}
.particle:nth-child(2) {
  left: 40%;
  bottom: -10px;
  animation-duration: 14s;
  animation-delay: 2s;
}
.particle:nth-child(3) {
  left: 60%;
  bottom: -10px;
  animation-duration: 11s;
  animation-delay: 4s;
}
.particle:nth-child(4) {
  left: 75%;
  bottom: -10px;
  animation-duration: 13s;
  animation-delay: 1s;
}
.particle:nth-child(5) {
  left: 30%;
  bottom: -10px;
  animation-duration: 15s;
  animation-delay: 3s;
}
.particle:nth-child(6) {
  left: 55%;
  bottom: -10px;
  animation-duration: 16s;
  animation-delay: 5s;
}
/* Floating effect for the photo only */
#floatingPhoto {
  animation: floaty 6s ease-in-out infinite;
}

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

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-50vh) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) scale(0.8);
    opacity: 0;
  }
}
/* Animation for mobile menu */
@keyframes slideDownFade {
  0% { transform: translateY(-20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes slideUpFade {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-20px); opacity: 0; }
}

#mobileNav.show {
  display: block !important;
  animation: slideDownFade 0.4s ease forwards;
}
#mobileNav.hide {
  animation: slideUpFade 0.3s ease forwards;
}

/* Animation for links */
#mobileNav a {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.4s ease forwards;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* =====================================
   FLOAT EFFECT FOR LETTERS
===================================== */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.letter {
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

.letter:nth-child(1) { animation-delay: 0s; }
.letter:nth-child(2) { animation-delay: 0.2s; }
.letter:nth-child(3) { animation-delay: 0.4s; }
.letter:nth-child(4) { animation-delay: 0.6s; }
.letter:nth-child(5) { animation-delay: 0.8s; }
.letter:nth-child(6) { animation-delay: 1s; }
.letter:nth-child(7) { animation-delay: 1.2s; }
.letter:nth-child(8) { animation-delay: 1.4s; }
.letter:nth-child(9) { animation-delay: 1.6s; }

/* =====================================
   FLYING BROOM ANIMATION
===================================== */
/* CSS */
/* Broom Animation */
@keyframes broomFly {
  0%   { transform: translateX(0) rotate(-5deg) scaleX(1); }
  50%  { transform: translateX(85vw) rotate(8deg) scaleX(1); }
  51%  { transform: translateX(85vw) rotate(8deg) scaleX(-1); } /* قلب الصورة */
  100% { transform: translateX(0) rotate(-5deg) scaleX(-1); }
}

.animate-broom {
  animation: broomFly 14s linear infinite;
}




/* =====================================
   HERO / BACKDROP BLUR & FLOATY BLOB
===================================== */
@keyframes floaty {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: .65; filter: blur(36px); }
  50% { opacity: .9; filter: blur(44px); }
}

.backdrop-blur-lg {
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

/* =====================================
   PRELOADER DOTS ANIMATION
===================================== */
/* Animation */
@keyframes bounce {
  0% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(-12px); opacity: 1; }
  100% { transform: translateY(0); opacity: 0.6; }
}

.dot {
  animation: bounce 0.7s infinite alternate;
}

.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.25s; }
.dot:nth-child(3) { animation-delay: 0.5s; }

/* =====================================
   SKILL BUBBLES
===================================== */
.skill-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  cursor: pointer;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  animation: floaty 4s ease-in-out infinite;
  font-weight: bold;
}

.skill-bubble i {
  transition: transform 0.4s ease, filter 0.4s ease;
  display: inline-block;
}

.skill-bubble:hover {
  transform: translateY(-8px) scale(1.1);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.skill-bubble:hover i {
  transform: scale(1.2) rotateY(15deg) rotateX(10deg);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

/* COLORS PER SKILL ICON */
.html i { color: #E34F26; }
.css i { color: #1572B6; }
.js i { color: #F7DF1E; }
.react i { color: #61DAFB; }
.ts i { color: #3178C6; }
.git i { color: #F05032; }
.bootstrap i { color: #7952B3; }
.docker i { color: #2496ED; }
.node i { color: #339933; }
.code i { color: #FFD700; }
.emailjs i { color: #FF6138; }
.ds i { color: #FF007F; }
.prompt i { color: #8A2BE2; }
/* =====================================
   GENERAL ANIMATIONS
===================================== */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-left {
  from { opacity: 0; transform: translateX(-100px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slide-right {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-slide-left {
  animation: slide-left 1.8s ease-out forwards;
}

.animate-slide-right {
  animation: slide-right 1.8s ease-out forwards;
}
.hidden-on-menu {
  display: none !important;
}
