@import url(https://fonts.googleapis.com/css?family=Inter:100,200,300,regular,500,600,700,800,900);

.light-theme {
  --text: #000000;
  --stroke: rgba(0, 0, 0, 0.5);
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(0, 0, 0, 0.02);
  --highlight: rgba(255, 255, 255, 0.1);
  --background-image-mobile: url(/assets/images/mobile-light-background.svg);
  --background-image-desktop: url(/assets/images/desktop-light-background.svg);
  --switch-bg-url: url(/assets/images/sun.svg);
  --handle-margin: 33px;
}

.dark-theme {
  --text: #ffffff;
  --stroke: rgba(255, 255, 255, 0.5);
  --surface: rgba(255, 255, 255, 0.1);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --highlight: rgba(255, 255, 255, 0.2);
  --background-image-mobile: url(/assets/images/mobile-dark-background.svg);
  --background-image-desktop: url(/assets/images/desktop-dark-background.svg);
  --switch-bg-url: url(/assets/images/moon.svg);
  --handle-margin: 0px;
}

* {
  margin: 0;
  padding: 0;
  outline: 0;
  border: none;
  box-sizing: border-box;
  font-family: "Inter", Arial, sans-serif;
}

body {
  height: 100vh;
  display: grid;
  place-items: center;
  background-image: var(--background-image-mobile);
  background-repeat: no-repeat;
  background-size: cover;
}

main {
  width: 90%;
  display: grid;
  place-items: center;
  padding: 20px;
}

#profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

#profile-picture {
  width: 112px;
  height: 112px;
  border-radius: 50%;
}

#profile p {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

#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;
  cursor: pointer;
  margin-left: var(--handle-margin);
  transition: margin-left 0.3s ease;
}

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

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

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

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  visibility: hidden;
  display: none;
}

.check {
  position: relative;
  display: block;
  width: 64px;
  height: 24px;
  background: var(--surface);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  border: 1px solid var(--stroke);
  border-radius: 50px;
  overflow: hidden;
}

#profile span img {
  width: 35px;
  height: 35px;
  margin-left: var(--handle-margin);
  margin-top: -5px;
  transition: 0.2s;
}

#links {
  margin-top: 24px;
}

#links ul {
  display: grid;
  place-items: center;
  gap: 16px;
}

#links ul li {
  list-style-type: none;
}

#links a {
  width: 312px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--surface);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  transition: 0.4s ease;
}

#links a:hover {
  background: var(--surface-hover);
  transition: 0.4s ease;
}

footer {
  display: grid;
  place-items: center;
  gap: 24px;
  margin-top: 24px;
}

footer div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

footer div a {
  cursor: pointer;
}

footer p {
  color: var(--text);
}

footer p a {
  text-decoration: underline;
  color: var(--text);
  text-decoration-skip-ink: none;
  text-underline-offset: 4px;
  cursor: pointer;
}

@media (min-width: 800px) {
  body {
    background-image: var(--background-image-desktop);
  }
}

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

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