:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --tint: color-mix(in srgb, var(--accent) 10%, var(--surface));
  --radius: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0b0d12;
    --surface: #151821;
    --text: #f3f4f6;
    --muted: #9ca3af;
    --line: #262a35;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d12;
  --surface: #151821;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --line: #262a35;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  padding: 0 0 env(safe-area-inset-bottom);
}
a { color: inherit; text-decoration: none; }

.card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--surface);
  min-height: 100dvh;
  padding-bottom: 32px;
}
@media (min-width: 520px) {
  body { padding: 32px 16px; }
  .card { min-height: 0; border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 40px rgb(0 0 0 / .08); }
}

.hero {
  height: 140px;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 55%, #fff) 0%, transparent 60%),
    var(--accent);
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 16px;
}
.logo {
  max-height: 40px;
  max-width: 140px;
  object-fit: contain;
  background: rgb(255 255 255 / .92);
  border-radius: 10px;
  padding: 6px 10px;
}

.identity { text-align: center; padding: 0 24px; }
.avatar {
  width: 128px; height: 128px;
  margin: -64px auto 14px;
  border-radius: 50%;
  border: 4px solid var(--surface);
  background: var(--tint);
  color: var(--accent);
  display: grid; place-items: center;
  overflow: hidden;
  font-size: 40px; font-weight: 700;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 4px; letter-spacing: -.01em; }
.role { margin: 0; font-weight: 500; }
.company { margin: 2px 0 0; color: var(--muted); }
.bio { margin: 14px 0 0; color: var(--muted); font-size: 15px; }

.quick {
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  gap: 10px;
  padding: 24px 20px 0;
}
.quick a {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 4px;
  border-radius: 14px;
  background: var(--tint);
  color: var(--accent);
  font-size: 13px; font-weight: 600;
  transition: transform .15s;
}
.quick a:active { transform: scale(.96); }
.quick span { color: var(--text); }

.save {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 16px 20px 0;
  padding: 15px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 17px;
  transition: transform .15s, filter .15s;
}
.save:hover { filter: brightness(1.06); }
.save:active { transform: scale(.98); }

.details { list-style: none; margin: 24px 20px 0; padding: 0; border-top: 1px solid var(--line); }
.details li { border-bottom: 1px solid var(--line); }
.details a {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 4px;
  min-height: 56px;
  word-break: break-word;
}
.details a > .ico { flex: none; color: var(--accent); }
.details span { display: flex; flex-direction: column; font-size: 15px; }
.details small { color: var(--muted); font-size: 12px; }

.share {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 20px auto 0;
  background: none; border: 0;
  color: var(--muted);
  font: inherit; font-size: 14px;
  padding: 10px 16px; border-radius: 999px;
  cursor: pointer;
}
.share:hover { color: var(--text); background: var(--tint); }

.ico { width: 22px; height: 22px; }
.share .ico { width: 18px; height: 18px; }

.empty { padding: 120px 24px; text-align: center; color: var(--muted); }

a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
