:root {
  color-scheme: dark;
  --bg: #070910;
  --text: #f7f8ff;
  --muted: rgba(232, 235, 250, 0.66);
  --line: rgba(255, 255, 255, 0.14);
  --line-bright: rgba(255, 255, 255, 0.26);
  --glass: rgba(19, 22, 34, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.075);
  --accent: #9ba7ff;
  --accent-soft: rgba(132, 147, 255, 0.2);
}

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

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -12%, #1b2040 0, transparent 36rem),
    linear-gradient(145deg, #090b14 0%, #06070c 52%, #0a0c14 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.4;
  transform: translateZ(0);
}

.blob-one {
  top: -12rem;
  left: -8rem;
  width: 25rem;
  height: 25rem;
  background: #495bc2;
}

.blob-two {
  right: -11rem;
  bottom: -9rem;
  width: 28rem;
  height: 28rem;
  background: #542d77;
}

.blob-three {
  top: 42%;
  left: 56%;
  width: 13rem;
  height: 13rem;
  background: #266f74;
  opacity: 0.2;
}

.noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.page {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 16px max(22px, env(safe-area-inset-bottom));
}

.profile-wrap {
  width: min(100%, 620px);
}

.profile-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 28px 20px 22px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.025) 48%, rgba(255, 255, 255, 0.055)),
    var(--glass);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    0 8px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(26px) saturate(135%);
  -webkit-backdrop-filter: blur(26px) saturate(135%);
  animation: card-in 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.profile-card::before {
  position: absolute;
  z-index: -1;
  top: -45%;
  left: -22%;
  width: 72%;
  height: 90%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 66%);
  content: "";
  transform: rotate(-24deg);
  pointer-events: none;
}

.profile-card::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: inherit;
  box-shadow: inset 0 0 36px rgba(255, 255, 255, 0.025);
  content: "";
  pointer-events: none;
}

.avatar-wrap {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto 20px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.045));
  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.32),
    0 0 30px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  animation:
    avatar-in 750ms 130ms cubic-bezier(0.22, 1, 0.36, 1) both,
    avatar-float 6s 1.1s ease-in-out infinite;
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  background: #11131d;
}

.profile-header {
  text-align: center;
}

.eyebrow {
  margin: 0 0 5px;
  color: rgba(215, 220, 255, 0.65);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.85rem, 9vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.role {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.42em;
  justify-content: center;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 500;
}

.role span {
  color: rgba(156, 168, 255, 0.78);
}

.domain {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  color: rgba(237, 239, 255, 0.84);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-decoration: none;
  transition: color 180ms ease;
}

.domain:hover {
  color: #fff;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #96a5ff;
  box-shadow: 0 0 10px rgba(150, 165, 255, 0.9);
}

.bio {
  max-width: 34rem;
  margin: 21px auto 22px;
  color: rgba(232, 235, 248, 0.78);
  font-size: 0.95rem;
  line-height: 1.65;
  text-align: center;
}

.social-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.social-link {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 13px 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 17px;
  color: rgba(249, 250, 255, 0.9);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.085),
    0 8px 20px rgba(0, 0, 0, 0.12);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 190ms ease,
    border-color 190ms ease,
    background-color 190ms ease,
    box-shadow 190ms ease;
  animation: link-in 540ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.social-link:nth-child(1) { animation-delay: 260ms; }
.social-link:nth-child(2) { animation-delay: 330ms; }
.social-link:nth-child(3) { animation-delay: 400ms; }
.social-link:nth-child(4) { animation-delay: 470ms; }

.social-link::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 18%, rgba(255, 255, 255, 0.07), transparent 68%);
  content: "";
  opacity: 0;
  transform: translateX(-45%);
  transition: opacity 190ms ease, transform 350ms ease;
  pointer-events: none;
}

.social-link svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
  opacity: 0.88;
}

.arrow {
  color: rgba(224, 228, 255, 0.42);
  font-size: 1rem;
  transition: color 190ms ease, transform 190ms ease;
}

.social-link:hover {
  border-color: var(--line-bright);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.115), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 12px 28px rgba(0, 0, 0, 0.2),
    0 0 24px rgba(126, 143, 255, 0.09);
  transform: translateY(-3px);
}

.social-link:hover::before {
  opacity: 1;
  transform: translateX(38%);
}

.social-link:hover .arrow {
  color: rgba(255, 255, 255, 0.88);
  transform: translate(1px, -1px);
}

.domain:focus-visible,
.social-link:focus-visible {
  outline: 3px solid rgba(151, 165, 255, 0.65);
  outline-offset: 3px;
}

.footer {
  padding: 18px 12px 0;
  color: rgba(220, 223, 238, 0.38);
  font-size: 0.72rem;
  letter-spacing: 0.025em;
  text-align: center;
}

.footer p {
  margin: 2px 0;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(12px) scale(0.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes avatar-in {
  from { opacity: 0; transform: translateY(8px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes avatar-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes link-in {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 600px) {
  .page {
    padding: 36px 24px 28px;
  }

  .profile-card {
    padding: 38px 38px 32px;
    border-radius: 36px;
  }

  .avatar-wrap {
    width: 132px;
    height: 132px;
    margin-bottom: 23px;
  }

  .role {
    font-size: 0.98rem;
  }

  .bio {
    margin-top: 24px;
    margin-bottom: 26px;
    font-size: 1rem;
  }

  .social-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 359px) {
  .page {
    padding-inline: 12px;
  }

  .profile-card {
    padding-inline: 16px;
    border-radius: 26px;
  }

  .avatar-wrap {
    width: 104px;
    height: 104px;
  }

  h1 {
    font-size: 1.75rem;
  }

  .bio {
    margin-block: 18px;
    font-size: 0.9rem;
  }
}

@media (hover: none), (pointer: coarse) {
  .social-link:hover {
    transform: none;
  }

  .social-link:active {
    border-color: var(--line-bright);
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.99);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
