:root {
  --blue: #1A3A7A;
  --blue-mid: #22499B;
  --orange: #EF4F23;
  --ink: #0F1C2E;
  --ink-soft: #3A4A5F;
  --muted: #7A8799;
  --line: #E8EDF5;
  --paper: #FFFFFF;
  --surface: #F7F9FC;
  --canvas: #EEF2F8;
  --radius: 22px;
  --font: "Instrument Sans", system-ui, sans-serif;
  --display: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--canvas);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(ellipse 90% 60% at 5% -15%, rgba(26, 58, 122, 0.18), transparent 60%),
    radial-gradient(ellipse 70% 50% at 105% 5%, rgba(34, 73, 155, 0.14), transparent 55%),
    radial-gradient(ellipse 80% 50% at 95% 105%, rgba(239, 79, 35, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 45% at -5% 100%, rgba(239, 79, 35, 0.12), transparent 50%),
    radial-gradient(ellipse 120% 80% at 50% 50%, rgba(26, 58, 122, 0.04), transparent 70%),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; cursor: pointer; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Page */
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

/* Card */
.vcard {
  width: min(100%, 520px);
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow:
    0 1px 2px rgba(15, 28, 46, 0.04),
    0 12px 40px rgba(15, 28, 46, 0.08),
    0 0 0 1px rgba(34, 73, 155, 0.06),
    0 0 60px -10px rgba(26, 58, 122, 0.15),
    0 0 80px -20px rgba(239, 79, 35, 0.1);
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .vcard {
    animation: cardGlow 8s ease-in-out infinite;
  }
}

@keyframes cardGlow {
  0%, 100% {
    box-shadow:
      0 1px 2px rgba(15, 28, 46, 0.04),
      0 12px 40px rgba(15, 28, 46, 0.08),
      0 0 0 1px rgba(34, 73, 155, 0.06),
      0 0 60px -10px rgba(26, 58, 122, 0.15),
      0 0 80px -20px rgba(239, 79, 35, 0.1);
  }
  50% {
    box-shadow:
      0 1px 2px rgba(15, 28, 46, 0.04),
      0 12px 40px rgba(15, 28, 46, 0.08),
      0 0 0 1px rgba(34, 73, 155, 0.08),
      0 0 80px -5px rgba(26, 58, 122, 0.22),
      0 0 100px -15px rgba(239, 79, 35, 0.15);
  }
}

/* Hero */
.hero {
  position: relative;
  padding: 28px 28px 32px;
  color: #fff;
  background:
    linear-gradient(
      155deg,
      #0D1F44 0%,
      #152E66 18%,
      var(--blue) 38%,
      #2A52A8 62%,
      #3B63C8 82%,
      #2A52A8 100%
    );
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 80% -10%, rgba(59, 99, 200, 0.35), transparent 60%),
    radial-gradient(ellipse 60% 50% at 95% 20%, rgba(239, 79, 35, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 45% at 5% 100%, rgba(239, 79, 35, 0.18), transparent 50%),
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(26, 58, 122, 0.2), transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 28, 46, 0.08) 100%);
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 85% 15%, rgba(255,255,255,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 85%, rgba(239, 79, 35, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse 35% 30% at 95% 50%, rgba(239, 79, 35, 0.12) 0%, transparent 45%);
  pointer-events: none;
}

.hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.logo {
  display: block;
  width: 110px;
  height: 58px;
  object-fit: contain;
  padding: 7px 10px;
  border-radius: 12px;
  background: #fff;
}

.profile {
  position: relative;
  z-index: 1;
  text-align: center;
}

.avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  backdrop-filter: blur(8px);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  padding: 6px;
}

.avatar--large {
  width: 116px;
  height: 116px;
  border-radius: 28px;
}

.avatar--large img {
  border-radius: 22px;
  padding: 10px;
}

.profile h1 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: clamp(26px, 6.5vw, 30px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: #fff;
}

.role {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
}

.company {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

/* Quick actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 20px 20px 8px;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 84px;
  padding: 14px 8px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.quick-action:hover {
  transform: translateY(-2px);
  background: #fff;
  border-color: var(--blue-mid);
  box-shadow: 0 8px 24px rgba(34, 73, 155, 0.1);
}

.quick-action:active {
  transform: scale(0.96);
}

.quick-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 19px;
  transition: transform 0.18s ease;
}

.quick-action:hover .quick-icon {
  transform: scale(1.05);
}

.quick-action.call .quick-icon {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(26, 58, 122, 0.3);
}

.quick-action.whatsapp .quick-icon {
  background: linear-gradient(135deg, #E6F5EC 0%, #CCEEDA 100%);
  color: #1A7A45;
}

.quick-action.save .quick-icon {
  background: linear-gradient(135deg, #FFF0EB 0%, #FFE0D6 100%);
  color: var(--orange);
}

.quick-action:focus-visible,
a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* Contact section */
.content-section {
  padding: 16px 20px 4px;
}

.section-head {
  margin-bottom: 8px;
  padding: 0 4px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.contact-item:hover {
  background: #fff;
  border-color: var(--blue-mid);
  box-shadow: 0 4px 16px rgba(34, 73, 155, 0.08);
  transform: translateX(2px);
}

.contact-item:active {
  transform: scale(0.98);
}

.item-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #EDF1FA;
  color: var(--blue-mid);
  font-size: 19px;
  transition: background 0.15s ease, color 0.15s ease;
}

.item-icon.accent {
  background: #FFF0EB;
  color: var(--orange);
}

.contact-item:hover .item-icon {
  background: var(--blue-mid);
  color: #fff;
}

.contact-item:hover .item-icon.accent {
  background: var(--orange);
  color: #fff;
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-info small {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.item-info strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.item-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: transparent;
  color: #C0C8D4;
  font-size: 15px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.contact-item:hover .item-arrow {
  background: var(--blue-mid);
  color: #fff;
  transform: translate(2px, -2px);
}

/* Social */
.social-section {
  padding: 12px 20px 8px;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--surface) 0%, #fff 100%);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(15, 28, 46, 0.03);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.social-card:hover {
  background: linear-gradient(135deg, #EDF1FA 0%, #fff 100%);
  border-color: var(--blue-mid);
  box-shadow: 0 6px 24px rgba(34, 73, 155, 0.1);
  transform: translateY(-2px);
}

.social-card:active {
  transform: scale(0.98);
}

.social-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #1877F2 0%, #1458B8 100%);
  color: #fff;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(24, 119, 242, 0.3);
}

.social-copy {
  flex: 1;
  min-width: 0;
}

.social-copy strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.social-copy small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.social-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-mid);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.social-card:hover .social-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Footer */
.footer {
  padding: 20px 20px 24px;
  text-align: center;
}

.copyright {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.footer-meta {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* Toast */
.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 14px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 36px rgba(15, 28, 46, 0.25), 0 4px 12px rgba(15, 28, 46, 0.15);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Wider desktop breathing room */
@media (min-width: 600px) {
  .page {
    padding: 40px 24px;
  }

  .vcard {
    width: min(100%, 540px);
  }

  .hero {
    padding: 32px 36px 36px;
  }

  .content-section,
  .social-section {
    padding-left: 28px;
    padding-right: 28px;
  }

  .quick-actions {
    padding-left: 28px;
    padding-right: 28px;
  }

  .footer {
    padding-left: 28px;
    padding-right: 28px;
  }
}

/* Mobile */
@media (max-width: 440px) {
  .page {
    align-items: flex-start;
    padding: 12px 10px max(16px, env(safe-area-inset-bottom));
  }

  .vcard {
    border-radius: 18px;
    animation: none !important;
    box-shadow:
      0 1px 2px rgba(15, 28, 46, 0.04),
      0 12px 40px rgba(15, 28, 46, 0.08),
      0 0 0 1px rgba(34, 73, 155, 0.06);
  }

  .hero {
    padding: 22px 22px 28px;
    background: linear-gradient(155deg, #0D1F44 0%, #152E66 20%, var(--blue) 45%, #2A52A8 70%, #3B63C8 100%);
  }

  .hero::before,
  .hero::after {
    display: none;
  }

  .hero-bg {
    background:
      radial-gradient(ellipse 60% 50% at 85% 10%, rgba(255,255,255,0.05) 0%, transparent 60%),
      radial-gradient(ellipse 50% 45% at 10% 90%, rgba(239, 79, 35, 0.12) 0%, transparent 55%);
  }

  .logo {
    width: 96px;
    height: 52px;
  }

  .avatar {
    width: 58px;
    height: 58px;
    font-size: 18px;
    border-radius: 16px;
  }

  .avatar--large {
    width: 100px;
    height: 100px;
    border-radius: 24px;
  }

  .avatar--large img {
    border-radius: 20px;
    padding: 8px;
  }

  .quick-actions {
    padding: 16px 14px 6px;
    gap: 8px;
  }

  body {
    background:
      radial-gradient(ellipse 80% 50% at 10% -10%, rgba(34, 73, 155, 0.09), transparent),
      radial-gradient(ellipse 60% 40% at 100% 100%, rgba(239, 79, 35, 0.06), transparent),
      var(--canvas);
  }
}

  .quick-action {
    min-height: 72px;
    font-size: 11px;
  }

  .content-section,
  .social-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .item-info strong {
    font-size: 13.5px;
  }
}

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