.experience-options {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.experience-options button {
    border-radius: var(--radius-round);
    padding: 12px 32px;
    background-color: var(--color-bg-hover);
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    font-size: var(--font-size-button);
    transition: all 0.3s ease;
    border: none;
    color: var(--color-text-secondary);
    flex: 0 1 auto;
    min-width: 0;
}

.experience-options button:hover {
    background-color: var(--color-bg-coral-tint);
    transform: translateY(-2px);
}

.experience-options button.active {
    background-color: var(--color-orange);
    color: var(--color-text-light);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(247, 85, 89, 0.3);
}

.professional-experience-container,
.volunteer-experience-container,
.leadership-experience-container {
    width: 100%;
}

.experience-item {
    padding: var(--spacing-lg);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    /* border: var(--border-width-medium) solid var(--color-border-pale); */
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
    background-color: var(--color-bg-white);
}

.experience-item:hover {
    transform: translateX(5px);
    border-color: var(--color-border-primary);
    box-shadow: 0 4px 16px var(--shadow-color-blue);
    /* background-color: var(--color-bg-orange-tint); */
}

.experience-logo {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    /* border: var(--border-width-thick) solid var(--color-border-primary); */
    border-radius: var(--radius-lg);
    padding: 4px;
    background-color: var(--color-bg-white);
}

.experience-logo img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.experience-details-container {
    display: flex;
    gap: 24px;
    align-items: start;
    margin-bottom: 20px;
}

.experience-details {
    flex: 1;
}

.experience-company {
    font-weight: 700;
    font-size: var(--font-size-card-title);
    margin-bottom: var(--spacing-sm);
    /* color: var(--color-purple); */
    /* border-bottom: var(--border-width-medium) solid var(--color-border-pale); */
    padding-bottom: var(--spacing-sm);
    display: inline-block;
}

.experience-meta-data {
    font-size: var(--font-size-meta);
    color: var(--color-text-muted);
    font-weight: 500;
}

.experience-meta-data span {
    font-weight: 600;
    color: var(--color-text-primary);
}

.experience-description-container {
    margin-left: 104px;
}

.experience-location {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-meta);
    color: var(--color-text-muted);
    font-weight: 500;
}

.experience-location img {
    width: 20px;
    height: 20px;
}

.experience-description-wrapper {
    position: relative;
}

.experience-description {
    /* font-size: 1.1rem; */
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-md);
}

.experience-description.truncated {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    max-height: 9em;
    /* Approximately 5 lines at 1.8 line-height */
}

.experience-read-more {
    background: none;
    border: none;
    color: var(--color-coral);
    font-size: var(--font-size-read-more);
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    margin-top: 8px;
    transition: color 0.2s ease;
    text-decoration: underline;
}

.experience-read-more:hover {
    color: var(--color-purple);
}

.experience-read-more .read-more-text {
    display: inline;
}

.experience-read-more .read-less-text {
    display: none;
}

.experience-read-more.expanded .read-more-text {
    display: none;
}

.experience-read-more.expanded .read-less-text {
    display: inline;
}

.experience-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.experience-skills button {
    border-radius: var(--radius-round);
    padding: 12px 32px;
    background-color: var(--color-bg-hover);
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    font-size: var(--font-size-button-sm);
    transition: all 0.3s ease;
    border: none;
    color: var(--color-text-secondary);
}

.experience-skills button:hover {
    background-color: var(--color-bg-coral-tint);
    transform: translateY(-2px);
}

.experience-attribution {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: var(--color-bg-hover);
    border-radius: var(--radius-md);
    border: var(--border-width-medium) solid var(--color-border-primary);
}

.attribution-label {
    font-size: var(--font-size-label);
    font-weight: 600;
    color: var(--color-purple);
    margin-bottom: var(--spacing-sm);
}

.attribution-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attribution-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.attribution-name {
    font-size: var(--font-size-body);
    font-weight: 600;
    color: var(--color-text-primary);
}

.attribution-help {
    font-size: var(--font-size-meta-sm);
    color: var(--color-text-secondary);
    font-style: italic;
    margin-left: var(--spacing-sm);
}

.experience-attachments {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.attachment-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--color-bg-hover);
    border: var(--border-width-medium) solid var(--color-border-primary);
    border-radius: var(--radius-round);
    cursor: pointer;
    font-weight: 500;
    font-size: var(--font-size-button);
    color: var(--color-text-secondary);
    transition: all 0.3s ease;
    min-height: 44px;
}

.attachment-button:hover {
    background-color: var(--color-bg-coral-tint);
    border-color: var(--color-border-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 85, 89, 0.2);
}

.attachment-icon {
    font-size: var(--font-size-2xl);
}

.attachment-count {
    background-color: var(--color-coral);
    color: var(--color-text-light);
    padding: 2px 8px;
    border-radius: var(--radius-round);
    font-size: var(--font-size-button-sm);
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* Attachment Modal Styles */
.attachment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.attachment-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.attachment-modal-content {
    position: relative;
    background-color: var(--color-bg-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    z-index: 1001;
}

.attachment-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background-color: var(--color-bg-hover);
    border: none;
    border-radius: var(--radius-circle);
    font-size: var(--font-size-4xl);
    cursor: pointer;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1002;
}

.attachment-modal-close:hover {
    background-color: var(--color-coral);
    color: var(--color-text-light);
    transform: rotate(90deg);
}

.attachment-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: var(--border-width-medium) solid var(--color-border-pale);
}

.attachment-modal-header h2 {
    margin: 0;
    font-size: var(--font-size-5xl);
    color: var(--color-text-primary);
}

.attachment-modal-counter {
    font-size: var(--font-size-body-lg);
    color: var(--color-text-muted);
    font-weight: 500;
}

.attachment-modal-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    flex: 1;
    min-height: 400px;
    max-height: calc(90vh - 200px);
}

.attachment-pdf-viewer {
    width: 100%;
    height: 600px;
}

.attachment-pdf-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius-md);
}

.attachment-video-viewer {
    width: 100%;
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.attachment-video-viewer iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius-md);
}

.attachment-image-viewer {
    text-align: center;
}

.attachment-image-viewer img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px var(--shadow-color-blue-light);
}

.attachment-link-viewer {
    text-align: center;
    padding: var(--spacing-xl);
}

.attachment-link-viewer p {
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-xl);
    color: var(--color-text-secondary);
}

.attachment-link-button {
    display: inline-block;
    padding: 12px 32px;
    background-color: var(--color-coral);
    color: var(--color-text-light);
    text-decoration: none;
    border-radius: var(--radius-round);
    font-weight: 600;
    transition: all 0.3s ease;
}

.attachment-link-button:hover {
    background-color: var(--color-accent-coral);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 85, 89, 0.3);
}

.attachment-modal-navigation {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-top: var(--border-width-medium) solid var(--color-border-pale);
    gap: var(--spacing-md);
}

.attachment-nav-button {
    padding: 12px 24px;
    background-color: var(--color-bg-hover);
    border: var(--border-width-medium) solid var(--color-border-pale);
    border-radius: var(--radius-round);
    cursor: pointer;
    font-weight: 500;
    font-size: var(--font-size-body-lg);
    color: var(--color-text-secondary);
    transition: all 0.3s ease;
    min-height: 44px;
}

.attachment-nav-button:hover {
    background-color: var(--color-bg-coral-tint);
    border-color: var(--color-border-primary);
    transform: translateY(-2px);
}

.attachment-nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media only screen and (max-width: 768px) {
    .experience-details-container {
        flex-direction: column;
        gap: 16px;
    }

    .experience-description-container {
        margin-left: 0;
    }

    .experience-logo {
        width: 60px;
        height: 60px;
    }

    .experience-skills {
        gap: 8px;
    }

    .experience-skills button {
        padding: 10px 20px;
        font-size: var(--font-size-button-sm);
    }

    .attachment-button {
        padding: 10px 20px;
        font-size: var(--font-size-md);
        min-height: 44px;
    }

    .attachment-modal {
        padding: var(--spacing-sm);
    }

    .attachment-modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: var(--radius-md);
    }

    .attachment-modal-close {
        width: 44px;
        height: 44px;
        top: 12px;
        right: 12px;
    }

    .attachment-modal-header {
        padding: var(--spacing-md);
    }

    .attachment-modal-header h2 {
        font-size: var(--font-size-2xl);
    }

    .attachment-modal-body {
        padding: var(--spacing-md);
        max-height: calc(95vh - 180px);
        min-height: 300px;
    }

    .attachment-pdf-viewer {
        height: 400px;
    }

    .attachment-pdf-viewer iframe {
        height: 400px;
    }

    .attachment-video-viewer {
        padding-bottom: 56.25%;
        /* Maintain 16:9 aspect ratio on mobile */
    }

    .attachment-modal-navigation {
        padding: var(--spacing-md);
        flex-direction: column;
    }

    .attachment-nav-button {
        width: 100%;
        padding: 14px 20px;
        min-height: 48px;
    }
}

/* Timeline Styles for Grouped Roles */
.experience-group {
    padding: var(--spacing-lg);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
    background-color: var(--color-bg-white);
}

.experience-group:hover {
    transform: translateX(5px);
    border-color: var(--color-border-primary);
    box-shadow: 0 4px 16px var(--shadow-color-blue);
}

.experience-group-header {
    display: flex;
    gap: 24px;
    align-items: start;
    margin-bottom: 20px;
}

.experience-header-details {
    flex: 1;
}

.experience-roles-timeline {
    position: relative;
    margin-left: 104px;
    padding-left: 32px;
}

/* Vertical timeline line */
.experience-roles-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--color-primary-blue-light), var(--color-primary-blue));
    border-radius: 2px;
}

/* Hide timeline for single role */
.experience-roles-timeline.single-role {
    padding-left: 0;
}

.experience-roles-timeline.single-role::before {
    display: none;
}

.experience-roles-timeline.single-role .experience-role::before {
    display: none;
}

.experience-role {
    position: relative;
    margin-bottom: var(--spacing-xl);
}

.experience-role:last-child {
    margin-bottom: 0;
}

/* Timeline dot for each role - matching timeline.css approach */
.experience-role::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-circle);
    background-color: var(--color-purple);
    border: 3px solid var(--color-bg-white);
    box-shadow: 0 0 0 3px var(--color-border-pale);
    z-index: 10;
    transform: translateX(-50%);
}

.role-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    margin-bottom: var(--spacing-md);
}

.role-position {
    font-weight: 600;
    font-size: var(--font-size-body-lg);
    color: var(--color-text-primary);
}

.role-date {
    font-size: var(--font-size-meta);
    color: var(--color-text-muted);
    font-weight: 500;
}

/* Mobile responsive for timeline */
@media only screen and (max-width: 768px) {
    .experience-group-header {
        flex-direction: column;
        gap: 16px;
    }

    .experience-roles-timeline {
        margin-left: 0;
        padding-left: 28px;
    }

    .experience-roles-timeline::before {
        left: 6px;
        width: 2px;
    }

    .experience-role::before {
        left: -22px;
        width: 12px;
        height: 12px;
        border: 2px solid var(--color-bg-white);
        top: 3px;
    }

    .role-header {
        flex-direction: column;
        gap: 4px;
    }
}