nav {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-around;
  background: var(--bg);
  border-radius: 10px;
  align-items: center;
}

.navbar-links {
  display: flex;
  column-gap: 60px;
  align-items: center;
  transition: all 0.3s ease-in-out;
}

.links-group {
  display: flex;
  column-gap: 20px;
  align-items: center;
}
.main-links {
  flex-grow: 3;
}

nav a {
  font: var(--h3);
  text-decoration: none;
  color: var(--text);
  font-weight: bold;
  /*transition: text-decoration-thickness 0.3s ease-in-out;*/
}

nav .navbar-links a:hover {
  text-decoration: underline var(--text) 20%;
}

.nav-toggle {
  display: none;
}

.hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text);
  user-select: none;
}

@media (max-width: 970px) {
  nav.navbar {
    justify-content: space-around;
    padding: 0 1rem;
  }

  .navbar-links {
    position: absolute;
    top: 70px;
    right: -40px;
    display: flex;
    visibility: hidden;
    opacity: 0;
    flex-direction: column;
    align-items: center;
    background: var(--bg);
    width: 120px;
    padding: 1.5rem;
    gap: 1.25rem;
    border-radius: 20px;
  }

  .hamburger {
    display: block;
  }

  .nav-toggle:checked ~ .navbar-links {
    visibility: visible;
    opacity: 1;
  }

  .links-group {
    flex-direction: column;
    gap: 1rem;
  }
}
