nav {
  position: sticky;
  top: 0;
  background-color: var(--nav-background);
  color: var(--nav-text);
  z-index: 100;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 3rem;
  padding: 1rem 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-mark-logo {
  width: 3.1rem;
}

.nav-text-logo {
  height: 1.1rem;
  width: auto;
}

.nav-links {
  list-style: none;
  display: flex;
}

.nav-links a {
  display: inline-block;
  color: var(--nav-text);
  text-decoration: none;
}

.nav-links a:visited {
  color: var(--nav-text);
}

.nav-links li {
  margin-right: 20px;
  cursor: pointer;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
}

.nav-links li:last-child {
  margin-right: 0;
}

.menu-icon {
  display: none; /* Initially hidden on desktop */
  flex-direction: column;
  cursor: pointer;
}

.menu-close {
  display: none;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: var(--nav-text);
  margin: 3px 0;
}

/* Media Query for Mobile */
@media screen and (max-width: 1000px) {
  .nav-links {
    display: none; /* Hidden until toggled */
    flex-direction: column;
    background-color: var(--nav-background);
    position: absolute;
    top: 3rem;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 1.2rem;
    gap: 0.5rem;
    padding: 0;
    padding-bottom: 1rem;
  }

  .nav-links li {
    margin-right: 0;
    margin-left: 0;
  }

  nav:target .nav-links {
    display: flex;
  }

  .menu-icon {
    display: flex; /* Show the menu icon on mobile */
  }

  .menu-open {
    display: flex;
  }

  .menu-close {
    display: none;
  }

  nav:target .menu-open {
    display: none;
  }

  nav:target .menu-close {
    display: flex;
  }
}
