* {
  box-sizing: border-box;
}

body.core-teams-page {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #dcdcdc;
  color: #111;
}

.core-frame {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  border: 0;
  overflow: hidden;
  background: #dcdcdc;
}

.page-fade {
  animation: fade-in 0.45s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.core-stage {
  min-height: 100vh;
  padding: 16px 18px 12px;
  background: #d07d81;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand h1 {
  margin: 0;
  font-size: clamp(22px, 1.85vw, 36px);
  font-weight: 800;
}

.brand-icon {
  width: clamp(34px, 2.4vw, 46px);
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
  border-radius: 6px;
  background: transparent;
  mix-blend-mode: normal;
  display: block;
}

.nav-cluster,
.top-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 114px;
  padding: 7px 14px;
  border: 0;
  border-radius: 4px;
  background: #d67f84;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  font-size: clamp(12px, 0.95vw, 14px);
  font-weight: 800;
  letter-spacing: 0;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.18s ease;
}

.pill-btn:hover,
.pill-btn:focus-visible {
  background: #e49da3;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
  outline: none;
  transform: translateY(-1px);
}

.profile-card {
  width: min(260px, 48vw);
  margin: 18px auto 0;
  padding: 8px 8px 12px;
  border: 5px solid #ededed;
  border-radius: 8px;
  background: #ededed;
  box-shadow: 0 12px 18px rgba(0, 0, 0, 0.16);
}

.profile-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  border-radius: 5px;
}

.profile-name {
  margin: 8px 0 0;
  text-align: center;
  color: #111;
  font-size: clamp(15px, 1.5vw, 22px);
  font-weight: 900;
}

.team-copy {
  margin: 14px auto 0;
  width: min(860px, 92vw);
  padding: 16px 20px 18px;
  border-radius: 4px;
  background: rgba(157, 83, 87, 0.34);
  color: #fff;
}

.team-copy h2 {
  margin: 0;
  text-align: center;
  color: #fff;
  font-size: clamp(38px, 4.2vw, 56px);
  line-height: 1.05;
  font-weight: 900;
}

.team-copy p {
  margin: 10px auto 0;
  max-width: 720px;
  text-align: center;
  color: #fff;
  font-size: clamp(12px, 1vw, 15px);
  line-height: 1.85;
  font-weight: 700;
}

.core-footer {
  position: relative;
  margin-top: auto;
  min-height: 70px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 14px;
}

.learn-pill,
.contact-btn {
  min-width: 132px;
  padding: 9px 18px;
  background: #d67f84;
  border-radius: 4px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.learn-pill:hover,
.learn-pill:focus-visible,
.contact-btn:hover,
.contact-btn:focus-visible,
.contact-btn[aria-expanded="true"] {
  background: #e49da3;
}

.copyright {
  margin: 0;
  justify-self: center;
  text-align: center;
  color: #fff;
  font-size: clamp(12px, 1.1vw, 18px);
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.contact-card {
  position: relative;
  justify-self: end;
}

.contact-btn {
  appearance: none;
  cursor: pointer;
}

.contact-popup {
  position: absolute;
  right: 0;
  bottom: calc(100% + 16px);
  z-index: 20;
  width: min(310px, calc(100vw - 32px));
  padding: 18px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 14px;
  background: #9d5357;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.contact-popup.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.contact-popup::after {
  content: "";
  position: absolute;
  right: 38px;
  bottom: -12px;
  border-width: 12px 10px 0;
  border-style: solid;
  border-color: #9d5357 transparent transparent;
}

.contact-popup h3 {
  margin: 0 0 14px;
  text-align: center;
  color: #fff;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 900;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(10px);
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  background: #fff;
  border-color: #fff;
  color: #9d5357;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  outline: none;
  transform: translateY(-2px);
}

.contact-popup.show .social-links a {
  animation: contact-link-in 0.32s ease forwards;
}

.contact-popup.show .social-links a:nth-child(1) {
  animation-delay: 0.04s;
}

.contact-popup.show .social-links a:nth-child(2) {
  animation-delay: 0.08s;
}

.contact-popup.show .social-links a:nth-child(3) {
  animation-delay: 0.12s;
}

.contact-popup.show .social-links a:nth-child(4) {
  animation-delay: 0.16s;
}

@keyframes contact-link-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  body.core-teams-page {
    overflow: auto;
  }

  .core-stage {
    min-height: 100vh;
    padding: 14px 14px 18px;
  }

  .topbar,
  .nav-cluster,
  .top-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .brand {
    width: 100%;
    justify-content: center;
  }

  .profile-card {
    width: min(240px, 76vw);
  }

  .team-copy {
    width: 100%;
    padding: 14px 16px 16px;
  }

  .core-footer {
    margin-top: 18px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
  }

  .contact-card {
    justify-self: center;
  }

  .contact-popup {
    right: 50%;
    transform: translate(50%, 12px) scale(0.96);
    transform-origin: bottom center;
  }

  .contact-popup.show {
    transform: translate(50%, 0) scale(1);
  }

  .contact-popup::after {
    right: 50%;
    transform: translateX(50%);
  }
}
