/* Mobile styles (up to 768px) */
@media only screen and (max-width: 768px) {
    body {
        font-size: 14px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    nav ul li {
        margin: 10px 0;
    }

    /* Stack project items vertically on smaller screens */
    .project-list {
        flex-direction: column;
        gap: 1rem;
    }

    .project-item {
        width: 100%;
        margin-bottom: 20px;
    }

    /* Reduce section margin for compact spacing */
    section {
        margin: 10px;
        padding: 20px;
    }

    /* Adjusting the height of sections for smaller screens */
    section {
        height: auto;
        padding: 10px;
    }

    /* Stack profile section items vertically */
    #profile {
        flex-direction: column;
        gap: 2rem;
    }

    .section__pic-container {
        width: 100%;
        height: auto;
    }

    .section__text {
        text-align: center;
    }

    /* Contact form adjusts for smaller screens */
    form {
        width: 100%;
    }

    form button {
        width: 100%;
    }

    /* Adjust the footer height */
    footer {
        height: auto;
        padding: 20px;
    }
}

/* Tablet styles (768px to 1024px) */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    body {
        font-size: 15px;
    }

    nav ul {
        flex-direction: row;
        gap: 1.5rem;
    }

    /* Project items full-width on tablets */
    .project-item {
        width: 100%;
        margin-bottom: 20px;
    }

    section {
        margin: 15px;
        padding: 30px;
    }

    /* Profile section adjustments */
    #profile {
        flex-direction: column;
        gap: 2rem;
    }

    .section__pic-container {
        width: 80%;
        height: auto;
    }

    form {
        width: 100%;
    }

    form button {
        width: 100%;
    }

    footer {
        height: auto;
        padding: 25px;
    }
}

/* Large screens (Desktops 1024px and above) */
@media only screen and (min-width: 1024px) {
    body {
        font-size: 16px;
    }

    /* Project items side by side with space between */
    .project-list {
        display: flex;
        justify-content: space-between;
    }

    .project-item {
        width: 45%;
    }

    /* Larger margin for sections */
    section {
        margin: 20px;
        padding: 40px;
    }

    /* Profile section layout for large screens */
    #profile {
        flex-direction: row;
    }

    .section__pic-container {
        width: 400px;
        height: auto;
    }

    form {
        max-width: 600px;
    }

    footer {
        height: 26vh;
        padding: 20px;
    }
}
