.image-comparison {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(228, 228, 231, 0.2); /* zinc-200 for dark mode vibe */
    background: #000;
    cursor: ew-resize;
    user-select: none;
}

/* Dark mode border adjustment if needed */
.dark .image-comparison {
    border-color: rgba(39, 39, 42, 1); /* zinc-800 */
}

.image-comparison-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.image-comparison-image.right {
    z-index: 2;
    clip-path: inset(0 0 0 50%);
    transition: clip-path 0.1s ease-out;
}

.image-comparison-image.left {
    z-index: 1;
}

.image-comparison-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: #fff;
    z-index: 3;
    pointer-events: none;
    transform: translateX(-50%);
    transition: left 0.1s ease-out;
}

.image-comparison-slider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    background-color: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m18 8 4 4-4 4'/%3E%3Cpath d='m6 8-4 4 4 4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px;
}

/* Specific styling for the portfolio project sections */
#iteration .image-comparison {
    margin-top: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
