/* Timeline Styles - Centered Mirror Layout */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 60px auto;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

/* Central Line */
.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--color-accent), transparent);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
    z-index: 1;
}

.timeline-item {
    position: relative;
    width: 50%;
    margin-bottom: 20px;
    z-index: 2;
}

/* Dot on the central line */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #000;
    border: 2px solid var(--color-accent);
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    z-index: 5;
    box-shadow: 0 0 10px var(--color-accent);
}

/* Right-side logic (Aligned to the left of its container) */
.timeline-item.right {
    align-self: flex-start;
    /* Occupies left half */
    padding-right: 30px;
    text-align: right;
}

.timeline-item.right::after {
    right: -6px;
    /* Sits exactly on the 50% line */
    left: auto;
}

/* Left-side logic (Occupies right half) */
.timeline-item.left {
    align-self: flex-end;
    /* Occupies right half */
    padding-left: 30px;
    text-align: right;
    /* Consistent text alignment */
}

.timeline-item.left::after {
    left: -6px;
    /* Sits exactly on the 50% line */
    right: auto;
}

.timeline-content {
    width: 100%;
    max-width: 380px;
    /* Narrower width for better proportionality */
    min-height: 180px;
    /* Unified height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    padding: 25px;
    border-radius: 20px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--card-shadow);
    position: relative;
    transform: translateY(0) scale(1);
}

/* Neon Interaction State */
.timeline-content.in-view {
    border-color: var(--color-accent);
    box-shadow: 0 0 25px rgba(201, 176, 55, 0.4), inset 0 0 10px rgba(201, 176, 55, 0.1);
    transform: translateY(-15px) scale(1.05);
    background: rgba(201, 176, 55, 0.05);
}

.timeline-content.in-view .timeline-title {
    color: var(--color-accent);
    text-shadow: 0 0 10px rgba(201, 176, 55, 0.5);
}

.timeline-content.in-view .timeline-year {
    color: var(--pure-white);
}

.timeline-content:hover {
    transform: scale(1.03);
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.timeline-year {
    display: block;
    color: var(--color-accent);
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 8px;
}

.timeline-title {
    font-size: 1.25rem;
    color: var(--pure-white);
    margin-bottom: 10px;
    font-weight: 700;
}

/* Responsive Fix for Mobile */
@media screen and (max-width: 850px) {
    .timeline::after {
        left: auto;
        right: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 20px;
        padding-right: 50px;
        left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 30px;
    }

    .timeline-item::after {
        right: 12px !important;
        left: auto !important;
    }

    .timeline-item.left,
    .timeline-item.right {
        text-align: right;
    }
}