:root {
  --bg-color: #1f242d;
  --second-bg-color: #323946;
  --text-color: #fff;
  --main-color: #0ef;
}

.light-theme {
  --bg-color: #f4f4f4;
  --second-bg-color: #ffffff;
  --text-color: #333;
  --main-color: #007bff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  scroll-behavior: smooth;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  transition: 0.5s;
  body {
    overflow-x: hidden;
    width: 100%;
  }
}

/* Navbar */
.navbar {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  padding: 20px 10%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-color);
  z-index: 1000;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
}
.nav-links li {
  margin-left: 30px;
}
.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}
.nav-links a:hover {
  color: var(--main-color);
}

#theme-toggle {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  font-size: 1.2rem;
  margin-left: 20px;
}
.logo span {
  color: var(--main-color);
}
/* Home Section */
section {
  min-height: 100vh;
  padding: 10rem 9% 2rem;
}
.home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.home-img {
  width: 30%;
  /* overflow: hidden; */
}
.home-img img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 0 20px var(--main-color);
  transition: 0.6s;
}
.home-img img:hover {
  transform: scale(1.1, 1.1);
}
.home-content {
  width: 60%;
}
.home-content h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 3%;
}
.home-content h1:hover {
  color: var(--main-color);
}
.home-content span {
  color: var(--main-color);
  font-weight: bolder;
}
.home-content > p {
  font-size: 1.4rem;
  text-align: justify;
}

/* Buttons & Skills Box */
.home-content .con {
  display: flex;
}
.btn1,
.btn2 {
  display: inline-block;
  padding: 10px 28px;
  background: var(--main-color);
  border-radius: 40px;
  color: var(--bg-color);
  font-weight: 600;
  text-decoration: none;
  margin-top: 20px;
  transition: 0.3s;
  width: fit-content;
  margin-right: 10%;
}
.btn1:hover,
.btn2:hover {
  transform: scale(1.1, 1.1);
}

/* Education Section */
.education-section {
  padding: 60px 10%;
}
.education-section .section-title {
  margin-bottom: 2%;
  color: #185dd3;
  font-weight: bolder;
  font-size: 2rem;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  justify-content: center;
}

.edu-card {
  padding: 30px;
  text-align: center;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  border-radius: 20px;
  transition: 0.4s;
  cursor: default;
}

/*  حركة عند التمرير بالماوس */
.edu-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--accent-blue);
  box-shadow: 0 10px 30px rgba(0, 210, 255, 0.2);
}

.edu-icon {
  font-size: 2.5rem;
  color: var(--accent-blue);
  margin-bottom: 15px;
  display: block;
  color: #60749d;
}

.edu-date {
  color: var(--accent-pink);
  font-size: 0.9rem;
  font-weight: bold;
  display: block;
  margin-bottom: 10px;
}

.edu-card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #fff;
}

.edu-card p {
  color: var(--text-dim);
  line-height: 1.6;
}
/*  Skills Box */
.heading {
  margin-bottom: 2%;
  color: #185dd3;
  font-weight: bolder;
  font-size: 2rem;
}
.skills-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.skills-box {
  background: var(--second-bg-color);
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  border: 2px solid transparent;
  transition: 0.4s ease-in-out;
}

.skills-box:hover {
  border-color: var(--main-color);
  transform: translateY(-10px);
}
.skills-box h3 {
  margin-bottom: 15px;
  color: var(--main-color);
}
.skills-box ul {
  list-style: none;
}
.skills-box li {
  font-size: 20px;
  margin-bottom: 1%;
}

/* Contact Form */
.contact form {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.contact input,
.contact textarea {
  width: 100%;
  padding: 15px;
  background: var(--second-bg-color);
  border: none;
  margin-bottom: 10px;
  border-radius: 10px;
  color: var(--text-color);
}
.btn {
  display: inline-block;
  padding: 3%;
  background: var(--main-color);
  border-radius: 40px;
  color: var(--bg-color);
  font-weight: bolder;
  text-decoration: none;
  font-size: 1rem;
  margin-top: 2%;
  transition: 0.3s;
  width: fit-content;
  margin-right: 10%;
}
.btn:hover {
  transform: scale(1.1, 1.1);
}
/* Projects */
.projects {
  padding: 10rem 9% 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  width: 100%;
  justify-content: center;
}

/*  (المربع) */
.project-card {
  background: var(--second-bg-color);
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  border: 2px solid transparent;
  transition: 0.4s ease-in-out;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* ظل خفيف لإبراز المربع */
}

/* تأثير الـ Hover مثل الـ Skills */
.project-card:hover {
  border-color: var(--main-color);
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* تنسيق الصورة لتكون مدورة */
.project-card img {
  width: 60%;
  height: 60%;
  object-fit: cover; /* لضمان عدم تشوه الصورة داخل الدائرة */
  border-radius: 50%; /* لجعلها دائرية */
  margin-bottom: 20px;
  border: 3px solid var(--main-color); /* إطار  للصورة */
}

.project-card h4 {
  font-size: 1.5rem;
  color: var(--main-color);
  margin-bottom: 15px;
}
.projects span {
  margin-left: 55px;
}
.project-card p {
  font-size: 1rem;
  margin-bottom: 20px;
  line-height: 1.6;
  text-align: justify;
}

/* تنسيق أيقونة الرابط */
.project-card a i {
  font-size: 1.5rem;
  color: var(--main-color);
  transition: 0.3s;
}

.project-card a i:hover {
  color: #185dd3;
}

/* Footer */
footer {
  width: 100%;
  padding: 3% 0%;
  background: var(--second-bg-color);
  text-align: center;
  height: 20dvh;
}
footer h3 {
  font-size: 1.2rem;
  color: var(--main-color);
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.footer-social a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.7rem;
  cursor: pointer;
}
@media (max-width: 1024px) {
  /* جعل السكاشن تأخذ مساحة مناسبة */
  section {
    padding: 5rem 5% 2rem;
  }

  .home {
    flex-direction: column;
    text-align: center;
  }

  .home-content {
    width: 100%;
  }

  .home-img {
    width: 70%;
    margin-top: 2rem;
  }

  .home-img img {
    height: auto;
  }
  /* جعل الـ Skills تحت بعضها */
  .skills-container {
    grid-template-columns: 1fr; /* عمود واحد فقط */
    gap: 1.5rem;
  }
  /* جعل الـ Projects تحت بعضها */
  .projects,
  .project-grid {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .project-card {
    width: 100%;
    max-width: 1024px;
  }

  .nav-links {
    gap: 10px;
  }
  .nav-links li {
    margin-left: 10px;
    font-size: 0.8rem;
  }
}
