/* Vertical Timeline CSS */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 40px auto;
    padding: 20px 0;
}

/* The vertical line */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--color-brand-primary, #2962ff);
    top: 0;
    bottom: 0;
    left: 20px;
    /* Position line to the left for a simpler vertical list style, or 50% for centered */
    border-radius: 2px;
}

/* Timeline Item */
.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 100%;
    box-sizing: border-box;
}

/* Timeline Node (Circle on the line) */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 12px;
    /* Adjust based on line position */
    background-color: var(--color-background, #fff);
    border: 4px solid var(--color-brand-primary, #2962ff);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-item:hover::after {
    background-color: var(--color-brand-primary, #2962ff);
    transform: scale(1.2);
}

/* Content Box */
.timeline-content {
    padding: 20px;
    background-color: var(--color-background-two, #f8f9fb);
    border-radius: 6px;
    border: 1px solid var(--color-background-border, #eeebee);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* Year Badge */
.timeline-year {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--color-brand-primary, #2962ff);
    color: white;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.timeline-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.25rem;
    color: var(--color-foreground, #000);
}

.timeline-job {
    font-weight: 600;
    color: var(--color-brand-content, #2b5be0);
    margin-bottom: 8px;
    display: block;
}

.timeline-desc {
    color: var(--color-foreground-secondary, #5c5962);
    font-size: 0.95em;
    line-height: 1.5;
}

/* Mobile Responsiveness specifically for the timeline */
@media screen and (max-width: 600px) {
    .timeline-container::after {
        left: 15px;
    }

    .timeline-item {
        padding-left: 50px;
        padding-right: 10px;
    }

    .timeline-item::after {
        left: 7px;
    }
}

/* Dark Mode Overrides */
body.dark-mode .timeline-content {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .timeline-item::after {
    background-color: #2c2c2c;
    /* Should match dark bg */
    border-color: var(--color-brand-primary, #4a9eff);
}

body.dark-mode.theme-pro-grey .timeline-item::after {
    background-color: #2b2b2b;
}

body.dark-mode .timeline-title {
    color: #fff;
    /* enforced for dark mode */
}

body.dark-mode .timeline-desc {
    color: #ccc;
}