/* Advisor profile — sky, glass panels (match resources news / hero hover) */

.team-page-body .site-footer .footer-address strong,
.team-page-body .site-footer .footer-bottom strong {
  font-weight: 400;
}

html:has(.team-page-sky),
body:has(.team-page-sky) {
  background: #ffffff;
}

.team-page-sky {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  background: linear-gradient(
    180deg,
    var(--navy-light) 0%,
    var(--navy) 42%,
    var(--navy-dark) 100%
  );
  padding-bottom: 3.5rem;
}

.team-page-sky .team-page-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 40px 80px, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(2px 2px at 120px 30px, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(2px 2px at 200px 120px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(2px 2px at 320px 50px, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(2px 2px at 450px 100px, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(2px 2px at 550px 180px, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(2px 2px at 680px 70px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(2px 2px at 80px 150px, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(2px 2px at 280px 200px, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(2px 2px at 380px 90px, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(2px 2px at 500px 160px, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(2px 2px at 620px 40px, rgba(255, 255, 255, 0.5), transparent);
  background-size: 800px 250px;
  background-repeat: repeat;
  animation: why-bayes-compass-stars-twinkle 4s ease-in-out infinite;
  opacity: 0.88;
}

.team-page-sky .section-shooting-stars {
  z-index: 1;
}

.team-page-sky .breadcrumbs {
  position: relative;
  z-index: 3;
}

.team-page-sky .contact-main.team-page {
  position: relative;
  z-index: 2;
  background: transparent;
  padding-top: 0;
}

/* Hero — match solutions video carousel slide (height, gradient, overlay copy) */
.team-page-sky .team-page-hero {
  position: relative;
  z-index: 2;
  height: 70vh;
  min-height: 400px;
  max-height: 600px;
  overflow: hidden;
  background: #1a2b5e;
}

.team-page-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.75) contrast(1.08) brightness(0.92);
  animation: team-page-hero-video-zoom 18s ease-in-out infinite alternate;
}

@keyframes team-page-hero-video-zoom {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.12) translate(2%, 1%);
  }
}

.team-page-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(26, 43, 94, 0.9) 0%, rgba(26, 43, 94, 0.4) 50%, transparent 100%);
  pointer-events: none;
}

.team-page-hero-content {
  position: absolute;
  bottom: 3rem;
  left: 2.5rem;
  right: 2.5rem;
  z-index: 2;
  color: #ffffff;
  text-align: left;
}

.team-page-hero-title {
  font-size: var(--subheading-font-size);
  font-weight: 400;
  margin: 0 0 0.5rem;
  text-transform: none;
  letter-spacing: 0.02em;
  text-align: left;
}

.team-page-hero-tagline {
  font-size: var(--font-size-body);
  margin: 0;
  max-width: 38rem;
  opacity: 0.95;
  text-align: left;
  line-height: 1.55;
}

/* Section title below hero (on sky), above advisor cards */
.team-page-section-title {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem 2.25rem 0;
  box-sizing: border-box;
}

.team-page-subtitle {
  font-size: var(--subheading-font-size);
  font-weight: 400;
  color: #ffffff;
  margin: 0;
  padding: 0 0 1.25rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .team-page-subtitle {
  color: #1a2b5e;
  text-shadow: none;
  border-bottom-color: rgba(26, 43, 94, 0.15);
}

.team-page-section-title.team-page-section-follow {
  padding-top: 2.5rem;
}

.leadership-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.75rem;
}

.leadership-role {
  font-size: clamp(0.9rem, 1.9vw, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: none;
}

[data-theme="light"] .leadership-role {
  color: #5a6b8a;
}

/* Advisor cards — same interaction as .resources-news-panel */
.advisor-card {
  max-width: 1040px;
  margin: 0 auto 2rem;
  padding: 2rem 2.25rem;
  box-sizing: border-box;
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  background: rgba(26, 43, 94, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.advisor-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.48);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.advisor-card:active {
  transform: translateY(0);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.advisor-card:focus-within {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.14);
}

[data-theme="light"] .advisor-card {
  border-color: rgba(26, 43, 94, 0.2);
  background: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .advisor-card:hover {
  border-color: rgba(26, 43, 94, 0.38);
  box-shadow: 0 8px 28px rgba(26, 43, 94, 0.12), 0 0 0 1px rgba(26, 43, 94, 0.08);
}

[data-theme="light"] .advisor-card:active {
  border-color: rgba(26, 43, 94, 0.28);
  box-shadow: 0 4px 16px rgba(26, 43, 94, 0.1);
}

[data-theme="light"] .advisor-card:focus-within {
  border-color: rgba(26, 43, 94, 0.42);
  box-shadow: 0 8px 28px rgba(26, 43, 94, 0.14), 0 0 0 1px rgba(26, 43, 94, 0.08);
}

.advisor-card:last-child {
  margin-bottom: 0;
}

.advisor-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.advisor-main-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem 2.5rem;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}

.advisor-name {
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  font-weight: 400;
  color: #ffffff;
  margin: 0 0 0.85rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .advisor-name {
  color: #1a2b5e;
  text-shadow: none;
}

.advisor-bio {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-width: 0;
  font-size: var(--font-size-body);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.65;
}

[data-theme="light"] .advisor-bio {
  color: #4a5568;
}

.advisor-bio a {
  color: rgba(255, 255, 255, 0.96);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.advisor-bio a:hover {
  color: #ffffff;
}

[data-theme="light"] .advisor-bio a {
  color: #1a2b5e;
}

[data-theme="light"] .advisor-bio a:hover {
  color: #243770;
}

.advisor-bio > p:not(.advisor-contact) {
  margin: 0 0 0.85rem;
}

.advisor-contact {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: var(--font-size-list, 0.95rem);
  text-align: justify;
  text-justify: inter-word;
  color: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .advisor-contact {
  border-top-color: rgba(26, 43, 94, 0.12);
  color: #1a2b5e;
}

.advisor-contact a {
  color: rgba(255, 255, 255, 0.96);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.advisor-contact a:hover {
  color: #ffffff;
}

[data-theme="light"] .advisor-contact a {
  color: #1a2b5e;
}

[data-theme="light"] .advisor-contact a:hover {
  color: #243770;
}

.advisor-photo-wrap {
  flex-shrink: 0;
  align-self: start;
}

/* Circular portrait frames (team / leadership / advisors) */
.advisor-photo {
  display: block;
  width: 320px;
  max-width: 100%;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  object-position: center;
  box-sizing: border-box;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.15);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.38),
    0 2px 10px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .advisor-photo {
  border-color: rgba(26, 43, 94, 0.12);
  box-shadow:
    0 6px 24px rgba(10, 24, 64, 0.14),
    0 2px 8px rgba(10, 24, 64, 0.08);
}

@media (max-width: 768px) {
  .team-page-sky .team-page-hero {
    height: 55vh;
    min-height: 350px;
  }

  .team-page-hero-content {
    left: 1.5rem;
    right: 1.5rem;
    bottom: 4rem;
  }
}

@media (max-width: 640px) {
  .team-page-section-title {
    padding: 1.5rem 1.25rem 0;
  }

  .team-page-sky .team-page-hero {
    height: 50vh;
    min-height: 280px;
  }

  .team-page-hero-content {
    left: 1rem;
    right: 1rem;
    bottom: 2.5rem;
  }

  .team-page-hero-title {
    font-size: clamp(1.35rem, 5vw, 1.65rem);
  }

  .advisor-card {
    padding: 1.75rem 1.5rem;
  }

  .advisor-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    text-align: left;
  }

  .advisor-main-row {
    display: contents;
  }

  .advisor-photo-wrap {
    order: 1;
    justify-self: center;
    margin: 0 auto 0.5rem;
  }

  .advisor-name {
    order: 2;
  }

  .advisor-bio {
    order: 3;
    flex: none;
    display: block;
    min-height: 0;
  }

  .advisor-bio > p:not(.advisor-contact) {
    margin: 0 0 0.85rem;
  }

  .advisor-contact {
    margin-top: 1.15rem;
    text-align: left;
  }

  .advisor-photo {
    width: 260px;
    max-width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-page-sky .team-page-stars {
    animation: none;
  }

  .team-page-sky .shooting-star {
    animation: none;
    opacity: 0;
    pointer-events: none;
  }

  .advisor-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .team-page-hero-video {
    animation: none;
  }

  .advisor-card:hover,
  .advisor-card:active,
  .advisor-card:focus-within {
    transform: none;
  }
}
