
.timeline-tabs {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.timeline-tab {
    padding: 12px 24px;
    border: none;
    background: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding-left: 36px;
    font-family: 'Libre Baskerville', serif;
}

.timeline-tab::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

.timeline-tab:hover {
    background: var(--tab-hover);
}

.timeline-tab.selected {
    background: var(--tab-hover);
    font-weight: 600;
}

.timeline-tab.website::before {
    background: var(--website-color);
}

.timeline-tab.personal::before {
    background: var(--personal-color);
}

.timeline-tab.academic::before {
    background: var(--academic-color);
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--border-color));
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item.hidden {
    display: none;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 15px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg-color);
    box-shadow: var(--shadow);
}

.timeline-item.website::before {
    background: var(--website-color);
}

.timeline-item.personal::before {
    background: var(--personal-color);
}

.timeline-item.academic::before {
    background: var(--academic-color);
}

.timeline-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .timeline-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.timeline-date::before {
    content: '📅';
    font-size: 1rem;
}

.timeline-date-text {
    flex: 1;
}

.timeline-place {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.timeline-place::before {
    content: '📍';
    font-size: 0.8rem;
}

.timeline-event {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}

.timeline-event a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.timeline-event a:hover {
    border-bottom-color: var(--primary);
}

@media (max-width: 768px) {
    .timeline-tabs {
        flex-direction: column;
        padding: 10px;
    }

    .timeline-tab {
        width: 100%;
        text-align: center;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline-item::before {
        left: -17px;
    }

    .timeline-card {
        padding: 20px;
    }
}