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

html, body {
  height: 100%;
  width: 100%;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: #fdf7fb;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
}

/* ── Mesh background ── */
.mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.mesh-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.65;
}

.b1 {
  width: 60vmax;
  height: 60vmax;
  top: -20%;
  left: -10%;
  background: radial-gradient(circle, #f3d4e0, transparent 70%);
}

.b2 {
  width: 55vmax;
  height: 55vmax;
  bottom: -15%;
  right: -10%;
  background: radial-gradient(circle, #dfd0f0, transparent 70%);
}

.b3 {
  width: 45vmax;
  height: 45vmax;
  top: 30%;
  left: 30%;
  background: radial-gradient(circle, #fce8f1, transparent 70%);
}

/* Grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px;
}

/* ── Page ── */
.page {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  padding: 0 28px;
  padding-top: max(48px, env(safe-area-inset-top, 48px));
  padding-bottom: max(40px, env(safe-area-inset-bottom, 40px));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow-x: hidden;
}

/* ── Avatar ── */
.avatar-wrap {
  position: relative;
  width: 118px;
  height: 118px;
  flex-shrink: 0;
  animation: heartbeat 3s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14%       { transform: scale(1.04); }
  28%       { transform: scale(1); }
  42%       { transform: scale(1.03); }
  56%       { transform: scale(1); }
}

.avatar-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4a0c0, #b890d4, #e8b8d0, #c8a0cc);
  background-size: 300% 300%;
  animation: ringShift 4s linear infinite;
  z-index: 0;
}

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

.avatar {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  display: block;
  background: #fce8f1;
}

/* ── Profile ── */
.profile {
  margin-top: 20px;
  text-align: center;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.15s;
}

.username {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  font-weight: 400;
  color: #3a2840;
  letter-spacing: 0.05em;
}

.bio {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 300;
  color: #9b6b8a;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

/* ── Divider ── */
.divider {
  width: 100%;
  height: 1px;
  margin: 24px 0;
  background: linear-gradient(to right, transparent, #c9a8d4 50%, transparent);
  opacity: 0.5;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.3s;
}

/* ── Quote block ── */
.quote-block {
  width: 100%;
  text-align: center;
  margin-bottom: 24px;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.38s;
}

.quote-main {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-style: italic;
  font-weight: 300;
  color: #9b6b8a;
  line-height: 1.4;
  margin-bottom: 10px;
}

.quote-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: #b08aa0;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

/* ── Links ── */
.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.45s;
}

/* ── Telegram button ── */
.btn-tg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 32px;
  border-radius: 999px;
  background: linear-gradient(120deg, #d4a0c0, #b890d4, #c8a0cc);
  background-size: 200% 200%;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  animation: floatBtn 3.5s ease-in-out infinite;
  transition: filter 0.2s ease, transform 0.15s ease;
  box-shadow: 0 8px 28px rgba(155, 107, 138, 0.28);
}

.btn-tg:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(155, 107, 138, 0.38);
}

.btn-tg:active {
  transform: scale(0.97);
}

.tg-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@keyframes floatBtn {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-5px); }
}

/* ── Fade up animation ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .page {
    justify-content: center;
  }

  .username { font-size: 28px; }
  .btn-tg   { font-size: 15px; padding: 15px 28px; }
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #fdf7fb; }
::-webkit-scrollbar-thumb { background: #c9a8d4; border-radius: 3px; }
