* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: #262e31;
    display: flex;
    justify-content: center;
    align-items: center;
}

.imgBx {
    position: relative;
    width: 300px;
    height: 300px;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.imgBx img {
    position: absolute;
    top: 0;
    Left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
    z-index: calc(1 + var(--i));
    opacity: calc(1 - (0.2 * var(--j)));
}

.imgBx:hover img{
    transform: rotate(-30deg) skew(25deg) translateX(calc(35px * var(--i))) translateY(calc(-35px * var(--i)));;
    box-shadow: -20px 20px 20px rgba(0,0,0,0.25) ;
}
