main {
    gap: 0;
    > .wrapper {
        position: relative;
    }
}
h1.animated-title {
    font-size: 70px;
    letter-spacing: -1.4px;
    margin-top: -10px;
    font-weight: 600;
}
.filters {
    position: sticky;
    top: 70px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-block: 10px;
    margin-block: 21px 10px;
    background: var(--main-color);
    button,
    label {
        position: relative;
        padding: 13px 19px 9px;
        font-size: 16px;
        line-height: 110%;
        cursor: pointer;
        background-color: #f4f4f4;
        border-radius: 400px;
        transition: background-color .3s linear, color .3s linear;
        &:has(input:checked) {
            background-color: var(--accent-color);
            color: var(--main-color);
        }
        input {
            position: absolute;
            z-index: -10;
            opacity: 0;
        }
    }
    button.checked {
        background-color: var(--accent-color);
        color: var(--main-color);
    }
}
.projects {
    --gap: 20px;
    margin-bottom: 120px;
}
.year {
    display: grid;
    grid-template-columns: 456px 1fr;
    grid-template-rows: 0fr;
    padding-top: var(--gap);
    border-top: 1px solid #9a9a9a;
    transition: grid-template-rows .6s linear, border-color .3s linear;
    &:last-child {
        border-bottom: 1px solid #9a9a9a;
        label {
            margin-bottom: -1px;
        }
    }
    label {
        position: relative;
        min-height: 79px;
        cursor: pointer;
        padding-bottom: var(--gap);
        input {
            display: none;
        }
        span {
            font-weight: 700;
            font-size: 40px;
            line-height: 100%;
            letter-spacing: -0.4px;
            color: #9a9a9a;
            transition: color .3s linear;
            &::after {
                content: '\e905';
                display: inline-block;
                font: 40px / 100% icon;
                color: inherit;
                transition: transform .6s linear;
                transform-style: preserve-3d;
            }
        }
    }
    .items {
        position: relative;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--gap);
        padding-bottom: var(--gap);
        overflow: hidden;
        &::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(0deg, #FFF 0%, rgba(255, 255, 255, 0) 100%);
            transition: opacity .6s linear;
        }
    }
    .project {
        --left: 22px;
        --padding: 30px;
        position: relative;
        display: flex;
        align-items: end;
        overflow: hidden;
        height: 190px;
        padding: var(--padding) var(--padding) var(--padding) var(--left);
        background: #f5f5f5;
        pointer-events: none;
        &::before {
            content: '';
            position: absolute;
            z-index: 2;
            inset: 0;
            pointer-events: none;
            opacity: 0;
            background: #f5f5f5;
            transition: .3s linear;
        }
        > a {
            position: absolute;
            inset: 0;
            z-index: 4;
        }
        .title,
        img {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }
        .title {
            display: flex;
            align-items: center;
            justify-content: center;
            padding-inline: 26px;
            width: min(422px, 68%);
            background: url(../images/default-bg.svg);
            z-index: 3;
            b {
                padding-inline: 10px;
                font-size: 30px;
                font-weight: 700;
                line-height: 100%;
                text-align: center;
                letter-spacing: -0.6px;
                text-transform: uppercase;
                padding: 10px;
                border-bottom: 4px solid var(--primary);
            }
        }
        img {
            width: 100%;
            object-fit: contain;
            transition: transform .3s linear;
            opacity: 0;
            transition: .3s linear;
        }
        .box {
            display: grid;
            grid-template-columns: 1fr ;
            column-gap: 10px;
            width: 100%;
            height: 100%;
            padding-right: 40px;
            position: relative;
            z-index: 3;
            > * {
                position: relative;
                transform: translateX(var(--left));
                opacity: 0;
                transition: transform .3s linear, opacity .3s linear;
            }
            a {
                margin-top: auto;
                z-index: 2;
                margin-bottom: -1px;
                line-height: 100%;
                &::before {
                    content: '\e902';
                    display: inline-block;
                    font: 32px / 100% icon;
                    color: #9a9a9a;
                    transform: rotate(-45deg);
                    transition: color .3s linear;
                }
            }
        }
        .dot {
            --height: 24px;
            --right: 10px;
            font-weight: 600;
            font-size: 24px;
            letter-spacing: -0.48px;
            text-transform: uppercase;
        }
        p {
            letter-spacing: -0.16px;
            line-height: 100%;
        }
    }
    &:has(:checked) {
        border-color: var(--primary);
        grid-template-rows: 1fr;
        label span {
            position: sticky;
            top: 220px;
            color: var(--primary);
            &::after {
                transform: rotateX(180deg);
            }
        }
        .items::after {
            opacity: 0;
            pointer-events: none;
        }
        .project {
            pointer-events: all;
            img {
                opacity: 1;
            }
        }
    }
}
@media screen and (max-width: 1600px) {
    h1.animated-title {
        font-size: 60px;
        letter-spacing: -1.2px;
    }
    .projects {
        margin-bottom: 90px;
    }
    .year {
        grid-template-columns: 320px 1fr;
    }
}
@media screen and (max-width: 1240px) {
    h1.animated-title {
        font-size: 40px;
        letter-spacing: -0.8px;
    }
    .projects {
        container: projects / inline-size;
        @container projects (max-width: 1049px) {
            .year {
                grid-template-columns: 1fr;
                grid-template-rows: max-content 0fr;
                &:not(:last-child) {
                    margin-bottom: 20px;
                }
                &:last-child {
                    border-bottom: none
                }
                &:has(:checked) {
                    grid-template-rows: max-content 1fr;
                    label {
                        padding-bottom: 10px;
                    }
                }
                label {
                    min-height: initial;
                    padding-bottom: 0;
                    transition: padding-bottom .4s linear .2s;
                    span {
                        font-size: 24px;
                        letter-spacing: -0.24px;
                    }
                }
                .items {
                    grid-auto-rows: 1fr;
                    padding-bottom: 0;
                    &::after {
                        display: none;
                    }
                }
            }
        }
    }
    .year {
        label span {
            font-size: 30px;
            letter-spacing: -0.3px;
            &::after {
                font-size: 24px;
            }
        }
        .items {
            grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
            gap: 10px;
        }
        .project {
            --left: 12px;
            --padding: 20px;
            .title {
                max-width: 90%;
                padding: 6px;
                b {
                    font-size: 18px;
                    letter-spacing: -0.36px;
                }
            }
            .dot {
                font-size: 20px;
                letter-spacing: -0.4px;
            }
        }
    }
}
@media screen and (max-width: 1024px) {
    h1.animated-title {
        font-size: 32px;
        letter-spacing: -0.64px;
    }
    .filters {
        margin-inline: -30px;
        padding-inline: 30px;
        gap: 6px;
        margin-block: 20px 10px;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        &::-webkit-scrollbar {
            display: none;
        }
        button,
        label {
            flex-shrink: 0;
        }
    }
    .year {
        .items {
            grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
            grid-auto-rows: 400px;
            gap: 10px;
        }
        .project .dot {
            font-size: 22px;
            letter-spacing: -0.44px;
        }
    }
}
@media screen and (max-width: 768px) {
    .filters {
        top: 60px;
        margin-inline: -20px;
        padding-inline: 20px;
        button,
        label {
            padding: 12px 16px 10px;
            font-size: 14px;
            flex-shrink: 0;
        }
    }
    .year {
        .items {
            grid-template-columns: 1fr;
            gap: 20px;
        }
        .project {
            justify-content: end;
            padding: 0;
            .title {
                max-width: initial;
                margin-inline: 67px;
                b {
                    font-size: 16px;
                    letter-spacing: -0.32px;
                }
            }
           .box {
                margin-top: auto;
                height: auto;
                padding: 10px 10px 5px;
                background: rgba(245, 245, 245, 0.6);
                > * {
                    transform: translateX(0);
                    opacity: 1;
                }
                .dot {
                    margin-top: auto;
                }
                a {
                    display: none;
                }
           }
            /* img {
                width: 60%;
            } */
            .dot {
                font-size: 20px;
                letter-spacing: -0.4px;
            }
            p {
                font-size: 14px;
                letter-spacing: -0.14px;
            }
        }
    }
}
@media (hover: hover) and (min-width: 1025px) {
    .year {
        &:not(:has(:checked)):has(label:hover) {
            border-color: var(--accent-color);
            label span {
                color: var(--accent-color);
            }
            .items::after {
                opacity: .6;
            }
        }
        .project:hover {
            &::before {
                opacity: 1;
            }
            img {
                transform: translate(-50%, -50%) scale(1.1);
            }
            .box {
                > * {
                    transform: translateX(0);
                    opacity: 1;
                }
                a:hover::before {
                    color: var(--primary);
                }
            }
        }
    }
}
@media (max-width: 1024px),
(hover: none) and (pointer: coarse) {
    /* .year .project {
        --left: 0;
        --padding: 0;
        flex-direction: column;
        align-items: center;
        .title,
        img {
            position: static;
            transform: none;
            margin-block: 75px;
            aspect-ratio: 200 / 144;
        }
        img {
            margin-inline: 68px;
        }
        .box {
            display: grid;
            grid-template-columns: 1fr auto;
            column-gap: 10px;
            width: 100%;
            margin-top: auto;
            padding: 10px 5px 0 22px;
            background: var(--main-color);
            > * {
                opacity: 1;
            }
            a {
                z-index: 0;
            }
        }
    } */
}