/* =========================
       Premium palette (KEEP #003345)
       ========================= */
:root {
  /* ✅ Brand (keep) */
  --navy: #003345;
  --navy2: #022b3a;
  --ink: #081726;

  /* ✅ Premium neutrals */
  --bg: #F6F8FA;
  /* page background */
  --surface: #FFFFFF;
  /* true white */
  --surface2: #F1F4F7;
  /* secondary surfaces */

  /* ✅ Text system */
  --text: #0D1B22;
  --muted: #5C6B76;
  --muted2: #83939F;

  /* ✅ Accent */
  --cyan: #0FADE6;
  --cyan2: #0B8FBF;

  /* ✅ Borders & shadows */
  --border: rgba(13, 27, 34, .10);
  --border2: rgba(13, 27, 34, .16);

  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .14);
  --softShadow: 0 12px 28px rgba(0, 0, 0, .10);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* ✅ premium background (subtle, not boxed) */
body {
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 12% 6%, rgba(15, 173, 230, .08), rgba(15, 173, 230, 0) 55%),
    radial-gradient(900px 520px at 88% 0%, rgba(214, 192, 141, .08), rgba(214, 192, 141, 0) 60%),
    radial-gradient(760px 560px at 70% 65%, rgba(0, 51, 69, .05), rgba(0, 51, 69, 0) 58%),
    linear-gradient(180deg, #FBFCFD 0%, var(--bg) 45%, #EEF2F6 100%);
  min-height: 100vh;
}

/* ===== Layout ===== */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 22px 86px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.title {
  margin: 0;
  font-size: clamp(30px, 3.3vw, 46px);
  letter-spacing: .02em;
  color: var(--navy);
  line-height: 1.1;
}

.sub {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 760px;
  line-height: 1.6;
  font-size: 14px;
}

.filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ===== Premium pills ===== */
.pill {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .72);
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
  user-select: none;
  backdrop-filter: blur(8px);
}

.pill:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 173, 230, .30);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .08);
  background: rgba(255, 255, 255, .92);
}

.pill.is-active {
  border-color: rgba(15, 173, 230, .50);
  box-shadow: 0 12px 26px rgba(15, 173, 230, .12);
  background: rgba(15, 173, 230, .08);
}

.divider {
  height: 1px;
  background: rgba(13, 27, 34, .10);
  margin: 18px 0 22px;
}

/* =========================
       ✅ Department sections
       - Remove outer big frame
       - Keep clear separation via spacing + subtle divider line
       ========================= */
.dept {
  margin: 34px 0;
  padding: 0;
  /* no boxed padding */
  border: 0;
  /* ✅ remove outer border */
  border-radius: 0;
  /* ✅ remove rounded container */
  background: transparent;
  /* ✅ remove panel background */
  box-shadow: none;
  /* ✅ remove panel shadow */
  backdrop-filter: none;
  position: relative;
}

/* clear boundaries between departments (not a big box) */
.dept+.dept {
  padding-top: 34px;
  border-top: 1px solid rgba(13, 27, 34, .10);
}

/* Centered department label */
.dept__label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 auto 20px;
  text-align: center;
}

.dept__label::before,
.dept__label::after {
  content: "";
  height: 1px;
  background: rgba(13, 27, 34, .14);
  flex: 1 1 auto;
  max-width: 240px;
}

.dept__title {
  margin: 0;
  font-size: 18px;
  color: #fff;
  letter-spacing: .02em;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(15, 173, 230, .26);
  background: var(--navy);
  /* keep */
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .10);
}

/* grid (big cards) */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  padding: 6px 6px 0;
}

@media (max-width: 1020px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .page-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .filters {
    justify-content: flex-start;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
       ✅ Card
       - Background same as website background (transparent / near-bg)
       - Premium border + subtle shadow
       ========================= */
.card {
  position: relative;
  text-align: center;
  padding: 18px 10px 16px;
  border-radius: var(--radius);

  /* ✅ card blends with page background */
  background: #003345;
  border: 1px solid rgba(13, 27, 34, .12);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .10);
  backdrop-filter: blur(10px);

  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
  cursor: pointer;
  user-select: none;

  /* bubble-in initial */
  opacity: 0;
  transform: translateY(22px) scale(.94);
  filter: blur(2px);
}

/* Slower “bubble-in” */
.card.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition:
    opacity 1.05s cubic-bezier(.2, .9, .2, 1),
    transform 1.50s cubic-bezier(.2, .9, .2, 1),
    filter 1.05s cubic-bezier(.2, .9, .2, 1);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, .16);
  border-color: rgba(15, 173, 230, .35);
}

/* premium highlight line */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;

  background: linear-gradient(
    180deg,
    rgba(15, 173, 230, 0.18),   /* cyan 高光 */
    rgba(15, 173, 230, 0.04) 40%,
    rgba(15, 173, 230, 0) 65%
  );

  opacity: 0.6;
}

.avatar {
  width: 160px;
  height: 160px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  margin: 0 auto 14px;
  background: #f2f4f6;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .55);

  object-fit: cover;
  object-position: center 10%;


}

.name {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: white;
  letter-spacing: .02em;
}

.role {
  margin: 6px 0 12px;
  font-size: 12px;
  color: #ece3d5;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 900;
}

.hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: white;
  padding: 8px 10px;
  opacity: .92;
}

.hint i {
  font-style: normal;
  color: var(--cyan2);
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999;
}

.modal.is-open {
  display: block;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 10, 14, .62);
}

.modal__panel {
  position: relative;
  width: min(980px, calc(100% - 28px));
  max-height: min(720px, calc(100% - 28px));
  margin: 12vh auto;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(13, 27, 34, .10);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .14);
  font-size: 18px;
}

.modal__body {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 22px;
  padding: 22px;
  align-items: start;

  background-color: #ece3d5;
}

@media (max-width: 860px) {
  .modal__body {
    grid-template-columns: 1fr;
  }

  .modal__left {
    display: flex;
    justify-content: center;
  }
}

.modal__left img {
  width: 100%;
  max-width: 360px;
  border-radius: 16px;
  object-fit: cover;
  background: #f2f4f6;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
}

.modal__right {
  min-width: 0;
}

#modalName {
  margin: 4px 0 4px;
  font-size: 28px;
  color: var(--navy);
  letter-spacing: .02em;
}

.modal__topmeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

#modalRole {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 900;
}

.chip {
  font-size: 10px;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-weight: 900;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(13, 27, 34, .10);
  color: #1d3b4a;
  background: rgba(0, 0, 0, .02);
}

.chip--dept {
  border-color: rgba(15, 173, 230, .30);
  background: rgba(15, 173, 230, .10);
  color: var(--navy);
}

.modal__scroll {
  max-height: 460px;
  overflow: auto;
  padding-right: 10px;
  border-top: 1px solid rgba(13, 27, 34, .10);
  padding-top: 14px;
}

#modalBio {
  white-space: pre-line;
  line-height: 1.72;
  font-size: 14.5px;
  color: #224353;
}

.modal__linkrow {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.modal__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 900;
  letter-spacing: .06em;
  border: 1px solid rgba(13, 27, 34, .10);
  padding: 10px 12px;
  border-radius: 999px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(6px);
}

.modal__link:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 173, 230, .35);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .10);
  background: rgba(255, 255, 255, .92);
}

.modal__scroll::-webkit-scrollbar {
  width: 10px;
}

.modal__scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .18);
  border-radius: 999px;
}

.modal__scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, .04);
}


/* ✅ 防止 role/hint 产生额外小标签（例如 IT chip） */
.card .role::before,
.card .role::after,
.card .hint::before,
.card .hint::after {
  content: none !important;
}

/* =========================
   Team Modal – Mobile image size fix
   ========================= */
@media (max-width: 860px){
  .modal__left img{
    width: 50%;          /* ✅ 缩小到原来的 50% */
    max-width: 180px;    /* ✅ 360 → 180，对应一半 */
    margin: 0 auto;      /* ✅ 居中 */
  }
}
