* {
  color: white;
  margin: 0;
  padding: 0;
  user-select: none;
}

html {
  background-color: black;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ---------- Background ---------- */

/*
  The full-screen `hue-rotate` animation used to live here. It forced the
  browser to re-filter an entire animated GIF every frame, which is a big
  source of lag. The GIF already animates on its own; if you want the color
  cycling back, use a <video> instead of a GIF and re-add the animation to
  the video only.
*/
.background {
  position: fixed;
  z-index: -1000;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  object-fit: cover;
}

.backbackground {
  position: fixed;
  background-color: hsla(0, 0%, 0%, 0.9);
  background-size: cover;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -999;
}

/* ---------- Layout ---------- */

.center {
  text-align: center;
}

.title {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.subtitle {
  font-size: 20px;
  font-weight: 300;
}

.outline {
  color: black;
  background: linear-gradient(90deg, #ffc400, #00ff2f, #ffc400, #fff, #ffc400, #00ff2f, #ffc400);
  background-size: 700% 700%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 2px transparent;
  animation: shine 7s linear infinite;
}

@keyframes shine {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

:root {
  --box-radious: 3.5%;
}

.box {
  background-color: hsla(0, 0%, 0%, 0);
  padding: 20px;
  border-radius: 20px;
  margin: 30px;
}

.box p {
  text-shadow: 1px 1px 2px black;
}

.expander-bottom {
  margin-bottom: 3.5%;
}

/* ---------- l1up card ---------- */

#l1up {
  width: 200px;
  height: 200px;
  filter: brightness(0.9);
  border-radius: 5px;
  outline: none;
  /* Only transition transform; `all` was transitioning filter/opacity too. */
  transition: transform 100ms ease-out;
  will-change: transform;
}

#l1up:focus-visible {
  box-shadow: 0 0 0 3px hsla(218, 100%, 90%, 0.6);
}

#card-box {
  position: relative;
  background-color: hsla(0, 0%, 0%, 0);
  width: 200px;
  height: 200px;
  margin-left: calc(50% - 100px);
  padding: 20px 0;
}

/* While hovering, snap to the target angle faster. */
#card-box.active #l1up,
#card-box.active #l1up-glow {
  transition-duration: 50ms;
}

:root {
  --lg1: hsla(0, 0%, 100%, 0.2);
  --lg2: hsla(0, 0%, 0%, 0);
}

#l1up-glow {
  border-radius: 5px;
  pointer-events: none;
  width: 200px;
  height: 200px;
  position: absolute;
  z-index: 1; /* <-- put the glow above the <img> */
  background: linear-gradient(-67deg, var(--lg1), var(--lg2), var(--lg1), var(--lg1), var(--lg1), var(--lg2), var(--lg1), var(--lg1), var(--lg2), var(--lg1));
  background-size: 200% 100%;
  background-position: 0 0;
  opacity: 0.2;
  will-change: transform, opacity;
  transition: transform 100ms ease-out, opacity 100ms ease-out;
}

.boing {
  animation: slime-boing 0.45s ease-out;
}

@keyframes slime-boing {
  0%   { transform: scale(1, 1); }
  20%  { transform: scale(0.9, 1.15); }
  40%  { transform: scale(1.12, 0.88); }
  60%  { transform: scale(0.95, 1.08); }
  80%  { transform: scale(1.03, 0.97); }
  100% { transform: scale(1, 1); }
}

/* ---------- Websites ---------- */

.websites {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.websites p {
  text-align: center;
  margin-bottom: 10px;
}

.websites img {
  border: hsla(0, 0%, 100%, 0.2) 2px solid;
  border-radius: 10px;
  height: 200px;
  /* Specific properties instead of `all`. */
  transition: transform 100ms ease-out, border-color 100ms ease-out, box-shadow 100ms ease-out;
}

.websites a:hover img {
  transform: scale(1.05);
  border-color: hsla(0, 0%, 100%, 0.7);
  /* box-shadow is cheaper than drop-shadow for a rounded rectangle. */
  box-shadow: 0 0 20px hsla(218, 100%, 90%, 0.25);
}

/* ---------- Text / socials ---------- */

.justify {
  text-align: center;
  padding: 0 11.6%;
  margin: 7px 0;
}

.socials {
  margin-left: 2px;
}

.socials img {
  width: 30px;
  height: 30px;
  filter: brightness(10);
  margin: 0 5px;
  transition: transform 100ms ease-out, filter 100ms ease-out;
}

.socials a:hover img {
  transform: scale(1.05);
  filter: brightness(99) drop-shadow(0 0 7px hsla(218, 100%, 90%, 0.5));
}

#loading-fade {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  opacity: 1;
  z-index: 9999;
  pointer-events: none;
}

#random-text {
  transform: translateY(15px);
  font-size: 15px;
  font-family: monospace;
  line-height: 20px;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .outline,
  .boing {
    animation: none;
  }
  #l1up,
  #l1up-glow,
  .websites img,
  .socials img {
    transition: none;
  }
}