.portfolioWrap {
    padding: 40px 60px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    text-align: left;
}

.portfolioTitle {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
}

.portfolioIntro {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.portfolioNote {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 16px;
}

.portfolioDivider {
    margin: 40px 0;
}

.sectionHead {
    font-size: 1.6rem;
    margin-bottom: 20px;
}


/* -- SKILLS -- */

.skillsGrid {
    display: flex;
    gap: 60px;
    margin-top: 10px;
    text-align: left;
}

.skillsCol {
    flex: 1;
}

.skillsHead {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.skillsList {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    padding: 0;
}

.skillItem {
    position: relative;
    font-size: 1rem;
    cursor: default;
    width: fit-content;
}

.skillItem.weak {
    color: #aaaaaa;
}

.skillTooltip {
    display: none;
    position: absolute;
    left: 105%;
    top: 50%;
    transform: translateY(-50%);
    background-color: #1a1a1a;
    color: white;
    font-size: 0.8rem;
    padding: 8px 12px;
    border-radius: 8px;
    width: 200px;
    z-index: 10;
    pointer-events: none;
    line-height: 1.4;
}

.skillItem:hover .skillTooltip {
    display: block;
}


/* -- SLIDESHOW -- */

.slideshow {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.slideshowTrack {
    flex: 1;
    position: relative;
    border: 2px solid #1a1a1a;
    overflow: hidden;
}

.slideshowSlide {
    display: none;
    flex-direction: column;
}

.slideshowSlide.active {
    display: flex;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.slideshowSlide a {
    display: block;
}

.slideshowSlide img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

@media (max-width: 700px) {
    .slideshowSlide img {
        height: auto;
        max-width: 400px;
    }
}

.slideshowCaption {
    padding: 10px;
    font-size: 0.9rem;
    text-align: center;
    background-color: #f5f5f5;
}

.slideshowBtn {
    background: none;
    border: 2px solid #1a1a1a;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1;
    padding-bottom: 3px;
}

.slideshowBtn:hover {
    background-color: #572171;
    color: white;
    border-color: #572171;
}


/* -- BEFORE / AFTER -- */

.beforeAfter {
    position: relative;
    width: calc(100% - 100px);
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 2px solid #1a1a1a;
    cursor: ew-resize;
    user-select: none;
    margin: 10px auto;
}

.baAfter,
.baBefore {
    position: absolute;
    inset: 0;
}

.baAfter img,
.baBefore img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.baBefore {
    clip-path: inset(0 50% 0 0);
}

.baHandle {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 2;
}

.baLine {
    flex: 1;
    width: 3px;
    background-color: white;
}

.baCircle {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.baLabel {
    position: absolute;
    top: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 3;
}

.baLabelBefore {
    left: 10px;
}

.baLabelAfter {
    right: 10px;
}

.lightboxContent {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#lightboxCaption {
    color: white;
    font-size: 0.95rem;
    text-align: center;
    max-width: 90vw;
    white-space: pre-line;
}

/* -- MOBILE COMPATIBILITY -- */

@media (max-width: 700px) {
    .portfolioWrap {
        padding: 20px;
    }

    .skillsGrid {
        flex-direction: column;
        gap: 30px;
    }

    .skillTooltip {
        left: 0;
        right: auto;
        top: 100%;
        transform: none;
        width: 160px;
    }

    .slideshow {
        gap: 8px;
    }

    .slideshowBtn {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }

    .beforeAfter {
        width: 100%;
    }
}