@import url('https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700,800,900&display=swap');

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

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

a {
  position: relative;
  display: inline-block;
  padding: 10px 30px;
  text-decoration: none;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  background: #262c37;
  letter-spacing: 2px;
  font-size: 16px;
  transition: 0.5s;
}

a:hover {
  color: rgba(255, 255, 255, 1);
}

a span {
  display: block;
  position: absolute;
  background: #2894ff;
}

a span:nth-child(1) {
  left: 0;
  bottom: 0;
  width: 1px;
  height: 100%;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s;
}

a:hover span:nth-child(1) {
  transform: scaleY(1);
  transform-origin: bottom;
  transition: transform 0.5s;
}

a span:nth-child(2) {
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s;
}

a:hover span:nth-child(2) {
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 0.5s;
}

a span:nth-child(3) {
  right: 0;
  bottom: 0;
  width: 1px;
  height: 100%;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s;
  transition-delay: 0.5s;
}

a:hover span:nth-child(3) {
  transform: scaleY(1);
  transform-origin: bottom;
  transition: transform 0.5s;
  transition-delay: 0.5s;
}

a span:nth-child(4) {
  left: 0;
  top: 0;
  width: 100%;
  height: 1px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s;
  transition-delay: 0.5s;
}

a:hover span:nth-child(4) {
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 0.5s;
  transition-delay: 0.5s;
}