html[data-theme="light"]{
  --t-bg: #f7f9fc;
  --t-card: #ffffff;
  --t-text: #111;
  --t-sub: #5b6472;
  --t-line: rgba(0,0,0,0.10);
  --t-shadow: 0 10px 28px rgba(0,0,0,0.14);
  --t-shadow2: 0 18px 44px rgba(0,0,0,0.20);
}

html[data-theme="dark"]{
  --t-bg: #0b0f17;
  --t-card: #111827;
  --t-text: #f3f4f6;
  --t-sub: #a7b0c0;
  --t-line: rgba(255,255,255,0.12);
  --t-shadow: 0 10px 28px rgba(0,0,0,0.55);
  --t-shadow2: 0 18px 44px rgba(0,0,0,0.70);
}

body{ background: var(--t-bg); color: var(--t-text); }

html[data-theme="dark"] .nav-bar{
  background: rgba(17,24,39,0.85);
  border-bottom: 1px solid var(--t-line);
  backdrop-filter: blur(16px);
}
html[data-theme="dark"] .nav-links a{
  background: rgba(255,255,255,0.08);
  color: var(--t-text);
}
html[data-theme="dark"] .nav-links a:hover{ background: rgba(255,255,255,0.12); }
html[data-theme="dark"] .mobile-menu{
  background: rgba(17,24,39,0.85);
  border-left: 1px solid var(--t-line);
}
html[data-theme="dark"] .mobile-menu a{ color: var(--t-text); }

.nav-tools{ display:flex; align-items:center; gap:12px; }

.theme-toggle{
  display:inline-flex; align-items:center; gap:10px;
  border: 1px solid var(--t-line);
  background: var(--t-card);
  color: var(--t-text);
  padding: 10px 14px;
  border-radius: 999px;
  cursor:pointer;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}
.theme-toggle:hover{
  transform: translateY(-1px);
  opacity: .95;
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}
.theme-toggle__icon{ width: 22px; text-align:center; font-weight:900; }

.team-page{
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 16px 70px;
}

.team-section{ padding-top: 18px; }

.team-head{
  text-align: center;
  margin: 60px auto 28px;
  max-width: 760px;
}
.team-head h1{
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 900;
}
.team-head p{
  margin-top: 12px;
  color: var(--t-sub);
  font-weight: 700;
  line-height: 1.55;
}
.team-actions{
  margin-top: 18px;
  display:flex;
  justify-content:center;
}

.team-grid{
  margin-top: 20px;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
}
@media (max-width: 1100px){ .team-grid{ grid-template-columns: repeat(3, 1fr);} }
@media (max-width: 860px){ .team-grid{ grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 560px){ .team-grid{ grid-template-columns: 1fr;} }

.team-hint{
  margin-top: 14px;
  text-align:center;
  color: var(--t-sub);
  font-weight: 700;
}

.team-card{
  background: var(--t-card);
  border: 1px solid var(--t-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--t-shadow);
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: pointer;
}
.team-card:hover{
  transform: translateY(-6px);
  box-shadow: var(--t-shadow2);
}

.team-card__top{
  padding: 16px 16px 12px;
  display:flex;
  gap:14px;
  align-items:center;
}

.team-photo{
  width: 72px; height: 72px;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid #4169E1;
  flex: 0 0 auto;
}

.team-name{
  font-weight: 900;
  font-size: 18px;
  line-height: 1.2;
  color: var(--t-text);
}
.team-role{
  margin-top: 3px;
  font-weight: 800;
  color: #4169E1;
  font-size: 13px;
}

.team-dates{
  margin-top: 6px;
  color: var(--t-sub);
  font-weight: 800;
  font-size: 12px;
}

.team-card__body{
  padding: 0 16px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .35s ease, opacity .25s ease;
}
.team-card__body-inner{
  padding: 0 0 14px;
  color: var(--t-sub);
  font-weight: 600;
  line-height: 1.55;
  font-size: 14px;
}

.team-card__foot{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 10px;
  border-top: 1px solid var(--t-line);
  padding: 12px 16px;
  color: var(--t-sub);
  font-weight: 800;
  font-size: 12px;
}
.team-card__chev{
  font-weight: 900;
  transition: transform .25s ease;
  color: var(--t-text);
}
.team-card.expanded .team-card__chev{ transform: rotate(180deg); }

.modal{
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: none;
}
.modal.open{ display:block; }
.modal__overlay{
  position:absolute; inset:0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
}
.modal__panel{
  position:relative;
  width: calc(100% - 24px);
  max-width: 1100px;
  margin: 6vh auto 0;
  background: var(--t-card);
  border: 1px solid var(--t-line);
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(0,0,0,0.35);
  padding: 16px;
}
.modal__head{
  display:flex;
  justify-content: space-between;
  align-items:flex-start;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--t-line);
}
.modal__head h3{ font-size: 22px; font-weight: 900; }
.modal__sub{ margin-top: 6px; color: var(--t-sub); font-weight: 700; }

.modal__close{
  border:none;
  background:#111;
  color:#fff;
  width: 40px; height: 40px;
  border-radius: 12px;
  cursor:pointer;
  font-weight: 900;
}
html[data-theme="dark"] .modal__close{ background:#fff; color:#111; }

.modal__tools{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items:center;
  margin-top: 12px;
}
.search-wrap input,
.select-wrap select{
  background: var(--t-bg);
  color: var(--t-text);
  border: 1px solid var(--t-line);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  outline:none;
}
.search-wrap input{ width: min(360px, 78vw); }

.team-grid--archive{ margin-top: 16px; }
