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

:root {
  --bg: #0b0d12;
  --bg-deep: #07080c;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text: #f2f3f5;
  --muted: #96979f;
  --muted-dim: #5a5b63;
  --accent: #5b8cff;
  --accent-dim: #3a5fc7;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 440px;
}

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; }

/* background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(91, 140, 255, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(91, 140, 255, 0.05), transparent 60%),
    var(--bg-deep);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 75% 55% at 50% 15%, black 0%, transparent 72%);
}

/* layout */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  padding: clamp(36px, 9vh, 72px) 20px 32px;
}

/* profile */
.profile-card {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 28px 30px;
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.7);
  opacity: 0;
  animation: rise .7s cubic-bezier(.16,1,.3,1) forwards .05s;
}

.avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 18px;
}

.avatar-wrap::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--accent-dim));
  z-index: 0;
}

.avatar-wrap::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bg);
  z-index: 1;
}

.avatar {
  position: absolute;
  inset: 5px;
  z-index: 2;
  border-radius: 50%;
  overflow: hidden;
  background: #111;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.name-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}

.name {
  font-size: clamp(1.4rem, 5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.verified {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.verified svg { width: 1.15rem; height: 1.15rem; }

.role {
  font-size: .84rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
}

.location {
  font-size: .74rem;
  color: var(--muted-dim);
  letter-spacing: .01em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.typewriter {
  font-size: .82rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: .01em;
  min-height: 1.3em;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.cursor {
  display: inline-block;
  width: 2px;
  height: .85em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink .9s infinite;
}

/* links */
.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: var(--max-width);
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .01em;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color .25s ease, background-color .25s ease, transform .2s ease, box-shadow .25s ease;
  opacity: 0;
  position: relative;
  overflow: hidden;
}

.link-btn::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform .25s ease;
  z-index: 0;
}

.link-btn > * { position: relative; z-index: 1; }

.link-btn:hover,
.link-btn:focus-visible {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.6);
}

.link-btn:hover::before,
.link-btn:focus-visible::before {
  transform: scaleY(1);
}

.link-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.link-btn:active { transform: translateY(0); }

.link-btn:nth-child(1) { animation: rise .6s cubic-bezier(.16,1,.3,1) forwards .18s; }
.link-btn:nth-child(2) { animation: rise .6s cubic-bezier(.16,1,.3,1) forwards .25s; }
.link-btn:nth-child(3) { animation: rise .6s cubic-bezier(.16,1,.3,1) forwards .32s; }
.link-btn:nth-child(4) { animation: rise .6s cubic-bezier(.16,1,.3,1) forwards .39s; }

.link-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}

.link-btn:hover .link-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  border-color: transparent;
  transform: scale(1.05);
}

.link-btn:hover .link-icon svg { fill: #fff; color: #fff; }

.link-icon svg {
  width: 19px;
  height: 19px;
  fill: var(--muted);
  color: var(--muted);
  transition: fill .25s ease, color .25s ease;
}

.link-text { flex: 1; }

.link-arrow {
  font-size: .85rem;
  color: var(--muted-dim);
  transition: color .25s ease, transform .25s ease;
  flex-shrink: 0;
}

.link-btn:hover .link-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* footer */
footer {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: .7rem;
  color: var(--muted-dim);
  letter-spacing: .02em;
  text-align: center;
  opacity: 0;
  animation: rise .6s cubic-bezier(.16,1,.3,1) forwards .55s;
  padding-bottom: env(safe-area-inset-bottom);
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: .66rem;
  color: var(--muted);
}

.footer-badge .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse 2s infinite;
}

.footer-copyright {
  margin-top: 14px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .profile-card, .link-btn, footer { opacity: 1; }
}

@media (max-width: 380px) {
  .profile-card { padding: 28px 20px 24px; }
  .link-btn { padding: 13px 15px; }
}
