.hamburger {
  grid-column: 1/2;
  justify-self: left;
  align-self: center;
  margin-left: 0.4rem;
  display: flex;
  width: 3rem;
  height: 3rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  aspect-ratio: 1/1;
  border-radius: 6px;
  background: var(--color-teal);
  box-shadow: 1px 1px 7px 0 rgba(0, 0, 0, 0.25);  
}

.hamburger svg path {
  /* Ensure the paths rotate around the center of the SVG box */
  transform-origin: center;
  /* Smoother deceleration curve */
  transition: 
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
    opacity 0.3s ease;
}

/* Hide the middle bar when open */
.hamburger.open > svg > path:nth-child(3) {
  opacity: 0;
}

/* Rotate the top bar to form part of an X */
.hamburger.open > svg > path:nth-child(2) {
  transform: translateY(2px) translateX(-2px) rotate(45deg);
  transform-origin: center;
}

/* Rotate the bottom bar to form the other part of an X */
.hamburger.open > svg > path:nth-child(4) {
  transform: translateY(-2px) translateX(-2px) rotate(-45deg);
  transform-origin: center;
}

@media (min-width:1000px) {
  .hamburger {
    display: none;
  }
}