/* Member single page (/member/{slug})
   -------------------------------------------------------------------------
   Layout, title band and member-specific card ordering. Mirrors group.css:
   the generic .card / .profile-card bases live in cards.css; this layers the
   two-column layout and mobile reordering on top. Enqueued after cards.css. */

/* Member single layout.
   Mobile: a single flex column. The aside/main wrappers use display:contents so
   their cards flow directly into .member-layout, and `order` sets the mobile
   sequence: bio, contact, business, sector, links, then the group-memberships carousel.
   Desktop: the wrappers become real sidebar + main columns. */
.member-layout {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}

.member-layout__aside,
.member-layout__main {
  display: contents;
}

.profile-bio-card                   { order: 1; }
.profile-business-card              { order: 3; }
.profile-sector-card                { order: 4; }
.profile-contact-card               { order: 2; }
.profile-social-card                { order: 5; }
.member-layout__groups              { order: 6; }

@media (min-width: 62rem) {
  /* Same 1:2 split + column gap as the event single (event.css). */
  .member-layout {
    display: grid;
    grid-template-columns: var(--grid-narrow) var(--grid-wide);
    gap: var(--space-md-lg-d);
    align-items: start;
  }

  /* Wrappers become independent columns; order falls back to source order
     within each (which already matches the desktop stack). */
  .member-layout__aside,
  .member-layout__main {
    display: flex;
    flex-direction: column;
    gap: var(--card-gap);
    min-width: 0;
  }
}
