/* Community profiles share the site's surfaces, typography and control tokens. */
.people-page { padding-block: 2.25rem 4rem; }
.people-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-block-end: 1.5rem; }
.people-eyebrow { color: var(--muted); font-size: .8rem; font-weight: 600; margin: 0 0 .5rem; }
.people-heading h1 { font-size: clamp(1.65rem, 3vw, 2.1rem); font-weight: 700; letter-spacing: -.04em; margin: 0 0 .55rem; }
.people-subtitle { color: var(--muted); max-width: 38rem; line-height: 1.65; margin: 0; }
.people-own-link { display: inline-flex; align-items: center; gap: .6rem; white-space: nowrap; min-height: 44px; }
:is(.people-page, .people-tabs, .portfolio-gallery-actions) svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.people-tabs { display: flex; align-items: center; gap: 1.75rem; border-bottom: 1px solid var(--border); margin-block-end: 1.5rem; }
.people-tabs a { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 48px; padding: .8rem .15rem; color: var(--muted); font-size: .875rem; font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.people-tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.people-tabs a:hover { color: var(--accent); }
.people-search-hint { color: var(--muted); font-size: .78rem; margin: .65rem 0 1.4rem; }
.people-saver-disclosure { color: var(--muted); font-size: .85rem; line-height: 1.6; margin: -.3rem 0 1.25rem; padding: .85rem 1rem; background: var(--accent-soft); border-radius: var(--control-radius, 10px); }
.people-results-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-block-end: 1rem; }
.people-results-heading h2 { font-size: 1rem; font-weight: 650; margin: 0; scroll-margin-top: 8rem; }
.people-results-heading > span { font-size: .8rem; color: var(--muted); }
.people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.people-card { display: flex; flex-direction: column; gap: .8rem; min-width: 0; padding: 1.1rem; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius, 14px); background: var(--card); box-shadow: var(--shadow-sm); transition: border-color .18s, box-shadow .18s; }
.people-card:focus-within, .people-card:hover { border-color: var(--border-control); box-shadow: var(--shadow-md); }
.people-card-profile { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; column-gap: .85rem; row-gap: .75rem; color: var(--text); text-decoration: none; min-width: 0; }
a.people-card-profile:hover { color: var(--text); }
a.people-card-profile:hover h3 { color: var(--accent); }
.people-card .people-avatar { width: 56px; height: 56px; border-width: 3px; font-size: 1.05rem; }
.people-avatar { width: 88px; height: 88px; flex: 0 0 auto; border-radius: 50%; overflow: hidden; isolation: isolate; position: relative; display: inline-grid; place-items: center; color: var(--accent); background: var(--accent-soft); border: 4px solid var(--card); outline: 1px solid var(--border); box-shadow: var(--shadow-sm); font-size: 1.5rem; font-weight: 650; letter-spacing: -.04em; }
.people-avatar img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: var(--people-avatar-x, 50%) var(--people-avatar-y, 50%); transform: scale(var(--people-avatar-scale, 1)); }
.people-avatar img[data-image-fallback-applied="true"] { display: none; }
.people-card-identity { min-width: 0; }
.people-card h3 { margin: 0 0 .3rem; font-size: .98rem; font-weight: 650; letter-spacing: -.025em; overflow-wrap: anywhere; }
.people-handle { display: inline-block; max-width: 100%; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.people-card-description { grid-column: 1 / -1; font-size: .82rem; line-height: 1.6; color: var(--muted); margin: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.people-card-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--border); }
.people-card-actions:not(:has(button:not([hidden]))) { display: none; }
.people-card-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; font-size: .8rem; }
.people-card-actions .btn svg { width: 17px; height: 17px; }
.people-card-actions > [hidden] { display: none; }
.people-card-actions .person-unsave-button { color: var(--muted); }
.people-card-actions .person-unsave-button:hover { color: var(--text); background: var(--accent-soft); }
.people-card [aria-busy="true"] { opacity: .65; cursor: progress; }
.person-private-note { margin: 0; padding: .65rem .75rem; border-inline-start: 2px solid var(--border-control); border-radius: 0 6px 6px 0; background: var(--card-soft); color: var(--muted); font-size: .8rem; line-height: 1.6; overflow-wrap: anywhere; }
.person-save-error { margin: 0; color: var(--danger-text); font-size: .8rem; line-height: 1.5; overflow-wrap: anywhere; }
.person-save-dialog { width: min(calc(100% - 32px), 460px); max-height: calc(100dvh - 48px); overflow-y: auto; margin: auto; padding: 1.5rem; border: 1px solid var(--border-control); border-radius: var(--radius, 14px); background: var(--card); color: var(--text); box-shadow: var(--shadow-lg); }
.person-save-dialog::backdrop { background: rgba(6, 15, 30, .55); }
.person-save-dialog h2 { font-size: 1.25rem; font-weight: 650; margin: 0 0 .5rem; }
.person-save-dialog-name { color: var(--muted); font-size: .9rem; margin-bottom: 1.25rem; overflow-wrap: anywhere; }
.person-save-dialog label { display: block; margin-bottom: .5rem; font-size: .85rem; font-weight: 600; }
.person-save-dialog input { width: 100%; min-height: 48px; padding: .7rem .85rem; border: 1px solid var(--border-control); border-radius: var(--control-radius, 10px); background: var(--bg); color: var(--text); font: inherit; font-size: .9rem; }
.person-save-dialog input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.person-save-dialog :is(small, .form-text) { display: block; color: var(--muted); font-size: .8rem; line-height: 1.6; margin-top: .65rem; }
.person-save-dialog-hint, .person-save-dialog-disclosure { margin: .7rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.6; }
.person-save-dialog-disclosure { padding: .75rem; background: var(--accent-soft); border-radius: var(--control-radius, 10px); }
.person-save-dialog [data-person-save-error] { color: var(--danger-text); font-size: .85rem; line-height: 1.5; margin-top: .8rem; }
.person-save-dialog-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .65rem; margin-top: 1.5rem; }
.person-save-dialog .btn { min-height: 44px; border-radius: var(--control-radius, 10px); font-size: .85rem; }
:is(.people-card-profile, .people-card-actions .btn, .people-tabs a):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 5px; }
[data-people-results][aria-busy="true"] .people-grid { opacity: .6; }
.people-empty { padding: 3.5rem 1.5rem; text-align: center; border: 1px dashed var(--border-control); border-radius: 16px; background: var(--card); }
.people-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; background: var(--accent-soft); border-radius: 20px; color: var(--accent); margin-block-end: 1.3rem; }
.people-empty-icon svg { width: 28px; height: 28px; }
.people-empty h3 { font-size: 1.1rem; font-weight: 650; }
.people-empty p { color: var(--muted); font-size: .9rem; margin: .75rem auto 1.5rem; max-width: 28rem; line-height: 1.65; }
.people-pagination { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; padding-top: 1.75rem; margin-top: 1.75rem; border-top: 1px solid var(--border); }
.people-pagination > :first-child { justify-self: start; }
.people-pagination > :last-child { justify-self: end; }
.people-pagination > span { color: var(--muted); font-size: .8rem; }
.people-error:not([hidden]) { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--warning-text); background: var(--card); color: var(--warning-text); border-radius: var(--radius); padding: 1rem; margin-block-end: 1rem; font-size: .9rem; }
.people-error button { flex-shrink: 0; }

/* Keep the existing sticky-controls and scroll hooks intact. */
.page-portfolio .portfolio-social-profile { display: flex; flex-direction: row; align-items: flex-start; justify-content: flex-start; gap: 1.65rem; padding-block: 1.3rem 1.25rem; }
.portfolio-social-profile > .people-avatar { width: 108px; height: 108px; margin-block-start: .3rem; font-size: 2rem; }
.portfolio-social-profile .portfolio-inline-profile { flex: 1; min-width: 0; }
.portfolio-social-profile h1 { font-weight: 650; letter-spacing: -.04em; overflow-wrap: anywhere; }
.portfolio-social-profile .people-handle { margin-block-end: .4rem; }
.portfolio-social-profile [data-portfolio-inline-view] > .text-secondary,
.portfolio-social-profile .portfolio-inline-editable-description p { font-size: .9rem; line-height: 1.65; max-width: 42rem; overflow-wrap: anywhere; }
.page-portfolio .portfolio-gallery-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.portfolio-gallery-toolbar .showcase-gallery-search { flex: 1 1 22rem; width: auto; min-width: 0; min-height: 44px; }
.portfolio-gallery-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; min-width: 0; max-width: 100%; }
.portfolio-gallery-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; max-width: none; font-size: .8rem; white-space: nowrap; }
.portfolio-gallery-actions .gallery-motion-controls { display: flex; margin-block-start: 0; }
/* The toggle itself communicates running/paused state; retain the live status
   for assistive technology without adding a detached third toolbar row. */
.portfolio-gallery-actions [data-gallery-motion-status] { position: absolute; width: 1px; height: 1px; min-width: 0; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.page-portfolio [data-showcase-filters-active="true"] .portfolio-gallery-actions [data-gallery-motion-status] { position: static; order: 1; flex: 1 0 100%; width: auto; height: auto; margin: 0; overflow: visible; clip-path: none; white-space: normal; }
.page-portfolio .people-tabs { margin-bottom: 1rem; gap: 1.5rem; }
.page-showcase .people-tabs { margin-block: .5rem 1rem; }
.portfolio-background-midnight .portfolio-social-profile { --card: #17233b; --text: #eef4ff; --muted: #bdd0eb; --border: #526681; --accent: #a3c6ff; --accent-soft: #263957; }
@media (max-width: 991px) {
    .portfolio-gallery-toolbar .showcase-gallery-search { flex-basis: 100%; width: 100%; }
    .portfolio-gallery-actions { width: 100%; }
}
@media (max-width: 850px) { .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) {
    .people-page { padding-block-start: 1.5rem; }
    .people-heading { align-items: flex-start; gap: 1rem; flex-direction: column; margin-bottom: 1.25rem; }
    .people-subtitle { font-size: .875rem; }
    .people-own-link { font-size: .8rem; }
    .people-tabs { gap: 1.5rem; }
    .people-grid { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
    .people-card { padding: 1rem; }
    .people-card h3 { font-size: .94rem; }
    .people-card-description { font-size: .8rem; }
    .people-pagination { gap: .5rem; }
    .people-pagination .btn { font-size: .8rem; }
    .people-error:not([hidden]) { flex-wrap: wrap; }
    .page-portfolio .portfolio-social-profile { gap: 1rem; padding-inline-end: 0; padding-block: .75rem 1rem; }
    .portfolio-social-profile > .people-avatar { width: 64px; height: 64px; font-size: 1.25rem; border-width: 3px; }
    .portfolio-social-profile h1 { font-size: 1.35rem; }
    .portfolio-social-profile .portfolio-inline-profile { padding-inline-end: 0; }
    .portfolio-social-profile [data-portfolio-inline-view] > .text-secondary:not(.portfolio-kicker),
    .portfolio-social-profile .portfolio-inline-editable-description { margin-inline-start: -80px; margin-block-start: .75rem; }
    .portfolio-gallery-actions { gap: .5rem; }
    .portfolio-gallery-actions .btn { white-space: normal; }
    .portfolio-social-profile .portfolio-inline-editor { margin-inline-start: -80px; }
}
@media (prefers-reduced-motion: reduce) { .people-card { transition: none; } .people-card:hover { transform: none; } }
