.project-list {
    display:flex;
    flex-direction: grid;
    justify-content: space-evenly;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px;
}

.portfolio-button {
    background-color: var(--primary-color);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: start;
    gap: 20px;
    width: 350px;
    height: max(450px, fit-content);
    padding-top:10px;
    padding-bottom: 10px;
    padding-left: 10px;
    padding-right: 10px;
    border: 5px solid rgb(21, 36, 36);
    transition: 
        transform ease-out 0.1s,
        background-color 0.1s;
    box-shadow: 0 0 0.2rem rgba(0, 0, 0, 0.5);
}

/* animate-on-view is already applied to element at load time so we are using this to initialize the proper values to avoid flickering*/
.portfolio-button.animate-on-view {
    opacity: 0;
}

.portfolio-button.animate-in {
    animation-name: pop-in;
    animation-duration: 0.5s;
    animation-fill-mode: forwards;
}

@keyframes pop-in {
    from {
        opacity: 0;
        translate: 0 20px;
    }

    to {
        opacity: 1;
        translate: 0 0;
    }
}

.portfolio-button:hover {
    background-color: var(--highlight-color-low);
    transform: scale(1.01);
    border-color: transparent;
    outline: 0.2rem var(--highlight-color-high) solid;
    outline-offset: 0.1rem;
    animation-duration: 0.2s;
    animation-name: pop-in, hover-outline;
}

.portfolio-button h3 {
    margin: 0;
    vertical-align: top;
}

.portfolio-button p {
    margin: 0;
    vertical-align: top;
}

@keyframes hover-outline {
    from {
        outline-offset: 0.5rem;
        outline-color: transparent;
    }

    to {
        outline-offset: 0.1rem;
        outline-color: var(--highlight-color-high);
    }
}

.portfolio-button .rounded-button {
    background-color: hsl(from var(--primary-color) h s calc(l + 5));
    margin-top: auto;
    height: 40px;
    transition: background-color 0.1s;
}

.portfolio-button .rounded-button:hover {
    background-color: hsl(from var(--highlight-color-high) h s calc(l + 5));
}

.modal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(29, 29, 29, 0.733);
    justify-content: center;
    align-items: center;
    animation-duration: 0.3s;
    animation-name: fade-in;
    z-index: 200;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--blank-space-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 5% 10%;
    border-radius: 10px;
    border: 4px solid var(--highlight-color-high);
    padding: 10px;
    width: 80%;
    height: 80%;
    max-width: 600px;
    animation-duration: 0.3s;
    animation-name: slide-in-up;
}

@keyframes slide-in-up {
    from {
        translate: 0 40px;
    }
    
    to {
        translate: 0 0;
    }
}

.modal-content hr {
    margin: 5px 0 5px 0;
    height: 0px;
    width: 100%;
    border: solid 2px;
    border-color: inherit;
}

.modal-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    margin: 0 0 5px 0;
}

.modal-header h2 {
    color: var(--primary-text-color);
    margin: 0 1rem 0 1rem;
    font-size: clamp(20px, calc(20vw - 80px), 30px);
    height: 34px;
    line-height: 34px;
    vertical-align: middle;
}

.modal-body {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 90%;
    width: 100%;
    margin: 5px 0 0 0;
}

.modal-body img {
    width: 90%;
    align-self: center;
}

.close {
    background-color: var(--negative-color);
    color: var(--primary-text-color);
    width: 30px;
    height: 30px;
    font-size: 27px;
    display: flex;
    justify-content: center;
    border: 2px solid black;
    border-radius: 5px;
    vertical-align: middle;
    line-height: 28px;
}

.close:hover {
    background-color: var(--negative-color-highlight);
    cursor: pointer;
}

.project-thumbnail {
    width: 100%;
    height: auto;
    align-self: center;
}

.filters {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1vw;
}

.filters a {
    margin: 0 0.5vw 0 0.5vw;
    padding: 0;
    height: 2rem;
    display: flex;
    text-decoration: none;
    border-radius: 30px;
}

.filter-button {
    margin: 0;
    height: 100%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: inherit;
    outline-color: transparent;
    transition: 
        background-color 0.1s,
        outline-color 0.1s;
}

.filter-button:hover {
    background-color: var(--highlight-color-low);
    outline: 2px solid;
    outline-color: var(--highlight-color-high);
}

.filter-button h3 {
    margin: 0;
    padding: 15px;
    font-size: clamp(12px, 2vw, 19px);
}

.filter-button-section {
    margin: 30px;
    display: flex;
    justify-content: center;
}

.all-filters {
    display: none;
    align-items: center;
    flex-direction: row;
    background-color: var(--primary-color);
    color: var(--primary-text-color);
    padding: 0.5rem;
    width: fit-content;
    border: 2px solid black;
    border-radius: 8px;
    cursor: pointer;
    align-self: center;
    transition:
      background-color 0.1s;
}

.all-filters:hover {
    background-color: var(--highlight-color-low);
}

.all-filters img {
    width: 20px;
    height: 20px;
    padding-right: 5px;
}

.all-filters p {
    margin: 0;
}

.filter-list a {
    margin-top: 10px;
    text-decoration: none;
}

.filter-list {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    width: 100%;
}

.filter-button.list-view {
    border: solid 2px var(--dark-space-color);
    border-radius: 5px;
    justify-content: flex-start;
}

.filter-button.list-view h3 {
    font-size: 19px;
}

@media (max-width: 600px) {
    .filters {
        display: none;
    }

    .all-filters {
        display: flex;
    }
}