/* =========================================================
   MY HEART BE HURT — members.css  (the Members view + card view)
   Version 2.9.0 · 2026-10-18 · see CHANGELOG.md
   Builds on style.css (colors, fonts, background, audio panel, cursor).

   Design notes (2026 practice):
   - Frosted glass only on controls and pop-ups (search, back button, audio
     panel, card view). Member tiles are calm solid surfaces: many stacked blur
     layers cost performance and hurt readability.
   - Hover effects only on devices with a mouse, so taps on phones don't leave
     cards stuck in their hover state.
   - Keyboard: clear 2px focus rings; focused items are never hidden under the
     sticky search bar or the audio panel; tap targets are 24px or larger.
   - Respects "reduce motion" and "reduce transparency" system settings.
   ========================================================= */
:root {
  --page-w: 1120px;
  --surface:     rgba(255, 255, 255, .045);
  --surface-2:   rgba(255, 255, 255, .075);
  --line:        rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .24);
  --focus:       rgba(255, 255, 255, .9);
  --radius: 20px;
}

/* =================== VIEW SWITCHING =================== */
.view[hidden] { display: none !important; }

/* Members view: the shared background video calms down so cards read clearly */
.bg__video, .bg__shade { transition: filter 1s var(--ease), opacity 1s var(--ease); }
body[data-view="members"] .bg__video { filter: saturate(.8) brightness(.42) blur(3px); }

/* keep focused items clear of the sticky search bar (top) and the audio panel (bottom) */
html:has(body[data-view="members"]) { scroll-padding: 96px 0 110px; }

.page {
  position: relative; z-index: 1;
  width: min(var(--page-w), 100%);
  margin: 0 auto;
  padding: 18px 16px 150px;
}

/* =================== TOP BAR =================== */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 6px 0 0;
}
.topbar__back {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: rgba(242,239,233,.78);
  font: 400 13px/1 var(--sans);
  letter-spacing: .04em;
  text-decoration: none;
  transition: color .25s, border-color .25s, background .25s;
}
.topbar__back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }

.topbar__brand {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 40px;
  color: var(--ink); text-decoration: none;
  border-radius: 999px;
}
.topbar__logo {
  position: relative;
  width: 36px; height: 36px; flex: none;
  border-radius: 50%;
  overflow: hidden;
  clip-path: circle(50% at 50% 50%);
  background: #fff;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.9);
}
.topbar__logo video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  object-position: var(--logo-x) var(--logo-y);
  transform: scale(var(--logo-zoom));
}
.topbar__name {
  font: 700 11px/1 var(--title);
  letter-spacing: .32em;
  padding-left: .32em;
  color: rgba(242,239,233,.86);
  white-space: nowrap;
}

/* =================== INTRO =================== */
.intro { text-align: center; padding: clamp(44px, 8vh, 80px) 0 26px; }
.intro__eyebrow {
  font: 400 12px/1 "Inter", system-ui, sans-serif;
  letter-spacing: .6em; padding-left: .6em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 14px;
}
.intro__title {
  font: 700 clamp(28px, 5vw, 44px)/1.1 var(--title);
  letter-spacing: .22em; padding-left: .22em;
  color: transparent;
  background: linear-gradient(180deg, #ffffff 0%, #e4e0d8 50%, #9a948a 100%);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.55));
}
.intro__meta {
  margin-top: 16px;
  font: 300 13px/1.4 var(--sans);
  letter-spacing: .08em;
  color: rgba(242,239,233,.7);
  font-variant-numeric: tabular-nums;
}
.intro__meta b { font-weight: 500; color: var(--ink); }
.intro__meta .dot { display: inline-block; width: 3px; height: 3px; margin: 0 10px 3px; border-radius: 50%; background: currentColor; opacity: .6; }

/* (v2.2) the intro and search move with the page itself (shared-axis transition in style.css) */

/* =================== SEARCH (sticks to the top while scrolling) =================== */
.searchbar {
  position: sticky; top: 12px; z-index: 20;
  width: min(560px, 100%);
  margin: 0 auto 8px;
}
.search {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  height: 54px;
  padding: 0 12px 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(16,16,18,.55);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
          backdrop-filter: blur(22px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 18px 44px -18px rgba(0,0,0,.9);
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.search:focus-within {
  border-color: rgba(255,255,255,.5);
  background: rgba(20,20,22,.66);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 18px 44px -18px rgba(0,0,0,.9), 0 0 0 4px rgba(255,255,255,.08), 0 0 36px -8px rgba(255,255,255,.2);
}
.search__icon { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ink-dim); stroke-width: 1.6; stroke-linecap: round; }
.search:focus-within .search__icon { stroke: var(--ink); }
.search__input {
  flex: 1; min-width: 0;
  height: 100%;
  border: 0; outline: 0;
  background: transparent;
  color: var(--ink);
  font: 300 16px/1 var(--sans);   /* 16px stops iPhone from zooming in */
  letter-spacing: .02em;
}
.search__input::placeholder { color: rgba(242,239,233,.5); }
.search__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search__status { flex: none; font: 400 12px/1 var(--sans); color: rgba(242,239,233,.7); letter-spacing: .04em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.search__clear {
  flex: none;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: var(--ink);
  transition: background .2s;
}
.search__clear[hidden] { display: none; }
.search__clear svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.search__kbd {
  flex: none;
  min-width: 26px; height: 26px; padding: 0 8px;
  display: grid; place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.16);
  font: 500 12px/1 var(--sans);
  color: var(--ink-dim);
}
.search:focus-within .search__kbd, .search.has-value .search__kbd { display: none; }
@media (hover: none), (max-width: 560px) { .search__kbd { display: none; } }   /* no keyboard shortcut on phones */

/* =================== TIER SECTIONS =================== */
.tiers { display: flex; flex-direction: column; gap: clamp(46px, 7vh, 72px); padding-top: clamp(34px, 6vh, 56px); }

/* label in the PARTNERS style: line — NAME (count) — line */
.tier__label {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-bottom: 26px;
  font: 700 11px/1 var(--title);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: #b9b6b0;
}
.tier__label::before, .tier__label::after {
  content: ""; height: 1px; flex: 0 1 120px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.24));
}
.tier__label::after { background: linear-gradient(90deg, rgba(255,255,255,.24), transparent); }
.tier__count {
  margin-left: -.32em;
  min-width: 24px; height: 20px; padding: 0 7px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  font: 500 10px/1 var(--sans);
  letter-spacing: .04em;
  color: rgba(242,239,233,.72);
  font-variant-numeric: tabular-nums;
}

/* centered rows: an uneven last row (or a few search results) stays centered */
.grid { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.grid--founder { gap: 18px; }
.grid--founder > li { flex: 0 1 535px; }   /* 2 per row */
.grid--leader  > li { flex: 0 1 168px; }   /* up to 6 per row */
.grid--member  { gap: 12px; }
.grid--member  > li { flex: 0 1 156px; }   /* up to 6 per row */
/* tiles keep their size: a long name never stretches a tile (it shrinks / ends with …) */
.grid > li { min-width: 0; }
.mcard__body { min-width: 0; max-width: 100%; }

/* entrance (on the list item, so it doesn't fight the card's hover lift) */
.grid > li.anim {
  opacity: 0;
  transform: translateY(14px);
  animation: cardIn .5s var(--ease) forwards;
  animation-delay: calc(min(var(--i, 0), 12) * 18ms + 40ms);   /* quick cascade, capped so long lists don't lag */
}
@keyframes cardIn { to { opacity: 1; transform: none; } }

/* =================== MEMBER TILE =================== */
.mcard {
  position: relative;
  height: 100%;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 26px 16px 20px;
  border-radius: var(--radius);
  /* solid surface (no blur): calm, fast, readable */
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 18px 40px -26px rgba(0,0,0,.9);
  overflow: hidden;
  isolation: isolate;
  transition: transform .45s var(--ease), border-color .35s, background .35s, box-shadow .45s;
}
.mcard::before {     /* soft top light, shown on hover */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 70% at 50% 0%, rgba(255,255,255,.10), transparent 60%);
  opacity: 0; transition: opacity .4s;
}

/* the whole tile is a button; social links sit above it */
.mcard__open {
  position: absolute; inset: 0; z-index: 1;
  border: 0; background: transparent;
  border-radius: inherit;
}
.mcard__open:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.mcard:has(.mcard__open:focus-visible) { border-color: var(--line-strong); background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04)); }

/* Name slot: fixed height, name centred inside it.
   Members: exactly one line · Leaders: room for two lines · Founders: free. */
.mcard__nameslot { margin-top: 16px; display: flex; align-items: center; justify-content: center; min-width: 0; }
.mcard--member .mcard__nameslot { margin-top: 14px; height: 19px; }          /* 15px x 1.25 */
.mcard--leader .mcard__nameslot { min-height: 43px; }                        /* 2 x 17px x 1.25 */
.mcard--founder .mcard__nameslot { margin-top: 10px; display: block; }
.mcard__name {
  margin-top: 0;
  font: 400 17px/1.25 var(--display);
  letter-spacing: .02em;
  color: var(--ink);
  max-width: 100%;
  min-width: 0;                   /* lets a long name shrink inside its slot */
  overflow-wrap: normal;          /* never split a name in the middle of a word */
  text-wrap: balance;
}
/* Member tiles: one line. Long names shrink to fit (members.js, down to 12px),
   then end with "…" — the full name is in the card view and on hover. */
.mcard--member .mcard__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mcard__name mark { background: rgba(255,255,255,.2); color: #fff; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
.mcard__tier {
  margin-top: 8px;
  font: 600 9.5px/1 var(--title);
  letter-spacing: .3em; padding-left: .3em;
  text-transform: uppercase;
  color: rgba(242,239,233,.6);
}
.mcard__bio {
  margin-top: 10px;
  font: 300 13px/1.55 var(--sans);
  color: rgba(242,239,233,.72);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* platform hint next to the tier (not clickable: the tile has one action — open the card) */
.mcard__tier { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.mcard__hint { display: inline-flex; gap: 4px; letter-spacing: 0; }
.mcard__hint svg {
  width: 16px; height: 16px; padding: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  fill: rgba(242,239,233,.85);
}
.mcard--founder .mcard__tier { justify-content: flex-start; }

/* ---------- Avatars ---------- */
.avatar {
  position: relative;
  width: var(--av, 64px); aspect-ratio: 1; flex: none;
}
.avatar__img, .avatar__initials {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  clip-path: circle(50% at 50% 50%);
  background: #1a1a1d;
  box-shadow: 0 14px 30px -14px rgba(0,0,0,.95);
}
.avatar__initials {
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #3a3a40, #121214 70%);
  font: 300 calc(var(--av, 64px) * .36)/1 var(--display);
  letter-spacing: .04em;
  color: rgba(242,239,233,.85);
}
/* ring with a gap (same language as the landing logo) */
.avatar::before {
  content: ""; position: absolute; inset: calc(var(--av, 64px) * -0.08);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
  pointer-events: none;
}
.avatar__orbit { position: absolute; inset: calc(var(--av, 64px) * -0.08); border-radius: 50%; animation: spin 18s linear infinite; pointer-events: none; }
.avatar__orbit::before {
  content: ""; position: absolute; top: -2px; left: 50%;
  width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px 2px rgba(255,255,255,.55);
}

/* ---------- Tier-specific tile layouts ---------- */
.mcard--member { --av: 64px; padding: 22px 12px 16px; }
.mcard--member .mcard__name { font-size: 15px; padding: 0 2px; }

.mcard--leader { --av: 84px; }
.mcard--leader .avatar::before { border-color: rgba(255,255,255,.24); }

/* Founders: wide feature cards */
.mcard--founder {
  --av: 112px;
  flex-direction: row; align-items: center; gap: 26px;
  text-align: left;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02) 60%),
    rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.15);
}
.mcard--founder .avatar { margin: 10px; }
.mcard--founder .avatar::before { border-color: rgba(255,255,255,.28); }
.mcard--founder .mcard__body { min-width: 0; flex: 1; }
.mcard--founder .mcard__name { font-size: 26px; font-weight: 300; }
.mcard--founder .mcard__tier { margin-top: 0; padding-left: 0; color: rgba(242,239,233,.68); }
.mcard--founder::after {   /* slow light sweep */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.07) 50%, transparent 65%);
  background-size: 250% 100%;
  animation: sweep 8s ease-in-out 1.5s infinite;
  pointer-events: none;
}
@keyframes sweep { 0% { background-position: 120% 0; } 45%, 100% { background-position: -20% 0; } }

@media (max-width: 560px) {
  .mcard--founder { flex-direction: column; text-align: center; gap: 6px; padding: 26px 18px 22px; }
  .mcard--founder .avatar { --av: 96px; }
  .mcard--founder .mcard__tier { padding-left: .3em; justify-content: center; }
  .grid--founder > li { flex-basis: 100%; }
  .grid--leader  > li { flex-basis: calc(50% - 7px); }
  .grid--member  > li { flex-basis: calc(50% - 6px); }
  .mcard--leader { --av: 72px; }
}

/* ---------- "Show all" toggle ---------- */
.tier__more {
  display: flex; align-items: center; gap: 10px;
  margin: 24px auto 0;
  height: 44px; padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
  color: var(--ink);
  font: 400 13px/1 var(--sans);
  letter-spacing: .06em;
  transition: background .25s, border-color .25s;
}
.tier__more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.tier__more[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 72px 0 24px; }
.empty[hidden] { display: none; }
.empty__title { font: 700 12px/1 var(--title); letter-spacing: .3em; padding-left: .3em; text-transform: uppercase; color: var(--ink); }
.empty__text { margin-top: 12px; font: 300 14px/1.5 var(--sans); color: rgba(242,239,233,.72); overflow-wrap: anywhere; }
.empty__btn {
  margin-top: 22px;
  height: 44px; padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.06);
  color: var(--ink);
  font: 400 13px/1 var(--sans);
  letter-spacing: .06em;
}

.foot { margin-top: 64px; text-align: center; font: 300 12px/1 var(--sans); letter-spacing: .12em; color: rgba(242,239,233,.55); }

/* shared focus ring for the view's controls */
.topbar__back:focus-visible, .topbar__brand:focus-visible, .tier__more:focus-visible,
.empty__btn:focus-visible, .search__clear:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 3px;
}

/* ---------- Hover: mouse/trackpad only ---------- */
@media (hover: hover) {
  .topbar__back:hover { color: var(--ink); border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.09); }
  .topbar__back:hover svg { transform: translateX(-3px); }
  .search__clear:hover { background: rgba(255,255,255,.18); }
  .mcard:hover {
    transform: translateY(-4px);
    background: linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.04));
    border-color: var(--line-strong);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 26px 50px -24px rgba(0,0,0,.95), 0 0 40px -14px rgba(255,255,255,.18);
  }
  .mcard:hover::before { opacity: 1; }
  .tier__more:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.34); }
  .empty__btn:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.36); }
}

/* =================== FROSTED CARD VIEW =================== */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: 24px 16px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(4,4,6,.45);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
          backdrop-filter: blur(14px) saturate(120%);
  opacity: 0;
  transition: opacity .45s ease;
}
.modal.is-open .modal__backdrop { opacity: 1; }

/* Sizes follow the screen height, so the card always fits without scrolling. */
.modal__card {
  --av: clamp(84px, 15vh, 132px);
  --gap: clamp(10px, 2.2vh, 24px);
  position: relative;
  width: min(400px, 100%);
  border-radius: 30px;
  overflow: hidden;              /* clips the color tint (this was the scroll bug) */
  overflow: clip;                /* stronger: the card itself can never scroll */
  /* frosted glass */
  background:
    linear-gradient(160deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.05) 45%, rgba(255,255,255,.08) 100%),
    rgba(12,12,14,.35);          /* dark base keeps text contrast steady */
  border: 1px solid rgba(255,255,255,.22);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
          backdrop-filter: blur(30px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.3),
    inset 0 -1px 0 rgba(255,255,255,.05),
    0 40px 90px -30px rgba(0,0,0,.95);
  isolation: isolate;
  opacity: 0;
  transform: translateY(18px) scale(.97);
  filter: blur(6px);
  transition: opacity .45s var(--ease), transform .55s var(--ease), filter .45s var(--ease);
}
.modal.is-open .modal__card { opacity: 1; transform: none; filter: none; }
.modal__card:focus { outline: none; }   /* the card itself takes focus on open (no ring for mouse users) */
.modal__card.is-swapping { opacity: 0; transform: scale(.985); filter: blur(4px); transition-duration: .18s; }

.modal__content {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  max-height: calc(100dvh - 48px);
  padding: clamp(30px, 5.5vh, 46px) 30px clamp(18px, 3vh, 26px);
  /* only on very small screens would content exceed the card: then it scrolls
     inside, without a visible scrollbar */
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.modal__content::-webkit-scrollbar { display: none; }

/* the member's own photo, blown up and blurred, tints the glass */
.modal__tint {
  position: absolute; inset: -20%; z-index: -1;
  background-size: cover; background-position: center;
  /* darkened so white text stays readable even with a light photo / light default avatar */
  filter: blur(46px) saturate(140%) brightness(.55);
  opacity: .5;
  pointer-events: none;
}
.modal__card::after {   /* frost texture */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .06; mix-blend-mode: overlay;
  pointer-events: none;
}

.modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.07);
  color: var(--ink);
  transition: background .25s, border-color .25s, transform .3s var(--ease);
}
.modal__close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

.modal__avatar .avatar { margin: 10px auto 0; }
.modal__avatar .avatar::before { border-color: rgba(255,255,255,.32); }

.chip {
  margin-top: var(--gap);
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 12px 0 calc(12px + .3em);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.07);
  font: 600 9.5px/1 var(--title);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(242,239,233,.86);
}
.modal__name {
  margin-top: calc(var(--gap) * .55);
  font: 300 clamp(26px, 4.4vh, 34px)/1.15 var(--display);
  letter-spacing: .01em;
  color: var(--ink);
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.modal__surname { font-weight: 200; color: rgba(242,239,233,.72); }   /* surname: same size, lighter */
.modal__bio {
  margin-top: calc(var(--gap) * .5);
  max-width: 30ch;
  font: 300 14px/1.55 var(--sans);
  color: rgba(242,239,233,.8);
  text-wrap: pretty;
}
.modal__bio:empty { display: none; }
.modal__rule {
  flex: none;
  width: 48px; height: 1px; margin: var(--gap) auto calc(var(--gap) * .85);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
}

.modal__socials { list-style: none; width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.modal__socials:empty::before { content: "No social links yet"; font: 300 13px/1 var(--sans); color: rgba(242,239,233,.7); }
.modal__main { flex: 1 1 100%; }

/* main link: one wide button  [icon  Facebook        jigsaw1.uzi  ↗] */
.cta {
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: 50px; padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.26);
  background: rgba(255,255,255,.12);
  color: #fff;
  text-decoration: none;
  font: 500 14px/1 var(--sans);
  letter-spacing: .01em;
  transition: background .25s, border-color .25s, transform .3s var(--ease), box-shadow .3s;
}
.cta > svg:first-child { width: 18px; height: 18px; flex: none; fill: currentColor; }
.cta__label { flex: none; }
.cta__handle {
  margin-left: auto; min-width: 0;
  font-weight: 300; font-size: 13px;
  color: rgba(242,239,233,.72);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cta__arrow { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.cta__label + .cta__arrow { margin-left: auto; }   /* no username: push the arrow to the right */

/* extra links (rare): small round icons under the main button — 40px targets */
.pill-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.07);
  color: var(--ink);
  transition: background .25s, border-color .25s, transform .3s var(--ease);
}
.pill-icon svg { width: 16px; height: 16px; fill: currentColor; }
.modal__pos { margin-top: calc(var(--gap) * .9); font: 400 11px/1 var(--sans); letter-spacing: .14em; color: rgba(242,239,233,.55); font-variant-numeric: tabular-nums; }

/* prev / next */
.modal__nav {
  position: absolute; top: 50%; z-index: 2;
  width: 48px; height: 48px; margin-top: -24px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(16,16,18,.45);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: var(--ink);
  opacity: 0;
  transition: opacity .4s ease .1s, background .25s, border-color .25s;
}
.modal__nav[hidden] { display: none; }
.modal.is-open .modal__nav { opacity: 1; }
.modal__nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.modal__nav--prev { left: max(16px, calc(50% - 300px)); }
.modal__nav--next { right: max(16px, calc(50% - 300px)); }

.modal__close:focus-visible, .modal__nav:focus-visible, .cta:focus-visible, .pill-icon:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 3px;
}
@media (hover: hover) {
  .modal__close:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.36); transform: rotate(90deg); }
  .modal__nav:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.38); }
  .cta:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.46); transform: translateY(-2px); box-shadow: 0 0 30px -8px rgba(255,255,255,.35); }
  .pill-icon:hover { background: rgba(255,255,255,.17); border-color: rgba(255,255,255,.42); transform: translateY(-2px); }
}

/* phones: arrows move below the card */
@media (max-width: 640px) {
  .modal { padding: 16px 16px 84px; }
  .modal__nav { top: auto; bottom: 20px; margin-top: 0; width: 46px; height: 46px; }
  .modal__nav--prev { left: calc(50% - 58px); }
  .modal__nav--next { right: calc(50% - 58px); }
  .modal__content { max-height: calc(100dvh - 100px); padding-left: 22px; padding-right: 22px; }
}

body.modal-open { overflow: hidden; }

/* Topbar on small screens: hide the long brand name, keep the logo */
@media (max-width: 560px) {
  .topbar__name { display: none; }
  .intro { padding-top: 40px; }
}

/* =================== SYSTEM PREFERENCES =================== */
@media (prefers-reduced-motion: reduce) {
  .grid > li.anim { animation: none; opacity: 1; transform: none; }
  .avatar__orbit, .mcard--founder::after { animation: none; }
  .modal__card, .modal__backdrop { transition-duration: .01s; }
}
/* "Reduce transparency": solid surfaces instead of glass */
@media (prefers-reduced-transparency: reduce) {
  .search, .topbar__back, .modal__nav { background: #18181b; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .modal__backdrop { background: rgba(4,4,6,.85); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .modal__card { background: #1d1d21; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .modal__tint { opacity: .18; }
}
