/* Experience Timeline */
.timeline {
    position: relative;
    padding: 2rem;
    margin: 2rem auto 0 auto;
    max-width: 1000px;
    z-index: 1;
    isolation: isolate;
}

/* Timeline start bullet */
.timeline::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #977dff;
    top: -6px;
    left: 50%;
    margin-left: -6px;
    z-index: 10;
    box-shadow: 0 0 0 3px white, 0 0 0 6px #977dff;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background: #977dff;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 1rem;
    position: relative;
    width: 50%;
    margin: 2rem 0;
    transition: all 0.3s ease-in-out;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 3rem;
}

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

.timeline-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #977dff, #6a0dad);
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 0 0 4px rgba(151, 125, 255, 0.22), 0 8px 20px rgba(106, 13, 173, 0.25);
    transition: all 0.3s ease-in-out;
}

.timeline-icon:hover {
    transform: scale(1.1) rotate(360deg);
    background: linear-gradient(135deg, #6a0dad, #977dff);
    box-shadow: 0 0 0 6px rgba(151, 125, 255, 0.3), 0 12px 28px rgba(106, 13, 173, 0.35);
}

.timeline-item:nth-child(odd) .timeline-icon {
    right: -25px;
}

.timeline-item:nth-child(even) .timeline-icon {
    left: -25px;
}

.timeline-content {
    padding: 1.6rem;
    border-radius: 16px;
    background:
        radial-gradient(circle at 90% 12%, rgba(151, 125, 255, 0.14), transparent 35%),
        rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 28px rgba(34, 20, 58, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(151, 125, 255, 0.25);
}

.timeline-content:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 24px 48px rgba(151, 125, 255, 0.22);
    border-color: rgba(151, 125, 255, 0.35);
    background:
        radial-gradient(circle at 90% 12%, rgba(151, 125, 255, 0.2), transparent 35%),
        rgba(248, 249, 250, 0.98);
}

/* Dark mode styles for timeline */
[data-theme="dark"] .timeline-content {
    background:
        radial-gradient(circle at 90% 12%, rgba(151, 125, 255, 0.22), transparent 35%),
        rgba(30, 35, 45, 0.95);
    color: #e0e6ed;
    border-color: rgba(151, 125, 255, 0.35);
}

[data-theme="dark"] .timeline-content:hover {
    background:
        radial-gradient(circle at 90% 12%, rgba(151, 125, 255, 0.3), transparent 35%),
        rgba(36, 41, 56, 0.98);
}

[data-theme="dark"] .timeline-content h3 {
    color: #977dff;
}

[data-theme="dark"] .timeline-content p {
    color: #a0a6b0;
}

[data-theme="dark"] .timeline-content li {
    color: #e0e6ed;
}

.timeline-content p {
    text-align: left;
    margin-bottom: 1rem;
    color: #333;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-content h3 {
    color: #6700a3;
    margin-bottom: 1rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-content ul {
    list-style: none;
    padding: 0;
}

.timeline-content li {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-content i.fas.fa-check {
    color: #977dff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.timeline-content:hover i.fas.fa-check {
    transform: scale(1.2);
    color: #6700a3;
}

/* Timeline end bullet */
.timeline-end-bullet {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #977dff;
    bottom: -6px;
    left: 50%;
    margin-left: -6px;
    z-index: 10;
    box-shadow: 0 0 0 3px white, 0 0 0 6px #977dff;
}

@media (max-width: 768px) {
    .timeline {
        padding: 1rem;
    }

    .timeline::before {
        left: 31px;
    }

    .timeline::after {
        left: 31px;
        margin-left: -6px;
    }

    .timeline-item {
        width: 100%;
        left: 0;
        padding-left: 5rem;
        padding-right: 1rem;
        margin: 1.5rem 0;
    }

    .timeline-item:nth-child(even) {
        left: 0;
        padding-left: 5rem;
        padding-right: 1rem;
    }

    .timeline-item:nth-child(odd) {
        padding-right: 1rem;
    }

    .timeline-icon {
        left: 6px !important;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .timeline-content {
        padding: 1.2rem;
        margin: 0;
    }

    .timeline-content h3 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }

    .timeline-content p {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }

    .timeline-content li {
        margin: 0.4rem 0;
        font-size: 0.9rem;
        text-align: left;
    }

    .timeline-end-bullet {
        left: 31px;
        margin-left: -6px;
    }
}

@media (max-width: 480px) {
    .timeline {
        padding: 0.5rem;
    }

    .timeline::before {
        left: 26px;
    }

    .timeline::after {
        left: 26px;
        margin-left: -6px;
    }

    .timeline-item {
        padding-left: 4rem;
        padding-right: 0.5rem;
        margin: 1rem 0;
    }

    .timeline-item:nth-child(even) {
        padding-left: 4rem;
        padding-right: 0.5rem;
    }

    .timeline-item:nth-child(odd) {
        padding-right: 0.5rem;
    }

    .timeline-icon {
        left: 1px !important;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .timeline-content {
        padding: 1rem;
    }

    .timeline-content h3 {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }

    .timeline-content p {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }

    .timeline-content li {
        margin: 0.3rem 0;
        font-size: 0.85rem;
        gap: 0.4rem;
        text-align: left;
    }

    .timeline-content i.fas.fa-check {
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    .timeline-end-bullet {
        left: 26px;
        margin-left: -6px;
    }
}
