
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

*,
*::after,
*::before {
  box-sizing: inherit;
}

label,
button {
  cursor: pointer;
}

figure {
  margin-inline: 0;
  margin-block: 0.25rem;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
  font-size: inherit;
  line-height: 1.1;
}

input[type="checkbox"] {
  display: none;
}

body {
  box-sizing: border-box;
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: linear-gradient(-45deg, #121521, #1d356d, #6b0715, #dc957d);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
  padding-left: var(--expanded);
  transition: padding-left 300ms ease;
  color: #f1f1f1;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

body:has(#checkbox-input:not(:checked)) {
  padding-left: var(--collapsed);
}

:root {
  --bg--primary: #1e1e2f;
  --bg--active: rgba(255, 255, 255, 0.1);
  --bg--hover: #2c2c4d;
  --bg--focus: #333355;
  --gray--primary: #aaa;
  --gray--secondary: #ddd;
  --dark--primary: #f1f1f1;
  --dark--secondary: #ccc;
  --accent--primary: #778fff;
  --accent--secondary: #8ab4f8;
  --expanded: 16.875rem;
  --collapsed: 3.25rem;
  --svg: 1.125rem;
  --item: 2.25rem;
  --brad-outer: 0.75rem;
  --frame-space: 0.5rem;
  --brad-inner: calc(var(--brad-outer) - var(--frame-space));
}

.vertical-sidebar {
  display: flex;
  inline-size: var(--expanded);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
}

nav {
  background: var(--bg--primary);
  display: flex;
  flex-flow: column;
  min-width: var(--collapsed);
  border-radius: var(--brad-outer);
  flex: 0 0 auto;
  transition: flex-basis 300ms ease-out;
  will-change: flex-basis;
  padding: var(--frame-space);
  box-shadow: 0 3px 5px #1233, 0 5px 17px #0003;
}

.vertical-sidebar :checked ~ nav {
  flex-basis: var(--expanded);
}

.vertical-sidebar :not(:checked) ~ nav {
  flex-basis: var(--collapsed);
}

header {
  display: flex;
  flex-flow: column;
  justify-content: center;
  gap: 0.5rem;
}

.sidebar__toggle-container {
  block-size: var(--item);
  display: flex;
  justify-content: end;
}

.nav__toggle {
  block-size: 100%;
  background: none;
  transition: all 233ms ease-in;
  border-radius: var(--brad-inner);
  outline: 2px solid transparent;
  outline-offset: -2px;
  overflow: hidden;
}

.toggle--icons {
  block-size: inherit;
  aspect-ratio: 1;
  display: inline-grid;
  place-content: center;
  grid-template-areas: "svg";
  z-index: 10;
}

.toggle-svg-icon {
  grid-area: svg;
  fill: var(--gray--primary);
  transition: fill 233ms ease-in;
}

.nav__toggle:hover {
  outline: 2px solid var(--accent--primary);
}

.toggle--icons:hover .toggle-svg-icon {
  fill: var(--dark--primary);
}

figure {
  display: flex;
  flex-direction: column;
  justify-content: center;
  container-type: inline-size;
  gap: 0.375rem;
}

.codepen-logo {
  width: 100%;
  max-width: 120px;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

figcaption {
  text-align: center;
}

.user-id {
  font-size: 1.0625rem;
  font-weight: 500;
  margin-block-end: 0.25rem;
  color: var(--gray--secondary);
}

.user-role {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray--primary);
}

.sidebar__wrapper {
  --list-gap: 0.5rem;
  display: flex;
  flex-flow: column;
  gap: var(--list-gap);
}

.sidebar__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-flow: column;
  gap: 0.125rem;
  overflow: hidden;
}

.sidebar__item {
  block-size: var(--item);
  border-radius: var(--brad-inner);
}

.item--heading {
  display: flex;
  align-items: end;
}

.sidebar__item--heading {
  margin-block-end: 0.4rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  font-weight: 500;
  color: var(--gray--primary);
  transition: color 200ms ease-in;
}

.sidebar__list:has(.sidebar__link):hover .sidebar__item--heading {
  color: var(--gray--secondary);
}

.sidebar__link {
  display: flex;
  text-decoration: none;
  block-size: 100%;
  align-items: center;
  gap: 0.5rem;
  outline: 2px solid transparent;
  border-radius: inherit;
}

.icon {
  aspect-ratio: 1;
  block-size: 100%;
  display: inline-grid;
}
.icon svg {
  place-self: center;
  inline-size: var(--svg);
  block-size: var(--svg);
  fill: var(--gray--primary);
}

.text {
  pointer-events: none;
  color: var(--gray--secondary);
  font-size: 0.875em;
  font-weight: 500;
  transition: color 266ms ease-out;
}

.sidebar__link:hover {
  background: var(--bg--hover);
}
.sidebar__link:hover .icon svg {
  fill: var(--accent--primary);
}
.sidebar__link:hover .text {
  color: var(--dark--primary);
}

.sidebar__link:focus {
  outline: 2px solid var(--accent--secondary);
  outline-offset: -2px;
  background: var(--bg--focus);
}
.sidebar__link:focus .icon svg {
  fill: var(--accent--primary);
}

.sidebar__link:active {
  background-color: var(--bg--active);
}

aside:not(:has(:checked)) .toggle--open,
aside:has(:checked) .toggle--close {
  opacity: 0;
}

aside:not(:has(:checked)) :where(figcaption, .item--heading) {
  opacity: 0;
}

aside:has(:checked) :where(figcaption, .item--heading) {
  transition: opacity 300ms ease-in 200ms;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: fixed;
  translate: calc(var(--item) * 1.5) calc(var(--item) * 0.125);
  border-radius: var(--brad-inner);
  padding: 0.125rem 0.5rem;
  color: #ddd;
  background-color: hsl(198 16% 30%);
  box-shadow: 0 6px 12px -6px #0003;
  opacity: 0;
  pointer-events: none;
  scale: 0 0;
  z-index: 999;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 350ms ease-out;
}

aside:not(:has(:checked)) .sidebar__link:where(:hover, :focus-visible)[data-tooltip]::before {
  opacity: 1;
  scale: 1;
}

.sidebar-footer {
  padding: 0.75rem 0.5rem;
  text-align: center;
  border-top: 1px solid var(--gray--primary);
  overflow: hidden;
  color: var(--gray--secondary);
}

.sidebar-footer .contact-info {
  font-size: 0.75rem;
  transition: opacity 0.3s ease, max-height 0.3s ease;
}

.sidebar-footer .social-icons {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.sidebar-footer .social-icons img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.vertical-sidebar:has(#checkbox-input:not(:checked)) .sidebar-footer .contact-info {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
}