:root {
  --gradient-colors: #fffdf4, #d8eee7, #6bc9c9, #1594b2, #062f6f;
  --gradient-speed: 20s;
  --text: #102b37;
  --muted: rgba(16, 43, 55, 0.66);
  --line: rgba(255, 255, 255, 0.48);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.gradient-background {
  position: fixed;
  inset: -18%;
  z-index: -1;
  background: linear-gradient(120deg, var(--gradient-colors));
  background-size: 350% 350%;
  filter: saturate(108%);
  animation: gradient-flow var(--gradient-speed) ease-in-out infinite;
}

.gradient-background::after {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 28%, rgba(255, 255, 255, 0.38), transparent 32%),
    radial-gradient(circle at 74% 70%, rgba(5, 75, 139, 0.22), transparent 36%);
  content: "";
  animation: light-drift var(--gradient-speed) ease-in-out infinite alternate;
}

.home {
  width: min(92vw, 680px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.avatar {
  display: block;
  width: clamp(88px, 11vw, 112px);
  height: clamp(88px, 11vw, 112px);
  border: 3px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 16px 42px rgba(2, 47, 111, 0.18);
}

h1 {
  margin: 18px 0 4px;
  font-family: "Segoe Script", "Brush Script MT", "Comic Sans MS", cursive;
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.tagline {
  margin: 8px 0 30px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.links {
  width: min(100%, 560px);
  padding-top: 25px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px 0;
  border-top: 1px solid var(--line);
}

.links a {
  position: relative;
  padding: 2px 10px;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 520;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease;
}

.links a:not(:last-child)::after {
  position: absolute;
  right: -1px;
  color: rgba(16, 43, 55, 0.48);
  content: "|";
}

.links a:hover,
.links a:focus-visible {
  color: #ffffff;
  transform: translateY(-1px);
}

.links a:focus-visible {
  border-radius: 3px;
  outline: 2px solid rgba(255, 255, 255, 0.86);
  outline-offset: 3px;
}

code {
  padding: 0.12em 0.35em;
  border-radius: 0.35em;
  background: rgba(255, 255, 255, 0.24);
  font-size: 0.9em;
}

@keyframes gradient-flow {
  0% {
    background-position: 0% 40%;
    transform: scale(1) rotate(0deg);
  }
  50% {
    background-position: 100% 60%;
    transform: scale(1.08) rotate(1.5deg);
  }
  100% {
    background-position: 0% 40%;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes light-drift {
  from {
    transform: translate3d(-3%, -2%, 0) scale(1);
  }
  to {
    transform: translate3d(5%, 3%, 0) scale(1.1);
  }
}

@media (max-width: 520px) {
  .links {
    max-width: 340px;
  }

  .links a {
    padding-inline: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gradient-background,
  .gradient-background::after {
    animation: none;
  }

  .links a {
    transition: none;
  }
}
