/* MOBILE STYLING (screen width < 48rem) */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-fg);

  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  z-index: 100;
  padding: 0 .5em;
}

.site-name {
  font-family: Cantarell, sans-serif;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-bg) !important;
  align-self: center;
  font-size: 2rem;
}

.k {
  letter-spacing: .1875rem;
}

/* HAMBURGER TOGGLE MENU BUTTON */

.hamburger {
  display: block;
  padding: .5em 0;
}

.patty {
  width: 2rem;
  height: .125rem;
  background: var(--color-bg);
  transition: all .125s;
  transform-origin: center;
}

.hamburger:hover .patty {
  background: var(--color-gray-light);
}

.patty:nth-child(1) {
  transform: translate(0, -300%) rotateZ(0);
}
.patty:nth-child(2) {
  opacity: 1;
}
.patty:nth-child(3) {
  transform: translate(0, 300%) rotateZ(0);
}

.rotate-left {
  transform: translate(0, 100%) rotateZ(45deg) !important;
}

.rotate-right {
  transform: translate(0, -100%) rotateZ(-45deg) !important;
}

.disappear {
  opacity: 0 !important;
}

/* MAIN MENU */

.main-menu-container {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 100%;
  width: 100vw;
  transition: left .25s;
  overflow-y: scroll;
  background: var(--color-fg);
}

.slide-in {
  left: 0;
}

.main-menu {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;
}

.dropdown-menu {
  max-height: 0;
  overflow-y: hidden;
  transition: max-height .5s ease-out;
  background: var(--color-fg);
}

.dropdown-header:hover .dropdown-menu {
  max-height: 100vh;
  transition: max-height .5s ease-in;
}

.menu-item > a {
  display: grid;
  font-size: 1.25rem;
  color: var(--color-bg);
  border-bottom: .0625rem solid var(--color-gray-dark);
  padding: 1em;
  text-decoration: none;
}

.menu-item > a:hover {
  color: var(--color-fg);
  background: var(--color-bg);
}

/* DROPDOWN MENUS */

.dropdown-menu a {
  padding-left: 2em;
}

.dropdown-header:hover {
  cursor: pointer;
}

.menu-item img {
  width: 1.25rem;
}

.menu-item:hover img {
  filter: invert();
}

.menu-item img {
  width: 1.25rem;
}

.menu-item:hover img {
  filter: invert();
}


/* DESKTOP STYLING (screen size over 56rem) */

@media (min-width: 54.5rem) {
  .hamburger {
    display: none;
  }

  .main-menu-container {
    position: unset;
    width: unset;
    height: unset;
    transform: unset;
    overflow-y: unset;
  }

  .main-menu {
    position: unset;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .dropdown-menu {
    position: absolute;
    transition: max-height .25s;
  }
  
  .menu-item > a {
    font-size: 1rem;
    border-bottom: unset;
    padding: .725em;
  }
}