@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500&display=swap');
*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  list-style-type: none;
  outline: none;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

::-webkit-scrollbar {
  width: 0;
}

body {
  font-size: 1.6rem;
  font-family: 'Inter', sans-serif;
  background: url('images/bg.png') no-repeat center/cover;
  height: 100vh;
  --bg: #fff;
  --text: #475569;
  --active-link: #edeef3;
  --divider: 0.1rem solid #d9d9da;
  --profile-text-1: #000;
  --profile-text-2: #8a8b8c;
  --dropdown-bg: rgb(245, 245, 245);
}

body.dark {
  --bg: #1a2037;
  --text: #ededed;
  --active-link: linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.6),
      rgba(255, 255, 255, 0.6)
    ),
    #1a2037;
  --divider: 0.1rem solid #d9d9da;
  --profile-text-1: #e0e0e0;
  --profile-text-2: #bfbfbf;
  --dropdown-bg: rgb(31, 44, 76);
}

.container {
  max-width: 140rem;
  margin: 0 auto;
  padding: 0 3rem;
}

body.dark .icon-img,
body.dark .dropdown-arrow img,
body.dark .dropdown-link img,
body.dark .sidebar-toggle-icon img {
  filter: brightness(0) invert(1);
}

.sidebar {
  width: 30rem;
  max-height: calc(100vh - 5rem);
  background: var(--bg);
  padding: 1.4rem;
  margin: 2.5rem 0;
  border-radius: 1.5rem;
  position: fixed;
  left: 2rem;
  display: flex;
  gap: 1rem;
  flex-direction: column;
  justify-content: space-between;
  overflow-x: hidden;
  overflow-y: scroll;
  transition: width 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.sidebar.active {
  width: 7rem;
}

.sidebar.active .profile-img {
  width: 3rem;
  height: 3rem;
}

.sidebar.active .list {
  width: 4.5rem;
  height: 4.5rem;
  padding: 1rem 1.1rem;
}

.sidebar-toggle {
  display: flex;
  justify-content: center;
}

.sidebar-toggle .sidebar-toggle-icon {
  width: 4.5rem;
  height: 4.5rem;
  background: var(--dropdown-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-toggle-icon img {
  width: 3rem;
  transform: rotate(180deg);
}

.sidebar-toggle-icon.active img {
  transform: rotate(0deg);
}

.list,
.dropdown-list {
  padding: 1rem 1.3rem;
  margin-bottom: 1rem;
  border-radius: 0.8rem;
  background-blend-mode: soft-light, normal;
  transition: all 0.5s ease;
}

.icon-img {
  width: 2.5rem;
  height: 2.5rem;
}

.list.active {
  background: var(--active-link);
}

.link,
.dropdown-link {
  display: flex;
  gap: 2rem;
  align-items: center;
  color: var(--text);
}

.link span,
.dropdown-link span {
  font-size: 1.8rem;
  font-weight: 500;
}

.dropdown-arrow {
  width: 100%;
  text-align: right;
}

.dropdown-link:not(:last-child) {
  margin-bottom: 0.5rem;
}

.dropdown-link {
  padding: 1rem 1.3rem;
  border-radius: 0.8rem;
  transition: all 0.5s ease;
}

.dropdown-list.active {
  margin-bottom: 0;
  background: transparent;
}

.dropdown-list .dropdown-arrow img {
  width: 1.3rem;
  transition: transform 0.5s ease;
}

.dropdown-list.active .dropdown-arrow img {
  transform: rotate(90deg);
}

.dropdown {
  height: 0;
  background: var(--dropdown-bg);
  border-radius: 1rem;
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  transition: all 0.5s cubic-bezier(0.51, -0.02, 0.4, 0.91);
}

.dropdown.active {
  margin-top: 1rem;
  height: 100%;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition: all 0.5s cubic-bezier(0.51, -0.02, 0.4, 0.91);
}

.dropdown-link.active {
  background-blend-mode: soft-light, normal;
  background: var(--active-link);
}

.profile {
  padding: 0 0.8rem;
}

.profile-content {
  padding: 1rem 0 0 0;
  margin-top: 1rem;
  border-top: var(--divider);
  display: flex;
  align-items: center;
  gap: 2rem;
}

.profile-img {
  width: 4rem;
  height: 4rem;
}

.profile-name {
  color: var(--profile-text-1);
  padding-bottom: 0.3rem;
}

.profile-email {
  color: var(--profile-text-2);
}

@media (max-width: 375px) {
  .sidebar {
    width: 28rem;
  }
}
