/* إعدادات عامة */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --primary-color: #bf47f7;
  --secondary-color: #121212;
  --accent-color: #09b1f3;
  --dark-bg: #1e1e1e;
  --card-bg: #2d2d2d;
  --text-color: #e0e0e0;
  --text-muted: #a0a0a0;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

body {
  background-color: var(--secondary-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  transition: var(--transition);
}

body.light-mode {
  --secondary-color: #f5f5f5;
  --dark-bg: #e8e8e8;
  --card-bg: #ffffff;
  --text-color: #333333;
  --text-muted: #666666;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* شريط التقدم */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  width: 0%;
  z-index: 1001;
  transition: width 0.3s ease;
}

/* خلفية متحركة */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.bg-animation::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(108, 99, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(0, 212, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(108, 99, 255, 0.05) 0%,
      transparent 50%
    );
  animation: pulse 15s ease-in-out infinite;
}

.bg-animation .floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.floating-shapes div {
  position: absolute;
  background: rgba(108, 99, 255, 0.05);
  border-radius: 50%;
  animation: float 20s infinite linear;
}

.floating-shapes div:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-shapes div:nth-child(2) {
  width: 120px;
  height: 120px;
  top: 60%;
  left: 80%;
  animation-delay: 5s;
}

.floating-shapes div:nth-child(3) {
  width: 60px;
  height: 60px;
  top: 80%;
  left: 20%;
  animation-delay: 10s;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-1000px) rotate(720deg);
    opacity: 0;
  }
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

section {
  padding: 80px 0;
}

.text-center {
  text-align: center;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--text-color);
  display: inline-block;
  margin-bottom: 15px;
  font-weight: 700;
}

.section-title h2::after {
  content: "";
  position: absolute;
  width: 70px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.section-title p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 20px auto 0;
}

/* الشريط العلوي */
header {
  background-color: rgba(18, 18, 18, 0.95);
  box-shadow: var(--shadow);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

body.light-mode header {
  background-color: rgba(245, 245, 245, 0.95);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}
.Name {
  display: flex;
  align-items: center;      /* محاذاة عمودية مظبوطة */
  gap: 12px;                /* مسافة بسيطة ومريحة */

  font-size: 1.8rem;
  font-weight: 700;
  line-height: normal;           /* 👈 أهم سطر يحل المشكلة */

  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  
}



.nav-right {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 800;
  transition: color 0.3s;
  position: relative;
}

.nav-links a.active {
  color: var(--primary-color);
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: width 0.3s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a:hover::after {
  width: 100%;
}

.theme-toggle {
  margin-left: 30px;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  color: var(--primary-color);
  transform: rotate(30deg);
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
  margin-left: 20px;
}

/* قسم الهيرو */
.hero {
  color: var(--text-color);
  padding: 180px 0 120px;
  text-align: center;
  position: relative;
}

.hero-content h1 {
  font-size: 3.2rem;
  margin-bottom: 20px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s forwards 0.3s;
}

.hero-content h2 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s forwards 0.6s;
}

.hero-content .highlight {
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 30px;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s forwards 0.9s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  display: inline-block;
  padding: 14px 35px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  color: white;
  border: none;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
  transition: all 0.3s;
  z-index: -1;
}

.btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(108, 99, 255, 0.4);
}

.btn:hover::before {
  width: 100%;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  color: white;
}

.btn-large {
  padding: 18px 45px;
  font-size: 1.1rem;
}

.btn-small {
  padding: 10px 20px;
  font-size: 0.9rem;
}

.hero-btns {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s forwards 1.2s;
}

/* قسم عني */
.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-img {
  flex: 1;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

.about-img::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    rgba(108, 99, 255, 0.2),
    rgba(0, 212, 255, 0.2)
  );
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s;
}

.about-img:hover::before {
  opacity: 1;
}

.about-img img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s;
}

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

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--text-color);
  font-weight: 700;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 15px;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.skills-list span {
  background: rgba(108, 99, 255, 0.1);
  color: var(--primary-color);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* قسم المهارات */
.skills {
  background-color: var(--dark-bg);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.skill-category {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.skill-category:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.skill-category h3 {
  margin-bottom: 20px;
  color: var(--primary-color);
  font-weight: 700;
  text-align: center;
}

.skill-item {
  margin-bottom: 15px;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.skill-info span {
  position: relative;
  padding-left: 18px; /* مساحة للدائرة */
}

/* الدائرة قبل النص */
.skill-info span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
}


/* قسم الخدمات */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.service-card {
  background-color: var(--card-bg);
  padding: 40px 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transition: transform 0.3s;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  font-size: 2.8rem;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 25px;
}

.service-card h3 {
  margin-bottom: 15px;
  color: var(--text-color);
  font-weight: 700;
}

.service-card p {
  color: var(--text-muted);
}

.service-link {
  display: inline-block;
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.service-link:hover {
  color: var(--primary-color);
}

/* قسم المشاريع */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.project-img {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.project-img::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    rgba(108, 99, 255, 0.3),
    rgba(0, 212, 255, 0.3)
  );
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}

.project-card:hover .project-img::before {
  opacity: 1;
}

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

.project-card:hover .project-img img {
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-overlay a {
  color: white;
  background: var(--primary-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 10px;
  transition: var(--transition);
}

.project-overlay a:hover {
  background: var(--accent-color);
  transform: scale(1.1);
}

.project-info {
  padding: 25px;
}

.project-info h3 {
  margin-bottom: 10px;
  color: var(--text-color);
  font-weight: 700;
}

.project-info p {
  color: var(--text-muted);
  margin-bottom: 15px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  background-color: rgba(108, 99, 255, 0.2);
  color: var(--primary-color);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* قسم الشهادات */
.certifications {
  background-color: var(--dark-bg);
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.cert-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.cert-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.cert-img {
  height: 180px;
  overflow: hidden;
}

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

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

.cert-info {
  padding: 25px;
}

.cert-info h3 {
  margin-bottom: 10px;
  color: var(--text-color);
  font-weight: 700;
}

.cert-info p {
  color: var(--text-muted);
  margin-bottom: 15px;
}

/* قسم التعليم والخبرة */
.education-experience {
  background-color: var(--dark-bg);
}

.timeline-item {
  margin-bottom: 50px;
  position: relative;
  width: 100%;
  padding-right: 40px;
}

.timeline-content {
  background-color: var(--card-bg);
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}



.timeline-content h3 {
  color: var(--text-color);
  margin-bottom: 10px;
  font-weight: 700;
}

.timeline-content .date {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}

.timeline-content p,
.timeline-content ul {
  color: var(--text-muted);
  margin-bottom: 10px;
}

.timeline-content ul {
  padding-left: 20px;
}

.timeline-content li {
  margin-bottom: 5px;
 }


/* الفوتر */
footer {
  background-color: var(--dark-bg);
  color: white;
  text-align: center;
  padding: 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  color: var(--text-color);
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.footer-section p {
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section ul li a:hover {
  color: var(--primary-color);
}

.social-links {
  margin-bottom: 20px;
}

.social-links a {
  display: inline-block;
  color: var(--text-color);
  font-size: 1.5rem;
  margin: 0 10px;
  transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
  color: var(--primary-color);
  transform: translateY(-5px);
}

/* نموذج الصور بالحجم الكامل */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  animation: zoom 0.3s;
}

@keyframes zoom {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

@keyframes modalFade {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close-modal:hover {
  color: var(--accent-color);
}

.modal-video {
  margin: 20px 0;
}

.modal-video video {
  width: 100%;
  border-radius: 8px;
}

/* التجاوب مع الشاشات المختلفة */
@media (max-width: 992px) {
  .about-content,
  .contact-content {
    flex-direction: column;
  }

  .timeline::before {
    left: 30px;
  }

  .timeline-item {
    width: 100%;
    padding-right: 0;
    padding-left: 70px;
  }

  .timeline-item:nth-child(even) {
    margin-left: 0;
    padding-left: 70px;
  }

  .timeline-content::before {
    left: 20px;
    right: auto;
  }

  .section-title h2 {
    font-size: 2.2rem;
  }

  .hero-content h1 {
    font-size: 2.8rem;
  }

  .hero {
    padding: 150px 0 100px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    background-color: rgba(18, 18, 18, 0.95);
    width: 100%;
    flex-direction: column;
    text-align: center;
    box-shadow: var(--shadow);
    padding: 20px 0;
    backdrop-filter: blur(10px);
  }

  body.light-mode .nav-links {
    background-color: rgba(245, 245, 245, 0.95);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 15px 0;
  }

  .menu-toggle {
    display: block;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content h2 {
    font-size: 1.4rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .theme-toggle {
    margin-left: 15px;
  }

  .hero-btns {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .btn {
    width: 100%;
    max-width: 250px;
    text-align: center;
  }

  section {
    padding: 60px 0;
  }

  .services-grid,
  .team-grid,
  .tech-grid,
  .media-container {
    grid-template-columns: 1fr;
  }

  .form-submit {
    flex-direction: column;
  }
}