:root {
  --pageBlack: #262626;
  --pageYellow: #fadf72;
  --pagePurple: #511e51;
  --pageRed: #814995;
  --pageGreen: #2ce771;
  --grey: #879c9b;
  --lightGreen: #47bc9f;
  --pageGrey: #212121;
  --lightBlue: #d7ecfa;
}
body {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: sans-serif;
  /* overflow: hidden; */
  background-color: var(--lightBlue);
}
ul {
  display:flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
ul li {
  position: relative;
  list-style: none;
  margin: 5px;
}
a {
  position: relative;
  display:block;
  height:40px;
  text-decoration: none;
  padding: 5px 10px;
  font-weight: 500;
  letter-spacing: 2px;
  overflow: hidden;
}
ul li a span {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .3s;
  color: var(--pagePurple);
  font-size: 20px;
  text-transform: capitalize;
  transition-delay: .5s;
}
a:hover span:nth-child(1) {
  transform: translateY(-100%);
  
  transition-delay: 0s;

}
a:hover span:nth-child(2) {
  transform: translateY(-100%);
  transition-delay: 0s;
}
a:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fadf72;
  transform: scaleX(0);
  transform-origin: left;
  transition:  .5s;
}
a:hover:before {
  transform: scaleX(1);
  transform-origin: right;
  transition-delay: .5s;
}
