/* Member styles.
 *
 * Loaded on two very different pages, so every rule here is scoped:
 *   .mbr*      -> the #members section injected into the Tailwind-built top page
 *   .mprofile* -> the standalone /members/<slug>/ pages, which get their base
 *                 typography and layout primitives from /works/case.css
 *
 * Deliberately contains no global/element selectors (no `*`, no `body`): the top
 * page has its own reset and font stack that must not be overridden.
 */

.mbr {
  --mbr-ink: #0b0b0b;
  --mbr-ink-soft: #3f3f46;
  --mbr-muted: #71717a;
  --mbr-line: #e4e4e7;
  --mbr-ease: cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  padding: clamp(72px, 8vw, 128px) 0;
  background: #fff;
}

.mbr__wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- section heading ---- */

.mbr__head {
  max-width: 46rem;
  margin-bottom: clamp(36px, 4vw, 60px);
}

.mbr__eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--mbr-muted);
}

.mbr__title {
  margin: 14px 0 0;
  font-size: clamp(1.9rem, 1rem + 3.4vw, 3rem);
  line-height: 1.16;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--mbr-ink);
}

.mbr__lead {
  margin: 20px 0 0;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.12rem);
  line-height: 1.9;
  color: var(--mbr-ink-soft);
}

/* ---- group photo with an overlapping caption card ---- */

.mbr__group {
  position: relative;
  margin: 0 0 clamp(56px, 7vw, 104px);
}

.mbr__group picture,
.mbr__group img {
  display: block;
  width: 100%;
  height: auto;
}

.mbr__group img {
  border-radius: 24px;
  object-fit: cover;
  background: #f4f4f5;
}

.mbr__group-cap {
  display: flex;
  align-items: baseline;
  gap: 18px;
  max-width: 30rem;
  margin: -56px 0 0 clamp(16px, 4vw, 56px);
  padding: 26px 30px;
  position: relative;
  z-index: 1;
  background: var(--mbr-ink);
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 26px 60px -30px rgba(0, 0, 0, 0.55);
}

.mbr__group-count {
  font-size: clamp(2.4rem, 1rem + 4vw, 3.6rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.mbr__group-text {
  font-size: 0.92rem;
  line-height: 1.75;
  color: #d4d4d8;
}

/* ---- member cards ---- */

.mbr__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.4vw, 34px);
}

.mbr__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--mbr-line);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform 0.45s var(--mbr-ease), box-shadow 0.45s var(--mbr-ease),
    border-color 0.45s var(--mbr-ease);
}

.mbr__card:hover,
.mbr__card:focus-visible {
  transform: translateY(-6px);
  border-color: #d4d4d8;
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.4);
}

.mbr__card:focus-visible {
  outline: 2px solid var(--mbr-ink);
  outline-offset: 3px;
}

.mbr__photo {
  position: relative;
  overflow: hidden;
  background: #f4f4f5;
  aspect-ratio: 3 / 4;
}

.mbr__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--mbr-ease);
}

.mbr__card:hover .mbr__photo img,
.mbr__card:focus-visible .mbr__photo img {
  transform: scale(1.045);
}

.mbr__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 24px 24px 26px;
}

/* min-height keeps the names on one baseline across the row even while some
 * members' job titles are still awaiting copy (the element is left empty). */
.mbr__role {
  margin: 0;
  min-height: 1.4em;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--mbr-muted);
}

.mbr__name {
  margin: 10px 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--mbr-ink);
}

.mbr__romaji {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mbr-muted);
}

.mbr__desc {
  margin: 16px 0 0;
  font-size: 0.92rem;
  line-height: 1.85;
  color: var(--mbr-ink-soft);
}

.mbr__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--mbr-ink);
}

.mbr__more svg {
  transition: transform 0.4s var(--mbr-ease);
}

.mbr__card:hover .mbr__more svg,
.mbr__card:focus-visible .mbr__more svg {
  transform: translateX(5px);
}

@media (max-width: 900px) {
  .mbr__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .mbr__grid {
    grid-template-columns: 1fr;
  }
  .mbr__group img {
    border-radius: 16px;
  }
  .mbr__group-cap {
    margin: -32px 12px 0;
    padding: 20px 22px;
    gap: 14px;
  }
}

/* =======================================================================
 * Standalone profile pages (/members/<slug>/) — layered on /works/case.css
 * ======================================================================= */

.mprofile {
  padding: clamp(40px, 5vw, 72px) 0 clamp(28px, 3vw, 48px);
}

.mprofile__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.mprofile__photo {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  background: #f4f4f5;
  aspect-ratio: 3 / 4;
}

.mprofile__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mprofile__role {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin: 0;
}

.mprofile__name {
  font-size: clamp(2rem, 1rem + 3.6vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 12px 0 0;
}

.mprofile__romaji {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.mprofile__lead {
  margin: 24px 0 0;
  font-size: clamp(1.02rem, 0.95rem + 0.4vw, 1.16rem);
  line-height: 1.9;
  color: var(--ink-soft);
}

.mprofile__facts {
  margin: 32px 0 0;
  border-top: 1px solid var(--line);
}

.mprofile__facts div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.mprofile__facts dt {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding-top: 0.35em;
}

.mprofile__facts dd {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--ink);
}

/* A section whose copy has not been supplied yet stays visibly unfinished
 * rather than being padded out with invented biography. */
.mprofile__pending {
  margin: 0;
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.8;
}

/* ---- career timeline ---- */

.mtimeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mtimeline li {
  position: relative;
  padding: 0 0 30px 30px;
  border-left: 1px solid var(--line);
}

.mtimeline li:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.mtimeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
}

.mtimeline__when {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.mtimeline__what {
  display: block;
  margin-top: 6px;
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.5;
}

.mtimeline__detail {
  margin: 8px 0 0;
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--ink-soft);
}

/* ---- headline figures ---- */

.mstats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mstats li {
  padding: 24px 0;
}

.mstats li + li {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.mstats__figure {
  display: block;
  font-size: clamp(1.7rem, 1rem + 2.4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.mstats__unit {
  font-size: 0.5em;
  font-weight: 700;
  margin-left: 2px;
}

.mstats__label {
  display: block;
  margin-top: 10px;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ---- outbound profile links ---- */

.mlinks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mlinks a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--bg-soft);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.mlinks a:hover {
  border-color: #c8c8cd;
  color: var(--ink);
  transform: translateY(-2px);
}

@media (max-width: 700px) {
  .mstats {
    grid-template-columns: 1fr;
  }
  .mstats li + li {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
  }
}

.mprofile__others {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.mprofile__other {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

.mprofile__other:hover {
  border-color: #c8c8cd;
  transform: translateY(-3px);
}

.mprofile__other img {
  display: block;
  width: 56px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #f4f4f5;
}

.mprofile__other-name {
  font-weight: 700;
  font-size: 1rem;
}

.mprofile__other-role {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
}

@media (max-width: 820px) {
  .mprofile__grid {
    grid-template-columns: 1fr;
  }
  .mprofile__photo {
    max-width: 340px;
  }
  .mprofile__others {
    grid-template-columns: 1fr;
  }
}
