.container-wrap {
  display: block;
  max-width: 1280px;
  padding: 0 64px;
  margin: 0 auto;
}

.container {
  display: flex;
  gap: 32px;
}

main {
  flex: 1;
  width: 0;
  padding-top: 16px;
}

aside {
  position: sticky;
  top: 0;
  display: block;
  width: 240px;
  height: 100vh;
  padding: 16px 0 32px;
  overflow: auto;
  background-color: var(--bg-color);
}

header {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-translucent-color);
  backdrop-filter: blur(6px);
}

footer {
  padding: 32px 0;
  margin-top: 64px;
  font-size: 0.75rem;
  text-align: center;
}

.menu,
.submenu {
  padding: 0;
  margin: 0;
  list-style-type: none;

  .menu-item {
    position: relative;
    display: block;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;

    &:hover {
      background-color: var(--bg-secondary-color);
    }
  }
}

.menu > li + li {
  margin-top: 24px;
}

.menu-item {
  font-weight: 500;
  color: var(--fg-color);

  &.active {
    &::before {
      content: '';
      position: absolute;
      top: 12px;
      left: 0;
      display: inline-block;
      width: 4px;
      height: 16px;
      background-color: currentColor;
      border-radius: 2px;
    }
  }

  .submenu & {
    color: var(--fg-secondary-color);
  }
}

.brand {
  display: inline-block;
  padding: 0 16px;
  color: var(--heading-color);
  font-size: 20px;
  font-weight: 600;
  line-height: 40px;
}

.spacer {
  flex-grow: 1;
}

@media (width <=960px) {
  .container-wrap {
    padding: 0 32px;
  }

  aside {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;

    &.show {
      transform: none;
    }
  }

  .backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 190;
    width: 100vw;
    height: 100vh;
    visibility: hidden;
    transition-duration: 400ms;
    transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
    transition-property: background-color, visibility;

    &.show {
      background-color: rgba(0, 0, 0, 0.5);
      visibility: visible;
    }
  }

  header {
    position: sticky;
    top: 0;
  }

  .brand {
    padding: 0 8px;
  }
}

@media (width <=600px) {
  .container-wrap {
    padding: 0 16px;
  }
}

@media (width > 960px) {
  .menu-toggle {
    display: none;
  }
}
