/* Timeline Styles */
.timeline-container {
    padding: var(--spacing-xl) 0;
}

.timeline-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Row */
.timeline-header-row {
    display: grid;
    grid-template-columns: 1fr 120px 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    position: sticky;
    top: 20px;
    z-index: 10;
    background: var(--background-primary);
    padding: var(--spacing-base);
    border-radius: var(--radius-base);
    box-shadow: var(--shadow-light);
}

.timeline-header-left,
.timeline-header-center,
.timeline-header-right {
    text-align: center;
}

.timeline-header-left h3,
.timeline-header-center h3,
.timeline-header-right h3 {
    color: var(--primary-color);
    font-size: var(--font-size-lg);
    margin: 0 0 var(--spacing-xs) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

/* Timeline Filters */
.timeline-filters {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xs);
}

.timeline-filter {
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 2px solid rgba(102, 126, 234, 0.2);
    background: var(--background-primary);
    color: var(--primary-color);
    border-radius: var(--radius-base);
    cursor: pointer;
    font-weight: 500;
    font-size: var(--font-size-sm);
    transition: all 0.3s ease;
}

.timeline-filter:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.timeline-filter.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Timeline Years Container */
.timeline-years {
    position: relative;
}

.timeline-years::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
    transform: translateX(-50%);
    opacity: 0.3;
    z-index: 1;
}

/* Spanning Timeline Items */
.timeline-spanning-item {
    position: absolute;
    z-index: 2;
    opacity: 0.95;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
}

.timeline-spanning-left {
    left: 0;
    right: calc(50% + 60px);
    padding-right: var(--spacing-base);
}

.timeline-spanning-right {
    left: calc(50% + 60px);
    right: 0;
    padding-left: var(--spacing-base);
}

.spanning-content {
    background: var(--background-primary);
    color: var(--text-primary);
    border-radius: var(--radius-base);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-light);
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    transition: all var(--transition-base);
    border-left: 3px solid var(--primary-color);
}

.spanning-content:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.spanning-content::before {
    display: none;
}

.spanning-content::after {
    display: none;
}

.spanning-duration {
    font-size: var(--font-size-sm);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    opacity: 0.9;
    letter-spacing: 0.5px;
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    align-self: center;
    display: none; /* Hide this element since it's redundant */
}

.spanning-content h4 {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: var(--font-size-base);
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    color: var(--text-primary);
}

.spanning-org {
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-xs);
    opacity: 1;
    font-weight: 500;
    text-align: left;
    color: var(--text-secondary);
}

.spanning-desc {
    margin: 0;
    font-size: var(--font-size-sm);
    opacity: 1;
    line-height: 1.4;
    text-align: left;
    color: var(--text-secondary);
}

/* Remove different spanning item types - use consistent styling */
.timeline-spanning-item[data-type="education"] .spanning-content {
    border-left-color: #48dbfb;
}

.timeline-spanning-item[data-type="position"] .spanning-content {
    border-left-color: #1dd1a1;
}

.timeline-spanning-item[data-type="certification"] .spanning-content {
    border-left-color: #feca57;
}

/* Ensure spanning items work with year containers */
.timeline-year-container {
    position: relative;
    z-index: 3;
}

/* Year Container */
.timeline-year-container {
    margin-bottom: var(--spacing-xl);
    position: relative;
}

.timeline-year-content {
    display: grid;
    grid-template-columns: 1fr 120px 1fr;
    gap: var(--spacing-lg);
    align-items: start;
    position: relative;
}

/* Year Sections */
.timeline-year-left,
.timeline-year-right {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-base);
}

.timeline-year-center {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.year-marker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.year-dot {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: var(--shadow-medium);
    position: relative;
    transition: all 0.3s ease;
}

.year-dot.has-left::before {
    content: '';
    position: absolute;
    left: -60px;
    top: 50%;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
    transform: translateY(-50%);
    opacity: 0.5;
}

.year-dot.has-right::after {
    content: '';
    position: absolute;
    right: -60px;
    top: 50%;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
    transform: translateY(-50%);
    opacity: 0.5;
}

.year-dot.has-left.has-right {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 24px;
    height: 24px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.year-label {
    background: var(--background-primary);
    color: var(--primary-color);
    font-weight: 700;
    font-size: var(--font-size-base);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-base);
    box-shadow: var(--shadow-light);
    white-space: nowrap;
    border: 2px solid var(--primary-color);
}

/* Timeline Items */
.timeline-item {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateY(-2px);
}

.timeline-content {
    background: var(--background-primary);
    border-radius: var(--radius-base);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-light);
    position: relative;
    border-left: 3px solid var(--primary-color);
    transition: all var(--transition-base);
}

.timeline-content:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.timeline-content h4 {
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--text-primary);
    font-size: var(--font-size-base);
    line-height: 1.4;
}

.timeline-org {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-sm);
}

.timeline-desc {
    color: var(--text-secondary);
    margin: 0;
    font-size: var(--font-size-sm);
}

/* Empty States */
.timeline-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    text-align: center;
    opacity: 0.5;
}

.empty-indicator {
    color: var(--text-secondary);
    font-style: italic;
    font-size: var(--font-size-sm);
}

/* Different item types */
.timeline-item[data-type="publication"] .timeline-content {
    border-left-color: #ff6b6b;
}

.timeline-item[data-type="position"] .timeline-content {
    border-left-color: #1dd1a1;
}

.timeline-item[data-type="education"] .timeline-content {
    border-left-color: #48dbfb;
}

.timeline-item[data-type="certification"] .timeline-content {
    border-left-color: #feca57;
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline-header-row {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
        text-align: center;
    }
    
    .timeline-header-center {
        order: 1;
    }
    
    .timeline-header-left {
        order: 2;
    }
    
    .timeline-header-right {
        order: 3;
    }
    
    .timeline-years::before {
        display: none;
    }
    
    .timeline-year-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-base);
    }
    
    .timeline-year-center {
        order: 1;
        margin-bottom: var(--spacing-base);
    }
    
    .timeline-year-left {
        order: 2;
        margin-bottom: var(--spacing-base);
    }
    
    .timeline-year-right {
        order: 3;
    }
    
    .year-dot::before,
    .year-dot::after {
        display: none;
    }
    
    .year-label {
        font-size: var(--font-size-sm);
    }
    
    /* Hide spanning items on mobile for simplicity */
    .timeline-spanning-item {
        display: none;
    }
} 