.contact {
  align-items: stretch;
}

.contact-profile {
  display: grid;
  grid-template-columns: minmax(7rem, clamp(8rem, 18vw, 15rem)) minmax(0, 1fr);
  gap: clamp(0.85rem, 2.4vw, 1.5rem);
  align-items: center;
  width: 100%;
  height: 100%;
  padding: var(--card-pad, clamp(0.875rem, 2.1svh, 1.5rem));
  border: 1px solid rgba(var(--section-accent-rgb), 0.36);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: inset 0 3px 0 var(--section-accent), var(--shadow);
}

.contact-photo {
  position: relative;
  width: min(100%, clamp(7rem, 18vw, 15rem));
  height: auto;
  aspect-ratio: 1 / 1;
  min-height: 0;
  justify-self: start;
  align-self: center;
  overflow: hidden;
  border: 1px solid rgba(var(--section-accent-rgb), 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(var(--section-accent-rgb), 0.12);
}

.contact-profile img {
  position: static;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: contain;
  object-position: center;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: none;
}

.contact-copy {
  align-self: center;
}

.contact-copy h2 {
  margin-right: 0;
}

.contact-form {
  width: 100%;
  height: 100%;
}

@media (max-width: 900px) {
  .contact {
    align-items: stretch;
  }

  .contact-profile {
    --contact-photo-width: min(30vw, 8.5rem) !important;
    grid-template-columns: var(--contact-photo-width) minmax(0, 1fr) !important;
    gap: 0.75rem !important;
    padding-left: 0 !important;
    height: auto;
  }

  .contact-photo {
    width: var(--contact-photo-width) !important;
    height: auto !important;
  }

  .contact-form {
    height: auto;
  }
}

@media (max-width: 520px) {
  .contact-profile {
    --contact-photo-width: min(31vw, 7.25rem) !important;
    padding: 0.55rem 0.55rem 0.55rem 0 !important;
  }

  .contact-pills {
    display: none;
  }
}
