/*
 * NK Civic Hybrid v2.0.4 — PROFILE / MESSAGE portrait safety.
 * Preserve the subject's head at the top when the photograph is cropped.
 * This layer loads LAST and intentionally affects ONLY the profile portrait.
 * Keep #7D003D branding unchanged.
 */
#profile .nk-about-picture {
  /* Existing mobile max-height clamps could crop the face when resizing. */
  position: relative;
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 480px;
  max-height: none;
  height: auto;
  min-height: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #F2EEF0;
  margin-inline: auto;
}
#profile .nk-about-picture > img {
  /* Anchored against the TOP edge. Any crop happens at the BOTTOM. */
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-height: 0;
  object-fit: cover;
  object-position: 50% 0%;
  transform: none;
}
/* Preserve the existing PROFILE placeholder if no picture has been chosen. */
#profile .nk-about-picture > .placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
@media (max-width: 800px) {
  #profile .nk-about-picture {
    width: min(100%, 420px);
    max-width: 420px;
    max-height: none;
    /* Slightly shorter than the original portrait on mobile: crop bottom. */
    aspect-ratio: 4 / 4.65;
  }
}
@media (max-width: 600px) {
  #profile .nk-about-picture {
    width: min(100%, 360px);
    max-width: 360px;
    max-height: none;
    aspect-ratio: 4 / 4.65;
  }
}
@media (max-width: 360px) {
  #profile .nk-about-picture {
    /* More vertical room on narrow devices without covering the head. */
    aspect-ratio: 4 / 4.8;
  }
}
