* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
}

html {
  font-size: 62.5%;
}

body {
  width: 100%;
  height: 100vh;
  background-color: rgb(191, 248, 226);
  display: grid;
  place-items: center;
}

.navbar {
  width: 90rem;
  height: 10rem;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0.3rem 0.3rem 0.3rem #aaa;
  border-radius: 0.5rem;
}

.navbar-link {
  width: 10rem;
  height: 100%;
  background-color: rgb(222, 233, 181);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1rem;
  position: relative;
  /* overflow: hidden; */
  transition: border-radius 0.2s;
}

.navbar-link:first-child {
  pointer-events: none;
  border-radius: 0.5rem 0 0 0.5rem;
}

.navbar-link:last-child {
  pointer-events: none;
  border-radius: 0 0.5rem 0.5rem 0;
}

.change.navbar-link {
  background-color: rgb(185, 197, 147);
}

.navbar-link.prevElChange {
  border-top-right-radius: 1.3rem;
  transition: border-radius 0.45s;
}

.navbar-link.nextElChange {
  border-top-left-radius: 1.3rem;
  transition: border-radius 0.45s;
}

.navbar-link::before {
  content: "";
  width: 10.4rem;
  height: 8rem;
  background-color: rgb(191, 248, 226); /* reason for comment overflow  */
  position: absolute;
  top: -100%;
  left: -0.2rem;
  border-radius: 0 0 5rem 5rem;
  transition: top 0.4s, background-color 0.4s 0.4s;
}

.change.navbar-link::before {
  top: -30%;
  transition: top 0.2s;
}

.navbar-link i {
  font-size: 2.5rem;
  color: #333;
  transition: color 0.4s, font-size 0.4s;
}

.change.navbar-link i {
  color: #fff;
  font-size: 3.5rem;
}
