/* =============================================================
   barrio_npm_prototype — Researcher profile modal (#np-researcher-modal)
   Shared chrome — rail researcher cards (project + person pages).
   JS: js/detail-modals.js (barrioNpmResearcherModal).
   (Extracted from project-detail.css.)
   ============================================================= */

/* ---------- Researcher profile modal ----------
   Click-to-expand modal for the rail's researcher cards. JS in
   js/detail-modals.js (barrioNpmResearcherModal behaviour) clones the
   per-card <template> content into .np-researcher-modal-slot on
   show.bs.modal. Layout is portrait-left + content-right at desktop;
   stacks image-on-top + content-below at <576px. */
.np-researcher-modal .modal-content {
  background: #fff;
  border: 0;
  border-top: 4px solid var(--hue);
  border-radius: 8px;
  padding: 28px 32px 24px;
  position: relative;
}
.np-researcher-modal .np-researcher-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  opacity: .7;
}
.np-researcher-modal .np-researcher-close:hover {
  opacity: 1;
}

/* Top section — image + heading group. CSS Grid keeps the image at
   a fixed 220px column at desktop; collapses to a single-column stack
   at <576px so the portrait sits above the name on phone. */
.np-profile-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 20px;
}
.np-profile-image {
  border-radius: 8px;
  overflow: hidden;
  background: #f1ece1;
  aspect-ratio: 1 / 1;
}
.np-profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.np-profile-head {
  min-width: 0;
}
.np-profile-name {
  font-weight: 700;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -.2px;
  margin: 0 0 14px;
  color: #2c2c2b;
}

/* Meta rows — labelled groups under the name. Mirror the rail's
   key/value pattern but tuned for the modal's wider space. */
.np-profile-meta-row {
  margin-bottom: 10px;
}
.np-profile-meta-row:last-child {
  margin-bottom: 0;
}
.np-profile-meta-key {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #6c675f;
  margin-bottom: 2px;
}
.np-profile-meta-value {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  color: #2c2c2b;
}

/* Body — full HTML rendered through check_markup. Reuses the same
   typography rhythm as .np-project-body but at a more compact size
   that fits the modal's reading width. */
.np-profile-body {
  font-size: 14.5px;
  line-height: 1.6;
  color: #2c2c2b;
  margin-bottom: 18px;
  padding-top: 18px;
  border-top: 1px solid #e4e0d8;
}
.np-profile-body p {
  margin: 0 0 12px;
}
.np-profile-body p:last-child {
  margin-bottom: 0;
}
.np-profile-body a {
  color: var(--hue-dk);
}
.np-profile-body a:hover {
  text-decoration: underline;
}
.np-profile-body ul,
.np-profile-body ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

/* View-full-profile link at the modal bottom — Pātai-hued anchor
   underneath the body. Acts as the modal's primary CTA. */
.np-profile-link {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid #e4e0d8;
}
.np-profile-link a {
  font-weight: 700;
  color: var(--hue-dk);
  text-decoration: none;
}
.np-profile-link a:hover {
  text-decoration: underline;
}

@media (max-width: 575.98px) {
  /* Stack image-on-top, content-below at phone width. Image shrinks
     to match the column width but stays square via aspect-ratio. */
  .np-researcher-modal .modal-content {
    padding: 22px 22px 18px;
  }
  .np-profile-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .np-profile-image {
    max-width: 200px;
  }
  .np-profile-name {
    font-size: 20px;
  }
}
