html,
body {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: black;
}

.menu {
    padding: 0;
}

.menu li {
	list-style-type: none;
	color: transparent;
	font-size: 3em;
	font-weight: bold;
	text-transform: uppercase;
	text-align: center;
	line-height: 1em;
	width: 7em;
	border-top: 1px solid transparent;
	position: relative;
	margin: 0.5em;
	transition: 0.3s;
}

.menu li:hover {
	border-top-color: yellow;
}

.menu li::before,
.menu li::after {
	content: attr(data-text);
	position: absolute;
	top: -0.5em;
	left: 0;
	width: 100%;
	color: silver;
	transition: 0.3s ease-out;
}

.menu li::before {
	clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
}

.menu li::after {
	clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
}

.menu li:hover::before,
.menu li:hover::after {
	color: yellow;
	transition: left 0.3s ease-out;
	transition-delay: 0.2s;
}

.menu li:nth-child(odd):hover::before,
.menu li:nth-child(even):hover::after {
	left: -0.15em;
}

.menu li:nth-child(even):hover::before,
.menu li:nth-child(odd):hover::after {
	left: 0.15em;
}
