:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --accent-color: #f59e0b;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
}

[data-theme="dark"] {
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
}

* {
  transition: all 0.3s ease;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.font-serif {
  font-family: "Playfair Display", serif;
}

.gradient-bg {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
}

.fa-moon:hover {
  /* transition: none; */
  color: white;
}
.animate-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.animate-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-slide-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease;
}

.animate-slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-slide-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease;
}

.animate-slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.floating-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      circle at 25% 25%,
      rgba(59, 130, 246, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 75% 75%,
      rgba(245, 158, 11, 0.1) 0%,
      transparent 50%
    );
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: #25d366;
  color: white;
  border-radius: 50px;
  text-align: center;
  font-size: 24px;
  box-shadow: 2px 2px 3px #999;
  z-index: 100;
  animation: pulse 2s infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1.5rem;
  width: 2px;
  height: calc(90% - 1rem);
  background-color: var(--primary-color);
  opacity: 0.3;
}

.timeline-item:last-child::after {
  display: none;
}

.skill-bar {
  height: 8px;
  background-color: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 4px;
  width: 0%;
  transition: width 2s ease-in-out;
}

.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .card-hover:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3),
    0 10px 10px -5px rgba(0, 0, 0, 0.2);
}
/* ====== Language Toggle Switch ====== */
.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
}

.switch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 80px; /* أكبر شوية لتفادي اختفاء الحروف */
  height: 36px;
  border-radius: 50px;
  background-color: var(--switch-bg, #e2e8f0);
  cursor: pointer;
  transition: background-color 0.3s ease;
  overflow: hidden;
}

.switch-text {
  position: absolute;
  font-weight: 600;
  font-size: 13px;
  width: 50%;
  text-align: center;
  transition: color 0.3s ease;
  z-index: 2;
  user-select: none;
}

.switch-text.en {
  left: 0;
  color: var(--switch-active, #2563eb);
}

.switch-text.ar {
  right: 0;
  color: var(--switch-inactive, #9ca3af);
}

.switch-slider {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 30px;
  height: 30px;
  background-color: white;
  border-radius: 50%;
  transition: left 0.3s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

#langSwitch:checked + .switch .switch-slider {
  left: 45px;
}

#langSwitch:checked + .switch .switch-text.en {
  color: var(--switch-inactive, #9ca3af);
}

#langSwitch:checked + .switch .switch-text.ar {
  color: var(--switch-active, #2563eb);
}

/* ===== Theme Colors ===== */
html[data-theme="light"] {
  --switch-bg: #e2e8f0;
  --switch-active: #2563eb;
  --switch-inactive: #9ca3af;
}

html[data-theme="dark"] {
  --switch-bg: #1f2937;
  --switch-active: #60a5fa;
  --switch-inactive: #6b7280;
}

.image-wrapper {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #3b82f6, #06b6d4, #9333ea);
  padding: 5px;
  animation: float 3.5s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3), 0 0 40px rgba(6, 182, 212, 0.2),
    0 0 60px rgba(147, 51, 234, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-wrapper:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.4), 0 0 50px rgba(6, 182, 212, 0.3),
    0 0 70px rgba(147, 51, 234, 0.25);
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* حركة الطفو */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}
