/* ============================================
   Experience Section Styles - Timeline Design
   ============================================ */

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

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg,
        var(--primary-color) 0%,
        var(--primary-light) 50%,
        var(--primary-color) 100%);
    box-shadow: 0 0 20px rgba(95, 216, 107, 0.3);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: auto;
    text-align: left;
}

.timeline-content {
    position: relative;
    width: calc(50% - 60px);
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--border-color));
    transform: translateY(-50%);
}

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

.timeline-item:nth-child(even) .timeline-content::before {
    left: -40px;
    background: linear-gradient(270deg, var(--primary-color), var(--border-color));
}

.timeline-content::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border: 5px solid var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 0 8px var(--bg-primary), 0 0 30px rgba(95, 216, 107, 0.6);
    transform: translateY(-50%);
    z-index: 10;
}

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

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

.timeline-content:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(95, 216, 107, 0.3);
    border-color: var(--primary-color);
}

.timeline-content:hover::after {
    box-shadow: 0 0 0 8px var(--bg-primary), 0 0 40px rgba(95, 216, 107, 0.8);
    background: var(--primary-color);
}

/* Timeline Header */
.timeline-header {
    margin-bottom: 1.25rem;
}

.company-name {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.job-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.job-type {
    display: inline-block;
    padding: 0.4rem 0.875rem;
    background: var(--primary-color);
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius-full);
    margin-bottom: 0.75rem;
    box-shadow: var(--glow-sm);
}

.job-duration,
.job-location {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.timeline-item:nth-child(odd) .job-duration,
.timeline-item:nth-child(odd) .job-location {
    justify-content: flex-end;
}

.job-duration i,
.job-location i {
    color: var(--primary-color);
    filter: drop-shadow(0 0 5px rgba(95, 216, 107, 0.5));
}

/* Timeline Body */
.timeline-highlights {
    list-style: none;
    margin: 0 0 1rem 0;
    padding: 0;
}

.timeline-highlights li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.625rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

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

.timeline-highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
}

.timeline-item:nth-child(odd) .timeline-highlights li::before {
    left: auto;
    right: 0;
}

/* Technologies */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.timeline-item:nth-child(odd) .tech-tags {
    justify-content: flex-end;
}

.tech-tag {
    padding: 0.4rem 0.875rem;
    background: var(--bg-secondary);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-tag:hover {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--glow-sm);
}

/* Responsive */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px;
        text-align: left;
    }

    .timeline-item:nth-child(odd) .job-duration,
    .timeline-item:nth-child(odd) .job-location,
    .timeline-item:nth-child(odd) .tech-tags {
        justify-content: flex-start;
    }

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

    .timeline-item:nth-child(odd) .timeline-highlights li::before {
        left: 0;
        right: auto;
    }

    .timeline-content::before {
        left: -40px !important;
        right: auto !important;
        background: linear-gradient(270deg, var(--primary-color), var(--border-color)) !important;
    }

    .timeline-content::after {
        left: -56px !important;
        right: auto !important;
    }

    .timeline-content {
        padding: 1.75rem;
    }
}

@media (max-width: 480px) {
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        margin-bottom: 3rem;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px;
        padding: 1.5rem;
    }

    .timeline-content::before {
        width: 30px;
        left: -30px !important;
    }

    .timeline-content::after {
        width: 24px;
        height: 24px;
        left: -42px !important;
        border-width: 4px;
    }

    .company-name {
        font-size: 1.25rem;
    }

    .job-title {
        font-size: 1rem;
    }

    .timeline-highlights li {
        font-size: 0.8125rem;
    }
}
