/* profile.css — BUDU profiles v2 (2026-11-08). Pairs with profile.js. */

.pf { padding: 0 0 8px; }
#profileContent > .pf { position: relative; }

/* ── hero: the person's own photo, blurred, is the backdrop ─────────── */
.profile-card.pf-hero {
    position: relative; margin: 12px 12px 0; padding: 0 18px 18px; border: 0;
    border-radius: 24px; overflow: hidden; background: var(--ink); color: #fff; isolation: isolate; text-align: left;
}
.pf-hero * { text-align: left; }
.pf-bg {
    position: absolute; inset: -40px; z-index: -2;
    background-size: cover; background-position: center;
    filter: blur(34px) saturate(1.35) brightness(.78); transform: scale(1.15);
}
.pf-hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(22,32,44,.05) 0%, rgba(22,32,44,.35) 45%, rgba(22,32,44,.82) 100%);
}
.pf-top { display: flex; align-items: flex-end; gap: 12px; padding-top: 22px; min-height: 132px; }
.pf-av { position: relative; flex: 0 0 auto; }
.pf-hero .profile-avatar {
    width: 112px; height: 112px; border-radius: 34px; object-fit: cover; display: block; cursor: zoom-in;
    border: 3px solid rgba(255,255,255,.9); box-shadow: 0 18px 40px -16px rgba(0,0,0,.6); background: #fff;
}
.pf-online {
    position: absolute; right: -3px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%;
    background: var(--live); border: 4px solid #0f1f3d;
}
.pf-cam {
    position: absolute; right: -6px; bottom: -6px; width: 36px; height: 36px; border-radius: 50%;
    border: 3px solid #0f1f3d; background: #fff; color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.pf-cam:focus-visible, .pf-status-empty:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* the one bold element: a status bubble coming off the avatar */
.pf-status {
    position: relative; align-self: center; margin-bottom: 18px; max-width: 100%;
    background: var(--sun); color: var(--ink); border: 0; text-align: left;
    font: 600 14.5px/1.35 var(--f-ui); padding: 10px 14px; border-radius: 18px 18px 18px 6px;
    box-shadow: 0 10px 24px -12px rgba(0,0,0,.5);
}
.pf-status::before {
    content: ""; position: absolute; left: -7px; bottom: 6px; width: 14px; height: 14px;
    background: inherit; clip-path: polygon(100% 0, 100% 100%, 0 100%); border-radius: 0 0 4px 0;
}
.pf-status span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pf-status-empty { background: rgba(255,255,255,.14); color: #fff; border: 1.5px dashed rgba(255,255,255,.55); cursor: pointer; font-weight: 500; box-shadow: none; }
.pf-status-empty::before { display: none; }

.pf-id { margin-top: 14px; }
.pf-name {
    margin: 0; font: 700 30px/1.05 var(--f-display); letter-spacing: -.025em; color: #fff;
    display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; word-break: break-word;
}
.pf-age { font-weight: 500; opacity: .72; font-size: 26px; }
.pf-verified { color: #8fd8ff; font-size: 18px; align-self: center; }
.pf-pronouns { font-size: 13.5px; opacity: .75; margin-top: 4px; }
.pf-work { margin-top: 10px; font-size: 15px; font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.pf-work i { opacity: .7; font-size: 13px; }
.pf-where { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; opacity: .88; }
.pf-where > span { display: inline-flex; align-items: center; gap: 6px; }
.pf-flag { font-size: 16px; line-height: 1; }
.pf-from { opacity: .8; }
.pf-seen { margin-top: 10px; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
           background: rgba(255,255,255,.12); padding: 4px 10px; border-radius: 999px; }
.pf-seen.on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }

/* ── actions right under the hero ───────────────────────────────────── */
.pf-actions { margin: 12px 12px 0; }
.pf-actions .profile-action-footer { position: static; padding: 0; margin: 0; background: none; border: 0; box-shadow: none; }
.pf-actions .btn { min-height: 48px; border-radius: 14px; font-weight: 700; font-size: 15px; }
.pf-actions-self { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pf-actions-self .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.pf-foot { margin: 18px 12px 0; display: flex; justify-content: center; }
.pf-foot .profile-action-row { display: flex; gap: 18px; margin: 0; }

/* ── facts: a single quiet row ──────────────────────────────────────── */
.pf-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 12px 0; }
.pf-fact {
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
    background: var(--card); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); font-weight: 600;
}
.pf-fact i { color: var(--violet); font-size: 12px; }
.pf-fact b { font-size: 15px; font-weight: 400; line-height: 1; }

/* ── sections: no boxes, just rhythm ────────────────────────────────── */
.pf-sec { margin: 22px 16px 0; }
.pf-sec h3 {
    margin: 0 0 10px; font: 700 17px/1.2 var(--f-display); letter-spacing: -.01em; color: var(--ink);
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.pf-sec + .pf-sec { padding-top: 20px; border-top: 1px solid var(--line); }
.pf-bio { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; white-space: pre-line; max-width: 62ch; }
.pf-sub { font-size: 13px; color: var(--muted); font-weight: 600; margin: 14px 0 8px; }

.pf-open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pf-open-i {
    display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px;
    background: var(--violet-50); color: var(--ink); font-weight: 600; font-size: 14px; line-height: 1.25;
}
.pf-open-i i { width: 32px; height: 32px; border-radius: 10px; background: var(--violet); color: #fff; display: grid; place-items: center; font-size: 14px; flex: 0 0 auto; }

.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-chip { padding: 7px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink); }
.pf-chip-skill { background: var(--card); }

.pf-dl { margin: 0; display: grid; gap: 0; }
.pf-dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pf-dl > div:last-child { border-bottom: 0; }
.pf-dl dt { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.pf-dl dd { margin: 0; color: var(--ink); font-size: 14.5px; font-weight: 600; word-break: break-word; }

.pf-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-link {
    display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 9px 14px; border-radius: 12px;
    background: var(--card); border: 1px solid var(--line-2); color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none;
}
.pf-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-link i, .pf-x { color: var(--violet); font-size: 16px; font-style: normal; }
.pf-link:hover { border-color: var(--violet); }
.pf-link:focus-visible { outline: 3px solid var(--violet-100); outline-offset: 1px; }

.pf-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pf-photos button { padding: 0; border: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; background: var(--paper); }
.pf-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pf-sec-quiet h3 { font-size: 14px; color: var(--muted); }
.pf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.pf-stats > div { display: flex; flex-direction: column; gap: 2px; }
.pf-stats b { font: 700 18px/1.2 var(--f-display); color: var(--ink); }
.pf-stats span { font-size: 12.5px; color: var(--muted); }

/* ── own profile extras ─────────────────────────────────────────────── */
.pf-mine .profile-settings-btn { position: absolute; top: 22px; right: 22px; z-index: 3; }
.pf-complete {
    display: block; width: calc(100% - 24px); margin: 12px 12px 0; padding: 12px 14px; text-align: left; cursor: pointer;
    background: var(--sun-50); border: 1px solid #f6e3a8; border-radius: 16px; font: inherit; color: var(--ink);
}
.pf-complete-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.pf-complete-top span { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.pf-bar { display: block; height: 6px; border-radius: 999px; background: rgba(22,32,44,.08); margin-top: 9px; overflow: hidden; }
.pf-bar > span { display: block; height: 100%; background: var(--ink); border-radius: inherit; }
.pf-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 12px 0; }
.pf-quick button {
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 11px 4px; cursor: pointer;
    border: 1px solid var(--line); background: var(--card); border-radius: 14px; color: var(--ink); font: 600 12px var(--f-ui);
}
.pf-quick i { color: var(--violet); font-size: 16px; }
.pf-empty {
    width: 100%; padding: 14px; border-radius: 14px; border: 1.5px dashed var(--line-2); background: none; cursor: pointer;
    color: var(--muted); font: 500 14px/1.4 var(--f-ui); text-align: left;
}
.pf-empty:hover { border-color: var(--violet); color: var(--ink); }

/* ── edit form ──────────────────────────────────────────────────────── */
.pe { padding: 6px 12px 24px; }
.pe-head { display: flex; align-items: center; gap: 10px; margin: 8px 0 6px; }
.pe-head h2 { margin: 0; font: 700 22px var(--f-display); letter-spacing: -.01em; }
.pe-g { border: 0; margin: 0; padding: 18px 0 4px; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.pe-g:first-of-type { border-top: 0; }
.pe-g legend { font: 700 17px var(--f-display); color: var(--ink); padding: 0; margin-bottom: 4px; float: left; width: 100%; }
.pe-hint { clear: both; margin: 0 0 10px; color: var(--muted); font-size: 13.5px; }
.pe-grid { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 6px; }
.pe-f { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pe-f.half { grid-column: auto; }
.pe-f > span { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.pe-f > span em { font-style: normal; font-weight: 500; color: var(--muted); }
.pe input[type=text], .pe input[type=url], .pe input[type=date], .pe select, .pe textarea {
    width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2);
    font: 16px var(--f-ui); color: var(--ink); background: #fff;
}
.pe textarea { resize: vertical; line-height: 1.5; }
.pe-open { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.pe-o { position: relative; cursor: pointer; }
.pe-o input { position: absolute; opacity: 0; pointer-events: none; }
.pe-o span {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 999px;
    border: 1.5px solid var(--line-2); background: #fff; font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.pe-o span i { color: var(--muted); font-size: 13px; }
.pe-o input:checked + span { background: var(--violet); border-color: var(--violet); color: #fff; }
.pe-o input:checked + span i { color: #fff; }
.pe-o input:focus-visible + span { outline: 3px solid var(--violet-100); outline-offset: 2px; }
.pe-save {
    position: sticky; bottom: calc(var(--nav-total, 0px) + 8px); z-index: 2; display: grid; grid-template-columns: 1fr 2fr; gap: 8px;
    margin-top: 18px; padding: 10px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 30px -18px rgba(22,32,44,.5);
}
.pe-save .btn { min-height: 46px; border-radius: 12px; font-weight: 700; }

@media (max-width: 380px) {
    .pf-hero .profile-avatar { width: 92px; height: 92px; border-radius: 28px; }
    .pf-name { font-size: 26px; }
    .pf-open { grid-template-columns: 1fr; }
    .pe-grid { grid-template-columns: 1fr; }
    .pe-f.half { grid-column: 1 / -1; }
}
@media (min-width: 760px) {
    #profileContent > .pf { max-width: 680px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) { .pf * { scroll-behavior: auto !important; } }
