/**
 * EXPERIENCE COMPONENT (Timeline Style)
 * 
 * Styles for the work experience timeline section
 */

/* Experience Section General */
.experience {
    background-color: var(--bg-color); /* Or var(--bg-color-alt) if preferred for contrast */
}

/* Experience Timeline Container */
.experience-timeline {
    position: relative;
    max-width: 900px; /* Adjust as needed */
    margin: 0 auto;
    padding: var(--spacing-md) 0;
}

/* The actual timeline bar (vertical line) */
.experience-timeline::before {
    content: '';
    position: absolute;
    left: 20px; /* Adjust based on icon size and desired position */
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Timeline Item: container for icon and content */
.timeline-item {
    position: relative;
    margin-bottom: var(--spacing-lg); /* Increased spacing between items */
    padding-left: 60px; /* Space for the icon and line */
    opacity: 0; /* For animation */
    transform: translateY(30px); /* For animation */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Animation class added by Intersection Observer */
.timeline-item.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Timeline Icon (circle on the line) */
.timeline-icon {
    position: absolute;
    left: 0; /* Aligns with the padding-left of timeline-item */
    top: 0; /* Align with the top of the content, or adjust as needed */
    transform: translateX(-50%); /* Center the icon on the line */
    margin-left: 21.5px; /* (line left position + half line width) */
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border: 3px solid var(--bg-color); /* To make it pop from the line */
    border-radius: var(--border-radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    z-index: 1; /* Above the timeline line */
}

.timeline-icon i {
    line-height: 0; /* Helps center FontAwesome icons */
}

/* Timeline Content Card */
.timeline-content {
    background-color: var(--card-bg);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 12px var(--shadow-color);
    border: 1px solid var(--border-color);
    position: relative; /* For potential pseudo-elements like arrows if desired */
}

/* Timeline Header (logo, title, company, duration) */
.timeline-header {
    display: flex;
    align-items: flex-start; /* Align items to the top */
    margin-bottom: var(--spacing-sm);
    gap: var(--spacing-sm); /* Gap between logo and text info */
}

.company-logo {
    width: 55px; /* Slightly larger logo */
    height: 55px;
    border-radius: var(--border-radius-sm);
    object-fit: contain; /* Use contain to ensure logo is not cropped */
    border: 1px solid var(--border-color);
    padding: var(--spacing-xs); /* Optional padding around logo */
    background-color: white; /* If placeholder is transparent */
}

.company-info {
    flex-grow: 1;
}

.job-title {
    font-size: 1.35rem; /* Increased font size */
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.2rem;
}

.company-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.job-duration,
.company-location {
    font-size: 0.9rem;
    color: var(--text-color-light);
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.job-duration i,
.company-location i {
    color: var(--primary-color); /* Icon color */
}

/* Job Description */
.job-description {
    font-size: 0.95rem;
    line-height: 1.7; /* Improved line height for readability */
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
}

.job-description ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: var(--spacing-sm);
}

.job-description li {
    position: relative;
    padding-left: 1.75rem; /* Space for custom bullet */
    margin-bottom: 0.6rem; /* Spacing between list items */
}

.job-description li::before {
    content: "▹"; /* Custom bullet point */
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
}

/* Tech Stack (reusing some styles from base if applicable) */
.experience-tech-stack h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    margin-top: var(--spacing-sm); /* Add some space before tech stack */
}

.experience-tech-stack .tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem; /* Slightly increased gap */
}

.experience-tech-stack .tech-tag {
    background-color: var(--bg-color-alt);
    color: var(--primary-color); /* Or var(--text-color) for less emphasis */
    padding: 0.35rem 0.85rem; /* Slightly larger tags */
    border-radius: var(--border-radius-sm); /* Consistent border radius */
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid transparent; /* Placeholder for potential border */
}

.experience-tech-stack .tech-tag:hover {
    border-color: var(--primary-color); /* Optional: add border on hover */
    background-color: rgba(var(--primary-color-rgb), 0.1); /* Light primary bg on hover */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .experience-timeline::before {
        left: 15px; /* Adjust line position for smaller screens */
    }

    .timeline-item {
        padding-left: 45px; /* Adjust padding for smaller screens */
    }

    .timeline-icon {
        width: 30px;
        height: 30px;
        font-size: 1rem;
        margin-left: 16.5px; /* (new line left pos + half line width) */
    }

    .job-title {
        font-size: 1.2rem;
    }

    .company-name {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .company-logo {
        margin-bottom: var(--spacing-sm); /* Space below logo when stacked */
        width: 50px;
        height: 50px;
    }

    .timeline-content {
        padding: var(--spacing-sm);
    }
}
