:root {
    --size: .625em;
    --highlight: #B3D061;
}

section.timeline, section.timeline article { display: grid }

.timeline {
	place-self: center;
    max-width:60rem;
}
	
.timeline article {

    


    grid-gap: 2em;
    grid-template-columns: 1fr 1fr;
    margin-top: -1px;
    background: 
        var(--marker), 
        linear-gradient(var(--highlight) 0 0) 50%/ 2px;
    background-repeat: no-repeat;
    --marker: 
    radial-gradient(circle closest-side, 
            var(--highlight) calc(100% - 1px), transparent) 
        0 0/ 100% var(--size);
}

.timeline article:not(:first-child) .timeline__content {
    visibility: hidden;
    opacity: 0;
    transition: all 0.5s ease-in-out;
}
	
	

.timeline article:first-child {
    --marker: 
        linear-gradient(var(--highlight) 0 0) 
            50% 0/ var(--size) calc(.5*var(--size))
}

.timeline article:nth-of-type(odd) .timeline__content {
    /* transform: translate3d(100px, -10px, 0); */
}

.timeline article:nth-of-type(even) .timeline__content {
    /* transform: translate3d(-100px, -10px, 0); */
}

.timeline article.in-view .timeline__content {
    transform: none;
    visibility: visible;
    opacity: 1;
}


.timeline article:nth-child(odd) .data {			
    grid-area: 1 / 1;
    justify-self: end;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.timeline article:nth-child(odd) time {
    justify-self: end;
}

.timeline article&:not(:last-child) { padding-bottom: 1em }


.timeline article > * { 
    border-radius: var(--size) 
}

.timeline__content {
    border: solid 2px;
    padding: 2em;
    background-color: #2d334d;
}

.timeline article h1 {
    margin: 0 0 var(--size);
    color: #B3D061;
    font: italic 1.375em/1 rosario, sans-serif;
    text-transform: capitalize;
}

.timeline article ime { font: 700 2.5em/ 1.25 roboto mono, monospace }

.timeline article hr { opacity: .3 }

.timeline article p {
    margin: 0;
    padding-top: .5em;
    font: 1em proza libre, sans-serif;
    width: 100%;
    height: 105px;
    overflow: hidden;
}

.timeline article img {
    box-sizing: border-box;
    width: min(100%, 290px);
    aspect-ratio: 1.3;
    object-fit: cover;
    border-radius: 5px;
}

.timeline time {
    font: 700 2.5em / 1.25 roboto mono, monospace;
}

img.no-image-content {
    opacity: 0;
}

.timeline article:not(:last-child)
 {
    padding-bottom: 4em;
}

.timeline .data {
    display: flex;
    flex-direction: column;
}

@media(max-width:1200px) {

    .timeline {
        max-width:350px;
        margin-top:3em;
    }

    .timeline article:nth-child(odd) .data {
        grid-area: auto;
        justify-self: end;
        align-items: flex-start;
        width: 100%;
    }

    .timeline article {
        grid-template-columns: 1fr 1px;
        background: var(--marker), linear-gradient(var(--highlight) 0 0) 98% / 2px;
        background-repeat: no-repeat;
        
    }

    .timeline article:not(:first-child) {
        --marker: radial-gradient(circle closest-side, 
            var(--highlight) calc(100% - 1px), transparent) 
        0 0/ 195% var(--size);
    }

    .timeline article:first-child {
        --marker: linear-gradient(var(--highlight) 0 0) 98% 0 / var(--size) calc(.5 * var(--size));
    }

    .timeline article:not(:last-child)
    {
        padding-bottom: 3em;
    }

    .timeline article img {
        display: none;
    }


}

@media(max-width:628px) {
    .timeline {
        position:relative;
        max-width:250px;
        margin-top:6em;
    }

    .timeline article {
        grid-template-columns: 1fr 1px;
        background: var(--marker), linear-gradient(var(--highlight) 0 0) 50% / 2px;
        background-repeat: no-repeat;
        
    }

    .timeline article:first-child {
        --marker: linear-gradient(var(--highlight) 0 0) 50% 0 / var(--size) calc(.5 * var(--size));
    }

    .timeline article:not(:first-child) {
        --marker: radial-gradient(circle closest-side, 
            transparent calc(100% - 1px), transparent) 
        0 0/ 50% var(--size);
    }

    .timeline article:not(:last-child)
    {
        padding-bottom: 7em;
    }

    .timeline .data {
        position: absolute;
    }

    .timeline .data time {
        position: absolute;
        top: -45px;
        right: -292px;
        background-color: #fffffff7;
        color: #2d334d;
        width: max-content;
        padding: 0 5px;
        border-radius: 5px;
    }

    .timeline article:nth-child(odd) .data time {
        right: 15px;
    }
}
