nav {
  background-color: rgba(var(--bg-color), 1);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 0.3rem 2rem 1rem 2rem;
  width: 100%;
  max-width: 1300px;
  box-sizing: border-box;
  position: relative;
}
nav .logo-and-name {
  margin-right: 1.3rem;
}
nav .logo-and-name a {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgba(var(--nav-txt-color), 1)
}
nav .logo-and-name a .img-logo {
  width: 60px;
}
nav .logo-and-name a img {
  width: 100%;
  height: auto;
}
nav .logo-and-name a .txt-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex;
  margin: 0 0 0 0.5rem;
}
nav .logo-and-name a .txt-wrapper h1 {
  margin: 0;
}
nav .links {
  display: flex;
  align-items: center;
}
nav .links li {
  list-style: none;
}
nav .links li a {
  margin: 0 1rem;
  text-decoration: none;
  color: rgba(var(--nav-txt-color), 1);
  font-weight: 600;
  white-space: nowrap;
}
nav .links li a:hover {
  text-decoration: underline;
  color: rgba(var(--txt-color), 1);
}

hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  -webkit-user-select: none;
  user-select: none;
}
hamburger input {
  margin: 0;
  width: 2rem;
  height: 2rem;
  position: absolute;
  display: block;
  cursor: pointer;
  opacity: 0; /* hide this */
  z-index: 3; /* and place it over the hamburger */
  -webkit-touch-callout: none;
}
hamburger span {
  display: block;
  width: 33px;
  height: 4px;
  margin-bottom: 5px;
  position: relative;
  background: rgba(var(--nav-txt-color), 1);
  border-radius: 3px;
  transform-origin: 4px 0px;
  transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
              background 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
              opacity 0.55s ease;
}
hamburger span:first-child {
  transform-origin: 0% 0%;
}
hamburger span:nth-last-child(2) {
  transform-origin: 0% 100%;
}
hamburger input:checked ~ span {
  opacity: 1;
  transform: rotate(45deg) translate(-2px, -1px);
}
hamburger input:checked ~ span:nth-last-child(3) {
  opacity: 0;
  transform: rotate(0deg) scale(0.2, 0.2);
}
hamburger input:checked ~ span:nth-last-child(2) {
  transform: rotate(-45deg) translate(0, -1px);
}
hamburger #menu {
  display: flex;
  flex-direction: column;
  position: absolute;
  width: 100vw;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  background-color: rgba(var(--bg-color), 1);
  box-sizing: border-box;
  z-index: 3;
  top: 100%;
  left: 0;
  opacity: 0;
  pointer-events: none;
  /*transform: translateY(-100%);*/
  transform: scaleY(0);
  transform-origin: top;
  transition:
    transform 0.3s cubic-bezier(0.77,0.2,0.05,1.0),
    top 0.3s ease,
    opacity 0.3s ease;
}
hamburger input:checked ~ #menu {
  /*transform: translateY(0);*/
  transform: scaleY(1);
  opacity: 1;
  pointer-events: auto;
}
hamburger #menu a {
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 1rem 0;
  color: inherit;
  font-size: 1.3rem;
  text-decoration: none;
}
hamburger #menu a:hover {
  background: rgba(0, 0, 0, 0.3);
  color: rgba(var(--bg-color), 1);
}

@media (max-width: 800px) {
  nav .logo-and-name a .img-wrapper {
    width: 50px;
  }
}

@media (max-width: 750px) {
  nav .links {
    display: none;
  }
  .overlap-layout .img-overlay.two img {
    object-fit: cover;
  }
  hamburger {
    display: flex;
  }
}

@media (max-width: 600px) {
  .overlap-layout.two {
    flex-direction: column;
  }
}

@media (max-width: 450px) {
  nav {
    padding: 0.3rem 0.5rem 0.8rem 0.5rem;
  }
  nav .logo-and-name a .txt-wrapper h1{
    font-size: 1.3rem;
  }
}
