body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  background: #f9f9f9;
  color: #333;
  scroll-behavior: smooth;
}

/* Header */
header {
  background: #0d6efd;
  color: white;
  text-align: center;
  padding: 80px 20px;
}
header h1 {
  font-size: 2.5rem;
  margin: 0;
}
header p {
  font-size: 1.2rem;
  margin: 10px 0;
}

/* Sections */
section {
  padding: 60px 20px;
  max-width: 1000px;
  margin: auto;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.7s ease;
}
section.show {
  opacity: 1;
  transform: translateY(0);
}
h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #0d6efd;
  font-size: 2rem;
}

/* Skills */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}
.skill {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s;
}
.skill:hover {
  transform: translateY(-8px);
}

/* Projects */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.project {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.6s ease;
}
.project img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
}
.project.show {
  transform: scale(1);
  opacity: 1;
}
.project:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

#contact {
  background: #f8f9fa;
  padding: 60px 20px;
  text-align: center;
}
#contact h2 {
  font-size: 2em;
  margin-bottom: 20px;
  color: #333;
}
#contact form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
#contact input,
#contact textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
}
#contact button {
  background-color: #0078ff;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-size: 1em;
  cursor: pointer;
  transition: 0.3s;
}
#contact button:hover {
  background-color: #005fcc;
}

/* ✨ Footer */
footer {
  background-color: #1e1e1e;
  color: #fff;
  text-align: center;
  padding: 25px 10px;
  font-size: 0.95em;
}
footer a {
  color: #00aaff;
  text-decoration: none;
  margin: 0 5px;
  transition: color 0.3s;
}
footer a:hover {
  color: #fff;
}
.social-icons {
  margin-top: 10px;
}
.social-icons a {
  color: #00aaff;
  text-decoration: none;
  font-size: 1.1em;
  margin: 0 10px;
  transition: color 0.3s, transform 0.2s;
}
.social-icons a i {
  margin-right: 6px;
}
.social-icons a:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

/* Back to Top Button */
#topBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #0d6efd;
  color: white;
  border: none;
  padding: 12px 15px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
/* للموبايل لحد 768px */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  .projects {
    grid-template-columns: 1fr; /* مشروع واحد في الصف */
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero p {
    font-size: 14px;
  }
}

/* للشاشات المتوسطة من 769px لحد 1200px */
@media (min-width: 769px) and (max-width: 1200px) {
  .projects {
    grid-template-columns: 1fr 1fr; /* مشروعين جنب بعض */
  }

  .hero h1 {
    font-size: 32px;
  }
}
