/* Enhanced Experience Section - MCP Layout with CTO Colors
   Uses MCP server vertical timeline layout with CTO website dark theme colors */

/* Staggered timeline layout with technology integration */
.experience-container {
    max-width: 1200px;
    margin: 0 auto;
}

.experience-timeline {
    position: relative;
    padding: 2rem 0;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    transform: translateX(-50%);
}

/* Staggered timeline items */
.timeline-item,
.enhanced-timeline-item {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    width: 45%;
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Left side items (odd) */
.timeline-item:nth-child(odd),
.enhanced-timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
    flex-direction: row-reverse;
}

/* Right side items (even) */
.timeline-item:nth-child(even),
.enhanced-timeline-item:nth-child(even) {
    left: 55%;
    text-align: left;
    flex-direction: row;
}

/* Timeline dots */
.timeline-item::before,
.enhanced-timeline-item::before {
    content: '';
    position: absolute;
    top: 1.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--dark);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

/* Dots for left side items */
.timeline-item:nth-child(odd)::before,
.enhanced-timeline-item:nth-child(odd)::before {
    right: -6px;
}

/* Dots for right side items */
.timeline-item:nth-child(even)::before,
.enhanced-timeline-item:nth-child(even)::before {
    left: -6px;
}

/* Card content area */
.timeline-card-content {
    flex: 1;
    min-width: 0;
}

/* Technology list area */
.timeline-tech-list {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tech-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.tech-tag {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #ffffff;
    padding: 0.4rem 0.8rem;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid #1e40af;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 3px 6px rgba(30, 64, 175, 0.3);
}

.tech-tag:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1f2937;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 15px rgba(245, 158, 11, 0.4);
    border-color: #f59e0b;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Enhanced tech tag variants with complementary colors */
.tech-tag:nth-child(2n) {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #ffffff;
    border-color: #dc2626;
    box-shadow: 0 3px 6px rgba(220, 38, 38, 0.3);
}

.tech-tag:nth-child(2n):hover {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: #1f2937;
    border-color: #10b981;
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.4);
}

.tech-tag:nth-child(3n) {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: #ffffff;
    border-color: #7c3aed;
    box-shadow: 0 3px 6px rgba(124, 58, 237, 0.3);
}

.tech-tag:nth-child(3n):hover {
    background: linear-gradient(135deg, #fbbf24, #fcd34d);
    color: #1f2937;
    border-color: #fbbf24;
    box-shadow: 0 6px 15px rgba(251, 191, 36, 0.4);
}

.tech-tag:nth-child(4n) {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #ffffff;
    border-color: #059669;
    box-shadow: 0 3px 6px rgba(5, 150, 105, 0.3);
}

.tech-tag:nth-child(4n):hover {
    background: linear-gradient(135deg, #ec4899, #f472b6);
    color: #ffffff;
    border-color: #ec4899;
    box-shadow: 0 6px 15px rgba(236, 72, 153, 0.4);
}

.tech-tag:nth-child(5n) {
    background: linear-gradient(135deg, #ea580c, #fb923c);
    color: #ffffff;
    border-color: #ea580c;
    box-shadow: 0 3px 6px rgba(234, 88, 12, 0.3);
}

.tech-tag:nth-child(5n):hover {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    color: #ffffff;
    border-color: #0891b2;
    box-shadow: 0 6px 15px rgba(8, 145, 178, 0.4);
}

.tech-tag:nth-child(6n) {
    background: linear-gradient(135deg, #be185d, #ec4899);
    color: #ffffff;
    border-color: #be185d;
    box-shadow: 0 3px 6px rgba(190, 24, 93, 0.3);
}

.tech-tag:nth-child(6n):hover {
    background: linear-gradient(135deg, #65a30d, #84cc16);
    color: #1f2937;
    border-color: #65a30d;
    box-shadow: 0 6px 15px rgba(101, 163, 13, 0.4);
}

.timeline-item:hover,
.enhanced-timeline-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15), 0 4px 10px rgba(0,0,0,0.1);
    background: rgba(0, 102, 255, 0.05);
    border-color: var(--primary);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.experience-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.experience-company {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.experience-location {
    color: var(--text-dim);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.experience-dates {
    background: rgba(0, 102, 255, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Description Styles */
.timeline-description-preview, 
.timeline-description-full {
    margin-top: 1rem;
}

.achievement-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.achievement-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--text-dim);
}

.achievement-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary);
    font-weight: bold;
}

.achievement-list li:hover {
    color: var(--text);
    transition: color 0.2s ease;
}

/* Interactive Buttons */
.expand-btn, .collapse-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    width: fit-content;
}

.expand-btn:hover, .collapse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.expand-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.expand-btn:hover .expand-icon {
    transform: translateY(2px);
}

.collapse-btn:hover .expand-icon {
    transform: translateY(-2px);
}

/* Enhanced Hover Effects */
.enhanced-timeline-item .timeline-content {
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.enhanced-timeline-item .timeline-content:hover {
    transform: scale(1.02);
    background: rgba(0, 102, 255, 0.05) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.15);
}

/* Loading States */
.timeline-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-dim);
    font-size: 1.1rem;
}

.timeline-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error States */
.timeline-status {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.timeline-status.success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--accent);
}

.timeline-status.error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: var(--warning);
}

/* Data Source Indicator */
.data-source-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 102, 255, 0.2);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-source-indicator.dynamic {
    background: rgba(0, 255, 136, 0.2);
    color: var(--accent);
}

.data-source-indicator.static {
    background: rgba(255, 107, 107, 0.2);
    color: var(--warning);
}

/* Enhanced Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 500px;
        opacity: 1;
    }
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .experience-timeline {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .experience-timeline::before {
        left: 0.5rem;
        transform: none;
    }
    
    .timeline-item,
    .enhanced-timeline-item {
        width: 100% !important;
        left: 0 !important;
        margin-left: 1rem !important;
        padding: 1.5rem !important;
        flex-direction: column !important;
        text-align: left !important;
        gap: 1rem;
    }
    
    .timeline-item::before,
    .enhanced-timeline-item::before {
        left: -1.25rem !important;
        right: auto !important;
    }
    
    .timeline-tech-list {
        flex: none;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .tech-label {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .achievement-list li {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .expand-btn, .collapse-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .enhanced-timeline-item:hover,
    .timeline-item:hover {
        transform: none; /* Disable hover transform on mobile */
    }
    
    .data-source-indicator {
        position: static;
        display: inline-block;
        margin-bottom: 1rem;
    }
    
    .experience-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .experience-dates {
        align-self: flex-start;
    }
}

/* Print Styles */
@media print {
    .expand-btn, .collapse-btn {
        display: none;
    }
    
    .timeline-description-full {
        display: block !important;
    }
    
    .timeline-description-preview {
        display: none !important;
    }
    
    .enhanced-timeline-item .timeline-content {
        break-inside: avoid;
        background: white !important;
        color: black !important;
    }
}