/** Hamed Academic Dashboard 5.0.4 — recovery, feed, typography and credential refinements. */

/* --------------------------------------------------------------------------
   Home identity — use the available vertical space while keeping clean rhythm
   -------------------------------------------------------------------------- */
@media (min-width: 1101px) {
  .had-home-v320 > .had-profile-card .had-profile-copy {
    padding: 13px 16px 10px !important;
    gap: 0 !important;
  }
  .had-home-v320 > .had-profile-card .had-profile-copy .had-kicker {
    margin: 0 0 5px !important;
    font-size: 9.5px !important;
    line-height: 1.25 !important;
    letter-spacing: .13em !important;
  }
  .had-home-v320 > .had-profile-card .had-profile-copy h1 {
    margin: 0 0 3px !important;
    font-size: clamp(27px, 1.95vw, 36px) !important;
    line-height: 1.06 !important;
    letter-spacing: -.035em !important;
  }
  .had-home-v320 > .had-profile-card .had-profile-role {
    margin: 0 0 7px !important;
    font-size: 11.5px !important;
    line-height: 1.3 !important;
  }
  .had-home-v320 > .had-profile-card .had-profile-interests {
    margin-top: 2px !important;
    padding-top: 8px !important;
  }
  .had-home-v320 > .had-profile-card .had-profile-interests > small,
  .had-home-v320 > .had-profile-card .had-profile-languages > small {
    display: block !important;
    margin: 0 0 6px !important;
    font-size: 8.5px !important;
    line-height: 1.25 !important;
    letter-spacing: .13em !important;
  }
  .had-home-v320 > .had-profile-card .had-profile-interests > div {
    gap: 6px !important;
  }
  .had-home-v320 > .had-profile-card .had-profile-interests span {
    min-height: 24px !important;
    padding: 5px 8px !important;
    font-size: 9.25px !important;
    line-height: 1.15 !important;
  }
  .had-home-v320 > .had-profile-card .had-profile-languages {
    margin-top: 8px !important;
    padding-top: 8px !important;
  }
  .had-home-v320 > .had-profile-card .had-profile-languages > div {
    gap: 6px !important;
  }
  .had-home-v320 > .had-profile-card .had-profile-languages span {
    min-height: 39px !important;
    padding: 6px 8px !important;
  }
  .had-home-v320 > .had-profile-card .had-profile-languages b {
    font-size: 9.25px !important;
    line-height: 1.2 !important;
  }
  .had-home-v320 > .had-profile-card .had-profile-languages em {
    margin-top: 2px !important;
    font-size: 7.5px !important;
    line-height: 1.15 !important;
  }
}

/* --------------------------------------------------------------------------
   Copyright — requested left alignment on every screen
   -------------------------------------------------------------------------- */
.had-site-copyright {
  justify-content: flex-start !important;
  text-align: left !important;
  padding-left: 18px !important;
}

/* --------------------------------------------------------------------------
   Research project index — give long titles/roles their own rows
   -------------------------------------------------------------------------- */
.had-project-record-index .had-record-index-scroll {
  padding-right: 3px !important;
}
.had-project-record-index .had-project-index-row {
  min-height: 122px !important;
  grid-template-columns: 34px minmax(0, 1fr) 18px !important;
  align-items: start !important;
  padding: 12px 11px !important;
  gap: 10px !important;
}
.had-project-record-index .had-project-index-row > span:nth-child(2) {
  min-width: 0 !important;
  display: grid !important;
  grid-template-rows: auto auto auto !important;
  align-content: start !important;
  gap: 4px !important;
}
.had-project-record-index .had-project-index-row label {
  display: block !important;
  margin: 0 !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
}
.had-project-record-index .had-project-index-row b {
  display: -webkit-box !important;
  margin: 0 !important;
  min-height: 0 !important;
  font-size: 12.5px !important;
  line-height: 1.28 !important;
  white-space: normal !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
}
.had-project-record-index .had-project-index-row em {
  display: -webkit-box !important;
  margin: 0 !important;
  font-size: 9.5px !important;
  line-height: 1.3 !important;
  white-space: normal !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}
.had-project-record-index .had-project-index-row > .dashicons {
  align-self: center !important;
}

/* --------------------------------------------------------------------------
   Credential index — same visual language as the other record selectors
   -------------------------------------------------------------------------- */
.had-credential-list .had-credential-scroll > button {
  min-height: 72px !important;
  padding: 10px 12px !important;
  border-left: 2px solid transparent !important;
  background: transparent !important;
  color: #d8e9ef !important;
  transition: background .18s ease, border-color .18s ease, color .18s ease !important;
}
.had-credential-list .had-credential-scroll > button > span:first-child {
  color: #35cce1 !important;
  font-size: 9px !important;
}
.had-credential-list .had-credential-scroll > button b {
  color: #e8f3f7 !important;
  font-size: 12.5px !important;
  line-height: 1.28 !important;
  font-weight: 750 !important;
}
.had-credential-list .had-credential-scroll > button small {
  margin-top: 4px !important;
  color: #7fa2b2 !important;
  font-size: 10px !important;
  line-height: 1.32 !important;
  letter-spacing: 0 !important;
}
.had-credential-list .had-credential-scroll > button.is-active,
.had-credential-list .had-credential-scroll > button:hover,
.had-credential-list .had-credential-scroll > button:focus-visible {
  border-left-color: var(--had-cyan, #22d3ee) !important;
  background: rgba(34, 211, 238, .09) !important;
}
.had-credential-list .had-credential-scroll > button.is-active b,
.had-credential-list .had-credential-scroll > button:hover b,
.had-credential-list .had-credential-scroll > button:focus-visible b {
  color: #fff !important;
}
.had-credential-list .had-credential-scroll > button.is-active small {
  color: #9bc4d1 !important;
}

/* --------------------------------------------------------------------------
   Credential certificates — whole certificate, large and uncropped
   -------------------------------------------------------------------------- */
.had-credentials-v3 .had-credential-certificate,
.had-detail-drawer.is-credential-record .had-record-cover {
  padding: 12px !important;
}
.had-credentials-v3 .had-credential-certificate::before,
.had-detail-drawer.is-credential-record .had-record-cover::before {
  inset: 8px !important;
  border-radius: 5px !important;
  background: #fff !important;
}
.had-credentials-v3 .had-credential-certificate .had-credential-image,
.had-credentials-v3 .had-credential-certificate.is-portrait .had-credential-image,
.had-credentials-v3 .had-credential-certificate.is-landscape .had-credential-image,
.had-credentials-v3 .had-credential-certificate.is-square .had-credential-image,
.had-detail-drawer.is-credential-record .had-record-cover img,
.had-detail-drawer.is-credential-record .had-record-cover.is-portrait img,
.had-detail-drawer.is-credential-record .had-record-cover.is-landscape img,
.had-detail-drawer.is-credential-record .had-record-cover.is-square img {
  width: calc(100% - 12px) !important;
  height: calc(100% - 12px) !important;
  max-width: calc(100% - 12px) !important;
  max-height: calc(100% - 12px) !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: #fff !important;
  filter: drop-shadow(0 7px 12px rgba(0, 24, 38, .12)) !important;
  transform: none !important;
}
.had-credentials-v3 .had-credential-certificate:hover .had-credential-image,
.had-credentials-v3 .had-credential-certificate:focus-within .had-credential-image,
.had-detail-drawer.is-credential-record .had-record-cover:hover img {
  transform: none !important;
}
.had-detail-drawer.is-credential-record .had-record-cover .had-media-motion,
.had-detail-drawer.is-credential-record [data-had-detail-permalink] {
  display: none !important;
}
.had-detail-drawer.is-credential-record .had-record-cover {
  height: clamp(390px, 60vh, 535px) !important;
}

@media (max-width: 900px) {
  .had-credentials-v3 .had-credential-certificate,
  .had-detail-drawer.is-credential-record .had-record-cover {
    padding: 10px !important;
  }
  .had-project-record-index .had-project-index-row {
    min-height: 102px !important;
  }
}
@media (min-width: 901px) {
  .had-detail-drawer.is-credential-record .had-drawer-body {
    grid-template-columns: minmax(360px, 430px) minmax(0, 1fr) !important;
    gap: 26px !important;
  }
}
