#timeline {
    --col-gap: 1rem;
    --row-gap: 2rem;
    --line-w: 1px;
    display: grid;
    grid-template-columns: var(--line-w) 1fr;
    grid-auto-columns: max-content;
    column-gap: var(--col-gap);
    list-style: none;
    width: min(60rem, 90%);
    margin-inline: auto;
    margin: 0 auto;
}

/* line */
#timeline::before {
    content: "";
    grid-column: 1;
    grid-row: 1 / span 20;
    background: rgb(0, 0, 0);
    border-radius: calc(var(--line-w) / 2);
}

/* columns*/

/* row gaps */
#timeline li:not(:last-child) {
    margin-bottom: var(--row-gap);
}

/* card */
#timeline li {
    grid-column: 2;
    --inlineP: 1.5rem;
    margin-inline: var(--inlineP);
    grid-row: span 2;
    display: grid;
    grid-template-rows: min-content min-content min-content;
}

/* date */
#timeline li .line {

    height: 1px;
    margin-inline: calc(var(--inlineP) * -1);

    background-color: rgb(0, 0, 0);


    display: grid;
    place-content: center;
    position: relative;
}

#timeline li:first-child .line {
    display: none;
}


/* circle */
#timeline li .line::after {
    content: "";
    position: absolute;
    width: 10px;
    aspect-ratio: 1;
    background: rgb(0, 0, 0);
    border-radius: 50%;
    top: 50%;
    transform: translate(50%, -50%);
    right: calc(100% + var(--col-gap) + var(--line-w) / 2);
    z-index: 101;
}

#timeline li .line::before {
    content: "";
    z-index: 100;
    position: absolute;
    width: 1px;
    height: calc(2rem + 10px);
    aspect-ratio: 1;
    background: rgb(255, 255, 255);
    top: 50%;
    transform: translate(50%, -50%);
    right: calc(100% + var(--col-gap) + var(--line-w) / 2);
}


#timeline li .title {
    overflow: hidden;
    padding-block-start: 1.5rem;
    padding-block-end: 1rem;
    font-weight: 500;
}

#timeline li .descr {
    padding-block-end: 1.5rem;
    font-weight: 300;
}

/* shadows */
#timeline li .title::before,
#timeline li .descr::before {
    content: "";
    position: absolute;
    width: 90%;
    height: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    left: 50%;
    border-radius: 50%;
    filter: blur(4px);
    transform: translate(-50%, 50%);
}

#timeline li .title::before {
    bottom: calc(100% + 0.125rem);
}

#timeline li .descr::before {
    z-index: -1;
    bottom: 0.25rem;
}

@media (min-width: 40rem) {
    #timeline {
        grid-template-columns: 1fr var(--line-w) 1fr;
    }

    #timeline::before {
        grid-column: 2;
    }

    #timeline li:nth-child(odd) {
        grid-column: 1;
    }

    #timeline li:nth-child(even) {
        grid-column: 3;
    }

    /* start second card */
    #timeline li:nth-child(2) {
        grid-row: 2/4;
    }


    #timeline li:nth-child(odd) .line::after {
        transform: translate(-50%, -50%);
        left: calc(100% + var(--col-gap) + var(--line-w) / 2);
    }

    #timeline li:nth-child(odd) .line::before {
        transform: translate(-50%, -50%);
        left: calc(100% + var(--col-gap) + var(--line-w) / 2);
    }
}

#timeline .timeline-item {
    overflow: hidden;
    border-radius: 4px;
}

#timeline .timeline-item .ban {
    height: 240px;
    width: 100%;
    object-fit: cover;
    object-position: center;
    margin-top: var(--row-gap);
    ;
}

#timeline .timeline-item .box {
    background-color: #eeeeee;
    padding: 10px;
}

#timeline .timeline-item .box .time {
    font-weight: bold;
}

.loop-item img {
    height: 160px;
}
.loop-item .box {
    padding: 10px;
    background-color: #eeeeee;
    min-height: 100px;
    
}