* {
    margin: 0;
    padding: 0;
}

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


ul {
    position: relative;
    transform: skewY(-15deg);
}

ul li {
    position: relative;
    list-style: none;
    width: 250px;
    background: #cda23a;
    padding: 25px;
    z-index: var(--i);
    transition: 0.5s;
}

ul li:hover {
    background: #527aa3;
    transform: translateX(-25px);
}

ul li:before,
ul li:after {
    content: '';
    position: absolute;
    transition: 0.5s;
}

ul li:before {
    bottom: 0;
    left: -40px;
    width: 40px;
    height: 100%;
    background: #b18d2a;
    transform-origin: right;
    transform: skewY(45deg);
}

ul li:hover::before {
    background: #355ea7;
}

ul li:after {
    top: -40px;
    left: 0;
    width: 100%;
    height: 40px;
    background: #e6b74b;
    transform-origin: bottom;
    transform: skewX(45deg);
}

ul li a {
    text-decoration: none;
    color: #282828;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.5s;
}

ul li:hover a {
    color: #FFFFFF;
}

.nav li:nth-child(1) {
    --i: 4;
}

.nav li:nth-child(2) {
    --i: 3;
}

.nav li:nth-child(3) {
    --i: 2;
}

.nav li:nth-child(4) {
    --i: 1;
}

/* hold click */
ul li:active {
    background: #1e5bc7;
}

ul li:nth-child(1)::after {
    content: 'Amin Yahya Selhabi';
    color: #303030;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
}

ul li:nth-child(1):hover::after {
    background: #3e84e0;
    color: #FFFFFF;
}