:root {
  color-scheme: dark;
  --bg: #090b0d;
  --card: rgba(29, 31, 34, .94);
  --card-edge: rgba(255, 255, 255, .075);
  --text: #f8f9fa;
  --muted: #8f969d;
  --green: #24d181;
  --blue: #3298ec;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 39%, rgba(45, 115, 158, .1), transparent 29%),
    linear-gradient(rgba(5, 8, 10, .88), rgba(5, 8, 10, .91)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='none' stroke='%2398a1aa' stroke-width='1.2' opacity='.23'%3E%3Ccircle cx='28' cy='32' r='9'/%3E%3Cpath d='M87 23h23v17H96l-6 6v-6h-3zM169 22l3 8 8 3-8 3-3 8-3-8-8-3 8-3zM23 123l8-8 8 8-8 8zM107 103c11-8 24 7 14 17-10 10-25-4-14-17zM174 108h24v18h-24zM181 114h10M53 183h26v18H53zM60 189h12M157 175l9 9M166 175l-9 9'/%3E%3Ccircle cx='24' cy='197' r='3'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, auto, 220px 220px;
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
}

.page-shell {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: max(28px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
}

.profile-card {
  position: relative;
  width: min(100%, 392px);
  padding: 35px 34px 29px;
  overflow: hidden;
  border: 1px solid var(--card-edge);
  border-radius: 24px;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(255,255,255,.028), transparent 38%),
    var(--card);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, .52),
    0 0 45px rgba(45, 143, 205, .055),
    0 1px 0 rgba(255, 255, 255, .035) inset;
  backdrop-filter: blur(15px);
}

.profile-card::before {
  content: "";
  position: absolute;
  width: 230px;
  height: 150px;
  top: -105px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(45, 164, 229, .12);
  filter: blur(30px);
}

.portrait-wrap {
  position: relative;
  width: 124px;
  height: 124px;
  margin: 0 auto 19px;
}

.portrait-glow {
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(50,152,236,.34), rgba(92,57,122,.12));
  filter: blur(8px);
  animation: avatarGlow 3.4s ease-in-out infinite;
}

.portrait-crop {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 3px solid #292d31;
  border-radius: 50%;
  background: #181a1d;
  box-shadow: 0 8px 24px rgba(0,0,0,.42);
}

.portrait-crop img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 53% 29%;
  transform: scale(1.43);
  transform-origin: 53% 29%;
}

.online-dot {
  position: absolute;
  right: 1px;
  bottom: 7px;
  width: 24px;
  height: 24px;
  border: 5px solid #202326;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(36,209,129,.3), 0 0 18px rgba(36,209,129,.36);
}

.online-dot::before,
.online-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid rgba(36, 209, 129, .55);
  border-radius: 50%;
  animation: onlinePulse 2s ease-out infinite;
}

.online-dot::after { animation-delay: 1s; }

.identity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -.04em;
}

.telegram-badge {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  color: white;
  background: var(--blue);
  box-shadow: 0 4px 10px rgba(50,152,236,.25);
}

.telegram-badge svg { width: 12px; height: 12px; fill: currentColor; transform: translate(-1px, 1px); }

.status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 9px 0 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 650;
}

.status span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 9px rgba(36,209,129,.7);
  animation: statusPulse 1.8s ease-in-out infinite;
}

.bio {
  margin: 24px 0 22px;
  color: #eceff1;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.5;
}

.cta {
  position: relative;
  display: grid;
  grid-template-columns: 23px 1fr 23px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  padding: 14px 17px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(110deg, #168bd4 0%, #34aaf4 58%, #62c0f7 115%);
  box-shadow:
    0 12px 27px rgba(38,145,220,.23),
    0 0 0 4px rgba(50,152,236,.09),
    inset 0 1px 0 rgba(255,255,255,.2);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .025em;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  animation: ctaBreathe 3.1s ease-in-out infinite;
}

.cta::before {
  content: "";
  position: absolute;
  top: -90%;
  left: -45%;
  width: 35%;
  height: 280%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transform: rotate(20deg);
  animation: sheen 4.8s ease-in-out infinite;
}

.cta:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 17px 34px rgba(38,145,220,.31), 0 0 0 4px rgba(50,152,236,.11), inset 0 1px 0 rgba(255,255,255,.2); }
.cta:active { transform: translateY(0) scale(.99); }
.cta:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(78,177,247,.5); outline-offset: 4px; }
.cta svg { width: 22px; height: 22px; fill: currentColor; }
.cta > svg { animation: telegramFloat 2.6s ease-in-out infinite; }
.cta .arrow { font-size: 22px; font-weight: 500; line-height: 1; animation: arrowNudge 1.7s ease-in-out infinite; }

.helper {
  margin: 14px 0 0;
  color: #717980;
  font-size: 11px;
}

.legal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: 25px;
  color: #626970;
  font-size: 11px;
}

.legal-nav button {
  padding: 5px 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.legal-nav button:hover { color: #a5acb2; }

.legal-dialog {
  width: min(calc(100% - 32px), 460px);
  padding: 0;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 20px;
  color: #f0f3f5;
  background: #1b1e21;
  box-shadow: 0 28px 90px rgba(0,0,0,.68);
}

.legal-dialog::backdrop { background: rgba(3,5,7,.78); backdrop-filter: blur(5px); }
.dialog-inner { position: relative; padding: 29px; }
.dialog-inner h2 { margin: 0 38px 16px 0; font-size: 23px; }
.dialog-inner p { margin: 0 0 13px; color: #aeb5bb; font-size: 14px; line-height: 1.65; }
.dialog-inner a { color: #67bcf7; overflow-wrap: anywhere; }
.email-link { display: inline-block; margin-top: 2px; }
.close { position: absolute; top: 14px; right: 16px; width: 38px; height: 38px; border: 0; border-radius: 50%; color: #c6cbd0; background: rgba(255,255,255,.055); font-size: 27px; line-height: 1; cursor: pointer; }

@keyframes sheen {
  0%, 64% { transform: translateX(-220%) rotate(20deg); }
  84%, 100% { transform: translateX(550%) rotate(20deg); }
}

@keyframes onlinePulse {
  0% { transform: scale(.72); opacity: .78; }
  72%, 100% { transform: scale(1.9); opacity: 0; }
}

@keyframes statusPulse {
  0%, 100% { transform: scale(.85); box-shadow: 0 0 6px rgba(36,209,129,.42); }
  50% { transform: scale(1.22); box-shadow: 0 0 13px rgba(36,209,129,.95); }
}

@keyframes avatarGlow {
  0%, 100% { opacity: .7; transform: scale(.97); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes ctaBreathe {
  0%, 100% { box-shadow: 0 12px 27px rgba(38,145,220,.22), 0 0 0 4px rgba(50,152,236,.08), inset 0 1px 0 rgba(255,255,255,.2); }
  50% { box-shadow: 0 16px 34px rgba(38,145,220,.34), 0 0 0 5px rgba(50,152,236,.125), inset 0 1px 0 rgba(255,255,255,.25); }
}

@keyframes telegramFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-2px) rotate(-4deg); }
}

@keyframes arrowNudge {
  0%, 100% { transform: translateX(0); opacity: .8; }
  50% { transform: translateX(4px); opacity: 1; }
}

@media (max-width: 460px) {
  .page-shell { padding-inline: 15px; }
  .profile-card { padding: 31px 25px 26px; border-radius: 22px; }
  .portrait-wrap { width: 114px; height: 114px; }
  h1 { font-size: 20px; }
  .bio { margin: 21px 0 20px; font-size: 13px; }
}

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