@import url("shared.css");

/* A warmer green, scoped to the headshot and resume page. */
.resource-section {
  background: rgb(242, 230, 207);
}

/* Each heading row follows the actual image width, not the wider grid column. */
.resource-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(24px, 5vw, 80px);
}

.resource-grid > section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: fit-content;
  max-width: 100%;
  justify-self: center;
}

.resource-heading {
  /* Let the image determine this card's width, rather than the heading text. */
  contain: inline-size;
  min-width: 0;
  min-height: 52px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.resource-heading h2 {
  font-size: clamp(22px, 2.3vw, 30px);
}

.resource-heading .button {
  flex-shrink: 0;
  gap: 8px;
  padding: 10px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.resource-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: clamp(320px, 54vw, 720px);
  aspect-ratio: auto;
  object-fit: contain;
  object-position: top center;
  background: transparent;
  border: 0;
  padding: 0;
}

@media (max-width: 600px) {
  .resource-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 45px;
  }

  .resource-image {
    max-height: none;
  }
}
