:root {
  --fg: #edf7f4;
  --muted-fg: rgba(237, 247, 244, 0.72);
  --btn-bg: rgba(15, 28, 36, 0.72);
  --btn-fg: #f4fffb;
  --btn-border: rgba(120, 230, 196, 0.35);
  --btn-hover: rgba(120, 230, 196, 0.18);
  --accent-local: #7be8c2;
  --glow-a: rgba(55, 180, 150, 0.35);
  --glow-b: rgba(30, 80, 140, 0.4);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Heebo", "Outfit", system-ui, sans-serif;
}

.page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  padding: clamp(28px, 6vw, 56px) 18px 40px;
  color: var(--fg, #edf7f4);
  overflow: hidden;
  --overlay: 0.82;
  background:
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--bg1, #0a1b24) calc(var(--overlay) * 100%), transparent),
      color-mix(in srgb, var(--bg2, #0b2a22) calc((var(--overlay) + 0.06) * 100%), transparent)
    ),
    var(--bg-image, linear-gradient(160deg, var(--bg1, #0a1b24), var(--bg2, #0b2a22)));
  background-size: cover;
  background-position: center;
}

.atmosphere {
  position: absolute;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--accent-local) 35%, transparent), transparent 42%),
    radial-gradient(circle at 80% 10%, color-mix(in srgb, var(--bg2) 45%, transparent), transparent 38%);
  animation: drift 18s ease-in-out infinite alternate;
  pointer-events: none;
}

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

.hero {
  width: min(440px, 100%);
  margin: 0 auto 28px;
  text-align: center;
}

.avatar {
  width: var(--avatar-size, 112px);
  height: var(--avatar-size, 112px);
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border: 3px solid color-mix(in srgb, var(--accent-local) 55%, transparent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  animation: rise .7s ease both;
}

.avatar.fallback {
  font-family: "Outfit", "Heebo", sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--accent-local) 25%, transparent);
}

.brand {
  margin: 0 0 10px;
  font-family: "Outfit", "Heebo", sans-serif;
  font-size: clamp(1.55rem, 5.2vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  animation: rise .75s ease .05s both;
  max-width: 100%;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.bio {
  margin: 0 auto;
  width: 100%;
  max-width: var(--bio-width, 34ch);
  color: var(--muted-fg);
  line-height: 1.55;
  animation: rise .75s ease .1s both;
  text-wrap: pretty;
  white-space: pre-line;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  animation: rise .75s ease .15s both;
}

.social {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--fg);
  background: color-mix(in srgb, var(--btn-bg) 80%, transparent);
  border: 1px solid var(--btn-border);
  transition: transform .2s ease, background .2s ease;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.social svg { width: 18px; height: 18px; }
.social:hover { transform: translateY(-2px); background: var(--btn-hover); }

.links-wrap { width: min(460px, 100%); margin: 0 auto; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.link-list li { animation: rise .65s ease calc(0.18s + var(--i) * 0.06s) both; }

.link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 14px 18px;
  border-radius: var(--radius, 14px);
  text-decoration: none;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  backdrop-filter: blur(10px);
  font-weight: 700;
  font-size: 1.05rem;
  transition: transform .2s ease, background .2s ease, opacity .2s ease;
  position: relative;
}

.link-btn.has-icon {
  justify-content: flex-start;
  padding-inline: 18px 22px;
}

.link-btn .link-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  opacity: 0.95;
}

.link-btn .link-label {
  flex: 1 1 auto;
  text-align: center;
}

.link-btn.has-icon .link-label {
  padding-inline-end: 20px;
}

.link-btn:hover {
  transform: translateY(-3px) scale(1.01);
  opacity: 0.92;
}

.link-btn.is-featured {
  background: color-mix(in srgb, var(--accent-local) 28%, var(--btn-bg));
  border-color: var(--accent-local);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-local) 55%, transparent), 0 10px 28px rgba(0, 0, 0, 0.18);
  font-size: 1.12rem;
  min-height: 64px;
}

.empty { text-align: center; color: var(--muted-fg); }
.foot {
  margin-top: 36px;
  text-align: center;
  color: var(--muted-fg);
  font-size: .85rem;
  animation: rise .7s ease .4s both;
}
.foot-brand {
  color: inherit;
  text-decoration: none;
  opacity: 0.85;
  font-weight: 600;
}
.foot-brand:hover { opacity: 1; text-decoration: underline; }

.sys-watermark {
  position: fixed;
  z-index: 40;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--fg, #edf7f4);
  background: color-mix(in srgb, var(--btn-bg, #0f1c24) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--btn-border, #78e6c4) 55%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform .2s ease, opacity .2s ease;
  opacity: 0.92;
}
.sys-watermark:hover { transform: translateY(-2px); opacity: 1; }
.sys-watermark__tag {
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-local, #7be8c2) 35%, transparent);
  font-size: 0.68rem;
}

@media (max-width: 520px) {
  .sys-watermark {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 10px;
  }
  .sys-watermark:hover { transform: translateX(-50%) translateY(-2px); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere, .avatar, .brand, .bio, .socials, .link-list li, .foot {
    animation: none !important;
  }
}
