* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: #333;
}

html {
    scroll-behavior: smooth;
}


html, body {
    overflow-x: hidden;
  }
  

  img {
    max-width: 100%;
    height: auto;
    display: block;
  }


a {
    color: #007bff;
    text-decoration: none;
}

/* Navbar */
nav {
    background-color: #222222d0;
    backdrop-filter: blur(3px);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

nav .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

nav .logo {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 1px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li a {
    color: #fff;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: #007bff;
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    height: 3px;
    width: 25px;
    background: #fff;
    margin-bottom: 5px;
    border-radius: 2px;
}

@media (max-width: 768px) {
    nav ul {
        position: fixed;
        top: 60px;
        right: -100%;
        background-color: #222;
        height: calc(100vh - 60px);
        width: 200px;
        flex-direction: column;
        padding-top: 20px;
        transition: right 0.3s ease;
    }

    nav ul.show {
        right: 0;
    }

    nav ul li {
        margin-bottom: 20px;
        text-align: center;
    }

    .menu-toggle {
        display: flex;
    }
}


/* Sections */
section {
    padding: 60px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

h1,
h2,
h3 {
    margin-bottom: 15px;
    color: #222;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    border-bottom: 3px solid #007bff;
    padding-bottom: 5px;
    margin-bottom: 25px;
}

p {
    margin-bottom: 15px;
    font-size: 1rem;
    color: #444;
}

/* About - First */
#about.first {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

#about.first .abt-cont {
    flex: 1;
    text-align: left;
}

#about.first .pfp1 {
    flex: 1;
    max-width: 400px;
    border-radius: 10px;
    overflow: hidden;
}

#about.first .pfp1 img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

#about.first .abt-cont h1 {
    font-size: 3rem;
    font-family: 'Times New Roman', Times, serif;
    margin-bottom: 10px;
  }
  
  #about.first .usp-cont h4 {
    font-size: 1.7rem;  
    font-weight: 600;
    color: #007bff;
    margin-bottom: 10px;
  }
  
  #about.first .usp {
    font-size: 1.5rem;
    font-family: 'Gabriola', cursive, sans-serif; 
    color: #444;
    letter-spacing: 0.5px;
  }

@media (max-width: 768px) {
    #about.first {
        flex-direction: column;
        text-align: center;
    }

    #about.first .abt-cont {
        text-align: center;
    }

    #about.first .pfp1 {
        max-width: 70%;
    }
}

/* About Second Section */
#about-second .about-second-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

#about-second .pfp {
    flex: 1;
    max-width: 380px;
    border-radius: 10px;
    overflow: hidden;
}

#about-second .pfp img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

#about-second .abt-cont {
    flex: 2;
    text-align: left;
}

/* Responsive */
@media (max-width: 768px) {
    #about-second .about-second-row {
        flex-direction: column;
        text-align: center;
    }
    #about-second .abt-cont {
        text-align: center;
    }
    #about-second .pfp {
        max-width: 70%;
        margin: 0 auto;
    }
}

/* Education Section */
#education {
    background: #fff;
    padding: 60px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 50px;
    margin-top: 20px;
  }

  
  #education h2 {
    text-align: center;
    margin-bottom: 40px;
  }
  
  .education-item {
    background: #f1f5f9;
    border-left: 5px solid #007bff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .education-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
  
  .education-item h3 {
    margin-bottom: 5px;
    color: #222;
    font-size: 1.3rem;
  }
  
  .education-item span {
    font-size: 0.95rem;
    color: #555;
    font-style: italic;
  }



/* Skills Section */
#skills .skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
  }
  
  #skills .skills-list {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
  }
  
  #skills .skills-list:hover {
    transform: translateY(-5px);
  }
  
  #skills .skills-list h3 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 1.4rem;
  }
  
  #skills .skills li {
    list-style: none;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
  }
  
  #skills .skills li:last-child {
    border-bottom: none;
  }



/* Projects */
.project {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.project-content {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.project-text {
    flex: 2;
    min-width: 250px;
}

.project-text h3 {
    margin-bottom: 15px;
    color: #007bff;
}

.project-image {
    flex: 1;
    min-width: 220px;
    max-width: 350px;
}

.project-image img {
    width: 100%;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .project-content {
        flex-direction: column;
        text-align: center;
    }

    .project-text {
        order: -1;
    }
}

/* Contact */
#contact p {
    margin-bottom: 10px;
}

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

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 50px;
}

footer p:first-child {
    font-size: 2.5rem;   /* كبير */
    font-family: 'Times New Roman', Times, serif;
    font-weight: bold;
    color: #222; 
    margin-bottom: 15px;
    display: inline-block;
    border-bottom: 3px solid #007bff;  /* الخط الأزرق */
    padding-bottom: 8px;
}

footer p:last-child {
    font-size: 1.1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #555;
    max-width: 700px;
    margin: 15px auto 0;
    line-height: 1.6;
}

/* Responsive General */
@media (max-width: 992px) {
    .first {
        flex-direction: column;
        text-align: center;
    }

    .pfp1 {
        height: auto !important;
        max-height: 320px;
    }
}

#education, #skills, #projects, #contact, footer {
    max-width: 100%;
    overflow-x: hidden;
}

/* ====== Fix for Sections Width on Laptop ====== */
@media (min-width: 992px) {
    #education,
    #skills,
    #projects,
    #contact {
      max-width: 1080px;
      margin: 50px auto;
      padding: 60px 20px;
    }
  
    footer {
      max-width: 900px;
      margin: 50px auto;
    }
  }

/* === Fix Spacing Between Project Images (My Work) === */
.project-image img {
    display: block;
    width: 100%;
    border-radius: 10px;
    margin-bottom: 20px;
  }
  
  .project-image img:last-child {
    margin-bottom: 0;
  }
  
  @media (max-width: 768px) {
    .project-image img {
      margin-bottom: 25px; 
    }
  }