.projects-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    max-width: 100%;
    gap: 1.2rem 1rem;
    padding-top: 2rem;
    margin-inline: auto;
    margin-bottom: 5rem;
}

.projects-filter__item {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    background: var(--color-inputs);
    border: 0.1rem solid transparent;
    border-radius: 10rem;
    font-family: var(--font-sora);
    font-size: 1.4rem;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
    color: var(--color-default);
    
    cursor: pointer;
    position: relative;
    transition: 0.3s ease-out;
}

.projects-filter__item:hover {
    background: var(--color-surface);
}

.projects-filter__item .projects-filter__item-inner {
    min-width: 5rem;
    min-height: 2.8rem;
    padding: 1rem 1.6rem;
    background: var(--color-inputs);
    border-radius: 10rem;
    font-family: var(--font-sora);
    font-size: 1.4rem;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
    color: var(--color-default);
    position: relative;
    z-index: 1;
}


.projects-filter__item:hover .projects-filter__item-inner {
    background: var(--color-surface);
}

.projects-filter__item::after {
    content: "";
    display: block;
    border-radius: 10rem;
    position: absolute;
    inset: 0;
    z-index: -2;
    transition: 0.3s;
    opacity: 0;
    
    background: linear-gradient(90deg, 
        #3A5EFD 0%, 
        #671CF5 25%, 
        #FE6C39 50%, 
        #FFC933 100%
    );
    filter: blur(0.5rem);
}


.projects-filter__item:hover::after {
    opacity: 1;
}

.projects-filter__item.active {
    background: transparent;
    border-color: transparent;
    
    background: linear-gradient(90deg, #3A5EFD 1%, #671CF5 22%, #FE6C39 74%, #FFC933 97%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: default;
}

.projects-filter__item.active::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10rem;
    padding: 0.13rem;
    background: linear-gradient(90deg, #3A5EFD 1%, #671CF5 22%, #FE6C39 74%, #FFC933 97%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}

.projects-filter__item.active::after {
    display: none;
}

.projects-filter__item.active .projects-filter__item-inner {
    border-color: transparent;
    background: linear-gradient(90deg, #3A5EFD 1%, #671CF5 22%, #FE6C39 74%, #FFC933 97%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: default;
}