body {
    font-family: 'Inknut Antiqua', serif;
    background-color: #f3f0e5;
    margin: 0;
    padding: 0;
}

.navbar {
    display: flex;
    align-items: center;
    /* justify-content: space-between; */
    padding: 10px 10px 10px 35px;
    background-color: #f3f0e5;
}

.toggle-button {
    display: none;
    font-size: 2.5em;
    padding: 10px 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: #b13d3d;
    margin-right: 20px;
}

.navbar-links {
    display: flex;
    gap: 20px;
}

.navbar-links a {
    text-decoration: none;
    font-size: 3em;
    color: #b13d3d;
    transition: color 0.3s;
    margin: 20px;
}

.navbar-links a:nth-child(1) {
    color: #81161C;
}

.navbar-links a:nth-child(2) {
    color: #CC1D33;
}

.navbar-links a:nth-child(3) {
    color: #c96a4d;
}

.navbar-links a:nth-child(4) {
    color: #d68a4d;
}

.navbar-links a:hover {
    color: #000;
}

.projects {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: 10vw;
    margin-right: 10vw;
    margin-bottom: 150px;
    justify-content: flex-start;
    /* Distribute space between items */
    align-items: center;
}

#project {
    flex: 1 1 calc((100% - 60px) / 4);
    /* Four items per row with space in between */
    aspect-ratio: 5 / 3;
    /* Maintain the 5:3 aspect ratio */
    /* border: 1px solid black; */
    border-radius: 25px;
    max-width: calc((100% - 60px) / 4);
    /* Ensure the max width of each project */
    min-width: 200px;
    /* Ensure a minimum width */
}

#project {
    display: grid;
    grid-template-rows: 2fr 1fr;
    grid-template-columns: 1fr;
    overflow: hidden;
}

.projects a {
    text-decoration: none;
    /* Remove underline from links */
}

#project div {
    background-color: white;
    cursor: pointer;
    text-align: center;
    line-height: 1fr;
    /* border: 1px solid #ccc; */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    overflow: hidden;
    /* Optional: Adjust text size */


}

#project div:nth-child(1) {
    padding-top: 10px;

}

#project div:nth-child(2) {
    background-color: #ffffff;
    overflow: visible;

}

#project div:nth-child(2) p {
    margin: 10px;
    font-family: -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    font-weight: 500;
    font-size: 1.2em;
    color: #CC1D33;
    position: relative;
    top: -5px;

}

#project div:empty {
    display: none;
}

img {
    width: 80%;
    /* 50% of the parent element's width */
    height: auto;
}

/* .projects div:hover {
    background-color: rgba(0, 191, 255, 0.096);
} */


/* Adjust layout for smaller screens */
@media (max-width: 1559px) {
    #project {
        flex: 1 1 calc((100% - 40px) / 3);
        /* Three items per row */
        max-width: calc((100% - 40px) / 3);
    }
}

@media (max-width: 1083px) {
    #project {
        flex: 1 1 calc((100% - 20px) / 2);
        /* Two items per row */
        max-width: calc((100% - 20px) / 2);
    }
}



/* .projects {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-left: 10vw;
    margin-right: 10vw;
    margin-bottom: 150px;
    justify-content: flex-start;
    align-items: center;
}

#project {
    flex-grow: 1;
    height: 300px;
    width: 500px;
    min-height: 200px;
    max-width: 500px;
    border: 1px solid black;
    border-radius: 25px;
}


*/
@media (max-width: 1023px) {
    .navbar {
        flex-direction: column;
        align-items: flex-end;
    }

    .toggle-button {
        display: block;
    }

    .navbar-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 0;
        overflow: hidden;
        transition: height 0.5s ease-out;
    }

    .navbar-links a {
        margin: 10px;
        width: auto;
        text-align: right;
        padding-right: 15px;
        margin-right: 15px;
        opacity: 0;
        height: 1.5em;
        font-size: 2em;
        transform: translateY(-20px);
        transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    }

    .navbar-links.active {
        height: auto;
        /* To smoothly transition the height to fit the content */
        margin-bottom: 20px;
    }

    .navbar-links.active a {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.1s;
    }

    .navbar-links.active a:nth-child(2) {
        transition-delay: 0.25s;
    }

    .navbar-links.active a:nth-child(3) {
        transition-delay: 0.4s;
    }

    .navbar-links.active a:nth-child(4) {
        transition-delay: 0.55s;
    }

    .projects {
        flex-direction: column;
        margin-left: 10vw;
        margin-right: 10vw;
        width: 80vw;
        justify-content: center;
        align-items: center;
    }

    #project {
        min-width: 80vw;
        min-height: 60vw;

    }

    #project div:nth-child(2) p {
        margin: 10px;
        font-size: 20px;

    }

}

@media (max-width: 720px) {
    #project {
        flex: 1 1 100%;
        /* One item per row */
        max-width: 100%;
    }

    #project div:nth-child(2) p {
        margin: 10px;
        font-size: 18px;
        top: 0%;
    }

}