@media screen and (min-width: 1400px) {
    .section__pic-container {
        height: 350px;
        width: 350px;
        margin: auto 0;
    }

    .section-container, .about-details-container {
        width: 100%;
        max-width: 1400px; /* Ensures that the containers don't stretch beyond 1400px */
    }

    .contact-info-upper-container {
        width: 100%;
        max-width: 1400px; /* Ensures the container doesn't exceed 1400px width */
        justify-content: space-around; /* Evenly distributes the contact info containers */
        margin: 0 auto; /* Center aligns the container */
        gap: 2rem; /* Increases gap for better visual separation at larger screen sizes */
    }

    .contact-info-container {
    
        /* Provides more padding */
        justify-content: space-between; /* Ensures spacing is maintained between icon and text */
    }
}

@media screen and (max-width: 1400px) {
    #profile {
        height: 83vh;
        margin-bottom: 6rem;
    }
    .about-containers {
        flex-wrap: wrap;
    }
    .skills-row-1, .skills-row-2 {
        flex-wrap: wrap;
    }
}


@media screen and (max-width: 1200px) {
    #desktop-nav {
        display: none;
    }
    #hamburger-nav {
        display: flex;
    }
    #experience, .experience-details-container {
        margin-top: 2rem;
    }
    #profile, .section-container {
        display: block;
    }
    .arrow {
        display: none;
    }
    section, .section-container {
        height: fit-content;
    }
    section {
        margin: 0 5%;
    }
    .section__pic-container {
        width: 275px;
        height: 275px;
        margin: 0 auto 2rem;
    }
    .about-containers {
        margin-top: 0;
    }
}

@media screen and (max-width: 900px) {
    .skills-row-1, .skills-row-2 {
        flex-direction: column;
        align-items: center;
    }
    .skill-item {
        flex: 0 0 80%;
        max-width: 80%;
    }
}

@media screen and (max-width: 600px) {
    #contact, footer {
        height: 40vh;
    }
    #profile {
        height: 83vh;
        margin-bottom: 0;
    }
    article {
        font-size: 1rem;
    }
    footer nav {
        height: fit-content;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }
    .about-containers,
    .contact-info-upper-container,
    .btn-container {
        flex-wrap: wrap;
    }
    .contact-info-container {
        margin: 0;
    }
    .contact-info-container p,
    .nav-links li a {
        font-size: 1rem;
    }
    .experience-sub-title {
        font-size: 1.25rem;
    }
    .logo {
        font-size: 1.5rem;
    }
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    .section__pic-container {
        width: auto;
        height: 42vw;
        justify-content: center;
    }
    .about-details-container {
        margin-top: 20px;
    }
    .section__text__p2 {
        font-size: 1.25rem;
    }
    .title {
        font-size: 2rem;
    }
    .text-container {
        text-align: justify;
    }

    /* Adjust skills section for small screens */
    .skills-item-container {
        flex-direction: column;
        align-items: center;
    }
    .skills-row-1 {
        flex-direction: column;
        align-items: center;
        gap: 0rem;
    }
    .skill-item {
        flex: 0 0 50%;
        max-width: 100%;
        text-align: center;
    }
    .skill-item h4 {
        white-space: normal; /* Allows text to wrap naturally */
        overflow: visible; /* Ensures the text is not hidden */
        text-overflow: clip; /* Removes the ellipsis (...) */
        font-size: 1rem;
        font-weight: 600;
        width: 100%; /* Ensures it spans the full width */
        margin: 0; /* Removes default margins */
        padding: 0; /* Removes extra spacing */
        text-align: center; /* Ensures proper alignment */
        word-wrap: break-word; /* Breaks long words if necessary */
    }
    
    
    
    .skill-item .progress {
        height: 8px;
       
        position: relative;
        min-width: 200px; /* Ensures consistent size */
        max-width: 300px; /* Prevents excessive stretching */
        margin: auto;
    }
    .skill-item .skill-percent {
        font-size: 12px;
        top: -16px;
        right: -30px;
    }

    .contact-info-wrapper {
        margin-top: 1rem;
        align-items: center;
    }

    .contact-info-upper-container {
        flex-direction: column;
        gap: 0;
        align-items: center;
        margin-bottom: 0rem;
    }

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

    
    .row1 {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }
    .form-item .col-6 {
        justify-content: center;
        width: 30%;
        gap: 0rem;
    }
    .form-group {
        margin-top: 0.5rem;
    }

    .form-control {
        width: 100%;
        font-size: 0.9rem;
    }

    .contact-form-container {
        height: auto;
    }

    #send-message-btn {
        justify-content: center;
        width: 50%;
        margin-top: 0;
        padding: 0.7rem;
        display: block;
    }
    .form-group {
        width: 100%; /* Ensure the form fields expand properly */
        text-align: center; /* Keep labels aligned */
    }

    .btn-wrapper {
        flex-direction: column; /* Stack buttons vertically */
        align-items: center; /* Center align buttons */
    }

    .btn-wrapper .btn {
        width: 40%; /* Make buttons take up most of the screen width */
        min-width: auto; /* Remove minimum width restriction */
        padding: 0.8rem 1.2rem; /* Adjust padding */
        font-size: 0.8rem; /* Ensure text is readable */
    }

    .moream__text__p2 {
        font-size: 0.5rem; /* Slightly reduce font size */
    }
    .research-item {
        display: flex;
        text-align: justify; /* Justify text */
        margin-bottom: 15px; /* Space between items */
        margin-top: none;
    }
    .research-item p {
        font-size: 0.5rem; /* Reduce font size for readability */
        line-height: 1; /* Improve line spacing */
        word-wrap: break-word; /* Ensure text doesn't overflow */
    }

    .research-item a {
        display: block; /* Make links appear on a new line */
        font-size: 1.1rem; /* Adjust font size */
        word-wrap: break-word;
    }
    #theme-toggle-mobile {
        width: 35px;
      }
      
}
