:root {
  --bg: #f7f7f7;
  --surface: #ffffff;
  --ink: #0a0a0a;
  --ink-soft: #6b6b6b;
  --ink-muted: #9a9a9a;
  --line: #ececec;
  --accent: #f2994a;
  --profile: #141414;
  --radius-xl: 28px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  --font: "Outfit", sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

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

body {
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  font-family: inherit;
}

/* ========== CARD PAGE ========== */

.page-card {
  background:
    radial-gradient(120% 80% at 50% -10%, #ffffff 0%, #f3f3f3 55%, #ebebeb 100%);
  min-height: 100dvh;
  padding: 28px 18px calc(110px + var(--safe-bottom));
}

.card-shell {
  width: min(420px, 100%);
  margin: 0 auto;
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.profile-card {
  position: relative;
  background: var(--profile);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 64px 22px 22px;
  margin-top: 48px;
  box-shadow: var(--shadow);
  overflow: visible;
}

.profile-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.08), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.avatar-wrap {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #2a2a2a center/cover no-repeat;
  border: 4px solid #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  color: #fff;
  animation: pop 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.name {
  margin: 0;
  text-align: center;
  font-size: clamp(1.55rem, 5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.title {
  margin: 8px 0 0;
  text-align: center;
  font-size: 0.98rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
}

.bio {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.45;
  max-width: 28ch;
  margin-inline: auto;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 64px;
  padding: 10px 8px;
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset;
}

.quick-btn:hover {
  transform: translateY(-2px);
}

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

.quick-btn svg {
  width: 18px;
  height: 18px;
}

.contact-list {
  margin-top: 8px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 4px 6px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.04);
  animation: rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.contact-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item:hover {
  background: #fafafa;
}

.contact-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--ink);
}

.contact-icon svg {
  width: 18px;
  height: 18px;
}

.contact-meta {
  min-width: 0;
}

.contact-label {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-bottom: 3px;
  font-weight: 400;
}

.contact-value {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.fab {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(22px + var(--safe-bottom));
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
  padding: 14px 20px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  z-index: 20;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

.fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

.fab:active {
  transform: translateY(0);
}

.share-link {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: calc(22px + var(--safe-bottom));
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  z-index: 20;
  border: 1px solid var(--line);
}

/* ========== SCAN PAGE ========== */

.page-scan {
  min-height: 100dvh;
  background: #0a0a0a;
  color: #fff;
}

.scan-layout {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.scan-pattern {
  background-color: #d8d8d8;
  background-image:
    linear-gradient(135deg, #111 25%, transparent 25%),
    linear-gradient(225deg, #111 25%, transparent 25%),
    linear-gradient(45deg, #111 25%, transparent 25%),
    linear-gradient(315deg, #111 25%, transparent 25%);
  background-position: 40px 0, 40px 0, 0 0, 0 0;
  background-size: 80px 80px;
  background-repeat: repeat;
  position: relative;
}

.scan-pattern::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.08), transparent 40%),
    linear-gradient(90deg, transparent, rgba(10, 10, 10, 0.15));
}

.scan-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 5vw, 56px);
  background: #121212;
  position: relative;
  overflow: hidden;
}

.scan-panel::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -80px;
  top: -80px;
  background: radial-gradient(circle, rgba(242, 153, 74, 0.18), transparent 70%);
  pointer-events: none;
}

.scan-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1;
}

.brand-mark {
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
}

.brand-sub {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin: auto 0;
  z-index: 1;
  animation: rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.qr-frame {
  position: relative;
  width: min(280px, 72vw);
  aspect-ratio: 1;
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
}

.qr-code {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.qr-code img,
.qr-code canvas,
.qr-accent {
  width: 100% !important;
  height: 100% !important;
  display: block;
  max-width: 100%;
}

.qr-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 0 0 6px #fff;
  z-index: 2;
  pointer-events: none;
}

.scan-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  box-shadow: 0 10px 24px rgba(242, 153, 74, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scan-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(242, 153, 74, 0.42);
}

.scan-hint {
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  font-weight: 400;
  max-width: 28ch;
}

@media (max-width: 860px) {
  .scan-layout {
    grid-template-columns: 1fr;
  }

  .scan-pattern {
    min-height: 28vh;
  }

  .scan-panel {
    min-height: 72vh;
  }
}

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