/* Resume Section — Interactive Swiper Timeline */

.resume-section {
    background-color: var(--warm-bg);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(144, 169, 85, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(193, 215, 174, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(144, 169, 85, 0.06) 0%, transparent 50%);
}

.timeline-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.resume-section .section-title {
    color: var(--dark-earth);
    margin-bottom: 4px;
}

.about-hook {
    font-family: "Nunito", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-earth);
    font-style: italic;
    margin-bottom: 4px;
    opacity: 0.75;
}

.timeline-hr {
    width: 60px;
    border-top: 3px solid var(--dark-earth);
    margin: 0 0 40px 0;
    opacity: 1;
}

/* ===== Swiper ===== */
.timeline-swiper {
    overflow: hidden;
    position: relative;
    padding: 10px 16px 20px;
}

.timeline-swiper .swiper-slide {
    opacity: 0.4;
    transform: scale(0.88);
    transition: opacity 0.4s ease, transform 0.4s ease;
    height: auto;
}

.timeline-swiper .swiper-slide-active {
    opacity: 1;
    transform: scale(1);
}

.timeline-swiper .swiper-slide-prev,
.timeline-swiper .swiper-slide-next {
    opacity: 0.6;
    transform: scale(0.92);
}

/* Animations */
@keyframes polaroid-float {
    0%, 100% { transform: rotate(var(--rotation, 0deg)) translateY(0); }
    50% { transform: rotate(var(--rotation, 0deg)) translateY(-3px); }
}

@keyframes polaroid-float-slow {
    0%, 100% { transform: rotate(var(--rotation, 0deg)) translateY(0); }
    50% { transform: rotate(var(--rotation, 0deg)) translateY(-2px); }
}

/* ===== Polaroid Card — the whole card IS the polaroid ===== */
.polaroid-card {
    background: #fff;
    padding: 10px 10px 20px;
    box-shadow: 2px 3px 14px rgba(36, 38, 15, 0.16);
    transform: rotate(var(--rotation, 0deg));
    cursor: default;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
}

.polaroid-card:hover {
    box-shadow: 4px 8px 28px rgba(36, 38, 15, 0.24);
}

.timeline-swiper .swiper-slide-active .polaroid-card {
    animation: polaroid-float 3.5s ease-in-out infinite;
}

.timeline-swiper .swiper-slide-prev .polaroid-card,
.timeline-swiper .swiper-slide-next .polaroid-card {
    animation: polaroid-float-slow 5s ease-in-out infinite;
}

/* Photo area — top of the polaroid */
.polaroid-photo {
    width: 100%;
    height: 170px;
    overflow: hidden;
    background: var(--warm-cream, #f5f0e8);
    position: relative;
    cursor: pointer;
}

.polaroid-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.polaroid-photo:hover img:not(.polaroid-rotate),
.polaroid-photo:hover img.polaroid-rotate.active {
    transform: scale(1.05);
}

/* Rotating images — crossfade */
.polaroid-photo img.polaroid-rotate {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.polaroid-photo img.polaroid-rotate.active {
    opacity: 1;
}

.polaroid-photo img.polaroid-rotate:first-child {
    position: relative;
}

/* Icon fallback for no-photo cards */
.polaroid-no-photo .polaroid-icon {
    width: 100%;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--warm-cream, #f5f0e8);
}

.polaroid-icon i {
    font-size: 3rem;
    color: var(--sage);
    opacity: 0.6;
}

/* Body area — the white space below the photo */
.polaroid-body {
    padding: 10px 4px 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Handwriting label — like a real polaroid caption */
.polaroid-label {
    font-family: "Caveat", cursive;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--dark-earth);
    margin-bottom: 8px;
    line-height: 1.2;
}

/* Year badge */
.polaroid-year {
    display: inline-block;
    font-family: "Nunito", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--sage);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

/* Title */
.polaroid-title {
    font-family: "Nunito", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark-earth);
    margin: 0 0 6px;
    line-height: 1.3;
}

/* Description */
.polaroid-desc {
    font-family: "Nunito", sans-serif;
    font-size: 0.8rem;
    color: var(--dark-earth);
    line-height: 1.55;
    margin: 0;
    opacity: 0.8;
}

/* ===== Navigation arrows ===== */
.timeline-nav-btn {
    color: var(--dark-earth);
    width: 40px;
    height: 40px;
}

.timeline-nav-btn:hover {
    color: var(--sage);
}

.timeline-nav-btn::after {
    font-size: 1.2rem;
    font-weight: 900;
}

.swiper-button-prev.timeline-nav-btn { left: 0; }
.swiper-button-next.timeline-nav-btn { right: 0; }

/* ===== Pagination dots ===== */
.timeline-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.timeline-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 4px 8px;
    transition: opacity 0.3s ease;
    opacity: 0.5;
}

.timeline-dot.active { opacity: 1; }

.timeline-dot-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(36, 38, 15, 0.2);
    margin-bottom: 4px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.timeline-dot.active .timeline-dot-circle {
    background: var(--sage);
    transform: scale(1.4);
}

.timeline-dot-year {
    font-family: "Nunito", sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--dark-earth);
}

/* ===== Progress bar ===== */
.timeline-progress-track {
    width: 100%;
    height: 3px;
    background: rgba(36, 38, 15, 0.12);
    border-radius: 2px;
    margin-top: 16px;
    overflow: hidden;
}

.timeline-progress-bar {
    height: 100%;
    background: var(--sage);
    border-radius: 2px;
    width: 0%;
    transition: width 0.4s ease;
}

/* ===== Lightbox ===== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(36, 38, 15, 0.92);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    z-index: 100001;
}

.lightbox-close:hover { color: var(--sage-light); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100001;
}

.lightbox-overlay.has-gallery .lightbox-nav {
    opacity: 0.6;
    pointer-events: all;
}

.lightbox-nav:hover { opacity: 1; }

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-image {
    max-width: 85vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.lightbox-caption {
    color: #fff;
    font-family: "Caveat", cursive;
    font-size: 1.4rem;
    margin-top: 16px;
    letter-spacing: 0.03em;
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    .polaroid-card {
        animation: none !important;
    }
    .polaroid-photo img.polaroid-rotate {
        transition: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .timeline-wrapper {
        padding: 24px 12px 40px;
    }

    .polaroid-photo,
    .polaroid-no-photo .polaroid-icon {
        height: 200px;
    }

    .polaroid-photo img.polaroid-rotate {
        height: 200px;
    }

    .polaroid-title { font-size: 0.9rem; }
    .polaroid-desc { font-size: 0.78rem; }
    .about-hook { font-size: 0.95rem; }

    .timeline-nav-btn { display: none; }
}

@media (min-width: 1024px) {
    .polaroid-photo,
    .polaroid-no-photo .polaroid-icon {
        height: 160px;
    }

    .polaroid-photo img.polaroid-rotate {
        height: 160px;
    }

}
