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

:root {
  --text-color: white;
  --bg-url: url(./assets/bg-mobile.jpg);
  --bg-bottom-shade: rgba(0, 18, 48, 0.28);
  --circuit-glow: rgba(0, 168, 255, 0.28);
  --circuit-band: rgba(0, 128, 255, 0.22);
  --stroke-color: rgba(255, 255, 255, 0.5);
  --surface-color: rgba(255, 255, 255, 0.05);
  --surface-color-hover: rgba(255, 255, 255, 0.14);
  --hover-border-color: rgba(255, 255, 255, 0.95);
  --highlight-color: rgba(255, 255, 255, 0.2);
  --switch-bg-url: url(./assets/moon-stars.svg);
}

.light {
  --text-color: #1a1a1a;
  --bg-url: url(./assets/bg-mobile-light.jpg);
  --bg-bottom-shade: rgba(0, 84, 170, 0.12);
  --circuit-glow: rgba(0, 168, 255, 0.24);
  --circuit-band: rgba(0, 128, 255, 0.18);
  --stroke-color: rgba(0, 0, 0, 0.5);
  --surface-color: rgba(0, 0, 0, 0.05);
  --surface-color-hover: rgba(0, 0, 0, 0.1);
  --hover-border-color: rgba(0, 0, 0, 0.9);
  --highlight-color: rgba(0, 0, 0, 0.16);
  --switch-bg-url: url(./assets/sun.svg);
}

body {
  position: relative;
  min-height: 100vh;
  background-image:
    linear-gradient(to top, var(--bg-bottom-shade) 0%, rgba(0, 0, 0, 0) 40%), var(--bg-url);
  background-repeat: no-repeat;
  background-position: top center;
  background-size: cover;
  font-family: "Inter", sans-serif;
  color: var(--text-color);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, var(--circuit-glow), rgba(0, 168, 255, 0) 46%),
    linear-gradient(
      to bottom,
      var(--circuit-band) 0%,
      rgba(0, 0, 0, 0) 18%,
      rgba(0, 0, 0, 0) 82%,
      var(--circuit-band) 100%
    );
  mix-blend-mode: soft-light;
}

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

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

#profile img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 35%;
}

#profile img.is-light {
  object-position: center 35%;
}

#profile p {
  font-weight: 500;
  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;
  color: var(--text-color);
  font-weight: 500;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}

ul li a.multiline-link {
  text-align: center;
}

ul li a:hover {
  background: var(--surface-color-hover);
  border: 1.5px solid var(--hover-border-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;
  color: var(--text-color);
  transition:
    background 0.2s,
    color 0.2s;
  border-radius: 50%;
}

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

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

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

/* Media Queries */
@media (min-width: 700px) {
  :root {
    --bg-url: url(./assets/bg-desktop.jpg);
    --bg-bottom-shade: rgba(0, 18, 48, 0.34);
    --circuit-glow: rgba(0, 168, 255, 0.28);
    --circuit-band: rgba(0, 128, 255, 0.22);
  }

  .light {
    --bg-url: url(./assets/bg-desktop-light.jpg);
    --bg-bottom-shade: rgba(0, 84, 170, 0.16);
    --circuit-glow: rgba(0, 168, 255, 0.24);
    --circuit-band: rgba(0, 128, 255, 0.18);
  }
}

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

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