.nav-links a {
    position: relative;
    text-decoration: none;
    color: rgb(233, 0, 0);
    font-size:15px;
  }
  
  /* underline container */
  .nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 6px;
  
    background: url("/wave.svg") repeat-x;
  
    background-size: 100px 6px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
  }
  
  /* show underline */
  .nav-links a:hover::after {
    transform: scaleX(1);
    animation: waveMove 1s linear infinite;
  }
  
  /* animate wave movement */
  @keyframes waveMove {
    from {
      background-position-x: 0;
    }
    to {
      background-position-x: 100px;
    }
  }