:root {
  --bg: #f7f4ef;
  --ink: #191627;
  --muted: #5d5875;
  --line: rgba(25, 22, 39, 0.09);
  --card: rgba(255, 255, 255, 0.62);
  --pink: #ff5f9e;
  --orange: #ff8a5b;
  --violet: #7c6cff;
  --teal: #2fc9b4;
  --yellow: #ffc857;
  --radius: 34px;
  --shadow: 0 40px 80px -32px rgba(58, 40, 90, 0.3),
    0 12px 32px -14px rgba(58, 40, 90, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: rgba(255, 95, 158, 0.25);
}

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}

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

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: multiply;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.62;
  will-change: transform;
}

.blob-1 {
  width: 52vmax;
  height: 52vmax;
  top: -24vmax;
  left: -18vmax;
  background: radial-gradient(circle at 40% 40%, #ffa5c4, #ff7fb4 55%, transparent 72%);
  animation: drift-a 22s ease-in-out infinite alternate;
}

.blob-2 {
  width: 44vmax;
  height: 44vmax;
  top: -12vmax;
  right: -16vmax;
  background: radial-gradient(circle at 45% 45%, #b9a8ff, #9c8bff 55%, transparent 72%);
  animation: drift-b 28s ease-in-out infinite alternate;
}

.blob-3 {
  width: 48vmax;
  height: 48vmax;
  bottom: -24vmax;
  left: -10vmax;
  background: radial-gradient(circle at 50% 50%, #ffd59c, #ffbd6f 55%, transparent 72%);
  animation: drift-c 25s ease-in-out infinite alternate;
}

.blob-4 {
  width: 40vmax;
  height: 40vmax;
  bottom: -18vmax;
  right: -10vmax;
  background: radial-gradient(circle at 50% 50%, #a2ecdf, #6fe0cd 55%, transparent 72%);
  animation: drift-d 30s ease-in-out infinite alternate;
}

.blob-5 {
  width: 22vmax;
  height: 22vmax;
  top: 42%;
  left: 52%;
  opacity: 0.35;
  background: radial-gradient(circle at 50% 50%, #ffe08a, transparent 70%);
  animation: drift-b 18s ease-in-out infinite alternate-reverse;
}

@keyframes drift-a {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(7vmax, 5vmax, 0) scale(1.12);
  }
}

@keyframes drift-b {
  from {
    transform: translate3d(0, 0, 0) scale(1.04);
  }
  to {
    transform: translate3d(-6vmax, 7vmax, 0) scale(0.96);
  }
}

@keyframes drift-c {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(6vmax, -7vmax, 0) scale(1.1);
  }
}

@keyframes drift-d {
  from {
    transform: translate3d(0, 0, 0) scale(1.02);
  }
  to {
    transform: translate3d(-7vmax, -5vmax, 0) scale(0.95);
  }
}

.spotlight {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 30%),
    rgba(255, 255, 255, 0.85),
    transparent 72%
  );
  mix-blend-mode: screen;
}

.spotlight.active {
  opacity: 0.9;
}

/* ---------- Card ---------- */

.card {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  padding: clamp(34px, 5.2vw, 50px) clamp(24px, 5vw, 48px) clamp(20px, 3vw, 28px);
  text-align: center;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  transition: box-shadow 0.5s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 95, 158, 0.65),
    rgba(255, 138, 91, 0.3) 26%,
    rgba(255, 255, 255, 0.05) 48%,
    rgba(124, 108, 255, 0.4) 74%,
    rgba(47, 201, 180, 0.55)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.card > * {
  animation: fade-up 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.card > :nth-child(1) {
  animation-delay: 0.08s;
}
.card > :nth-child(2) {
  animation-delay: 0.14s;
}
.card > :nth-child(3) {
  animation-delay: 0.2s;
}
.card > :nth-child(4) {
  animation-delay: 0.26s;
}
.card > :nth-child(5) {
  animation-delay: 0.32s;
}
.card > :nth-child(6) {
  animation-delay: 0.38s;
}
.card > :nth-child(7) {
  animation-delay: 0.44s;
}
.card > :nth-child(8) {
  animation-delay: 0.5s;
}
.card > :nth-child(9) {
  animation-delay: 0.56s;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Avatar ---------- */

.avatar-wrap {
  position: relative;
  width: clamp(98px, 22vw, 116px);
  aspect-ratio: 1;
  margin: 0 auto 24px;
}

.avatar-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 90deg,
    var(--pink),
    var(--orange),
    var(--yellow),
    var(--teal),
    var(--violet),
    var(--pink)
  );
  animation: spin 12s linear infinite;
}

.avatar {
  position: absolute;
  inset: 5px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(150deg, #ffffff, #f5f0ff);
  color: #5b4bd6;
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-weight: 700;
  font-size: clamp(2.3rem, 8vw, 3rem);
  line-height: 1;
  box-shadow: 0 12px 30px -14px rgba(80, 60, 130, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.avatar-wrap:hover .avatar {
  transform: scale(1.04);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 201, 180, 0.55);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(47, 201, 180, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(47, 201, 180, 0);
  }
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(1.85rem, 5.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.grad {
  background: linear-gradient(
    100deg,
    #ff4f92,
    #ff8a5b 26%,
    #ffc857 42%,
    #7c6cff 66%,
    #2fc9b4 88%,
    #ff4f92
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 9s linear infinite;
}

@keyframes gradient-shift {
  to {
    background-position: 220% center;
  }
}

.role {
  margin: 0 0 18px;
  font-size: clamp(0.95rem, 2.6vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.role .slash {
  margin: 0 0.5em;
  color: var(--pink);
  font-weight: 300;
}

.bio {
  max-width: 40ch;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.01em;
}

/* ---------- Tags ---------- */

.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.tag {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--tag-line, var(--line));
  background: var(--tag-bg, rgba(255, 255, 255, 0.55));
  color: var(--tag-ink, var(--muted));
  font-size: 12.5px;
  letter-spacing: 0.03em;
  transition: transform 0.25s ease;
}

.tag:hover {
  transform: translateY(-1px);
}

.tag:nth-child(4n + 1) {
  --tag-bg: rgba(255, 95, 158, 0.11);
  --tag-ink: #b82c66;
  --tag-line: rgba(255, 95, 158, 0.2);
}

.tag:nth-child(4n + 2) {
  --tag-bg: rgba(124, 108, 255, 0.11);
  --tag-ink: #5b4bd6;
  --tag-line: rgba(124, 108, 255, 0.2);
}

.tag:nth-child(4n + 3) {
  --tag-bg: rgba(47, 201, 180, 0.12);
  --tag-ink: #0f8f7c;
  --tag-line: rgba(47, 201, 180, 0.22);
}

.tag:nth-child(4n + 4) {
  --tag-bg: rgba(255, 200, 87, 0.18);
  --tag-ink: #96660a;
  --tag-line: rgba(214, 158, 24, 0.24);
}

/* ---------- Buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    background-color 0.25s ease, border-color 0.25s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(120deg, #241f3d, #4b3a8f 55%, #7c6cff);
  box-shadow: 0 14px 26px -12px rgba(75, 58, 143, 0.65);
}

.btn.primary .arrow {
  width: 15px;
  height: 15px;
  transition: transform 0.25s ease;
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 32px -14px rgba(75, 58, 143, 0.75);
}

.btn.primary:hover .arrow {
  transform: translateX(3px);
}

.btn.ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  border-color: var(--line);
}

.btn.ghost:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 12px 22px -14px rgba(25, 22, 39, 0.35);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

/* ---------- Socials ---------- */

.socials {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.social-link {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  color: #4a4560;
  cursor: pointer;
  transition: transform 0.25s ease, color 0.25s ease,
    background-color 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.social-link:hover {
  color: var(--brand, var(--ink));
  background: #ffffff;
  border-color: color-mix(in srgb, var(--brand, var(--ink)) 28%, transparent);
  transform: translateY(-3px) rotate(-4deg);
  box-shadow: 0 12px 22px -12px rgba(25, 22, 39, 0.32);
}

.social-link:active {
  transform: translateY(0) scale(0.95);
}

/* ---------- Footer ---------- */

.meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.meta .sep {
  opacity: 0.5;
}

#local-time {
  font-variant-numeric: tabular-nums;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 10;
  padding: 10px 18px;
  border-radius: 999px;
  background: #191627;
  color: #ffffff;
  font-size: 13px;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 34px -14px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
  .card {
    border-radius: 28px;
  }

  .bio br {
    display: none;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .spotlight {
    display: none;
  }
}
