/* Team pages — loaded by inc/team.php for the "Team roster" and "Team member" templates.
   Restraint is the brief: no new palette values, one accent (--sky) on the handle only,
   hierarchy carried by weight and alignment rather than scale or colour. */

/* ===========================================================================
   Roster: leadership directory. Uniform rows, hairline separators.
   =========================================================================== */
.pg-team .ptitle__lead p { margin: 0; max-width: 60ch; }

.pg-team .dir { border-top: 1px solid var(--line); }

.pg-team .dir__row {
  position: relative;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) minmax(0, 230px) 28px;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(28px, 3.4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.3s var(--ease);
}
.pg-team .dir__row:hover { border-bottom-color: var(--line-strong); }

/* Same duotone treatment as the record page, at thumbnail scale. */
.pg-team .dir__portrait {
  margin: 0; position: relative;
  width: 180px; aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg);
}
.pg-team .dir__portrait img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center 18%;
  filter: grayscale(1) brightness(0.88) contrast(1.14);
  transition: filter 0.45s var(--ease);
}
.pg-team .dir__portrait::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: var(--bg); mix-blend-mode: color; opacity: 0.62;
}
.pg-team .dir__portrait::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to bottom, transparent 62%, var(--bg) 100%);
}
.pg-team .dir__row:hover .dir__portrait img { filter: grayscale(1) brightness(1) contrast(1.14); }
.pg-team .dir__ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(227, 229, 232, 0.18); }
.pg-team .dir__ph svg { width: 40px; height: 40px; }

.pg-team .dir__name {
  margin: 0;
  font-size: clamp(1.35rem, 1.9vw, 1.7rem);
  font-weight: 600; letter-spacing: -0.022em; line-height: 1.15;
}
.pg-team .dir__name a { color: var(--text-strong); text-decoration: none; }
/* Whole row is the target; the accessible link text stays the name. */
.pg-team .dir__name a::after { content: ""; position: absolute; inset: 0; }
.pg-team .dir__row:hover .dir__name a { color: var(--sky); }
.pg-team .dir__handle {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.74em; font-weight: 400; color: var(--sky);
  letter-spacing: 0; margin-left: 4px;
}
.pg-team .dir__role {
  margin: 10px 0 0; font-size: 0.98rem; font-weight: 500;
  color: rgba(227, 229, 232, 0.9);
}
.pg-team .dir__hint {
  margin: 10px 0 0; max-width: 56ch;
  font-size: 0.95rem; font-weight: 300; line-height: 1.7;
  color: rgba(227, 229, 232, 0.62);
}

.pg-team .dir__facts { margin: 0; display: grid; gap: 16px; align-content: center; }
.pg-team .dir__facts dt {
  margin: 0 0 3px; font-size: 0.78rem; font-weight: 400; color: rgba(227, 229, 232, 0.45);
}
.pg-team .dir__facts dd {
  margin: 0; font-size: 0.95rem; font-weight: 400; line-height: 1.5;
  color: rgba(227, 229, 232, 0.88);
}

.pg-team .dir__go { color: rgba(227, 229, 232, 0.3); transition: color 0.3s var(--ease), transform 0.3s var(--ease); }
.pg-team .dir__go svg { width: 22px; height: 22px; }
.pg-team .dir__row:hover .dir__go { color: var(--sky); transform: translateX(4px); }



/* ===========================================================================
   Member record: sticky identity column beside scrolling content.
   =========================================================================== */
.pg-member { padding: clamp(22px, 3vw, 34px) 0 clamp(48px, 6vw, 80px); }

.pg-member .rec {
  display: grid;
  grid-template-columns: clamp(228px, 24vw, 290px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: start;
}

/* ---- sticky identity ----
   No panel, no shadow, no frame. The photograph and the spacing do the work;
   a single hairline above the links is the only rule in the column. */
.pg-member .rec__aside { position: sticky; top: calc(var(--header-h) + 24px); }

.pg-member .rec__portrait {
  margin: 0; position: relative;
  aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 2px;
  background: var(--bg-deep);
}
.pg-member .rec__portrait img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center 15%;
  filter: grayscale(1) brightness(0.95) contrast(1.16);
}
/* Hue and saturation from the navy, luminance from the photograph. */
.pg-member .rec__portrait::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: var(--bg); mix-blend-mode: color; opacity: 0.58;
}

.pg-member .rec__ident { padding: 26px 0 0; }
.pg-member .rec__name {
  margin: 0; font-size: 1.5rem; font-weight: 500;
  letter-spacing: -0.028em; line-height: 1.12; color: var(--text-strong);
}
.pg-member .rec__handle {
  margin: 7px 0 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.86rem; font-weight: 400; letter-spacing: 0.01em; color: var(--sky);
}
.pg-member .rec__role {
  margin: 22px 0 0;
  font-size: 0.95rem; font-weight: 400; line-height: 1.5;
  color: rgba(227, 229, 232, 0.82);
}
.pg-member .rec__exp {
  margin: 4px 0 0;
  font-size: 0.9rem; font-weight: 300; line-height: 1.5;
  color: rgba(227, 229, 232, 0.5);
}

.pg-member .rec__links {
  list-style: none; margin: 24px 0 0; padding: 20px 0 0;
  border-top: 1px solid var(--line);
  display: grid; gap: 11px;
}
.pg-member .rec__links a {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.88rem; font-weight: 400; text-decoration: none;
  color: rgba(227, 229, 232, 0.66);
  transition: color 0.22s var(--ease);
}
.pg-member .rec__links a:hover { color: var(--sky); }
.pg-member .rec__links svg {
  width: 15px; height: 15px; flex: none;
  color: rgba(227, 229, 232, 0.38);
  transition: color 0.22s var(--ease);
}
.pg-member .rec__links a:hover svg { color: var(--sky); }

/* ---- prose ---- */
.pg-member .rec-lead { max-width: 64ch; }
.pg-member .rec-lead p {
  margin: 0;
  font-size: clamp(1.08rem, 1.4vw, 1.26rem);
  font-weight: 300; line-height: 1.62; letter-spacing: -0.008em;
  color: rgba(227, 229, 232, 0.95);
}
.pg-member .rec-lead strong { color: var(--text-strong); font-weight: 500; }
.pg-member .rec-bio { margin-top: 20px; max-width: 68ch; }
.pg-member .rec-bio p { margin: 0 0 15px; font-weight: 300; line-height: 1.75; }
.pg-member .rec-bio p:last-child { margin-bottom: 0; }
.pg-member .rec-bio strong { color: var(--text-strong); font-weight: 500; }

/* ---- compact sections ---- */
.pg-member .rec-sec {
  margin-top: clamp(26px, 3vw, 36px);
  padding-top: clamp(20px, 2.4vw, 26px);
  border-top: 1px solid var(--line);
}
.pg-member .rec-h2 {
  margin: 0 0 14px; font-size: 0.8rem; font-weight: 400;
  color: rgba(227, 229, 232, 0.45);
}

/* Certifications: one flowing mono list, divided by hairlines. */
.pg-member .certs {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; row-gap: 8px;
}
.pg-member .certs li {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.83rem; font-weight: 400; letter-spacing: 0.02em; line-height: 1.35;
  color: rgba(227, 229, 232, 0.88);
  padding: 0 12px; border-left: 1px solid var(--line);
}
.pg-member .certs li:first-child { padding-left: 0; border-left: 0; }
/* Qualifier, not a credential: set in the body face so it reads as prose. */
.pg-member .certs .certs__more {
  font-family: var(--font); font-style: italic; font-size: 0.9rem;
  letter-spacing: 0; color: rgba(227, 229, 232, 0.5);
}

.pg-member .rec-edu {
  margin: 0; font-size: 0.96rem; font-weight: 300; line-height: 1.5;
  color: rgba(227, 229, 232, 0.88);
}

.pg-member .rec-back {
  margin: clamp(30px, 3.6vw, 44px) 0 0;
  padding-top: clamp(18px, 2.2vw, 24px);
  border-top: 1px solid var(--line);
}
.pg-member .rec-back .link-arrow { font-weight: 500; font-size: 0.92rem; }
.pg-member .rec-back .link-arrow .ico { transform: rotate(180deg); }
.pg-member .rec-back .link-arrow:hover .ico { transform: rotate(180deg) translateX(4px); }

/* ===========================================================================
   Narrow viewports
   =========================================================================== */
@media (max-width: 1040px) {
  .pg-team .dir__row { grid-template-columns: 148px minmax(0, 1fr) 24px; }
  .pg-team .dir__portrait { width: 148px; }
  .pg-team .dir__facts {
    grid-column: 2 / 3; grid-row: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
  }
}

@media (max-width: 860px) {
  /* Identity stops being sticky and sits inline above the content. */
  .pg-member .rec { grid-template-columns: 1fr; gap: 26px; }
  .pg-member .rec__aside { position: static; }
  .pg-member .rec__card {
    display: grid; grid-template-columns: 132px minmax(0, 1fr);
    gap: 16px; align-items: center;
  }
  .pg-member .rec__portrait { aspect-ratio: 1 / 1; }
  .pg-member .rec__ident { padding: 0 4px 0 0; }
}

@media (max-width: 760px) {
  .pg-team .dir__row {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 18px 20px; align-items: start;
  }
  .pg-team .dir__portrait { width: 96px; }
  .pg-team .dir__facts { grid-column: 1 / -1; grid-row: auto; }
  .pg-team .dir__go { display: none; }

  .pg-member .rec-strip { grid-template-columns: 1fr; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .pg-team .dir__row,
  .pg-team .dir__portrait img,
  .pg-team .dir__go,
  .link-arrow .ico { transition: none; }
  .pg-team .dir__row:hover .dir__go { transform: none; }
}
