/*
 * About page: "From the Director's Desk" and "Meet the Team".
 * Everything is prefixed ab- so it cannot collide with the legacy .team-* rules in
 * style.css or .badge-committee on public_profile.php. Light theme only (site-wide).
 */

.about-page-wrapper {
  --ab-navy: var(--primary-color, #0a2342);
  --ab-gold: var(--accent-gold, #c9a46b);
  --ab-gold-ink: #8a6420;          /* gold dark enough for text on white/cream (>= 5:1) */
  --ab-ink: #26324a;
  --ab-muted: #4f5b73;
  --ab-line: rgba(10, 35, 66, 0.12);
  --ab-radius: 18px;
  --ab-shadow: 0 1px 2px rgba(10, 35, 66, 0.06), 0 12px 32px -14px rgba(10, 35, 66, 0.2);
  --ab-shadow-lift: 0 1px 2px rgba(10, 35, 66, 0.06), 0 20px 38px -16px rgba(10, 35, 66, 0.32);
  --ab-ease: cubic-bezier(0.22, 0.8, 0.3, 1);
  --ab-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

.ab-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/*
 * Panel look shared with the other .alt-background sections. These two sections deliberately do not use
 * .alt-background: its 2.5rem padding squeezes phones, and its `p` rules out-rank single-class selectors here.
 */
.about-page-wrapper .ab-panel {
  margin-top: 2rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background-color: var(--background-offwhite);
  border: 1px solid var(--std-dash-border-color, rgba(10, 35, 66, 0.1));
  border-radius: 10px;
}

/* ---------- Director's Desk: a foreword, not a card ---------- */

.ab-director__card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  grid-template-areas: 'who quote';
  column-gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  margin: 0;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: #fff;
  border: 1px solid var(--ab-line);
  border-radius: 24px;
  box-shadow: var(--ab-shadow);
}

/* Quote comes first in the DOM (reads as quote, then attribution); the grid puts the portrait on the left. */
/* Scoped under .about-page-wrapper to out-rank the site's `.content-section blockquote` (grey box + left border). */
.about-page-wrapper .ab-director__quote {
  grid-area: quote;
  position: relative;
  margin: 0;
  padding: 2.9rem 0 0;
  background: none;
  border: 0;
  font-style: normal;
}
.ab-director__who { grid-area: who; text-align: center; }

.ab-director__mark {
  position: absolute;
  top: 0;
  left: -0.15rem;
  font-family: var(--ab-serif);
  font-size: 7.5rem;
  font-weight: 700;
  line-height: 0.75;
  color: var(--ab-gold);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}

.ab-director__lede {
  margin: 0 0 1.5rem;
  font-family: var(--ab-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.3rem, 1.05rem + 1vw, 1.7rem);
  line-height: 1.45;
  color: var(--ab-navy);
}

.ab-director__quote p:not(.ab-director__lede) {
  max-width: 62ch;
  margin: 0 0 1rem;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ab-ink);
}
.ab-director__quote p:last-child { margin-bottom: 0; }

.ab-director__frame { position: relative; width: min(100%, 230px); margin: 0 auto 1.4rem; aspect-ratio: 4 / 5; }
.ab-director__frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--ab-gold);
  border-radius: 999px 999px 18px 18px;
  transform: translate(10px, 10px);
}
.ab-director__photo {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: 999px 999px 18px 18px;
  background: #e9edf3;
}

.ab-director__name { margin: 0 0 0.35rem; font-family: var(--ab-serif); font-size: 1.4rem; line-height: 1.25; color: var(--ab-navy); }
.ab-director__role {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ab-gold-ink);
}
.ab-director__profile {
  display: inline-flex;
  gap: 0.35rem;
  padding-bottom: 1px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ab-navy);
  border-bottom: 1px solid var(--ab-gold);
  transition: color 0.2s;
}
.ab-director__profile:hover { color: var(--ab-gold-ink); }
.ab-director__profile:focus-visible { outline: 2px solid var(--ab-navy); outline-offset: 4px; border-radius: 3px; }

@media (max-width: 719px) {
  .ab-director__card { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'who' 'quote'; row-gap: 1.75rem; }
  .ab-director__frame { width: 190px; }
  .about-page-wrapper .ab-director__quote { padding-top: 2.4rem; }
  .ab-director__mark { font-size: 6rem; }
}

/* ---------- Meet the Team ---------- */

.ab-team__lead { max-width: 64ch; margin: 0 0 2rem; font-size: 1.05rem; color: var(--ab-muted); text-wrap: balance; }

.ab-tier { margin-top: clamp(2.25rem, 5vw, 3.25rem); }
.ab-team__lead + .ab-tier { margin-top: 0; }
.ab-tier__head { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.25rem; }
.ab-tier__title { margin: 0; font-family: var(--ab-serif); font-size: 1.35rem; line-height: 1.2; color: var(--ab-navy); white-space: nowrap; }
.ab-tier__head::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--ab-gold), transparent); }

/* Whole card is one link: the name link is stretched over the card. */
.ab-faculty__card,
.ab-core__card { position: relative; }
.ab-stretch { color: inherit; text-decoration: none; }
.ab-stretch::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.ab-stretch:focus-visible { outline: 2px solid var(--ab-navy); outline-offset: 4px; border-radius: 3px; }

/* Faculty Coordinators */
.ab-faculty { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; }
.ab-faculty__card {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--ab-line);
  border-radius: var(--ab-radius);
  box-shadow: var(--ab-shadow);
  transition: transform 0.35s var(--ab-ease), box-shadow 0.35s var(--ab-ease), border-color 0.35s;
}
.ab-faculty__card:hover { transform: translateY(-4px); border-color: rgba(201, 164, 107, 0.7); box-shadow: var(--ab-shadow-lift); }
.ab-faculty__card:has(.ab-stretch:focus-visible) { box-shadow: 0 0 0 3px var(--ab-gold); }
.ab-faculty__top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.ab-faculty__photo { flex: none; width: 76px; height: 76px; border: 3px solid #fff; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--ab-gold); background: #fff; }
.ab-faculty__name { margin: 0; font-family: var(--ab-serif); font-size: 1.2rem; line-height: 1.25; color: var(--ab-navy); }
.ab-faculty__role { margin: 0.25rem 0 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ab-gold-ink); }
.ab-faculty__bio { margin: 0 0 1.1rem; font-size: 0.97rem; line-height: 1.65; color: var(--ab-ink); }
.ab-faculty__more { margin-top: auto; font-size: 0.9rem; font-weight: 700; color: var(--ab-navy); }

/* 1 per row on phones, 2 (last one centred) on tablets, 3 on desktop */
@media (min-width: 640px) { .ab-faculty__card { flex-basis: calc((100% - 1.25rem) / 2); } }
@media (min-width: 1000px) { .ab-faculty__card { flex-basis: calc((100% - 2.5rem) / 3); } }

/* Core Committee: the one dark band on the page */
.ab-core {
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(110% 90% at 8% 0%, rgba(53, 108, 178, 0.45), transparent 55%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 11px),
    linear-gradient(145deg, #0a2342, #0d2d57);
  box-shadow: 0 26px 50px -26px rgba(10, 35, 66, 0.7);
}
.ab-core .ab-tier__title { color: #fff; }
.ab-core .ab-tier__head::after { background: linear-gradient(90deg, rgba(201, 164, 107, 0.8), transparent); }

.ab-core__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.ab-core__card {
  flex: 0 0 calc((100% - 2 * 14px) / 3);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.35rem 0.95rem 1.1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  transition: transform 0.3s var(--ab-ease), background-color 0.3s, border-color 0.3s;
}
.ab-core__card:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.11); border-color: rgba(201, 164, 107, 0.6); }
.ab-core__card:has(.ab-stretch:focus-visible) { box-shadow: 0 0 0 3px var(--ab-gold); }
.ab-core .ab-stretch:focus-visible { outline-color: var(--ab-gold); }
.ab-core__photo { flex: none; width: 76px; height: 76px; margin-bottom: 0.85rem; border: 3px solid var(--ab-gold); border-radius: 50%; object-fit: cover; background: #0a2342; }
.ab-core__text { display: flex; flex: 1 1 auto; flex-direction: column; align-items: center; width: 100%; min-width: 0; }
.ab-core__role { margin: 0 0 0.3rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ab-gold); }
.ab-core__name { margin: 0 0 0.55rem; font-family: var(--ab-serif); font-size: 1.08rem; line-height: 1.25; color: #fff; }
.ab-core__bio {
  display: -webkit-box;
  margin: 0 0 0.9rem;
  overflow: hidden;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.ab-core__more { margin-top: auto; font-size: 0.82rem; font-weight: 700; color: var(--ab-gold); }
.ab-core__photo--initials { display: grid; place-items: center; font-family: var(--ab-serif); font-size: 1.55rem; font-weight: 700; letter-spacing: 0.02em; color: var(--ab-gold); background: rgba(255, 255, 255, 0.1); }
.ab-core__card--open { background: transparent; border-style: dashed; border-color: rgba(255, 255, 255, 0.32); }
.ab-core__card--open .ab-core__photo { opacity: 0.55; filter: grayscale(1); }

@media (min-width: 1100px) { .ab-core__card { flex-basis: calc((100% - 4 * 14px) / 5); } }

@media (max-width: 639px) {
  .ab-core__card { flex-basis: 100%; flex-direction: row; align-items: center; gap: 1rem; padding: 0.9rem 1rem; text-align: left; }
  .ab-core__photo { width: 58px; height: 58px; margin: 0; }
  .ab-core__text { align-items: flex-start; }
  .ab-core__bio { margin-bottom: 0.45rem; }
}

/* Members: small, simple chips */
.ab-members { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .ab-members { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
@media (max-width: 359px) { .ab-members { grid-template-columns: minmax(0, 1fr); } }
.ab-member {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 48px;
  padding: 5px 14px 5px 5px;
  font-size: 0.9rem;
  color: var(--ab-navy);
  background: #fff;
  border: 1px solid var(--ab-line);
  border-radius: 999px;
  transition: transform 0.25s var(--ab-ease), border-color 0.25s, box-shadow 0.25s;
}
.ab-member[hidden] { display: none !important; }
.ab-member:hover { transform: translateY(-1px); border-color: rgba(201, 164, 107, 0.8); box-shadow: 0 8px 18px -10px rgba(10, 35, 66, 0.35); }
.ab-member:focus-visible { outline: 2px solid var(--ab-navy); outline-offset: 3px; }
.ab-member__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 50%;
  background: #e8eef7;
  color: var(--ab-navy);
}
.ab-member__avatar img { width: 100%; height: 100%; object-fit: cover; }
.ab-member__avatar[data-tone='1'] { background: #f5ecda; color: #6b4c12; }
.ab-member__avatar[data-tone='2'] { background: #e1efe9; color: #1d5446; }
.ab-member__avatar[data-tone='3'] { background: #f1e4ec; color: #70324f; }
.ab-member__name { display: -webkit-box; min-width: 0; overflow: hidden; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }

.ab-members__more { margin: 1.1rem 0 0; text-align: center; }

/* Buttons */
.ab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ab-navy);
  background: transparent;
  border: 2px solid var(--ab-navy);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.25s var(--ab-ease);
}
.ab-btn:hover { color: #fff; background: var(--ab-navy); }
.ab-btn:focus-visible { outline: 2px solid var(--ab-navy); outline-offset: 3px; }
.ab-btn--gold { background: var(--ab-gold); border-color: var(--ab-gold); }
.ab-btn--gold:hover { transform: translateY(-2px); }
.ab-cta { margin: clamp(2rem, 4vw, 2.75rem) 0 0; text-align: center; }

/* ---------- Reveal on scroll (script adds .ab-js and .is-in; without script everything is simply visible) ---------- */

@keyframes ab-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.ab-js .ab-reveal:not(.is-in) { opacity: 0; }
.ab-js .ab-reveal.is-in { animation: ab-rise 0.55s var(--ab-ease) var(--d, 0ms) backwards; }

@media (prefers-reduced-motion: reduce) {
  #director-desk *,
  #team-section * { transition: none !important; animation: none !important; }
  .ab-js .ab-reveal:not(.is-in) { opacity: 1; }
}

/* ==========================================================================
 * Committee terms (appended): per-term team blocks, archive <details>, link chips.
 * Markup comes from includes/about_team_render.php. Light theme only.
 * ========================================================================== */

/* Deep links (#team-YYYY-YYYY) must not land under the sticky header. */
[id^='team-'] { scroll-margin-top: 6rem; }

/* Live block: a small non-heading eyebrow above the tiers */
.ab-term > .ab-tier:first-child { margin-top: 0; }
.ab-term__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ab-navy);
}
.ab-term__eyebrow + .ab-tier { margin-top: 0; }

/* Text pill: navy on gold (about 7:1), never colour alone */
.ab-tag {
  display: inline-block;
  padding: 0.18rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ab-navy);
  background: var(--ab-gold);
  border-radius: 999px;
}

/* Member chips: only real links lift; plain chips stay still */
div.ab-member:hover { transform: none; border-color: var(--ab-line); box-shadow: none; }
a.ab-member { text-decoration: none; cursor: pointer; }
a.ab-member:hover { transform: translateY(-1px); border-color: rgba(201, 164, 107, 0.8); box-shadow: 0 8px 18px -10px rgba(10, 35, 66, 0.35); }
a.ab-member > .ab-member__name + span { flex: none; margin-left: auto; font-size: 0.85rem; font-weight: 700; color: var(--ab-gold-ink); }

/* Previous teams: one collapsed <details> per archived term */
.ab-archive { display: grid; gap: 0.9rem; margin-top: 1.25rem; }
.ab-archive__term {
  background: #fff;
  border: 1px solid var(--ab-line);
  border-radius: var(--ab-radius);
  box-shadow: var(--ab-shadow);
}
.ab-archive__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  font-family: var(--ab-serif);
  font-size: 1.1rem;
  line-height: 1.3;
  color: var(--ab-navy);
  cursor: pointer;
  list-style: none;
  border-radius: var(--ab-radius);
}
.ab-archive__summary::-webkit-details-marker { display: none; }
.ab-archive__summary:hover { background: rgba(10, 35, 66, 0.04); }
.ab-archive__summary:focus-visible { outline: 2px solid var(--ab-navy); outline-offset: 3px; }
/* CSS-only chevron: points down when closed, up when open */
.ab-archive__summary::after {
  content: '';
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  margin-top: -0.25rem;
  border-right: 2px solid var(--ab-navy);
  border-bottom: 2px solid var(--ab-navy);
  transform: rotate(45deg);
}
.ab-archive__term[open] > .ab-archive__summary::after { margin-top: 0.25rem; transform: rotate(-135deg); }
.ab-archive__body { padding: 0 clamp(1rem, 3vw, 1.5rem) clamp(1.25rem, 3vw, 1.75rem); }
.ab-archive__body > .ab-tier:first-child { margin-top: 0.5rem; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes ab-archive-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
  .ab-archive__summary::after { transition: transform 0.25s var(--ab-ease); }
  .ab-archive__term[open] > .ab-archive__body { animation: ab-archive-open 0.3s var(--ab-ease); }
}

/* Reveal cards start at opacity 0 until scrolled into view; paper has no scrolling. */
@media print { .ab-reveal { opacity: 1 !important; } }
