@import url('https://fonts.googleapis.com/css2?family=Inter&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: lightskyblue;
}

ul {
    position: relative;
    transform-style: preserve-3d;
    perspective: 500px;
    display: flex;
    flex-direction: column;
    gap: 0;
    grid-area: 0;
    transition: 0.5s;
}

ul li {
    position: relative;
    list-style: none;
    width: 450px;
    height: 100px;
    padding: 15px;
    background: #dbdbdb;
    gap: 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border-radius: 6px;
    box-shadow: 0 -15px 25px rgba(0,0,0,0.25);
    transition: 0.5s;
    transition-delay: calc(var(--i) * 0.05s);
}

ul li:nth-child(1) {
    transform: translateZ(-75px) translateY(20px);
    opacity: 0.6;
}

ul li:nth-child(3) {
    transform: translateZ(75px) translateY(-30px);
    background: #eee;
}

ul li:nth-child(4) {
    transform: translateZ(150px) translateY(-75px);
    background: #fff;
}

ul:hover {
    gap: 30px;
}

ul:hover li {
    opacity: 1;
    background: #fff;
    transform: translateZ(0px) translateY(0px);
}

ul li img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

ul li .content {
    width: 100%;
    cursor: pointer;
}

ul li .content h4 {
    font-weight: 600;
    color: #333;
}

ul li .content p {
    position: relative;
    color: #333;
    line-height: 1em;
    width: 100%;
}

ul li .content p span {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.75em;
    color: #888;
}