/* BEFORE AND AFTER HOVER EFFECT */

.slider-wrap {
    display: grid;
    place-items: center;
    min-height: 60vh;
}

.hover-container {
    display: grid;
    place-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    --position: 50%;
}

.image-container {
    max-width: 600px;
    max-height: 70vh;
    aspect-ratio: 1/1;
}

.slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left;
}

.image-before {
    position: absolute;
    inset: 0;
    width: var(--position);
    filter: grayscale(100%)
}

.slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    opacity: 0;
    width: 100%;
    height: 100%;
}

.slider:focus-visible~.slider-button {
    outline: 5px solid black;
    outline-offset: 3px;
}

.slider-line {
    position: absolute;
    inset: 0;
    width: .2rem;
    height: 100%;
    background-color: #fff;
    left: var(--position);
    transform: translateX(-50%);
    pointer-events: none;
}

.slider-button {
    position: absolute;
    background-color: #fff;
    color: black;
    padding: .5rem;
    border-radius: 100vw;
    display: grid;
    place-items: center;
    top: 50%;
    left: var(--position);
    transform: translate(-50%, -50%);
    pointer-events: none;
    box-shadow: 1px 1px 1px hsl(0, 50%, 2%, .5);
}

/* one-page anchors: keep section titles below the sticky navbar */
#modules,
#about-section,
#contact {
    scroll-margin-top: 70px;
}

html {
    scroll-behavior: smooth;
}
