/*
 * TritonIQ Experts — the team page and the profile pages. Registered in
 * <head> before the skin's CSS, so a skin can override any rule with an equally specific one.
 * The profile follows the TritonIQ Article Manager's author page (articles.css), so the two modules
 * look alike on one site.
 *
 * Colours and fonts come from the site's tokens, with the Triton skin's defaults as fallbacks:
 *   --color-primary #9E2065  --color-secondary #00ABD8  --color-dark-shade #222  --color-light-shade #E6E6E6
 *   --font-headline / --font-body: the skin's own fonts when unset.
 */

.tiq-experts,
.tiq-expert {
  --tiq-primary: var(--color-primary, #9e2065);
  --tiq-secondary: var(--color-secondary, #00abd8);
  --tiq-dark: var(--color-dark-shade, #222);
  --tiq-light: var(--color-light-shade, #e6e6e6);
}

/* --- Editor toolbar (editors only) ---------------------------------------- */
.tiq-experts .tiq-toolbar,
.tiq-expert .tiq-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 16px;
}

.tiq-experts .tiq-toolbar__status,
.tiq-expert .tiq-toolbar__status {
  margin-right: auto;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fff4d6;
  color: #7a4b00;
  font-size: 0.85rem;
  font-weight: 700;
}

.tiq-experts .tiq-toolbar__button,
.tiq-expert .tiq-toolbar__button {
  font: inherit;
  font-size: 0.875rem;
  padding: 6px 14px;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.tiq-experts .tiq-empty,
.tiq-expert .tiq-empty {
  padding: 32px 0;
  text-align: center;
  opacity: 0.75;
}

/* --- Team page ------------------------------------------------------------ */
.tiq-experts {
  padding-top: 32px;
  padding-bottom: 32px;
}

.tiq-experts__head {
  max-width: 760px;
  margin: 0 auto 40px;
  text-align: center;
}

.tiq-experts__title {
  margin: 0;
  font-family: var(--font-headline);
}

.tiq-experts__intro {
  margin-top: 12px;
  font-family: var(--font-body);
  font-size: 1.075rem;
  line-height: 1.7;
}

.tiq-experts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 32px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tiq-expert-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: center;
  font-family: var(--font-body);
}

.tiq-expert-card.is-draft {
  opacity: 0.6;
}

.tiq-expert-card__media {
  width: 180px;
  height: 180px;
  margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  background: color-mix(in srgb, var(--tiq-primary) 12%, #fff);
  box-shadow: 0 0 0 5px #fff, 0 0 0 7px var(--tiq-primary);
  transition: box-shadow 0.2s ease;
}

.tiq-expert-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tiq-expert-card__initials {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--tiq-primary);
  font-family: var(--font-headline);
  font-size: 3rem;
  font-weight: 700;
}

.tiq-expert-card__draft {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fff4d6;
  color: #7a4b00;
  font-size: 0.75rem;
  font-weight: 700;
}

.tiq-expert-card__name {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 1.3rem;
  line-height: 1.2;
}

.tiq-expert-card__name a {
  color: inherit;
  text-decoration: none;
}

/* The whole card is the name's link. */
.tiq-expert-card__name a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.tiq-expert-card__name a:focus-visible {
  outline: none;
}

.tiq-expert-card:focus-within .tiq-expert-card__media,
.tiq-expert-card:hover .tiq-expert-card__media {
  box-shadow: 0 0 0 5px #fff, 0 0 0 7px var(--tiq-secondary);
}

.tiq-expert-card:focus-within {
  outline: 3px solid var(--tiq-secondary);
  outline-offset: 8px;
  border-radius: 8px;
}

.tiq-expert-card__title {
  margin: 6px 0 0;
  color: var(--tiq-primary);
  font-family: var(--font-headline);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tiq-expert-card__summary {
  margin: 10px 0 0;
  line-height: 1.6;
}

.tiq-expert-card__topics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.tiq-expert-card__topics li,
.tiq-expert__chips li {
  padding: 3px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tiq-dark) 7%, transparent);
  font-size: 0.8rem;
  font-weight: 600;
}

/* --- Profile page --------------------------------------------------------- */
.tiq-expert {
  padding-top: 32px;
  padding-bottom: 32px;
}

.tiq-expert__card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px 40px;
  max-width: 880px;
  margin: 0 auto 32px;
}

.tiq-expert__photo {
  flex: none;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 6px #fff, 0 0 0 8px var(--tiq-primary);
}

.tiq-expert__intro {
  flex: 1 1 320px;
  min-width: 0;
}

.tiq-expert__name {
  margin: 0;
  font-family: var(--font-headline);
  line-height: 1.15;
}

.tiq-expert__title {
  margin: 8px 0 0;
  color: var(--tiq-primary);
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tiq-expert__summary {
  margin: 14px 0 0;
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.6;
}

.tiq-expert__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.tiq-expert .tiq-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px currentColor;
  color: inherit;
  font-family: var(--font-headline);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: box-shadow 0.2s ease, color 0.2s ease;
}

.tiq-expert .tiq-pill:hover {
  box-shadow: inset 0 0 0 2px var(--tiq-secondary);
  color: var(--tiq-secondary);
}

.tiq-expert .tiq-pill:focus-visible {
  outline: 3px solid var(--tiq-secondary);
  outline-offset: 2px;
}

.tiq-expert__bio {
  max-width: 880px;
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: 1.075rem;
  line-height: 1.7;
}

.tiq-expert__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px 48px;
  max-width: 880px;
  margin: 40px auto 0;
  font-family: var(--font-body);
}

.tiq-expert__heading {
  margin: 0 0 14px;
  font-family: var(--font-headline);
  font-size: 1.35rem;
}

.tiq-expert__heading--center {
  margin: 56px 0 24px;
  text-align: center;
}

.tiq-expert__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tiq-expert__credentials {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tiq-expert__credentials li {
  position: relative;
  padding: 8px 0 8px 28px;
  border-bottom: 1px solid color-mix(in srgb, var(--tiq-dark) 10%, transparent);
}

.tiq-expert__credentials li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.95em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--tiq-primary);
  border-bottom: 2px solid var(--tiq-primary);
  transform: rotate(-45deg);
}

.tiq-expert__posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tiq-expert-post {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px -12px rgba(0, 0, 0, 0.25);
  font-family: var(--font-body);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tiq-expert-post:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 14px 30px -12px rgba(0, 0, 0, 0.3);
}

.tiq-expert-post:focus-within {
  outline: 3px solid var(--tiq-secondary);
  outline-offset: 3px;
}

.tiq-expert-post__media {
  aspect-ratio: 16 / 10;
  background: var(--tiq-light);
}

.tiq-expert-post__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tiq-expert-post__body {
  padding: 18px 20px 22px;
}

.tiq-expert-post__date {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.7;
}

.tiq-expert-post__title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 1.15rem;
  line-height: 1.3;
}

.tiq-expert-post__title a {
  color: inherit;
  text-decoration: none;
}

.tiq-expert-post__title a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.tiq-expert-post__title a:focus-visible {
  outline: none;
}

.tiq-expert-post__summary {
  margin: 8px 0 0;
  line-height: 1.55;
}

.tiq-expert__back {
  margin: 40px 0 0;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 600;
}

@media (max-width: 575px) {
  .tiq-expert__card {
    flex-direction: column;
    text-align: center;
  }

  .tiq-expert__photo {
    width: 160px;
    height: 160px;
  }

  .tiq-expert__links {
    justify-content: center;
  }

}

@media (prefers-reduced-motion: reduce) {
  .tiq-expert-card__media,
  .tiq-expert-post,
  .tiq-expert .tiq-pill {
    transition: none;
  }

  .tiq-expert-post:hover {
    transform: none;
  }
}
