:root {
  --navbar-height: 65px;
  --grey-accent: #525252;
  --accent-color-bar-height: 2px;
  --menubar-padding: 0.5em;
}

* {
  box-sizing: border-box;
}
/**/
nav {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  height: var(--navbar-height);
  padding: 1em;
  font-weight: bolder;
  font-size: 20pt;
  z-index: 1000;
}

.menu::before,
nav::before {
  content: "";
  position: absolute;
  z-index: -1;
  -webkit-backdrop-filter: blur(50px);
  backdrop-filter: blur(50px);
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
}

nav a,
nav a:visited,
nav a:hover,
nav a:visited:hover {
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.menu li:hover,
.titleLogo:hover {
  color: var(--text-color);
  cursor: pointer;
  background-color: var(--accent-color-dark);
}

.menu li:active,
.titleLogo:active {
  color: var(--accent-color);
}

.menu {
  display: flex;
  flex-direction: row;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.menu > li,
.titleLogo {
  padding: 0 1rem;
  overflow: hidden;
  height: var(--navbar-height);
}

.menu > li > *,
.titleLogo > * {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/*Container for menu button  */
.menu-button-container {
  display: none;
  height: 100%;
  width: 30px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#menu-toggle {
  display: none;
}

/*  Creating the menu button */
.menu-button,
.menu-button::before,
.menu-button::after {
  display: block;
  background-color: var(--text-color);
  position: absolute;
  height: 6px;
  width: 32px;
  border-radius: 3px;
}

.menu-button:hover,
.menu-button:hover::before,
.menu-button:hover::after {
  background-color: var(--grey-accent);
}

.menu-button::before {
  content: "";
  margin-top: -8px;
}

.menu-button::after {
  content: "";
  margin-top: 8px;
}

/*  Adding Functionality to the Hamburger Menu with CSS  */
#menu-toggle:checked + .menu-button-container .menu-button::before {
  margin-top: 0px;
  transform: rotate(45deg);
}

#menu-toggle:checked + .menu-button-container .menu-button {
  background: rgba(255, 255, 255, 0);
}

#menu-toggle:checked + .menu-button-container .menu-button::after {
  margin-top: 0px;
  /*  transforms the hamburger icon into a cross  */
  transform: rotate(-45deg);
}

/* nav:has(#menu-toggle:checked)::after {
  top: var(--navbar-height);
  left: 0;
  content: "";
  width: 100%;
  height: 2px;
  position: absolute;
  background-color: var(--accent-color);
} */

/* nav:has(#menu-toggle:checked) {
  border-bottom: 10px solid var(--accent-color);
} */

@media (max-width: 768px) {
  .menu-button-container {
    display: flex;
  }
  .menu {
    position: absolute;
    top: 0;
    margin-top: var(--navbar-height);
    left: 0;
    flex-direction: column;
    width: 100%;
    justify-content: center;
    align-items: center;
  }

  #menu-toggle ~ .menu li {
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }

  #menu-toggle:checked ~ .menu li {
    /* border: 1px solid var(--grey-accent); */
    height: 2.5em;
    padding: var(--menubar-padding);
    border-top: 2px solid var(--grey-accent);
  }

  .menu > li {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: var(--menubar-padding) 0;
    width: 100%;

    /* background-color: rgba(0, 0, 0, 0.5); */
    /* background-color: #1a1a1a; */
  }
  .menu {
    color: var(--text-color);
  }

  /* #menu-toggle:checked ~ .menu > li:first-child {
    border-top: 1px solid var(--accent-color);
  } */

  #menu-toggle:checked ~ .menu > li:last-child {
    border-bottom: 2px solid var(--grey-accent);
  }

  /* .menu > li:not(:last-child) {
    border-bottom: 1px solid var(--grey-accent);
  } */

  .titleLogo {
    margin-left: -1rem;
  }
}
