#projects {
    width: 100vw;
    padding: 0 calc(var(--header-size, 0px) + var(--padding, 0px));
    padding-bottom: var(--header-size, 0px);
    gap: var(--padding, 0px);
}

#projects > layout-row.title {
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: calc(0.6875rem * 3);
}

#projects > layout-row.title > h4 {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    
    position: relative;
    
    font-weight: 600;
    font-size: 3rem;
    
    white-space: nowrap;
    letter-spacing: calc(3rem * var(--letter-spacing));
    
    width: 100%;
    gap: calc(0.6875rem * 3);
}

#projects > layout-row.title > h4::before {
    content: "";
    position: absolute;
    
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    
    top: 50%;
    right: 0;
    
    width: 9px;
    height: 9px;
    
    transform: translate(0, -50%) rotate(45deg);
    transform-origin: center;
}

#projects > layout-row.title > h4::after {
    content: "";
    
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    
    flex-shrink: 1;
    flex-grow: 1;
}

#projects > layout-row.title > a {
    color: rgb(255, 255, 255);
    background-color: rgb(0, 0, 0);
    border-radius: 2rem;
    
    font-weight: 500;
    font-size: 1rem;
    
    outline: 1px solid rgba(0, 0, 0, 0);
    outline-offset: 1.375rem;
    
    line-height: 1.175rem;
    letter-spacing: calc(1rem * var(--letter-spacing));
    
    padding: 1rem 2rem;
    
    transition: outline-color var(--transition), outline-offset var(--transition);
}

#projects > layout-row.title > a:hover {
    outline-color: rgba(0, 0, 0, 0.1);
    outline-offset: 0.6875rem;
}

#projects > layout-row.container {
    --row-items: 3;
    width: 100%;
    gap: var(--padding, 0px);
}

#projects > layout-row.container > a {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: flex-start;
    
    position: relative;
    
    flex-shrink: 0;
    flex-grow: 0;
    
    width: calc(100% / var(--row-items) - (var(--row-items) - 1) * var(--padding) / var(--row-items));
    gap: 12px;
}

#projects > layout-row.container > a::after {
    content: "";
    position: absolute;

    background-color: rgba(0, 0, 0, 0);
    
    top: 0;
    left: 0;
    
    transition: background-color var(--transition);
}

#projects > layout-row.container > a:hover::after {
    background-color: rgba(0, 0, 0, 0.25);
}

#projects > layout-row.container > a > img,
#projects > layout-row.container > a::after {
    pointer-events: none;
    border-radius: 0.75rem;
    width: 100%;
    aspect-ratio: calc(4 / 3);
}

#projects > layout-row.container > a > img {
    
}

#projects > layout-row.container > a > span.title {
    color: rgb(0, 0, 0);
    
    font-weight: 600;
    font-size: 1.35rem;
    
    pointer-events: none;
    
    white-space: normal;
    line-height: calc(1.35rem * 1.5);
    letter-spacing: calc(1.35rem * var(--default-letter-spacing));
    
    margin-top: 8px;
}

#projects > layout-row.container > a > span.action {
    position: relative;
    
    opacity: 0.25;
    color: rgb(0, 0, 0);
    
    font-weight: 500;
    font-size: 0.925rem;
    
    pointer-events: none;
    
    line-height: 0.925rem;
    letter-spacing: calc(0.925rem * var(--letter-spacing) * 0.5);
    
    transition: opacity var(--transition);
}

#projects > layout-row.container > a > span.action::after {
    content: "";
    position: absolute;
    
    opacity: 0.75;
    
    background-image: url(/icons/redirect.svg);
    background-repeat: no-repeat;
    background-position: center;
    
    top: 50%;
    left: 100%;
    
    width: 1rem;
    height: 1rem;
    
    filter: brightness(0);
    transform: translateY(-50%) translateX(0.25rem);
}

#projects > layout-row.container > a:hover > span.action {
    opacity: 0.5;
}

#projects > a {
    display: none;
    
    color: rgb(255, 255, 255);
    background-color: rgb(0, 0, 0);
    border-radius: 2rem;
    
    font-weight: 500;
    font-size: 1rem;
    
    text-align: center;
    
    outline: 1px solid rgba(0, 0, 0, 0);
    outline-offset: 1.375rem;
    
    line-height: 1.175rem;
    letter-spacing: calc(1rem * var(--letter-spacing));
    
    width: 100%;
    padding: 1rem 0;
    
    transition: outline-color var(--transition), outline-offset var(--transition);
}

#projects > a:hover {
    outline-color: rgba(0, 0, 0, 0.1);
    outline-offset: calc(1.375rem / 2);
}

@media (max-width: 1240px) {
    #projects {
        padding: var(--padding, 0px);
        gap: calc(var(--padding, 0px) * 2);
    }
    
    #projects > layout-row.container {
        --row-items: 2;
    }
    
    #projects > layout-row.container > *:nth-child(n + 3) {
        display: none;
    }
}

@media (max-width: calc(37.5rem + 2rem * 2)) {
    #projects > a {
        display: block;
    }
    
    #projects {
        border-top: 1px solid rgb(240, 240, 240);
        gap: var(--padding, 0px);
    }
    
    #projects > layout-row.title {
        container-type: inline-size;
    }
    
    #projects > layout-row.title > h4 {
        font-size: calc(15cqi * var(--multiplier, 1));
        line-height: calc(15cqi * var(--multiplier, 1) * 0.75);
        letter-spacing: calc(15cqi * var(--multiplier, 1) * var(--letter-spacing));
    }
    
    #projects > layout-row.title > h4::before,
    #projects > layout-row.title > h4::after {
        content: none;
    }
    
    #projects > layout-row.title > a {
        display: none;
    }
    
    #projects > layout-row.container {
        --row-items: 1;
        flex-direction: column;
    }
}