body {
    margin: 50px auto;
    background-size: cover;
    background-repeat: no-repeat;
}

#lglabel {
    margin-bottom: 5px;
    font-weight: bold;
}

#legend {
    list-style: none;
    padding: 0 0 20px 0;
    display: flex;
    align-content: center;
    justify-content: center;
    font-size: 0.8em;
    flex-wrap: wrap;
    margin-top: 0;
}

#legend a {
    margin: 5px 10px;
    white-space: nowrap;
}

#legend a svg {
    position: relative;
    top: 0.1em;
    margin-right: 4px;
    height: 1em;
}

.boxes {
    display: flex;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
    column-gap: 20px;
    row-gap: 40px;
}

.wrap {
    width: 90%;
    text-align: center;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-content: flex-start;
    flex-wrap: wrap;
    gap: 15px;
}


/*
#sh {
    color: white;
    background-color: black;
}
*/

h2 {
  width: 100%;
  margin: 10px 0 0 0;
}

.whole {
    display: flex;
    column-gap: 10px;
}

.block {
    position: relative;
}

.project {
    margin: 10px 0;
    /* filter: grayscale(100%); */
    background-color: var(--hlcolor);
    color: var(--txtcolor);
    width: 250px;
    height: 300px;
    /*border-radius: 10px;*/
    display: flex;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    overflow: hidden;
}

#cat {
    align-self: center;
    margin: 0 auto;
}

.icons li, #name {
    padding: 3px 2px 0px 2px;
}

.icons {
    position: absolute;
    top: -10px;
    left: -10px;
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    column-gap: 3px;
    width: fit-content;
}

.icons li {
    background: transparent;
    width: 25px;
}


#name {
    background: var(--bgcolor);
    max-width: max-content;
    text-align: right;
    position: absolute;
    bottom: -5px;
    right: -5px;
}

.subproject {
    text-align: left;
    max-width: 200px;
    align-self: center;
}

#subttl {
    font-size: 0.8em;
    font-weight: bold;
}
#subcat {
    font-size: 0.8em;
}

#cat {
    font-weight: bold;
    display: none;
}

p#subtext {
    margin: 5px 0;
}

.whole:hover .project{
    background-blend-mode: multiply;
}

.whole:hover .icons li, .whole:hover #name {
    color: var(--bgcolor);
    background: var(--hlcolor);
}

.whole:hover #subttl, .whole:hover #subcat {
    color: var(--hlcolor);
}

.whole:hover #cat {
    color: var(--bgcolor);
    background: var(--hlcolor);
    padding: 3px 2px 0px 2px;
    display: block;
}

#happytimes {
    font-family: happytimes;
    font-weight: bold;
}

#vagra {
    font-family: vagra;
    font-size: 160%;
}

#boecklins {
    font-family: boecklins;
}


@media only screen and (max-width: 480px) {
    .wrap {
        width: 100%;
        max-width: 480px;
        gap: 10px;
    }
    
    .project {
        width: 40vw;
        height: 50vw;
    }

    #name {
        font-size: 0.8em;
        max-width: 65%;
        overflow-wrap: break-word;
    }
    
    #cat {
        font-size: 1em;
    }

    body {
        margin: 50px 20px 30px 20px; 
    }
    
    .project:hover {
        filter: none;
    }

    .subproject {
        display: none;
    }
}

