* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --background: #272c43;
  --white: #ffffff;
  --purple: #8f85c7;
  --text-color: #888585;
  --stroke-color: rgba(255, 255, 255, 0.5);
  --surface-color: rgba(255, 255, 255, 0.05);
  --surface-color-hover: rgba(0, 0, 0, 0.02);
  --highlight-color: rgba(255, 255, 255, 0.2);
  --switch-bg-url: url(./assets/svg/moon-stars.svg);
}

.light {
  --background: #8f85c7;
  --text-color: black;
  --purple: #272c43;
  --stroke-color: rgba(0, 0, 0, 0.5);
  --surface-color: rgba(0, 0, 0, 0.05);
  --surface-color-hover: rgba(0, 0, 0, 0.02);
  --highlight-color: rgba(0, 0, 0, 0.1);
  --switch-bg-url: url(./assets/svg/sun.svg);
}

body {
  background-color: var(--background);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

body * {
  font-family: "Inter", sans-serif;
  color: var(--text-color);
}

#container {
  width: 400px;
  max-width: 650px;
  margin: 0px auto 0px;
  padding: 0 24px;
  padding-top: 56px;
}

/* Profile */
#profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
  gap: 8px;
}

#profile img {
  width: 112px;
  border: 4px solid var(--purple);
  border-radius: 50%;
  width: 112px;
  height: auto;
}

#profile a {
  text-align: center;
  margin-bottom: 4px;
}

.icon-computer {
  font-size: 20px;
}

#profile h1 {
  color: var(--text-color);
  font-weight: 600;
  font-size: x-large;
  line-height: 24px;
}

/* Switch */
#switch {
  position: relative;
  width: 64px;
  margin: 4px auto;
}

#switch button {
  width: 32px;
  height: 32px;
  background: white var(--switch-bg-url) no-repeat center;
  border: 0;
  border-radius: 50%;

  position: absolute;
  top: 50%;
  left: 0;
  z-index: 1;
  transform: translateY(-50%);
  animation: slide-back 0.2s;
}

.light #switch button {
  animation: slide-in 0.2s forwards;
}

#switch button:hover {
  outline: 8px solid var(--highlight-color);
}

#switch span {
  display: block;
  width: 64px;
  height: 24px;
  background: var(--surface-color);
  border: 1px solid var(--stroke-color);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border-radius: 9999px;
}

/* Links extras */
.my-extra-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 0;
}

.my-extra-links .extra-link a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  background: var(--surface-color);
  border: 1px solid var(--stroke-color);
  border-radius: 8px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  text-decoration: none;
  font-weight: 500;
  font-size: 20px;
  transition: background 0.2s, border 0.2s;
}

.my-extra-links .extra-link a:hover {
  background: var(--surface-color-hover);
  border: 1.5px solid var(--text-color);
}

a {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Social links */
#social-links {
  display: flex;
  justify-content: center;
  font-size: 30px;
}

#social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s;
}

#social-links a:hover {
  background-color: var(--highlight-color);
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -100;
  width: 100%;
  height: 100%;
}

/* Footer */
footer {
  padding: 24px 0;
  text-align: center;
  font-size: 14px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--white);
}

::-webkit-scrollbar-thumb {
  background: rgb(156, 156, 156);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* Responsividade */
@media (max-width: 320px) {
  #container {
    padding: 0 20px;
    padding-top: 0px;
  }

  #profile h1 {
    font-size: larger;
  }

  .my-links {
    padding: 0 20px;
    padding-top: 0px;
  }

  .my-extra-links .extra-link a {
    font-size: 16px;
  }

  .icon-computer {
    font-size: 22px;
  }

  #social-links {
    font-size: 26px;
  }

  #social-links a {
    padding: 3px;
  }
}

/* Animações */
@keyframes slide-back {
  from {
    left: 50%;
  }
  to {
    left: 0;
  }
}

@keyframes slide-in {
  from {
    left: 0;
  }
  to {
    left: 50%;
  }
}
