/* 
project.css
Author: John Wesley Thompson
Created: 5/26/2026
Last Edited: 6/9/2026
*/


#projects {
    padding-block: 50px;
    padding-inline: var(--content-padding);
    margin-top: 50px;
    scroll-margin-top: 5rem;

    background-color: #0a0a0a;
}
#projects h3 {
    transform: translateX(-1ch);
}
#projects ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
    list-style: none;
    padding: 0;
    margin-top: var(--space-l);
}
#projects li {
    display: grid;
    grid-template-columns: auto 4fr;
    grid-template-rows: 1fr;
    grid-template-areas:
    "thumbnail info info info null";
    position: relative;
    background-color: #131313;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 5px;
    overflow: hidden;
    z-index: 0;

    transform-origin: center bottom;
    transition: transform 0.2s, background-color 0.5s;
}
#projects li:hover {
    cursor: pointer;
    transform: translateY(-0.2rem);
    background-color: #232323;

    .x-shape-decor {
        color: rgb(var(--blue-accent-rgb) / 0.5);
    }

    h4 {
        color: rgb(var(--blue-accent-rgb) / 0.5);
    }
}

.project-img-wrapper {
    grid-area: thumbnail;
    position: relative;
    width: 200px;
    height: 100%;
    border-right: 1px solid rgba(var(--secondary-text-color));
    box-shadow: 3px 0px 2px black;
    overflow: hidden;

    transition: width 0.3s, height 0.3s;
}
.project-img-wrapper.expanded {
    width: 300px;
    height: auto;
    overflow: visible;
}

.project-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;

    transition: width 0.3s, height 0.3s;
}

.project-info {
    grid-area: info;
    display: flex;
    gap: calc(var(--space-s) + var(--space-xs));
    flex-direction: column;
    width: 75%;
    margin: 15px 20px;
    text-shadow: 3px 3px 4px black;
    font-size: var(--base-font-size-sm);
    color: rgba(var(--secondary-text-color));
}
.project-info h4 {
    position: relative;
    font-size: var(--base-font-size-lg);
    margin: 0;

    z-index: 0;

    transition: color 0.3s;
}
.more-info {
    max-height: 0px;
    opacity: 0;
    overflow: hidden;
    white-space: pre-line;

    transition: max-height 0.5s ease, opacity 0.5s;
}
.more-info.show {
    max-height: 250px;
    opacity: 1;
}

#projects .project-info p {
    font-family: ubuntu;
    line-height: var(--base-line-height);
    margin: 0;
}
.project-languages {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}
.language-used {
    padding: 5px 10px;
    border-radius: 10px;
    box-shadow: 1px 1px 3px black;
    text-shadow: none;
    background-color: #1a1a1a;
    font-family: Ubuntu;
    font-size: var(--base-font-size-sm);
    color: rgba(var(--secondary-text-color));
}
.project-link {
    display: block;
    width: fit-content;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    box-shadow: 1px 1px 3px black;
    background: #1a1a1a;
    font-family: Ubuntu;
    color: rgba(var(--secondary-text-color));
    text-decoration: none;
    text-shadow: none;
}
.project-link:hover {
    background-color: #232323;
}

.x-shape-decor {
    font-family: Xfont;
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 3rem;
    color: #232323;
    transition: color 0.3s;

    z-index: -1;
}

@media screen and (max-width: 760px) {
    #projects li {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        grid-template-areas: 
        "thumbnail"
        "info";
    }

    .project-img-wrapper {
        height: 150px;
        width: 100%;
        border-bottom: 1px solid rgba(var(--secondary-text-color));
        border-right: none;
        box-shadow: 0px 3px 2px black;
    }
    .project-img-wrapper.expanded {
        width: auto;
        height: 150px;
    }

    .x-shape-decor {
        top: auto;
        bottom: 0;
        right: 1rem;
    }

    .more-info.show {
        max-height: 300px;
    }
}