@import url('https://fonts.googleapis.com/css?family=Ubuntu:700|Ubuntu:400');

:root {
  --text: hsl(0, 0%, 0%);

  --background-50: hsl(0, 0%, 95%);
  --background-100: hsl(0, 0%, 90%);
  --background-200: hsl(0, 0%, 80%);
  --background-300: hsl(0, 0%, 70%);
  --background-400: hsl(0, 0%, 60%);
  --background-500: hsl(0, 0%, 50%);
  --background-600: hsl(0, 0%, 40%);
  --background-700: hsl(0, 0%, 30%);
  --background-800: hsl(0, 0%, 20%);
  --background-900: hsl(0, 0%, 10%);
  --background-950: hsl(0, 0%, 5%);

  --primary: hsl(16, 93%, 59%);
  --secondary: hsl(16, 96%, 72%);
  --accent: hsl(306, 41%, 45%);
}

.dark {
  --text: hsl(0, 0%, 100%);

  --background-50: hsl(0, 0%, 5%);
  --background-100: hsl(0, 0%, 10%);
  --background-200: hsl(0, 0%, 20%);
  --background-300: hsl(0, 0%, 30%);
  --background-400: hsl(0, 0%, 40%);
  --background-500: hsl(0, 0%, 50%);
  --background-600: hsl(0, 0%, 60%);
  --background-700: hsl(0, 0%, 70%);
  --background-800: hsl(0, 0%, 80%);
  --background-900: hsl(0, 0%, 90%);
  --background-950: hsl(0, 0%, 95%);

  --primary: hsl(16, 97%, 59%);
  --secondary: hsl(15, 100%, 68%);
  --accent: hsl(306, 57%, 70%);
}

/* Reseteo básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Hacer que la página ocupe toda la pantalla sin scroll */
html,
body {
  min-height: 100dvh;
  font-family: 'Ubuntu', sans-serif;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  scroll-padding-top: var(--scroll-padding, 60px);
}

body {
  background-image: url("../img/bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 🔹 Barra Superior */
header {
  position: sticky;
  z-index: 1000;
  top: 0;

  display: flex;
  justify-content: space-between;
  font-size: clamp(
    1.1rem,
    0.972rem + 0.587vw,
    1.5rem
  ); /* min 350px | max 1440px*/
  align-items: center;
  background-color: var(--background-200);
  color: var(--text);
  padding: 0.3em;
}

header > .left {
  display: flex;
  height: 100%;
  gap: 0.4em;
  flex-direction: row;
  align-items: center;
}

.left > img {
  height: 1.5em;
  aspect-ratio: 1;
  border-radius: 50%;
}

.left > h1 {
  margin: 0px;
  font-style: normal;
  font-size: 1em;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.5;
}

@media (max-width: 380px) {
  .left > h1 {
    display: none;
  }
}

.center > p {
  font-style: normal;
  font-size: 0.9em;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.5;
}

.right {
  display: flex;
  height: 1.7em;
  gap: 0.5em;
  align-items: center;
  align-content: stretch;
  flex-wrap: nowrap;
  flex-direction: row-reverse;
  justify-content: start;
}

.right > * {
  --background-items: var(--background-300);
  --background-items-hover: var(--background-400);

  height: 100%;
  width: 100%;
  border-radius: 0.4em;
  background: var(--background-items);
  transition: background 0.3s;
  border: 0.1em solid var(--background-items-hover);
  padding: 0.05em;
}

@media (hover: hover) {
  .right > *:hover {
    background: var(--background-items-hover);
    border: 0.1em solid var(--background-items-hover);
  }
}

.right > * svg{
  cursor: pointer;
  padding: 0.05rem;
  height: 100%;
  width: 100%;
  aspect-ratio: 1;
  fill: var(--text);
}

/* Contenedor Principal */
.container {
  flex-grow: 1;
  display: flex;
}

/* Barra Lateral */
nav {
  --background: hsla(from var(--background-200) h s l / 75%);

  position: sticky;
  left: 0;
  min-width: clamp(50px, 8dvw, 90px);
  background: var(--background);
}

nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.3rem;
}

/* Elementos apilados en la barra lateral */
nav li {
  --background-items: var(--background-300);
  --background-items-hover: var(--background-400);

  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--background-items);
  border-radius: 0.5rem;
  border: 0.2rem solid var(--background-items-hover);
  cursor: pointer;
  transition: background 0.3s;
  padding: 0.1rem;
  width: 100%;
  aspect-ratio: 1;

  &:hover {
    background: var(--background-items-hover);
  }
}

nav a:is(.active) svg {
  fill: var(--accent);
}

.svg-container {
  height: 100%;
}

.svg-container svg { /* ! Apply in about.html and activities.html as well */
  height: 100%;
  width: 100%;
  fill: var(--text);
}

#sidebarCollapse {
  display: none;
}



@media (max-width: 425px) {
  nav:not(.show) {
    min-width: auto;
    background: none;
  }

  nav:not(.show) > #sidebarCollapse {
    display: flex;
    border: 0;
    border-radius: 0 0.5rem 0.5rem 0;
    background: var(--background);
    min-width: 1.5rem;
    min-height: 2.5rem;
  }
  
  @media (hover: hover) {
    nav:not(.show) > #sidebarCollapse:hover {
      background-color: var(--background-400);
      border: 0;
    }
  }

  nav > #sidebarCollapse > svg {
    align-self: center;
    width: 100%;
    height: 100%;
    fill: var(--text);
  }

  nav:not(.show) ul {
    display: none !important;
  }

  nav:is(.show) > #sidebarCollapse {
    --margin: 0.25rem;

    position: absolute;
    bottom: var(--margin);
    left: var(--margin);

    display: flex;
    border: 0.15rem solid var(--background-500);
    border-radius: 0.5rem;
    background: var(--background-300);
    width: calc(100% - 2 * var(--margin));
    aspect-ratio: 1;
  }

  @media (hover: hover) {
    nav:is(.show) > #sidebarCollapse:hover {
      background-color: var(--background-400);
      border: 0;
    }
  }

  nav:is(.show) > #sidebarCollapse > svg {
    transform: rotate(180deg);
    justify-self: center;
  }
}