:root {
  --bg: #1E2330;
  --bg-top: #161A25;
  --bg-bottom: #151923;
  --glow: rgba(255, 255, 255, 0.05);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --btn-bg: rgba(255, 255, 255, 0.03);
  --btn-border: rgba(255, 255, 255, 0.16);
  --btn-text: #ffffff;
  --btn-hover-bg: #ffffff;
  --btn-hover-text: #1E2330;
  --btn-hover-border: #ffffff;
  --radius: 14px;
  --max-width: 680px;
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior: none;
}

html {
  background: var(--bg);
}

body {
  position: relative;
  background:
    radial-gradient(ellipse 70% 40% at 50% -5%, var(--glow), transparent 70%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 50%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  padding: 48px 20px 80px;
  padding-top: max(48px, env(safe-area-inset-top));
  padding-bottom: max(80px, env(safe-area-inset-bottom));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.35;
  mix-blend-mode: overlay;
}

.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.loading {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin-top: 30vh;
}

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

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  max-width: 480px;
}

.avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  background: #0b0e17;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 0 6px rgba(255, 255, 255, 0.04),
    0 12px 36px rgba(0, 0, 0, 0.45);
}

.name-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.01em;
}

.bio {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 400;
}

.sections {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.section-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 4px;
}

.links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 56px;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  color: var(--btn-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  text-align: center;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 8px 20px rgba(0, 0, 0, 0.18);
  transition:
    transform 160ms ease,
    background-color 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .link:hover {
    background: var(--btn-hover-bg);
    color: var(--btn-hover-text);
    border-color: var(--btn-hover-border);
    outline: none;
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  }
  .link:hover .link-icon img {
    filter: invert(1);
    transform: scale(1.06);
  }
  .social:hover {
    background: rgba(255, 255, 255, 0.1);
    outline: none;
  }
}

.link:focus-visible {
  background: var(--btn-hover-bg);
  color: var(--btn-hover-text);
  border-color: var(--btn-hover-border);
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.link:focus-visible .link-icon img {
  filter: invert(1);
  transform: scale(1.06);
}

.social:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.link:active { transform: translateY(0) scale(0.99); }

.link-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.link-icon img,
.link-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  transition: filter 180ms ease, transform 200ms ease;
}

.socials {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: -14px;
  margin-bottom: -14px;
  flex-wrap: wrap;
}

.social {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text);
  transition: transform 120ms ease, background-color 180ms ease;
}

.social:active { transform: scale(0.92); }

.social img { width: 22px; height: 22px; }

@media (max-width: 480px) {
  body { padding: 32px 16px 60px; }
  .app { gap: 24px; }
  .avatar { width: 88px; height: 88px; }
  .link { padding: 12px 52px; min-height: 54px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
