/* General Styling */




@media (max-width: 1080px) {
  /* NAVIGATION */
  /* Prevent horizontal scrolling */
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  #desktop-nav .logo {
    display: none;
  }

  nav {
    padding: 0 1rem;
    height: 3vh;
  }

  .nav-links {
    display: none;
  }

  #hamburger-nav {
    display: flex;
    position: sticky; /* Use sticky instead of fixed */
    margin-top: 2rem;
  }

  section,
  .container,
  .contact-container,
  .work-container {
    max-width: 100%;
    overflow: hidden;
  }

  section {
    padding: 2rem;
  }

  /* PROFILE SECTION */
  #profile {
    display: flex;
    flex-direction: column; /* Stack image above text */
    align-items: center; /* Center everything horizontally */
    justify-content: center; /* Center vertically */
    text-align: center; /* Ensure text alignment */
    width: 100%;
    height: auto;
    margin-top: 17rem; /* Adjust spacing */
    gap: 1.5rem; /* Space between image and text */
  }


  .section__text {
    text-align: center;
    max-width: 90%;
    margin-left: 0;
  }
  .section__text__p1{
    text-align: center;
  }
  .section__text__p2{
    text-align: center;
  }

  .title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
  }

  /* About Section */
  #about {
    flex-direction: column;
    gap: 2rem;
    margin-top: 17rem;
    margin-left: 2rem;
    margin-right: 2rem;
  }

  .about__start h1 {
    font-size: 3rem;
    text-align: center;
  }

  .about-containers {
    flex-direction: column;
    align-items: center;
  }

  .about-details-container{
    text-align: center;
  }

  /* Make detail containers horizontal */
  .details-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    max-width: 100%;
    padding: 1rem;
  }

  /* Work Section */
  #work {
    padding: 2rem;
  }

  .work-container {
    grid-template-columns: 1fr; /* One column layout on smaller screens */
    gap: 20px;
  }

  .work-item {
    width: 100%; /* Full-width items */
  }

  .title1 {
    font-size: 4rem;
  }

  /* CONTACT SECTION (Fixing form responsiveness on iPhones) */
  #contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 5rem;
    width: 100%;
    padding: 0 1rem; /* Added padding to prevent overflow */
    box-sizing: border-box; /* Ensures padding doesn't add extra width */
  }

  .contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%; /* Ensuring it does not go beyond screen width */
  }

  .contact-text h1 {
    font-size: 2.2rem;
  }

  .contact-text {
    flex-direction: column;
    align-items: center;
    white-space: normal;
  }

  .contact-text p {
    font-size: 1rem;
    white-space: normal;

  }

  .contact-form {
    width: 100%;
    max-width: 90%; /* Ensures form does not exceed screen width */
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  /* Adjust contact form boxes to grow vertically on smaller screens */
  .contact-form input,
  .contact-form textarea {
    width: 100%;
    max-width: 100%; /* Prevents overflow */
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Prevents width issues */
    min-height: 3rem; /* Ensures fields grow vertically */
  }

  .contact-form textarea {
    resize: none; /* Prevent users from resizing and causing overflow */
    height: auto;
    min-height: 150px; /* Allows textarea to grow */
  }

  .contact-form button {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    background: black;
    color: white;
    border: none;
    cursor: pointer;
  }

  /* Prevents unwanted horizontal scrolling */
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Hamburger menu styling for mobile devices */
  .hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 24px;
    width: 30px;
  }

  .hamburger-icon span {
    width: 100%;
    background: black;
    height: 2px;
    transition: all 0.3s ease-in-out;
  }

  .menu-links {
    width: fit-content;
    transition: all 0.3s ease-in-out;
  }
  .menu-links a {
    font-size: 1.5rem;
    color: black;
    transition: all 0.3s ease-in-out;
  }

  .menu-links li {
    list-style: none;
  }
  .menu-links.open {
    max-height: 300px;
  }



  .hamburger-icon.open span:first-child {
    transform: rotate(45deg) translate(10px, 5px);
  }

  .hamburger-icon.open span:nth-child(2) {
    opacity: 0;
  }

  .hamburger-icon.open span:last-child {
    transform: rotate(-45deg) translate(10px, -5px);
  }
}
