/* ============ БАЗА ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #07080d;
  --panel: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f4f5f7;
  --muted: #9aa0ab;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
}

html, body { height: 100%; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============ ФОН ============ */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(124, 92, 255, 0.13), transparent 55%),
    radial-gradient(ellipse at 50% 115%, rgba(34, 211, 238, 0.08), transparent 55%),
    var(--bg);
  box-shadow: inset 0 0 180px rgba(0, 0, 0, 0.55);
}

/* мягкое свечение за карточкой, чтобы карточка «парила» над фоном */
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 42% at 50% 40%, rgba(124, 92, 255, 0.10), transparent 70%);
}

/* ============ КАРТОЧКА ============ */
.card {
  width: 100%;
  max-width: 460px;
  padding: 38px 30px 26px;
  border-radius: 30px;
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: center;
  position: relative;
}

/* тонкая бегущая рамка */
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 31px;
  padding: 1px;
  background: conic-gradient(from var(--angle, 0deg), transparent 0 70%, #7c5cff 85%, #22d3ee 95%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: spin 6s linear infinite;
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --angle: 360deg; } }

/* ============ АВАТАРКА (квадрат) ============ */
.avatar-wrap {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 0 auto 20px;
}

.avatar-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: #fff;
  opacity: 1;
}

.avatar {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #0b0c12;
  display: block;
  background: #12131a;
}

.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Unbounded", sans-serif;
  font-size: 56px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #7c5cff, #22d3ee);
  border-radius: 50%;
}
.avatar-fallback[hidden] { display: none; }

/* ============ ИМЯ ============ */
.name {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(30px, 8vw, 40px);
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff 20%, #b9bec9 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}

.handle {
  margin-top: 6px;
  color: var(--accent-2);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .08em;
}

/* курсор печатающегося имени */
.name.typing::after {
  content: "▌";
  color: var(--accent-2);
  font-weight: 700;
  margin-left: 6px;
  animation: blink .75s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #4ade80;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, .7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.bio {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

/* ============ КНОПКИ: 2 ряда по 3 ============ */
.links {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.btn {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 4px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .03em;
  overflow: hidden;
  transition: transform .22s cubic-bezier(.2,.8,.3,1), box-shadow .22s, border-color .22s, background .22s;
}
.btn span {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn svg {
  width: 24px;
  height: 24px;
  fill: var(--brand);
  transition: transform .22s, filter .22s;
}

/* иконки, которые рисуются штрихами (например, глобус) */
.btn svg.stroke-icon {
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* свечение бренда при наведении */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 120%, var(--glow), transparent 65%);
  opacity: 0;
  transition: opacity .25s;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: 0 10px 26px rgba(0,0,0,.45), 0 0 22px var(--glow);
  outline: none;
}
.btn:hover::after { opacity: .35; }
.btn:hover svg { transform: scale(1.12); filter: drop-shadow(0 0 8px var(--glow)); }

.btn:active { transform: translateY(-1px) scale(.97); }

/* пустые кнопки-заглушки */
.btn-empty {
  --brand: rgba(255, 255, 255, .25);
  --glow: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, 0.02);
  border-style: dashed;
  border-color: rgba(255, 255, 255, .16);
  min-height: 66px;
  cursor: default;
}
.btn-empty:hover {
  transform: none;
  border-color: rgba(255, 255, 255, .3);
  box-shadow: none;
}
.btn-empty::after { display: none; }

/* клик-волна */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: var(--brand);
  opacity: .45;
  transform: scale(0);
  animation: ripple .6s ease-out forwards;
  pointer-events: none;
}
@keyframes ripple { to { transform: scale(3.5); opacity: 0; } }

/* ============ ПОДВАЛ ============ */
.footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.07);
  color: #6b7280;
  font-size: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.footer .sep { opacity: .5; }

/* ============ ПОЯВЛЕНИЕ ЭЛЕМЕНТОВ ============ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal .7s cubic-bezier(.2,.8,.3,1) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============ МОБИЛЬНЫЕ ============ */
@media (max-width: 420px) {
  body { padding: 24px 12px; }
  .card { padding: 28px 14px 20px; border-radius: 26px; }
  .avatar-wrap { width: 116px; height: 116px; }
  .links { gap: 9px; }
  .btn { padding: 13px 3px; font-size: 10px; border-radius: 15px; gap: 7px; }
  .btn svg { width: 21px; height: 21px; }
  .bio { font-size: 13px; }
}
