.experience {
    padding: 5rem 0;
    margin: 0;
    background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    max-width: none;
}

.experience h2,
.experience > p {
    color: white;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

body.dark-mode .experience {
    background: linear-gradient(135deg, #1e1e1e 0%, #333 100%);
}

body.dark-mode .experience h2,
body.dark-mode .experience > p {
    color: #f0f0f0;
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 6px;
    background: linear-gradient(180deg, #3a86ff 0%, #ff006e 100%);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    animation: fadeIn 0.6s ease-in-out forwards;
    opacity: 0;
}

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

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -17px;
    background-color: #3a86ff;
    border: 4px solid #fff;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 0 4px rgba(58, 134, 255, 0.2);
    transition: all 0.3s ease;
}

.timeline-item:nth-child(even)::before {
    left: -16px;
}

.timeline-item.education::before {
    background-color: #ff006e;
    box-shadow: 0 0 0 4px rgba(255, 0, 110, 0.2);
}

.timeline-content {
    padding: 30px;
    background: #fff;
    position: relative;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.timeline-item:nth-child(odd) .timeline-content {
    padding-right: 30px;
}

.timeline-item:nth-child(even) .timeline-content {
    padding-left: 30px;
}

.timeline-content::after {
    content: '';
    position: absolute;
    border-style: solid;
    width: 0;
    height: 0;
    top: 15px;
    right: -15px;
    border-width: 10px 0 10px 15px;
    border-color: transparent transparent transparent #fff;
}

.timeline-item:nth-child(even) .timeline-content::after {
    left: -15px;
    border-width: 10px 15px 10px 0;
    border-color: transparent #fff transparent transparent;
}

.timeline-content h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.4rem;
}

.timeline-content .date {
    color: #3a86ff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-item.education .timeline-content .date {
    color: #ff006e;
}

.timeline-content .company {
    font-weight: 600;
    color: #666;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.timeline-content p {
    margin: 0;
    line-height: 1.6;
    font-size: 1rem;
    color: #555;
}

/* Animation delays for items */
.timeline-item:nth-child(1) { animation-delay: 0.2s; }
.timeline-item:nth-child(2) { animation-delay: 0.4s; }
.timeline-item:nth-child(3) { animation-delay: 0.6s; }
.timeline-item:nth-child(4) { animation-delay: 0.8s; }
.timeline-item:nth-child(5) { animation-delay: 1s; }
.timeline-item:nth-child(6) { animation-delay: 1.2s; }
.timeline-item:nth-child(7) { animation-delay: 1.4s; }
.timeline-item:nth-child(8) { animation-delay: 1.6s; }
.timeline-item:nth-child(9) { animation-delay: 1.8s; }

/* Dark mode styles */
body.dark-mode .timeline::before {
    background: linear-gradient(180deg, #3a86ff 0%, #ff006e 100%);
}

body.dark-mode .timeline-content {
    background: #1e1e1e;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

body.dark-mode .timeline-content::after {
    border-color: transparent transparent transparent #1e1e1e;
}

body.dark-mode .timeline-item:nth-child(even) .timeline-content::after {
    border-color: transparent #1e1e1e transparent transparent;
}

body.dark-mode .timeline-content h3 {
    color: #f5f5f5;
}

body.dark-mode .timeline-content .company {
    color: #aaa;
}

body.dark-mode .timeline-content p {
    color: #ddd;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .timeline::before {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-item::before {
        left: 15px;
        right: auto;
    }
    
    .timeline-item:nth-child(even)::before {
        left: 15px;
    }
    
    .timeline-content::after {
        left: -15px;
        border-width: 10px 15px 10px 0;
        border-color: transparent #fff transparent transparent;
    }
    
    .timeline-item:nth-child(even) .timeline-content::after {
        left: -15px;
        border-width: 10px 15px 10px 0;
        border-color: transparent #fff transparent transparent;
    }
    
    body.dark-mode .timeline-content::after,
    body.dark-mode .timeline-item:nth-child(even) .timeline-content::after {
        border-color: transparent #1e1e1e transparent transparent;
    }
} 