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

:root {
  --text-color: #fff;
  --bg-url: url(../assets/bg-mobile.jpg);
  --stroke-color: rgb(255 255 255 / 0.5);
  --surface-color: rgb(255 255 255 / 0.05);
  --surface-color-hover: rgb(0 0 0 / 0.02);
  --highlight-color: rgb(255 255 255 / 0.2);
  --switch-bg-url: url(../assets/moon-stars.svg);
}

.light {
  --text-color: #000;
  --bg-url: url(../assets/bg-mobile-light.jpg);
  --stroke-color: rgb(0 0 0 / 0.5);
  --surface-color: rgb(0 0 0 / 0.05);
  --surface-color-hover: rgb(0 0 0 / 0.02);
  --highlight-color: rgb(0 0 0 / 0.1);
  --switch-bg-url: url(../assets/sun.svg);
}

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

body {
  background-image: var(--bg-url);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
}

#container {
  width: 100%;
  max-width: 588px;
  margin: 36px auto 0px;
  padding: 0 18px;
}

/*********** PROFILE **********/

#profile {
  text-align: center;
  padding: 16px;
}

#profile img {
  width: 96px;
}

#profile h2 {
  line-height: 22px;
  margin-top: 6px;
  font-size: 1.2rem;
}

#profile p {
  font-weight: 400;
  line-height: 20px;
  margin-top: 6px;
  font-size: 0.95rem;
}

/*********** SWITCH **********/
#switch {
  position: relative;
  width: 64px;
  margin: 2px auto;
}

#switch button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background-color: #fff;
  background-image: var(--switch-bg-url);
  background-repeat: no-repeat;
  background-position: center;
  position: absolute;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  animation: slide-back 0.4s forwards;
}

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

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

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

/*********** LINKS **********/
#links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 0;
}

#links li .icons {
  margin-right: 8px;
}

#links li a {
  display: flex;
  /* Alinha verticamente */
  align-items: center;
  /* Alinha horizontalmente */
  justify-content: center;
  padding: 12px 16px;
  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: 0.95rem;
  transition: background 0.2s;
}

#links li a:hover {
  background: var(--surface-color-hover);
  border: 1.5px solid var(--text-color);
}

#social-links {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 14px 0;
  font-size: 22px;
}

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

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

footer {
  padding: 14px 0;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 420px) {
  #container {
    margin-top: 24px;
    padding: 0 14px;
  }

  #profile {
    padding: 12px;
  }

  #profile img {
    width: 84px;
  }

  #profile p {
    font-size: 0.9rem;
    line-height: 18px;
  }

  #links {
    gap: 8px;
    padding: 12px 0;
  }

  #links li a {
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  #social-links {
    padding: 10px 0;
    font-size: 20px;
  }

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

/*********** MEDIA QUERIES **********/
@media (min-width: 700px) {
  :root {
    --bg-url: url(../assets/bg-desktop.jpg);
  }

  .light {
    --bg-url: url(../assets/bg-desktop-light.jpg);
  }
}

@media (min-width: 1308px) {
  body {
    background-position: center center;
  }
}

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

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