/* Slideshow Styles - All slideshow containers, slides, and controls */
/* Includes photo slideshows, experience, education, and skills sections */

/* ========================================
   BASE SLIDESHOW CONTAINER
   ======================================== */

.slideshow-container {
    position: relative;
    max-width: 700px;
    margin: 25px auto;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    overflow: hidden;
}

.slideshow-container:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 8px;
}

.slideshow-container:hover .keyboard-hint,
.slideshow-container:focus-within .keyboard-hint {
    opacity: 1;
}

.slides-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

/* ========================================
   SLIDE DISPLAY STATES
   ======================================== */

.slide {
    display: none;
    position: relative;
    width: 100%;
    height: 100%;
}

.slide.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* ========================================
   PHOTO SLIDESHOW
   ======================================== */

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: white;
    padding: 30px 25px;
    text-align: left;
}

.slide-caption h4 {
    margin: 0 0 8px 0;
    font-size: 1.4em;
}

.slide-caption p {
    margin: 0;
    font-size: 1em;
    opacity: 0.9;
}

/* ========================================
   EXPERIENCE SLIDESHOW
   ======================================== */

.experience-slide.active {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px;
}

.experience-content {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.experience-content h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.8em;
    font-weight: 600;
}

.experience-content .company {
    color: #667eea;
    font-style: italic;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1.2em;
}

.experience-content .date {
    color: #888;
    font-size: 1em;
    margin-bottom: 25px;
    display: inline-block;
    background: rgba(102, 126, 234, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.experience-content .date i {
    margin-right: 8px;
    color: #667eea;
}

.experience-content .description {
    color: #555;
    font-size: 1.1em;
    line-height: 1.8;
    margin: 0;
    text-align: left;
    max-width: 100%;
}

/* Experience Read More/Less functionality */
.experience-description-container {
    position: relative;
}

.description-short {
    display: inline;
}

.description-full {
    display: none;
}

.read-more-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.read-more-btn.expanded {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ========================================
   EXPERIENCE ITEMS (NON-SLIDESHOW)
   ======================================== */

.experience-item,
.education-item {
    background: white;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.experience-item:hover,
.education-item:hover {
    transform: translateX(5px);
    box-shadow: -5px 0 15px rgba(102, 126, 234, 0.1);
}

.experience-item h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.4em;
}

.experience-item .company {
    color: #667eea;
    font-style: italic;
    margin-bottom: 12px;
    font-weight: 600;
}

.experience-item .date {
    color: #888;
    font-size: 0.9em;
    margin-bottom: 15px;
    display: inline-block;
    background: #f8f9fa;
    padding: 5px 12px;
    border-radius: 15px;
}

/* ========================================
   SKILLS SECTION
   ======================================== */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.skill-category {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.skill-category h4 {
    color: #667eea;
    margin-bottom: 18px;
    font-size: 1.2em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.skill-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.skill-item .skill-level {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
}

/* ========================================
   VIDEO SECTION
   ======================================== */

.video-container {
    display: flex;
    justify-content: center;
    margin: 25px 0;
}

.intro-video {
    width: 100%;
    max-width: 700px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.intro-video:hover {
    transform: scale(1.02);
}

/* ========================================
   SLIDESHOW CONTROLS
   ======================================== */

.slideshow-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    position: relative;
}

.slideshow-controls-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    border-top: 1px solid #e0e0e0;
    gap: 15px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slide-indicators {
    display: flex;
    gap: 12px;
}

/* ========================================
   PROGRESS BAR
   ======================================== */

.progress-container {
    flex: 1;
    position: relative;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin: 0 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: width 0.1s linear;
    width: 0%;
}

.progress-bar.paused {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Auto-pause progress on hover */
.slideshow-container:hover .progress-bar {
    animation-play-state: paused;
}

/* ========================================
   SLIDE COUNTER & HINTS
   ======================================== */

.slide-counter {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    min-width: 50px;
    text-align: center;
}

.keyboard-hint {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .header {
        background: #000 !important;
        color: #fff !important;
    }

    .slide-btn,
    .pause-play-btn {
        background: #000 !important;
        border: 2px solid #fff !important;
    }

    .progress-bar {
        background: #fff !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .slideshow-container .progress-bar {
        transition: none !important;
    }

    .slide.active {
        animation: none !important;
    }
}

/* ========================================
   DARK MODE OVERRIDES FOR SLIDESHOWS
   ======================================== */

[data-theme="dark"] .experience-content h3,
[data-theme="dark"] .education-content h3,
[data-theme="dark"] .skill-card h4 {
    color: var(--text-primary);
}

[data-theme="dark"] .experience-content .description,
[data-theme="dark"] .education-content .description,
[data-theme="dark"] .skill-card .description {
    color: var(--text-secondary);
}

[data-theme="dark"] .slideshow-controls,
[data-theme="dark"] .slideshow-controls-enhanced {
    background: linear-gradient(to bottom, var(--bg-elevated), var(--bg-surface));
    border-top-color: var(--border-color);
}

[data-theme="dark"] .skill-category {
    background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
}

[data-theme="dark"] .skill-item {
    background: var(--bg-elevated);
}

[data-theme="dark"] .experience-item,
[data-theme="dark"] .education-item {
    background: var(--bg-surface);
    border-left-color: var(--accent-primary);
}

[data-theme="dark"] .experience-content .date {
    background: rgba(124, 146, 255, 0.15);
    border-color: rgba(124, 146, 255, 0.3);
    color: var(--text-secondary);
}

/* ========================================
   DETAIL LINK (HOVER-REVEAL)
   ======================================== */

.experience-brief-container {
    text-align: left;
    position: relative;
}

.detail-link {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    text-decoration: none;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.2);
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(5px);
    transition: all 0.3s ease;
}

.experience-content:hover .detail-link {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
}

.detail-link:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.detail-link i {
    margin-right: 5px;
    font-size: 0.8em;
}
