@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap");

:root {
  color-scheme: dark;
  --bg: #080a0d;
  --surface: rgba(13, 16, 20, 0.96);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: #b5bbc3;
  --accent: #d9ff3f;
  --accent-ink: #101400;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100dvh;
  font-family: "Poppins", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(217,255,63,.11), transparent 22rem),
    radial-gradient(circle at 100% 90%, rgba(217,255,63,.035), transparent 22rem),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.page-shell {
  width: min(100%, 560px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(7px, env(safe-area-inset-top)) 8px max(7px, env(safe-area-inset-bottom));
  display: grid;
  align-items: center;
}

.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), transparent 32%),
    var(--surface);
  box-shadow: 0 22px 60px rgba(0,0,0,.45);
  backdrop-filter: blur(18px);
}

.card-glow {
  position: absolute;
  z-index: -1;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  filter: blur(38px);
  pointer-events: none;
}

.card-glow-one { top: -145px; right: -80px; background: rgba(217,255,63,.16); }
.card-glow-two { bottom: 30px; left: -180px; background: rgba(217,255,63,.045); }

.brand-row {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .86rem;
  font-weight: 900;
  letter-spacing: -.08em;
}

.brand-word {
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .2em;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
}

.icon-button:active { transform: scale(.96); }

.icon-button svg,
.button svg,
.contact-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.profile {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto auto auto auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 10px 2px 11px;
}

.avatar {
  grid-column: 1;
  grid-row: 1 / 6;
  position: relative;
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border: 1px solid rgba(217,255,63,.28);
  border-radius: 19px;
  color: var(--accent-ink);
  background: linear-gradient(145deg, #efff8f, var(--accent));
  box-shadow: 0 12px 28px rgba(217,255,63,.12);
  font-size: 1.45rem;
  font-weight: 900;
}

.status-dot {
  position: absolute;
  right: -2px;
  bottom: 3px;
  width: 13px;
  height: 13px;
  border: 3px solid #151518;
  border-radius: 999px;
  background: #4ade80;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin: 0 0 1px;
  font-size: clamp(1.35rem, 5.9vw, 1.95rem);
  line-height: 1;
  letter-spacing: -.05em;
}

.role, .company {
  margin: 0;
  line-height: 1.25;
}

.role {
  color: #ddddda;
  font-size: .79rem;
  font-weight: 650;
}

.company {
  color: var(--muted);
  font-size: .72rem;
}

.intro {
  max-width: 48ch;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.3;
}

.primary-actions {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 7px;
  margin-bottom: 9px;
}

.button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 0 10px;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 800;
}

.button:active { transform: scale(.985); }
.button svg { width: 16px; height: 16px; }
.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-secondary { border-color: var(--line); background: var(--surface-2); }

.contact-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.024);
}

.contact-row {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  min-height: 49px;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
}

.contact-row:last-child { border-bottom: 0; }

.contact-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: var(--accent);
  background: rgba(217,255,63,.09);
}

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

.contact-copy { min-width: 0; }
.contact-copy small, .contact-copy strong { display: block; }

.contact-copy small {
  margin-bottom: 1px;
  color: var(--muted);
  font-size: .58rem;
}

.contact-copy strong {
  overflow: hidden;
  font-size: .76rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-arrow { color: #73736e; font-size: .86rem; }

.qr-panel {
  display: grid;
  grid-template-columns: minmax(0,1fr) 92px;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background:
    linear-gradient(135deg, rgba(217,255,63,.07), transparent 55%),
    rgba(255,255,255,.024);
}

.qr-copy h2 {
  margin: 0 0 3px;
  font-size: 1rem;
  letter-spacing: -.03em;
}

.qr-copy p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: .65rem;
  line-height: 1.3;
}

.qr-wrap {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  padding: 6px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  cursor: zoom-in;
}

#qrCode,
#qrCode img,
#qrCode canvas {
  width: 80px !important;
  height: 80px !important;
}

.qr-fallback {
  display: grid;
  width: 80px;
  height: 80px;
  place-items: center;
  color: #222;
  font-size: .58rem;
  text-align: center;
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 0 0;
  color: #73736e;
  font-size: .6rem;
}

footer a { color: #a7a7a0; font-weight: 700; }

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(15px + env(safe-area-inset-bottom));
  max-width: calc(100vw - 24px);
  transform: translate(-50%, 18px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--text);
  background: #1b1b1f;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  font-size: .72rem;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

:focus-visible {
  outline: 3px solid rgba(217,255,63,.58);
  outline-offset: 2px;
}

@media (max-height: 620px) {
  .page-shell { align-items: start; }
  .card { border-radius: 20px; padding: 9px; }
  .brand-row { min-height: 32px; }
  .brand-mark { width: 25px; height: 25px; }
  .icon-button { width: 32px; height: 32px; }
  .profile { padding: 6px 2px 7px; }
  .avatar { width: 52px; height: 52px; border-radius: 16px; }
  .profile { grid-template-columns: 56px minmax(0,1fr); }
  .intro { display: none; }
  .button { min-height: 39px; }
  .contact-row { min-height: 44px; }
  .qr-panel { margin-top: 7px; padding: 7px 9px; grid-template-columns: minmax(0,1fr) 78px; }
  .qr-wrap { width: 78px; height: 78px; padding: 5px; }
  #qrCode, #qrCode img, #qrCode canvas { width: 68px !important; height: 68px !important; }
  footer { padding-top: 5px; }
}

@media (min-width: 700px) {
  .page-shell { width: min(100%, 620px); padding: 18px; }
  .card { padding: 16px; }
}

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

@media print {
  body { background: #fff; }
  .page-shell { width: 100%; padding: 0; }
  .card { box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .icon-button, .toast { display: none !important; }
}


body.modal-open {
  overflow: hidden;
}

.qr-modal[hidden] {
  display: none;
}

.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
}

.qr-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(5, 7, 9, .88);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.qr-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px 20px 20px;
  background:
    radial-gradient(circle at 50% -20%, rgba(217,255,63,.13), transparent 15rem),
    #0d1014;
  box-shadow: 0 28px 90px rgba(0,0,0,.55);
  text-align: center;
}

.qr-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255,255,255,.06);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.qr-modal-card h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  letter-spacing: -.035em;
}

.qr-modal-copy,
.qr-modal-hint {
  margin: 0;
  color: var(--muted);
}

.qr-modal-copy {
  font-size: .82rem;
  line-height: 1.45;
}

.qr-modal-code {
  display: grid;
  width: min(74vw, 300px);
  aspect-ratio: 1;
  margin: 20px auto 14px;
  place-items: center;
  padding: 18px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0,0,0,.28);
}

#qrCodeLarge,
#qrCodeLarge img,
#qrCodeLarge canvas {
  width: 100% !important;
  height: 100% !important;
}

.qr-modal-hint {
  font-size: .7rem;
}

@media (max-height: 620px) {
  .qr-modal-card {
    width: min(100%, 360px);
    padding: 18px 16px 16px;
  }

  .qr-modal-code {
    width: min(58vh, 250px);
    margin-top: 12px;
    margin-bottom: 10px;
  }

  .qr-modal-copy {
    font-size: .74rem;
  }
}


/* Slightly larger overall presentation while preserving single-screen layout */
.card { padding: 14px; }
.brand-row { min-height: 39px; }
.brand-mark { width: 30px; height: 30px; font-size: .92rem; }
.brand-word { font-size: .76rem; }
.icon-button { width: 39px; height: 39px; }
.icon-button svg { width: 19px; height: 19px; }

.profile {
  grid-template-columns: 68px minmax(0, 1fr);
  column-gap: 13px;
  padding: 12px 2px 13px;
}
.avatar {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  font-size: 1.55rem;
}
.eyebrow { font-size: .62rem; }
h1 { font-size: clamp(1.45rem, 6.2vw, 2.05rem); }
.role { font-size: .84rem; }
.company { font-size: .76rem; }
.intro { font-size: .72rem; }

.primary-actions { gap: 8px; margin-bottom: 10px; }
.button {
  min-height: 46px;
  border-radius: 14px;
  font-size: .83rem;
}
.button svg { width: 17px; height: 17px; }

.contact-row {
  grid-template-columns: 37px minmax(0,1fr) auto;
  min-height: 53px;
  gap: 10px;
  padding: 7px 11px;
}
.contact-icon {
  width: 35px;
  height: 35px;
}
.contact-icon svg { width: 17px; height: 17px; }
.contact-copy small { font-size: .62rem; }
.contact-copy strong { font-size: .81rem; }
.row-arrow { font-size: .92rem; }

.qr-panel {
  grid-template-columns: minmax(0,1fr) 98px;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 11px;
}
.qr-copy h2 { font-size: 1.08rem; }
.qr-copy p:last-child { font-size: .69rem; }
.qr-wrap { width: 98px; height: 98px; padding: 7px; }
#qrCode,
#qrCode img,
#qrCode canvas {
  width: 84px !important;
  height: 84px !important;
}

footer { padding-top: 9px; font-size: .64rem; }

.qr-modal-card {
  width: min(100%, 440px);
  padding: 26px 22px 22px;
}
.qr-modal-card h2 { font-size: 1.6rem; }
.qr-modal-copy { font-size: .88rem; }
.qr-modal-code { width: min(78vw, 320px); }
.qr-modal-hint { font-size: .74rem; }

@media (max-height: 620px) {
  .card { padding: 10px; }
  .brand-row { min-height: 33px; }
  .brand-mark { width: 26px; height: 26px; }
  .icon-button { width: 33px; height: 33px; }
  .profile {
    grid-template-columns: 58px minmax(0,1fr);
    padding: 7px 2px 8px;
  }
  .avatar { width: 54px; height: 54px; }
  .button { min-height: 40px; }
  .contact-row { min-height: 45px; }
  .qr-panel { grid-template-columns: minmax(0,1fr) 80px; }
  .qr-wrap { width: 80px; height: 80px; }
  #qrCode, #qrCode img, #qrCode canvas {
    width: 70px !important;
    height: 70px !important;
  }
}


/* Use the extra room on taller phones without affecting compact screens */
@media (min-height: 760px) and (max-width: 699px) {
  .page-shell {
    padding: max(12px, env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom));
  }

  .card {
    padding: 17px;
    border-radius: 28px;
  }

  .brand-row { min-height: 44px; }
  .brand-mark { width: 34px; height: 34px; font-size: 1rem; }
  .brand-word { font-size: .82rem; }
  .icon-button { width: 44px; height: 44px; border-radius: 13px; }
  .icon-button svg { width: 21px; height: 21px; }

  .profile {
    grid-template-columns: 76px minmax(0, 1fr);
    column-gap: 15px;
    padding: 16px 2px 17px;
  }

  .avatar {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    font-size: 1.72rem;
  }

  .status-dot {
    width: 15px;
    height: 15px;
  }

  .eyebrow { font-size: .67rem; }
  h1 { font-size: clamp(1.7rem, 6.8vw, 2.3rem); }
  .role { font-size: .92rem; }
  .company { font-size: .82rem; }
  .intro {
    margin-top: 6px;
    font-size: .78rem;
    line-height: 1.35;
  }

  .primary-actions {
    gap: 10px;
    margin-bottom: 12px;
  }

  .button {
    min-height: 52px;
    border-radius: 15px;
    font-size: .9rem;
  }

  .button svg { width: 19px; height: 19px; }

  .contact-list { border-radius: 19px; }

  .contact-row {
    grid-template-columns: 42px minmax(0,1fr) auto;
    min-height: 61px;
    gap: 11px;
    padding: 8px 12px;
  }

  .contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .contact-icon svg { width: 19px; height: 19px; }
  .contact-copy small { font-size: .68rem; }
  .contact-copy strong { font-size: .9rem; }
  .row-arrow { font-size: 1rem; }

  .qr-panel {
    grid-template-columns: minmax(0,1fr) 112px;
    gap: 14px;
    margin-top: 12px;
    padding: 12px 13px;
    border-radius: 19px;
  }

  .qr-copy h2 { font-size: 1.2rem; }
  .qr-copy p:last-child { font-size: .76rem; }

  .qr-wrap {
    width: 112px;
    height: 112px;
    padding: 8px;
    border-radius: 14px;
  }

  #qrCode,
  #qrCode img,
  #qrCode canvas {
    width: 96px !important;
    height: 96px !important;
  }

  footer {
    padding-top: 11px;
    font-size: .69rem;
  }
}


.visit-counter {
  color: var(--accent);
  font-weight: 750;
}

.footer-dot {
  color: #555b62;
}


.personal-card-label {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .16em;
}
