




#project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 20px;
  grid-auto-flow: dense;
  justify-items: center;
}


@media (min-width: 768px) {
  #project-grid { 
    grid-template-columns: repeat(2, 1fr);
  }
}

.title{
    margin: 0 0 20px;
    padding: 60px 0 10px;
    font-size: 3em;
}

.project-container{
    aspect-ratio: 16 / 9;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8)), url("/assets/osric.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    text-decoration: none;
    width: 97%;
    max-width: 97%;
    justify-self: center;
    margin: 0;
}

.project-container:hover {
    cursor: default;
}

.project-title {
    font-size: clamp(1.5em, 1.5vw, 3em);
    font-weight: bold;
    color: white;
    margin-bottom: 5px;
}

.project-description {
    font-size: clamp(0.5em, 1.2vw, 2em); 
    text-align: left;
    margin: auto 10px;
    opacity: 0;
}

@media(max-width: 767px) {
    .project-description {
        font-size: clamp(0.5em, 2.5vw, 3em); 
    }
}

.expanded-project{
    background-color: rgba(0, 0, 0, 0.7);
    background-blend-mode: darken;
    transition: background-color 1s ease-in-out;
}

.expanded-project .project-description {
    opacity: 1;
    transition: opacity 1s ease-in-out;
}

@media (max-width: 500px){
    .expanded-project{
        grid-row: span 1.5;
        width: min(100%, 1100px);
        justify-self: center;
        aspect-ratio: 16 / 12;
    }

    .project-container:only-child {
        grid-row: 1 / -1;
        width: min(100%, 800px);
        justify-self: center;
    }
} 

.filter {
    display: inline-block;
    padding: 8px 16px;
    margin: 3px;
    background-color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.filter span {
    font-size: 14px;
}

.filter:hover {
    background-color: #555;
}

.filter.selected {
    transform: translateY(-1px);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2) inset;
}

.filter.selected span{
    color: black;
    font-weight: bold;
}

.project-container.hidden {
    display: none;
}

#filter-container{
    white-space: nowrap;
    overflow-x: auto;
    padding: 0 20px 0 20px;
}
