.doctor-card {
  background: #e8e6e4;
  box-shadow: var(--shadow);
  display: block;
  min-height: 460px;
  overflow: hidden;
  position: relative;
}

.doctor-card > img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: center 18%;
  position: absolute;
  transition: transform 0.45s ease;
  width: 100%;
}

.doctor-card::after {
  background: linear-gradient(180deg, transparent 48%, rgb(52 37 31 / 82%) 100%);
  content: "";
  inset: 0;
  position: absolute;
}

.doctor-card:hover > img {
  transform: scale(1.025);
}

.doctor-card-copy {
  bottom: 0;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
  left: 0;
  padding: 32px;
  position: absolute;
  right: 0;
  z-index: 1;
}

.doctor-card-copy b {
  font-family: "Songti SC", STSong, "Noto Serif SC", serif;
  font-size: 29px;
  font-weight: 500;
}

.doctor-card-copy span {
  color: rgb(255 255 255 / 78%);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.doctor-profile {
  align-items: stretch;
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(180px, 230px) minmax(0, 1fr);
}

.doctor-portrait {
  background: #e8e6e4;
  border: 1px solid var(--line);
  margin: 0;
  overflow: hidden;
}

.doctor-portrait img {
  height: 100%;
  object-fit: cover;
  object-position: center 14%;
  width: 100%;
}

.doctor-profile .definition-box {
  height: 100%;
  margin: 0;
}

.doctor-profile .definition-box p:first-of-type {
  margin-top: 20px;
}

.doctor-profile .definition-box p:last-child {
  margin-bottom: 0;
}

.specialty-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.specialty-tags span {
  background: #f7f1eb;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brown);
  font-size: 14px;
  line-height: 1.5;
  padding: 8px 14px;
}

.specialty-note {
  color: var(--taupe);
  font-size: 14px;
}

@media (width <= 980px) {
  .doctor-card {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }
}

@media (width <= 640px) {
  .doctor-card {
    aspect-ratio: 0.92 / 1;
  }

  .doctor-card-copy {
    padding: 24px;
  }

  .doctor-card-copy b {
    font-size: 26px;
  }

  .doctor-profile {
    gap: 24px;
    grid-template-columns: 1fr;
  }

  .doctor-portrait {
    max-width: 280px;
    width: 100%;
  }

  .doctor-portrait img {
    aspect-ratio: 0.86 / 1;
    height: auto;
  }

  .doctor-profile .definition-box {
    height: auto;
  }

  .specialty-tags {
    gap: 8px;
  }

  .specialty-tags span {
    font-size: 13px;
    padding: 7px 12px;
  }
}
