/* Logo styling */
.logo {
  height: var(--nav-bar-height);
  width: 250px;
  overflow: hidden;
  margin-left: 0.5rem;
}

.logo img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center;
}

/* General styles for nav */
nav {
  display: flex;
  justify-content: space-between;
  /* Space between logo and nav items */
  align-items: center;
  /* Stretch the nav items to fill the full height */
  padding: 0;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 99;
  height: var(--nav-bar-height);
  /* Define the height of the navbar */
  box-sizing: border-box;
  right: 0;
  transition:
    transform 0.8s ease-in-out,
    opacity 0.8s ease-in-out;
  will-change: transform, opacity;

  background: rgba(255, 255, 255, 0.15);
  /* glass tint */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(12px);

  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);

}

nav.nav-hidden {
  transform: translateY(-100%);
  opacity: 0;
}

/* Style for the unordered list */
nav ul {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
  margin-left: auto;
  /* This aligns the navigation items to the right */
}

/* Style for each list item in the navbar */
nav ul li {
  display: flex;
  align-items: stretch;
  /* Ensures that the blocks stretch to fill the nav height */
  height: 100%;
  /* Make sure list items stretch to full height of the navbar */
}

nav ul li a.nav-block {
  text-decoration: none;
  position: relative;
  color: var(--ink);
  font-size: var(--font-size-base);
  padding: 2.5rem 1rem;
  width: var(--nav-bar-width);
  transition: 0.3s ease-in-out;
  display: flex;
  align-items: center;
  height: 100%;
  justify-content: center;
}

nav ul li a.nav-block:hover {
  color: var(--accent);
}

nav ul li a.nav-block:hover::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 7px;
  background-color: var(--accent);
}


/* Hamburger Button Styles */
.off-screen-menu {
  background: var(--paper);
  backdrop-filter: blur(5px);
  width: 150px;
  height: auto;
  max-height: auto;
  position: fixed;
  top: 100px;
  right: 0;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.3, 1.05);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  font-size: 1.5rem;
  box-sizing: border-box;
  z-index: 2;
}

.off-screen-menu.active {
  transform: translateX(0);
  height: auto;
  max-height: calc(100vh - 100px);
  padding: 0;
  overflow-y: auto;
}


.off-screen-menu::-webkit-scrollbar {
  display: none;
}

.off-screen-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  width: 100%;
}

.off-screen-menu ul li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  width: 100%;
  cursor: pointer;
  margin: 0;
}


.off-screen-menu ul li a.nav-block {
  text-decoration: none;
  color: var(--ink);
  font-size: var(--font-size-base);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  position: relative;
}

.off-screen-menu ul li a.nav-block:hover {
  color: var(--accent);
}

.off-screen-menu ul li a.nav-block:hover::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background-color: var(--accent);
}

/* Hamburger menu */
.ham-menu {
  height: 30px;
  width: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  margin-left: auto;
  margin-right: 1rem;
}

.ham-menu span {
  height: 2px;
  width: 75%;
  left: 50%;
  background-color: var(--muted);
  border-radius: 10px;
  position: absolute;
  top: 50%;
  /* Adjust positioning to compensate for padding */
  transform: translate(-50%, -50%);
  transition: 0.3s ease;
}

.ham-menu:hover span {
  background-color: var(--muted);
}

.ham-menu span:nth-child(1) {
  top: 25%;
}

.ham-menu span:nth-child(2) {
  opacity: 0;
}

.ham-menu span:nth-child(3) {
  top: 50%;
}

.ham-menu span:nth-child(4) {
  opacity: 0;
}

.ham-menu span:nth-child(5) {
  top: 75%;
}


/* Ham menu active */
.ham-menu.active span:nth-child(1) {
  opacity: 0;
}

.ham-menu.active span:nth-child(2) {
  opacity: 100%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.ham-menu.active span:nth-child(3) {
  opacity: 0;
}

.ham-menu.active span:nth-child(4) {
  opacity: 100%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.ham-menu.active span:nth-child(5) {
  opacity: 0;
}


@media screen and (min-width: 768px) {
  .ham-menu {
    display: none;
  }

  .off-screen-menu {
    display: none !important;
  }
}

@media screen and (max-width: 767px) {
  .nav-links {
    display: none;
  }

  .ham-menu {
    display: block;
  }
}
