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

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

.expert-full .frontend-editing__action--edit {
  opacity: 1;
  margin-left: 10px;
}

.expert-full.frontend-editing:hover .frontend-editing-actions .title-edit-container {
  display: block;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:has(.expert-full) #page-title {
  --r-bg: var(--at-grey-bg);
  --r-h1: var(--at-aqua-on-grey);
  display: grid;
  max-width: none;
  overflow: visible;
  padding: 0;
  color: var(--r-tx);
  font-size: 1rem;
  font-weight: 400;
  hyphens: manual;
  letter-spacing: normal;
  line-height: 2rem;
  text-overflow: clip;
  transition: none;
  white-space: normal;
  border-bottom:3px solid var(--at-heading-color);
}

.page-wrapper #page-title .field--name-body.emerging-expert-page-title h2 {
  color: var(--at-grey-heading);
}

body:has(.expert-full) #page-title-inner {
  padding-block: 3em;
}

body:has(.expert-full) #block-solo-forumarmstrade-expert-page-title {
  padding-block: 0;
}

body.page-node-type-expert #block-solo-forumarmstrade-primary-local-tasks {
  display: none;
}

body:has(.expert-full) #sidebar-box-main > .region-inner {
  padding: 0;
}

.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.5em;
  row-gap: 1em;
}

/* 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;
}

/* ── Profile image and details ──────────────────────────────────────────── */

.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);
  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: 1em;
  flex-wrap: wrap;
  align-items: baseline;
  /*margin-bottom: 0.5rem;
  font-size: .95rem;*/
}

.expert-full__label {
  font-family: var(--at-font-heading);
  font-size: 18px;
  font-weight: bold;
  white-space: nowrap;
  margin-top:1em;
}

.expert-full__contact-detail-label {
  font-weight: 700;
  white-space: nowrap;
}

.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__meta-value .field--name-field-language .field__item + .field__item::before {
  content: ' | ';
  white-space: pre;
}

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

.expert-full__contact > .expert-full__label {
  display: block;
  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 {
  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;
}

/* 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;*/
}

/*Featured Publications Inner grid*/
.expert-full__fp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding:1em 3em;
  justify-self: center;
  column-gap:2em;
}

/*Featured Publication card*/
.expert-full__fp-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /*min-height: 15rem;*/
  padding: .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 > .expert-featured-marker {
  align-self: flex-end;
}

.expert-full__fp-card.expert-featured-slot:focus-within {
  outline: 3px solid #fff;
  outline-offset: -3px;
}

/*.expert-full__fp-card--has-next {
  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 {
  color: var(--at-dk-aqua-text);
  line-height: 1.35;
}

.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: .5em 0 3em 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;
}

.page-wrapper .expert-full__featured-publications a.button {
  border-color: currentColor;
  background-color: inherit;
}

.page-wrapper .expert-full__featured-publications .expert-full__fp-btn:hover,
.page-wrapper .expert-full__featured-publications .expert-full__fp-btn:focus-visible,
.page-wrapper .expert-full__featured-publications .expert-full__fp-btn:active {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--at-dk-aqua-text);
  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) {
  body:has(.expert-full) #page-title-inner {
    padding-block: 1.5rem;
  }

  body:has(.expert-full) #page-title #block-solo-forumarmstrade-expert-page-title h2 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .expert-full__grid {
    grid-template-columns: minmax(0, 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; }

  .page-wrapper .expert-full__name {
    font-size: 2rem;
    line-height: 1.15;
  }

}
