/* ─── Generations Timeline ─── */

.c-gen-tl {
    position: relative;
}
@media (min-width: 992px) {
    .c-gen-tl {
        padding: 2.5rem 0;
    }
}
/* ─── Item ─── */
.c-gen-tl__item + .c-gen-tl__item {
    margin-top: 60px;
}

/* ─── Layout: 3-column grid on desktop ─── */
.c-gen-tl__row {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

@media (min-width: 992px) {
    .c-gen-tl__row {
        display: grid;
        grid-template-columns: 1fr 80px 1fr;
        align-items: start;
        text-align: left;
    }
}

/* ─── Columns ─── */
.c-gen-tl__col--left {
    display: flex;
    justify-content: flex-end;
    padding-right: 2rem;
}

.c-gen-tl__col--right {
    padding-left: 2rem;
    display: flex;
}

/* ─── Center line ─── */
.c-gen-tl__center {
    display: none;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 992px) {
    .c-gen-tl__center {
        display: flex;
        /* stretch to fill the full row height */
        align-self: stretch;
    }
}

.c-gen-tl__dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #b9956a;
    border: 3px solid #faf8f5;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    margin-top: 2rem;
}

.c-gen-tl__line {
    width: 1px;
    flex: 1;
    background-color: #d6cdc2;
    position: absolute;
    left: 50%;
    top: 4px;
    bottom: 4px;
    transform: matrix(1, 0, 0, 1, -0.5, 0);
}
@media(max-width: 992px){
    .c-gen-tl__dot,
    .c-gen-tl__line {
        display: none;
    }
}

/* ─── Portrait ─── */
.c-gen-tl__portrait-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    position: relative;
}
.c-gen-tl__portrait-wrap:before{
    content: '';
    position: absolute;
    top: -.5rem;
    right: -.5rem;
    bottom: -.5rem;
    left: -.5rem;
    aspect-ratio: 3 / 4;
    border: 1px solid #b9956a40;
    border-radius: 50%;
}

.c-gen-tl__portrait {
    width: 8rem;
    height: 11rem;
    aspect-ratio: 3 / 4;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #b9956a80;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
@media(min-width: 768px){
    .c-gen-tl__portrait {
        width: 9rem;
        height: 12rem;
    }
}
@media(min-width: 1024px){
    .c-gen-tl__portrait {
        width: 10rem;
        height: 13rem;
    }
}
@media(min-width: 1280px){
    .c-gen-tl__portrait {
        width: 11rem;
        height: 14rem;
    }
}

.c-gen-tl__portrait--placeholder {
    background-color: #e8dcc8;
}

.c-gen-tl__portrait .c-gen-tl__portrait-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.c-gen-tl__portrait-numeral {
    font-family:
            Libre Baskerville,
            serif;
    font-size: 1.875rem;
    line-height: 2.25rem;
    color: #b9956a66;
}

.c-gen-tl__portrait-label {
    font-family:
            Libre Baskerville,
            serif;
    font-size: 1.125rem;
    line-height: 1.75rem;
    color: #b9956a;
}

/* ─── Content block ─── */
.c-gen-tl__content {
    max-width: 520px;
}

.c-gen-tl__content--right {
    text-align: right;
}

.c-gen-tl__epithet {
    display: block;
    font-size: 0.875rem;
    line-height: 1.5;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #b9956a;
    margin-bottom: 4px;
}

.c-gen-tl__years {
    display: block;
    font-size: 1rem;
    color: #2b2b2b80;
    margin-bottom: 8px;
}

.c-gen-tl .c-gen-tl__name {
    font-family:
            Libre Baskerville,
            serif;
    font-size: 1.5rem;
    line-height: 2rem;
    color: #2b2b2b;
    margin: 0 0 4px;
}
@media (min-width: 768px) {
    .c-gen-tl .c-gen-tl__name {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
}

.c-gen-tl__title {
    font-family:
            Playfair Display,
            serif;
    font-style: italic;
    font-size: 1rem;
    line-height: 1.5;
    color: #b9956a;
    margin: 0 0 16px;
}

.c-gen-tl__bio {
    font-size: 1rem;
    line-height: 1.625;
    color: #2b2b2bbf;
}

.c-gen-tl__bio p {
    margin: 0 0 12px;
}

.c-gen-tl__bio p:last-child {
    margin-bottom: 0;
}

/* ─── Tags ─── */
.c-gen-tl__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.c-gen-tl__content--right .c-gen-tl__tags {
    justify-content: flex-end;
}

.c-gen-tl__tag {
    display: inline-block;
    font-size: 0.875rem;
    line-height: 1.5;
    background-color: #e5dbcc;
    color: #2b2b2bb3;
    padding: 6px 12px;
    border-radius: 9999px;
}

/* ─── Mobile ─── */
@media (max-width: 992px) {
    .c-gen-tl__item:nth-child(even) .c-gen-tl__row{
        flex-direction: column-reverse;
    }
    .c-gen-tl__col--left,
    .c-gen-tl__col--right {
        padding: 0;
    }

    .c-gen-tl__content {
        margin-top: 20px;
        max-width: none;
    }

    .c-gen-tl__row,
    .c-gen-tl__content--right{
        text-align: left;
        max-width: none;
    }

    .c-gen-tl__content--right .c-gen-tl__tags{
        justify-content: flex-start;
    }

}
