/* =============================================================
   ITI Design System — Personnel listing
   Loaded only on the two personnel pages (EL + EN).

   A directory, not a feed: people are scanned by name and role, so the
   cards are compact and set in a grid that keeps two columns at the widths
   the old page used, and one when there is no room.
   ============================================================= */

.peo { font-family: var(--iti-font-sans); }

/* =========================================================
   Groups
   ========================================================= */

.peo section { margin-bottom: var(--iti-s-7); }
.peo section:last-child { margin-bottom: 0; }

/* The section headings, under the .toc class and the toc1-toc7 ids they
   had before — the rail links to those ids. */
.peo .toc {
  scroll-margin-top: var(--iti-anchor-offset);
  margin: 0 0 var(--iti-s-4);
  padding-bottom: var(--iti-s-3);
  font-size: clamp(1.15rem, 1rem + .6vw, 1.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--iti-text);
  border-bottom: 1px solid var(--iti-line-strong);
}
/* =========================================================
   Cards
   ========================================================= */

/* Two columns, as the original had (its cards were .col-md-6), collapsing
   to one where there is no room for them. The list itself had no class in
   the old markup — it was a bootstrap row of columns — so this is the one
   name on this page with no counterpart there. */
.peo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--iti-s-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.peo .person {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 15px;
  gap: 0 var(--iti-s-4);
  align-items: start;
  /* No wrapper around the text: the old card had the parts as flat
     children of .person, so they are placed by column here instead. */
  grid-template-rows: auto auto auto;
  margin: 0;
  padding: var(--iti-s-4);
  list-style: none;
  background: var(--iti-surface);
  border: 1px solid var(--iti-line);
  clip-path: var(--iti-clip-sm);
  transition: border-color var(--iti-dur) var(--iti-ease),
              background var(--iti-dur) var(--iti-ease),
              box-shadow var(--iti-dur) var(--iti-ease);
}

/*
 * Hover, and why it is not a box-shadow.
 *
 * It used to be a grey border and --iti-shadow-1, and you had to be looking
 * for it: measured against the card at rest, 4.5% of it changed. The shadow
 * was most of what was meant to carry it, and almost none of it arrived —
 * --iti-clip-sm is a polygon that runs 2px outside the box, so the card
 * clips its OWN shadow to a 2px rim. A bigger shadow would have been cut to
 * the same 2px; raising it was never going to work.
 *
 * So the cues are the ones that live inside the card: the whole ground takes
 * a faint electric wash, the hairline goes blue, and a lit bar runs down the
 * leading edge — the same bar the project rows use, so a list of people and
 * a list of projects answer "which row am I on" the same way.
 */
.peo .person::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--iti-electric);
  box-shadow: var(--iti-electric-glow);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--iti-dur) var(--iti-ease);
}
.peo .person:hover {
  background: rgba(var(--iti-electric-rgb), .07);
  border-color: var(--iti-electric-dim);
}
.peo .person:hover::before { transform: scaleY(1); }

/* The keyboard half, kept in rules of its OWN — not merged into the lists
   above. A selector list is discarded whole when any part of it does not
   parse, so a browser without :has() would have dropped the hover along with
   it and left the card with no hover at all. Apart they fail independently:
   no :has(), no keyboard highlight, hover untouched. */
.peo .person:has(a:focus-visible) {
  background: rgba(var(--iti-electric-rgb), .07);
  border-color: var(--iti-electric-dim);
}
.peo .person:has(a:focus-visible)::before { transform: scaleY(1); }

/* The portrait is decorative — the name beside it is the link and carries
   the accessible name, so the image takes an empty alt.

   Framed rather than bordered: a white mount inside a hairline, with the
   picture inset from it, and a single cyan rule along the foot to tie it to
   the rest of the page. */
.peo .img-thumbnail {
  width: 64px;
  height: 84px;
  box-sizing: border-box;
  object-fit: cover;
  object-position: top center;
  padding: 3px;
  background: var(--iti-surface);
  border: 1px solid var(--iti-line-strong);
  border-bottom: 2px solid var(--iti-electric-dim);
  box-shadow: 0 1px 2px rgba(6, 25, 44, .10),
              0 2px 8px rgba(var(--iti-electric-rgb), .22);
  transition: border-bottom-color var(--iti-dur) var(--iti-ease),
              box-shadow var(--iti-dur) var(--iti-ease);
}
.peo .person:hover .peo .img-thumbnail {
  border-bottom-color: var(--iti-electric);
  box-shadow: 0 2px 6px rgba(6, 25, 44, .16);
}
.peo .person:has(a:focus-visible) .peo .img-thumbnail {
  border-bottom-color: var(--iti-electric);
  box-shadow: 0 2px 6px rgba(6, 25, 44, .16);
}


.peo .position {
  margin: 0 0 .2rem;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.35;
  color: var(--iti-electric-ink);
}

.peo .name {
  margin: 0 0 .35rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}
.peo .name a { color: var(--iti-text); text-decoration: none; }
/* Stretched over the card, so the whole slate is clickable while the link
   itself names only the person. */
.peo .name a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}
.peo .name a:focus-visible { outline: none; }
/* Keyboard only. :focus-within has no -visible counterpart — it asks
   "is focus inside me", which a mouse click answers too, so clicking a
   card used to leave it ringed. :has() asks whether the link inside is
   focused the way a keyboard focuses it. */
.peo .person:has(a:focus-visible) {
  outline: 2px solid var(--iti-electric);
  outline-offset: 2px;
}
.peo .person:hover .peo .name a { color: var(--iti-blue); }
.peo .person:has(a:focus-visible) .peo .name a { color: var(--iti-blue); }

/* css/style.css indents everything in a card with `.person p { margin-left:
   80px }`, which cleared the portrait when it was floated. It is a grid
   column of its own now, so that indent would apply twice. Same for the
   sizes it sets on .position / .contact_cnt / .name, which this sheet
   states itself. */
.peo .person p { margin-left: 0; }

/* The portrait spans the card; the chevron sits beside it on the right. */
.peo .img-thumbnail { grid-column: 1; grid-row: 1 / span 3; }
.peo .position      { grid-column: 2; grid-row: 1; }
.peo .name          { grid-column: 2; grid-row: 2; }
.peo .contact_cnt   { grid-column: 2; grid-row: 3; }
.peo .more          { grid-column: 3; grid-row: 1 / span 3; }

.peo .contact_cnt {
  display: grid;
  gap: .1rem;
  margin: 0;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--iti-text-muted);
}

.peo .more {
  align-self: center;
  color: var(--iti-text-decor);
  transition: transform var(--iti-dur) var(--iti-ease),
              color var(--iti-dur) var(--iti-ease);
}
.peo .person:hover .peo .more {
  color: var(--iti-blue);
  transform: translateX(3px);
}
.peo .person:has(a:focus-visible) .peo .more {
  color: var(--iti-blue);
  transform: translateX(3px);
}

.peo .person-empty {
  margin: 0;
  padding: var(--iti-s-5);
  font-size: .95rem;
  color: var(--iti-text-muted);
  background: var(--iti-surface);
  border: 1px dashed var(--iti-line-strong);
}

@media (max-width: 860px) {
  .peo-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .peo .person { padding: var(--iti-s-3); gap: var(--iti-s-3); }
}
