/* ═══════════════════════════════════════════
 TOKENS
═══════════════════════════════════════════ */
:root {
--accent:   #2563EB;
--accent-l: #EFF6FF;
--accent-d: #1D4ED8;
--bg:       #F1F5F9;
--card:     #FFFFFF;
--border:   #E2E8F0;
--border-l: #F1F5F9;
--text:     #0F172A;
--text-2:   #475569;
--text-3:   #94A3B8;
--r:        16px;
--r-sm:     10px;
--shadow:   0 2px 8px rgba(0,0,0,.06), 0 8px 32px rgba(0,0,0,.08);
--shadow-lg:0 16px 56px rgba(0,0,0,.14);
}

/* ═══════════════════════════════════════════
 RESET
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }
body {
font-family: 'Inter', system-ui, sans-serif;
background: var(--bg); color: var(--text);
min-height: 100dvh;
}
img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ═══════════════════════════════════════════
 PAGE SHELL
═══════════════════════════════════════════ */
.page {
min-height: 100dvh;
display: flex; flex-direction: column; align-items: center;
padding: 0 0 40px;
}
@media (min-width: 560px) { .page { padding: 32px 16px 56px; } }

.card-shell {
width: 100%; background: var(--card);
display: flex; flex-direction: column;
overflow: hidden;
}
@media (min-width: 560px) {
.card-shell {
  max-width: 480px; border-radius: 24px;
  box-shadow: var(--shadow-lg);
}
}

/* ═══════════════════════════════════════════
 COVER + AVATAR
═══════════════════════════════════════════ */
.cover-wrap {
position: relative; width: 100%;
height: 160px; overflow: visible; flex-shrink: 0;
background: linear-gradient(135deg, var(--accent), rgba(0,0,0,.5));
}
.cover-wrap > img,
.cover-wrap > #cover-img {
position: absolute; inset: 0; z-index: 0;
width: 100%; height: 100%; object-fit: cover;
border-radius: 0;
}
.cover-overlay {
position: absolute; inset: 0; z-index: 1;
background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.28) 100%);
pointer-events: none;
}
@media (min-width: 560px) { .cover-wrap { height: 180px; } }

/* Avatar */
.avatar-ring {
position: absolute; bottom: -70px; left: 20px;
width: 140px; height: 140px; border-radius: 50%;
border: 4px solid var(--card);
overflow: hidden; background: var(--border);
box-shadow: 0 4px 16px rgba(0,0,0,.18);
z-index: 3;
}
.avatar-ring .avatar-initials {
width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
font-size: 28px; font-weight: 800; color: #fff;
}
.avatar-photo-btn {
position: absolute; inset: 0; z-index: 1;
width: 100%; height: 100%; padding: 0; margin: 0;
border: none; border-radius: 50%;
background: transparent; cursor: zoom-in;
-webkit-tap-highlight-color: transparent;
}
.avatar-photo-btn:focus-visible {
outline: 3px solid var(--accent);
outline-offset: 3px;
}
.avatar-photo-btn img {
width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
pointer-events: none;
}
.avatar-expand {
position: absolute; right: 6px; bottom: 6px; z-index: 2;
width: 32px; height: 32px; border-radius: 50%;
background: rgba(17, 24, 39, 0.62); color: #fff;
display: flex; align-items: center; justify-content: center;
pointer-events: none;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
}

/* ── Style: minimal — no cover, just avatar row ── */
.cover-wrap.minimal-style { height: 70px; }
/* ── Style: bold — full-bleed gradient cover with name overlay ── */
.cover-wrap.bold-style { height: 220px; }

/* ═══════════════════════════════════════════
 PROFILE HEADER
═══════════════════════════════════════════ */
.profile-header {
position: relative; z-index: 2;
padding: 88px 20px 18px;
border-bottom: 1px solid var(--border-l);
background: var(--card);
}
.profile-name {
font-size: 24px; font-weight: 800; color: var(--text);
letter-spacing: -.03em; line-height: 1.15;
}
.profile-pronouns {
display: inline-block; font-size: 11px; color: var(--text-3);
font-weight: 500; margin-left: 6px; vertical-align: middle;
}
.profile-title {
font-size: 14px; font-weight: 600; color: var(--text-2); margin-top: 4px;
}
.profile-company {
display: inline-flex; align-items: center; gap: 5px;
font-size: 13px; color: var(--accent); font-weight: 600;
margin-top: 2px;
}
.profile-bio-wrap {
margin-top: 10px; padding-top: 10px;
border-top: 1px solid var(--border-l);
}
.profile-bio {
font-size: 13px; color: var(--text-2); line-height: 1.65;
white-space: pre-wrap; word-break: break-word;
}
.profile-bio--clamp {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
.profile-bio-toggle {
display: inline-block;
margin-top: 6px; padding: 0;
border: none; background: none;
font-family: inherit; font-size: 12px; font-weight: 700;
color: var(--accent); cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.profile-bio-toggle:hover { text-decoration: underline; }
.profile-bio-toggle[hidden] { display: none; }

/* ── Save to Contacts CTA ── */
.cta-row {
display: flex; gap: 10px; padding: 16px 20px;
border-bottom: 1px solid var(--border-l);
}
.btn-save-contact {
flex: 1; height: 48px;
background: var(--accent); color: #fff;
border: none; border-radius: var(--r-sm);
font-size: 15px; font-weight: 700; font-family: inherit;
display: flex; align-items: center; justify-content: center; gap: 8px;
cursor: pointer; transition: background .14s, transform .1s;
-webkit-tap-highlight-color: transparent;
text-decoration: none;
}
.btn-save-contact:hover  { background: var(--accent-d); }
.btn-save-contact:active { transform: scale(.98); }
.btn-share {
width: 48px; height: 48px; border-radius: var(--r-sm);
background: var(--border-l); color: var(--text-2);
border: 1.5px solid var(--border);
display: flex; align-items: center; justify-content: center;
cursor: pointer; transition: background .12s, border-color .12s;
flex-shrink: 0;
}
.btn-share:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-l); }

/* ═══════════════════════════════════════════
 CONTACT DETAILS SECTION
═══════════════════════════════════════════ */
.section-block { padding: 18px 20px; border-bottom: 1px solid var(--border-l); }
.section-title {
font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
color: var(--text-3); margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.section-title::after {
content: ''; flex: 1; height: 1px; background: var(--border-l);
}

.contact-list { display: flex; flex-direction: column; gap: 2px; }
.contact-item {
display: flex; align-items: center; gap: 12px;
padding: 10px 12px; border-radius: var(--r-sm);
text-decoration: none; color: var(--text);
transition: background .12s; cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.contact-item:hover { background: var(--accent-l); }
.contact-item:active { background: var(--border-l); }
.contact-icon {
width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.icon-set-font .contact-icon--theme {
color: var(--accent);
font-size: 16px;
}
.contact-detail { flex: 1; min-width: 0; }
.contact-label { font-size: 10px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.contact-value { font-size: 14px; font-weight: 600; color: var(--text); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-arrow { color: var(--text-3); flex-shrink: 0; }

/* ═══════════════════════════════════════════
 SOCIAL LINKS
═══════════════════════════════════════════ */
.socials-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
}
@media (min-width: 400px) { .socials-grid { grid-template-columns: repeat(5, 1fr); } }

.social-tile {
display: flex; flex-direction: column; align-items: center; gap: 5px;
padding: 12px 6px 10px; border-radius: var(--r-sm);
border: 1.5px solid var(--border-l); background: var(--card);
text-decoration: none; color: var(--text-2);
transition: border-color .14s, background .14s, transform .12s;
cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.social-tile:hover { border-color: var(--accent); background: var(--accent-l); transform: translateY(-2px); }
.social-tile:active { transform: scale(.96); }
.social-tile .social-tile-icon { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.social-tile .social-tile-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; text-align: center; }

/* ═══════════════════════════════════════════
 ADDRESS / MAP
═══════════════════════════════════════════ */
.address-block {
display: flex; align-items: flex-start; gap: 12px;
padding: 10px 12px; border-radius: var(--r-sm);
text-decoration: none; color: var(--text); transition: background .12s;
}
.address-block:hover { background: var(--accent-l); }
.address-icon {
width: 38px; height: 38px; border-radius: 10px;
display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px;
}
.icon-set-font .address-icon--theme {
color: var(--accent);
font-size: 16px;
}
.address-text strong { font-size: 14px; font-weight: 600; display: block; }
.address-text span   { font-size: 12px; color: var(--text-3); display: block; margin-top: 2px; }


/* ═══════════════════════════════════════════
 TOAST CONFIRMATION
═══════════════════════════════════════════ */
.toast {
position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
background: #0F172A; color: #fff; padding: 10px 20px;
border-radius: 999px; font-size: 13px; font-weight: 600;
max-width: min(92vw, 420px); white-space: normal; text-align: center;
line-height: 1.35; z-index: 999; box-shadow: 0 4px 20px rgba(0,0,0,.3);
opacity: 0; transition: opacity .2s; pointer-events: none;
}
.toast.show { opacity: 1; }

/* ═══════════════════════════════════════════
 PHOTO LIGHTBOX
═══════════════════════════════════════════ */
.photo-lightbox {
position: fixed; inset: 0; z-index: 3000;
width: 100%; height: 100%; height: 100dvh;
background: rgba(0, 0, 0, 0.94);
opacity: 0; pointer-events: none;
transition: opacity 0.22s ease;
touch-action: none;
}
.photo-lightbox.open {
opacity: 1; pointer-events: auto;
}
.photo-lightbox__stage {
position: absolute; inset: 0;
display: flex; align-items: center; justify-content: center;
padding:
  max(52px, calc(env(safe-area-inset-top) + 44px))
  max(12px, env(safe-area-inset-right))
  max(24px, env(safe-area-inset-bottom))
  max(12px, env(safe-area-inset-left));
cursor: zoom-out;
}
.photo-lightbox__stage img {
display: block; max-width: 100%; max-height: 100%;
width: auto; height: auto; object-fit: contain;
user-select: none; -webkit-user-drag: none;
border-radius: 8px;
}
.photo-lightbox__close {
position: absolute; z-index: 2;
top: max(12px, env(safe-area-inset-top));
right: max(12px, env(safe-area-inset-right));
width: 44px; height: 44px; border-radius: 50%;
border: none; background: rgba(255, 255, 255, 0.14); color: #fff;
display: flex; align-items: center; justify-content: center;
cursor: pointer; transition: background 0.15s;
-webkit-tap-highlight-color: transparent;
}
.photo-lightbox__close:hover { background: rgba(255, 255, 255, 0.24); }
.photo-lightbox__close:focus-visible {
outline: 3px solid #fff; outline-offset: 2px;
}

/* ═══════════════════════════════════════════
 LOADING / ERROR SHIMMER
═══════════════════════════════════════════ */
.shimmer {
background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
background-size: 200% 100%;
animation: shim 1.4s ease-in-out infinite;
border-radius: var(--r-sm);
}
@keyframes shim { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ═══════════════════════════════════════════
 POWERED FOOTER
═══════════════════════════════════════════ */
.powered {
display: flex; align-items: center; justify-content: center; gap: 6px;
padding: 18px 20px 4px; margin-top: auto;
}
.powered-mark { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.powered-text { font-size: 11px; color: var(--text-3); font-weight: 500; }

/* ═══════════════════════════════════════════
 UTILITY
═══════════════════════════════════════════ */
.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; }
