.nav {
  display: flex;
  justify-content: center;
}

.nav--secondary .nav__link {
  font-size: var(--font-size-s);
  color: var(--color-grey-400);
}

.nav__link {
  display: block;
  color: var(--color-grey-500);
  cursor: pointer;
  font-family: var(--font-family-secondary);
  font-size: var(--font-size-m);
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  position: relative;
  margin-right: var(--space-l);
  word-wrap: normal;
  flex-shrink: 0;
}

.nav__link:last-child {
  margin-right: 0;
}

.nav:not(.nav--secondary) .nav__link[aria-current='page']::after {
  transform: scaleY(4);
  animation: 1000ms ease 300ms 1 normal forwards running pulse;
}

.nav__link:hover::after {
  transform: scaleY(4);
}

.nav__link::after {
  content: '';
  position: absolute;
  width: 100%;
  background-color: var(--color-grey-300);
  height: 4px;
  bottom: -8px;
  left: 0;
  z-index: -1;
  transform-origin: center bottom 0;
  transition: transform 100ms ease-in 0s;
}

@keyframes pulse {
  0% {
    transform: scaleY(4);
  }
  100% {
    transform: scale(1.3, 8);
  }
}
