/* Resume Timeline Styles - Enhanced version */
.resume {
    background-color: var(--background);
    padding-bottom: 60px;
}

.timeline { 
    position: relative; 
    margin: 40px auto 10px; 
    padding-left: 12px; 
    max-width: 860px; 
}

.timeline::before { 
    content: ''; 
    position: absolute; 
    left: 26px; 
    top: 0; 
    bottom: 0; 
    width: 3px; 
    background: linear-gradient(180deg, var(--color-border) 0%, rgba(var(--color-primary-rgb),0.5) 60%, var(--color-primary) 100%); 
    border-radius: 3px; 
    opacity: 0.75; 
}

.timeline-item { 
    position: relative; 
    padding: 0 0 38px 72px; 
    opacity: 0; 
    transform: translateY(16px); 
    animation: timelineFade var(--transition-slow) forwards; 
}

.timeline-item:nth-child(1) { animation-delay: .05s; }
.timeline-item:nth-child(2) { animation-delay: .12s; }
.timeline-item:nth-child(3) { animation-delay: .18s; }
.timeline-item:nth-child(4) { animation-delay: .24s; }
.timeline-item:nth-child(5) { animation-delay: .30s; }
.timeline-item:nth-child(6) { animation-delay: .36s; }
.timeline-item:last-child { padding-bottom: 0; }

@keyframes timelineFade { 
    to { opacity: 1; transform: translateY(0); } 
}

.timeline-marker { 
    position: absolute; 
    left: 12px; 
    top: 6px; 
    width: 30px; 
    height: 30px; 
    border-radius: 50%; 
    background: var(--gradient-primary); 
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb),0.5), 0 0 0 4px rgba(var(--color-primary-rgb),0.25); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 10;
}

.timeline-marker::after { 
    content: ''; 
    width: 10px; 
    height: 10px; 
    background: #fff; 
    border-radius: 50%; 
    box-shadow: 0 0 0 3px rgba(255,255,255,0.35); 
}

.timeline-item[data-type='education'] .timeline-marker { 
    background: linear-gradient(135deg, #6366f1, #3b82f6); 
    box-shadow: 0 4px 12px rgba(59,130,246,0.4), 0 0 0 4px rgba(59,130,246,0.25); 
}

.timeline-item[data-type='summary'] .timeline-marker { 
    background: linear-gradient(135deg, #0ea5e9, #06b6d4); 
    box-shadow: 0 4px 12px rgba(14,165,233,0.45), 0 0 0 4px rgba(6,182,212,0.3); 
}

.timeline-item[data-type='experience'] .timeline-marker { 
    background: var(--gradient-primary); 
}

.timeline-content { 
    background: var(--color-surface, #fff); 
    border: 1px solid var(--color-border, #e2e8f0); 
    border-radius: var(--radius-lg, 12px); 
    padding: 26px 28px 22px; 
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.08)); 
    position: relative; 
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.timeline-content:hover { 
    box-shadow: var(--shadow-lg, 0 10px 25px rgba(0,0,0,0.12)); 
    transform: translateY(-4px); 
}

.timeline-content::before { 
    content: ''; 
    position: absolute; 
    left: -14px; 
    top: 24px; 
    width: 14px; 
    height: 14px; 
    background: inherit; 
    border-left: 1px solid var(--color-border, #e2e8f0); 
    border-top: 1px solid var(--color-border, #e2e8f0); 
    transform: rotate(-45deg); 
    border-radius: 2px 0 0 0; 
}

.timeline-title { 
    font-size: 1.15rem; 
    font-weight: 600; 
    letter-spacing: 0.3px; 
    margin-bottom: 10px; 
    color: var(--color-text, #1e293b);
    text-shadow: 0 1px 1px rgba(255,255,255,0.9);
}

.timeline-meta { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px; 
    align-items: center; 
    margin-bottom: 12px; 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 0.8px; 
    font-weight: 600; 
    color: var(--color-text-soft, #64748b); 
}

.timeline-period { 
    background: rgba(var(--color-primary-rgb, 0,120,255),0.1); 
    padding: 4px 12px; 
    border-radius: var(--radius-pill, 50px); 
    color: var(--color-primary, #0078ff); 
    font-size: 0.75rem; 
    letter-spacing: 0.5px; 
    font-weight: 600; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.timeline-badge { 
    background: #1e293b; 
    color: #fff; 
    padding: 4px 12px; 
    border-radius: var(--radius-pill, 50px); 
    font-size: 0.7rem; 
    letter-spacing: 0.5px; 
    font-weight: 600; 
    box-shadow: 0 2px 6px rgba(0,0,0,0.25); 
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.timeline-badge.primary { 
    background: var(--color-primary, #0078ff); 
}

.timeline-badge.alt { 
    background: #6366f1; 
}

.timeline-entity { 
    margin-bottom: 12px; 
    font-size: 0.92rem; 
    color: var(--color-text-soft, #64748b); 
}

.timeline-intro { 
    font-size: 0.95rem; 
    line-height: 1.5; 
    color: var(--color-text-soft, #64748b);
    margin-bottom: 14px;
}

.timeline-list { 
    margin: 0; 
    padding-left: 20px; 
    font-size: 0.9rem; 
    line-height: 1.5; 
    color: var(--color-text-soft, #64748b);
}

.timeline-list.small { 
    font-size: 0.85rem; 
}

.timeline-list li { 
    margin-bottom: 8px; 
    position: relative; 
}

.timeline-list li:last-child { 
    margin-bottom: 0; 
}

.timeline-item:focus-within .timeline-content, 
.timeline-item:hover .timeline-content { 
    border-color: var(--color-primary, #0078ff); 
}

/* Dark mode enhancements */
[data-theme="dark"] .timeline::before { 
    background: linear-gradient(180deg, #2e3d50, #365d82); 
    opacity: 0.9; 
}

[data-theme="dark"] .timeline-content { 
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .timeline-content::before {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .timeline-title {
    color: #f1f5f9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .timeline-period {
    background: rgba(var(--color-primary-rgb, 0,120,255), 0.2);
    color: #38bdf8;
}

[data-theme="dark"] .timeline-badge {
    background: #334155;
}

[data-theme="dark"] .timeline-content p, 
[data-theme="dark"] .timeline-content li,
[data-theme="dark"] .timeline-intro,
[data-theme="dark"] .timeline-entity {
    color: #cbd5e1;
}

/* Improved accessibility for links */
.timeline-content a {
    color: var(--color-primary, #0078ff);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.2s ease;
}

.timeline-content a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 680px) {
    .timeline { 
        padding-left: 4px; 
    }
    
    .timeline::before { 
        left: 20px; 
    }
    
    .timeline-item { 
        padding: 0 0 34px 62px; 
    }
    
    .timeline-marker { 
        left: 5px; 
        width: 26px; 
        height: 26px; 
    }
    
    .timeline-content { 
        padding: 20px 20px 18px; 
    }
    
    .timeline-title { 
        font-size: 1rem; 
    }
    
    .timeline-meta { 
        font-size: 0.65rem; 
    }
    
    .timeline-period { 
        padding: 3px 8px; 
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) { 
    .timeline-item { 
        animation: none; 
        opacity: 1; 
        transform: none; 
    } 
    
    .timeline-content:hover { 
        transform: none; 
    } 
}