:root {
  --bg-1: #f4f6fb;
  --bg-2: #e9ecf6;
  --card: rgba(255, 255, 255, 0.72);
  --card-border: rgba(255, 255, 255, 0.6);
  --text: #0f172a;
  --text-muted: #64748b;
  --link-bg: rgba(255, 255, 255, 0.85);
  --link-bg-hover: #ffffff;
  --link-border: rgba(15, 23, 42, 0.08);
  --shadow: 0 20px 60px -20px rgba(15, 23, 42, 0.25);
  --primary: #0f172a;
  --primary-text: #ffffff;
  --accent: #6366f1;
  --accent-2: #ec4899;
  --success: #10b981;
  --chip-bg: rgba(15, 23, 42, 0.06);
  --chip-success-bg: rgba(16, 185, 129, 0.12);
  --chip-success-text: #047857;
  --radius: 16px;
  --radius-lg: 24px;
}

[data-theme="dark"] {
  --bg-1: #0b0f1a;
  --bg-2: #131a2b;
  --card: rgba(20, 26, 42, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --link-bg: rgba(30, 38, 58, 0.7);
  --link-bg-hover: rgba(40, 50, 75, 0.95);
  --link-border: rgba(255, 255, 255, 0.06);
  --shadow: 0 25px 60px -25px rgba(0, 0, 0, 0.7);
  --primary: #ffffff;
  --primary-text: #0f172a;
  --chip-bg: rgba(255, 255, 255, 0.08);
  --chip-success-bg: rgba(16, 185, 129, 0.18);
  --chip-success-text: #34d399;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(900px 500px at 90% 110%, rgba(236, 72, 153, 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 10;
}
.theme-toggle:hover { transform: translateY(-2px); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px 24px;
  box-shadow: var(--shadow);
  animation: rise 0.5s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.profile { text-align: center; }

.avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.55);
  border: 3px solid rgba(255, 255, 255, 0.7);
  display: block;
}

[data-theme="dark"] .avatar { border-color: rgba(255, 255, 255, 0.12); }

.status-dot {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--success);
  border: 3px solid var(--bg-1);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.name {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.role {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.bio {
  margin: 0 auto 14px;
  max-width: 360px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 22px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text);
}

.chip-success {
  background: var(--chip-success-bg);
  color: var(--chip-success-text);
}

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: pulseDot 2s infinite;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: var(--primary-text);
}
.btn-primary:hover { box-shadow: 0 10px 24px -12px rgba(15, 23, 42, 0.5); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--link-border);
}
.btn-secondary:hover { background: var(--link-bg); }

.links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  background: var(--link-bg);
  border: 1px solid var(--link-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.link:hover {
  background: var(--link-bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -18px rgba(15, 23, 42, 0.35);
}

.link-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(236, 72, 153, 0.12));
  color: var(--text);
}
.link-icon svg { width: 20px; height: 20px; }

.link-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.link-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}
.link-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-arrow {
  color: var(--text-muted);
  font-size: 18px;
  transition: transform 0.2s ease, color 0.2s ease;
}
.link:hover .link-arrow {
  color: var(--text);
  transform: translateX(3px);
}

.link-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border: none;
}
.link-cta .link-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.link-cta .link-sub { color: rgba(255, 255, 255, 0.85); }
.link-cta .link-arrow { color: rgba(255, 255, 255, 0.9); }
.link-cta:hover { box-shadow: 0 18px 40px -18px rgba(99, 102, 241, 0.7); }

.card-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}
.card-footer p { margin: 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: var(--primary);
  color: var(--primary-text);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 380px) {
  .card { padding: 28px 18px 18px; border-radius: 20px; }
  .name { font-size: 22px; }
  .actions { grid-template-columns: 1fr; }
}

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