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

:root {
  --text-color: white;
  background-color: hsl(275, 15%, 6%);
  background-image: radial-gradient(
      at 79% 17%,
      hsl(273, 74%, 23%) 0px,
      transparent 50%
    ),
    radial-gradient(at 6% 71%, hsla(283, 100%, 27%, 0.58) 0px, transparent 50%);
  animation: mixbg 5s infinite;
  background-size: 200% 200%;
  background-position: 0% 0%;
  --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/moon-stars.svg);
}

.light {
  --text-color: black;
  background-color: hsl(275, 100%, 100%);
  background-image: radial-gradient(
      at 79% 17%,
      hsl(217, 71%, 79%) 0px,
      transparent 50%
    ),
    radial-gradient(at 6% 71%, hsl(270, 74%, 77%) 0px, transparent 70%);
  animation: mixbg 5s infinite;
  background-size: 200% 200%;
  background-position: 0% 0%;
  --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/sun.svg);
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(./assets/noise.png);
  background-repeat: repeat;
  background-blend-mode: multiply;
  opacity: 0.1;
  z-index: -1;
}

body {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

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

#container {
  width: 100%;
  max-width: 588px;
  margin: 56px auto 0px;
  padding: 0 24px;
  flex: 1;
}

/* profile */
#profile {
  text-align: center;
  padding: 24px;
}

#profile img {
  width: 112px;
  z-index: 2;
}

#profile h2 {
  font-weight: 500;
  line-height: 24px;
  margin-top: 8px;
}

#profile h3 {
  font-weight: 400;
  line-height: 24px;
  margin-top: 8px;
}

#profile p {
  font-weight: 300;
  line-height: 24px;
  margin-top: 8px;
}

/* 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);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 9999px;
}

/* links */
ul {
  list-style: none;

  display: flex;
  flex-direction: column;
  gap: 16px;

  padding: 24px 0;
}

ul li 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;

  transition: background 0.2s;
}

/* pseudo-selector */
ul li a:hover {
  background: var(--surface-color-hover);
  border: 1.5px solid var(--text-color);
}

/* social links */
#social-links {
  display: flex;
  justify-content: center;

  padding: 24px 0;

  font-size: 24px;
}

#social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;

  transition: background 0.2s;
  border-radius: 50%;
}

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

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

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

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

@keyframes mixbg {
  0%,
  100% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 100%;
  }
}
