/* Expert full node display — 8-column × 4-row grid ======================= */

.expert-full {
  --expert-content-width: 100%;
  max-width:1150px;
  justify-self:center;
}

body:has(.expert-full) #page-title {
  --r-bg: var(--at-grey-bg);
  --r-h1: var(--at-aqua-on-grey);
}

.expert-full__grid,
.expert-full__featured-publications,
.expert-full__publications {
  width: 100%;
  max-width: var(--expert-content-width);
  margin-inline: auto;
}

.expert-full__grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(4, auto);
  column-gap: 0.5rem;
  row-gap: 0.5rem;
}

/* col 1-3, rows 1-2 */
.expert-full__headshot    { grid-column: 1 / 4; grid-row: 1 / 4; align-self: start; max-width: 425px; }
/* col 4-7, rows 1-2 — the "4 × 2" cell in the design */
.expert-full__name-row    { grid-column: 4 / 9; grid-row: 1 / 3; align-self: start; }
/* col 1-3, rows 3-4 */
.expert-full__card        { grid-column: 1 / 4; grid-row: 4 / 5; align-self: stretch; max-width: 425px; }
/* col 4-7, row 3 */
.expert-full__topics-row  { grid-column: 4 / 9; grid-row: 3;     align-self: start; }
/* col 4-8, row 4 */
.expert-full__bio-wrapper {
  grid-column: 4 / 8;
  grid-row: 4;
  align-self: stretch;
  border-left: 3px solid var(--at-aqua-bg);
  padding-top: 1.25rem;
  padding-left: 1.5rem;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.expert-full__headshot {
  margin-bottom: 0;
  line-height: 0; /* collapse whitespace under the image */
  width:100%;
}

/* Override Solo's width:100% on the clickable-image wrapper. */
.expert-full__headshot a.img--is-clickable {
  display: block;
  overflow: hidden;
  border-radius: 4px 4px 0 0;
}

.expert-full__headshot a.img--is-clickable > img.solo-image,
.expert-full__headshot a.img--is-clickable > picture > img.solo-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  float: none;
  animation: none;
}

/* Fallback for non-linked images. */
.expert-full__headshot img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center center;
  display: block;
  border-radius: 4px 4px 0 0;
}

.expert-full__card {
  background-color: var(--at-aqua-bg);
  border-radius: 0 0 25px 25px;
  padding: 1.25rem 1.25rem 1.5rem;
  color:var(--at-aqua-text);
  width:100%;
}

.expert-full__positions {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Double Field: each position rendered as "role | org" */
.expert-full__positions .field__item {
  font-size:1.2rem;
}

.expert-full__meta-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: baseline;
  /*margin-bottom: 0.5rem;
  font-size: .95rem;*/
}

.expert-full__label {
  font-weight: 600;
  white-space: nowrap;
}

.page-wrapper .expert-full__language-label,
.page-wrapper .expert-full__contact-heading {
  font-family: var(--at-font-heading);
  font-size: 18px;
  font-weight: 600;
}

.expert-full__meta-value {
  color: inherit;
}

/* Strip the wrapper <div> margin Drupal adds to inline field values */
.expert-full__meta-value .field,
.expert-full__meta-value .field__items {
  display: inline;
}

.expert-full__meta-value .field__item {
  display: inline;
}

.expert-full__meta-value .field__item + .field__item::before {
  content: ' ';
}

.expert-full__contact {
  margin-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  padding-top: 0.75rem;
}

.expert-full__contact-heading {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.expert-full__social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.expert-full__social-link {
  margin: 0;
}

.expert-full__social-link > .sm-icon {
  display: block;
  width: 2rem;
  height: 2rem;
  fill: var(--at-aqua-text);
  color: var(--at-aqua-text);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.expert-full__social-links .expert-full__social-link svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: var(--at-aqua-text);
}

.expert-full__social-link > .sm-icon:hover {
  transform: scale(1.3);
  background: var(--at-aqua-bg);
}

.expert-full__social-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.expert-full__website {
  margin-top: 0.25rem;
  font-size: 0.9rem;
}

/* ── Main content ────────────────────────────────────────────────────────── */

.expert-full__name-row {
  padding-top: 0.25rem;
  padding-left:2rem;
  align-self: end;
}

/* font-size, font-family, color, font-weight inherited from global .page-wrapper h1 */
.expert-full__name {
  line-height: 1.15;
  margin: 0;
  letter-spacing:-3%;
}

.expert-full__topics-row {
  margin-top: 1.25rem;
  align-self: end;
  padding-left:2rem;
}

.expert-full__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.expert-full__bio {
  font-size: 1rem;
  line-height: 1.7;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 12;
  -webkit-box-orient: vertical;
  transition: none;
}

.expert-full__bio p:first-of-type {
  margin-top: 0;
}

.expert-full__bio--expanded {
  display: block;
  overflow: visible;
}

/* hidden when content is short enough to not need clamping */
.expert-full__bio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--at-font-body);
  /*font-size: 0.9rem;*/
  font-weight: 600;
  color: var(--at-heading-color);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.expert-full__bio-toggle:hover {
  color: var(--at-accent);
}

.expert-full__bio-toggle[hidden] {
  display: none;
}

/* ── Featured publications (dark card row) ───────────────────────────────── */

.expert-full__featured-publications {
  background-color: var(--at-dk-aqua-bg);
  padding: 3rem 1.5rem;
  color: var(--at-page-bg);
  margin-top:1rem;
  margin-bottom:1rem;
}

/* higher specificity (0,2,0) beats global .page-wrapper p (0,1,1) */
.expert-full__featured-publications .expert-full__fp-heading {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--at-page-bg);
  /*margin: 0 0 1.75rem;*/
}

.expert-full__fp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0 3em;
  /*max-width: 1000px;*/
  justify-self: center;
}

.expert-full__fp-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 15rem;
  padding: 1.5em;
  font-family: var(--at-font-body);
}

.expert-full__fp-card:first-child { padding-left: 0; }
.expert-full__fp-card:last-child  { padding-right: 0; }

.expert-full__fp-card:not(:last-child) {
  border-right: 1px solid var(--at-aqua-bg);
}

/* higher specificity (0,2,0) beats global .page-wrapper h3 (0,1,1) */
.expert-full__featured-publications .expert-full__fp-title {
  /*font-size: 1.3rem;
  font-weight: 600;*/
  color: var(--at-dk-aqua-text);
  line-height: 1.35;
  /*margin: 0 0 1rem;*/
}

.expert-full__fp-citation {
  font-size: 0.875rem;
  color: var(--at-page-bg);
  flex: 1;
  padding: 1.5rem 0;
}

.expert-full__fp-publication-meta {
  line-height: 1.2;
  padding: 1rem 0;
}

/* specificity 0,2,1 beats .page-wrapper p (0,1,1) and forces color through */
.expert-full__featured-publications .expert-full__fp-citation p {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--at-page-bg);
  margin: 0;
}

/* specificity 0,2,1 matches Solo's .page-wrapper a:not(...) 0,2,1; loads later so wins */
.page-wrapper .expert-full__featured-publications a,
.page-wrapper .expert-full__featured-publications a:visited {
  color: var(--at-dk-aqua-text);
  text-decoration: none;
}

.expert-full__fp-btn,
.expert-full__fp-btn:visited {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--at-aqua-bg);
  /*font-size: 0.875rem;*/
  transition: background-color 0.15s;
  align-self: flex-start;
}

.expert-full__fp-btn:hover {
  background-color: var(--at-dk-aqua-text);
}

@media (max-width: 991px) {
  .expert-full__fp-grid {
    grid-template-columns: 1fr;
  }

  .expert-full__fp-card {
    min-height: 15rem;
    padding: 1.5rem 0 2rem;
    border-right: none;
    border-bottom: 1px solid var(--at-aqua-bg);
  }

  .expert-full__fp-card:last-child {
    padding-bottom: 0;
    border-bottom: none;
  }
}

/* ── All publications ────────────────────────────────────────────────────── */

.expert-full__publications {
  margin-top: 3rem;
  border-top: 2px solid var(--at-heading-color);
  padding-top: 1.25rem;
}

.page-wrapper .expert-full__add-publication,
.page-wrapper .expert-full__add-publication:visited,
.page-wrapper .expert-full__add-publication:hover,
.page-wrapper .expert-full__add-publication:focus-visible {
  color: #fff !important;
}
/* higher specificity (0,2,0) beats global .page-wrapper h2 (0,1,1) */
.expert-full__publications .expert-full__publications-heading {
  /****font-size: 1.4rem;
  margin-bottom: 1rem;****/
  color: var(--at-heading-color);
}

.expert-full__publication-list,
.expert-full__publications .item-list > ul.solo-ul {
  margin: 0;
  padding-left: 3em;
  list-style: none;
}

.expert-full__publication-item {
  margin: 0 0 0.75rem;
}

.expert-full__publication-title-line,
.expert-full__publication-meta {
  line-height: 1.5;
}

.expert-full__publication-title {
  font-size: 1.2rem;
  text-decoration: underline;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
  .expert-full__grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  /* Restore natural document order on mobile */
  .expert-full__headshot    { grid-column: 1; grid-row: 1; }
  .expert-full__name-row    { grid-column: 1; grid-row: 2; padding-left: 0; }
  .expert-full__topics-row  { grid-column: 1; grid-row: 3; padding-left: 0; }
  .expert-full__card        { grid-column: 1; grid-row: 4; }
  .expert-full__bio-wrapper { grid-column: 1; grid-row: 5; border-left: none; padding-top: 0; padding-left: 0; }

  .expert-full__name {
    font-size: 2rem;
  }

}
