* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: #fff8ec;
  color: #102033;
}

.navbar {
  height: 72px;
  padding: 0 46px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 248, 236, 0.96);
  border-bottom: 1px solid rgba(197, 132, 32, 0.24);
}

.logo {
  color: #c98420;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 2px;
}

.logo span {
  color: #102033;
}

/* PUSH NAV TO RIGHT */
nav {
  display: flex;
  gap: 56px;
  margin-left: auto;
  margin-right: 26px;
}

nav a {
  color: #102033;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 27px 0;
  transition: 0.3s ease;
}

nav a.active,
nav a:hover {
  color: #c98420;
  border-bottom: 3px solid #c98420;
}

/* THEME TOGGLE */
.theme-switch {
  width: 74px;
  height: 38px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.switch-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 999px;
  background: linear-gradient(180deg, #f3c56d, #df9e29);
  border: 1px solid rgba(201, 132, 32, 0.35);
  transition: all 0.4s ease;
  box-shadow:
    inset 0 1px 3px rgba(255,255,255,0.04),
    0 0 14px rgba(35, 140, 255, 0.12);
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fffdf7, #ffe6ad);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(36px);
  transition:
    transform 0.4s ease,
    background 0.4s ease;
  overflow: hidden;
  box-shadow:
    0 4px 12px rgba(0,0,0,0.28),
    inset 0 1px 2px rgba(255,255,255,0.7);
}

.icon-toggle {
  position: absolute;
  font-size: 15px;
  transition: all 0.35s ease;
}

.sun {
  color: #f4a100;
  opacity: 1;
  transform: translateY(0);
}

.moon {
  color: #16345f;
  opacity: 0;
  transform: translateY(-10px);
}

.hero {
  min-height: 450px;
  padding-top: 88px;
  height: 300px;

  background-image:
    linear-gradient(
      90deg,
      rgba(255,248,236,.96),
      rgba(255,248,236,.68),
      rgba(255,248,236,.18)
    ),
    url("../assets/images/hero_3_light.png");

  background-repeat: no-repeat;
  background-position: center center;
  background-size: max(1920px, 100%) auto;
  background-color: #fff8ec;

  transition: background 0.4s ease;
}

.hero-text {
  max-width: 560px;
  margin-left: 76px;
}

.hero-text h1 {
  font-size: 66px;
  font-weight: 400;
}

.hero-text h1 span {
    color: #c98420;
}

.accent-line {
  width: 42px;
  height: 3px;
  background: #c98420;
  margin: 18px 0;
}

.hero-text p {
  font-size: 18px;
  line-height: 1.7;
  color: #39485c;
}

.team-page {
  padding: 24px 56px 48px;
}

.team-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.tabs {
  display: flex;
  border-right: 1px solid rgba(201,132,32,.16);
}

.tabs button {
  padding: 15px 22px;
  background: transparent;
  color: #48596d;
  border: 0;
  border-right: 1px solid rgba(201,132,32,.16);
  font-size: 14px;
}

.tabs button.active {
  color: #c98420;
  border: 1px solid rgba(201,132,32,.5);
  border-radius: 5px;
}

.tabs span {
  margin-left: 20px;
  color: #c98420;
}

.search {
  width: 300px;
  padding: 13px 16px;
  color: #69798c;
  border: 1px solid rgba(201,132,32,.2);
  border-radius: 5px;
  background: rgba(255,255,255,.58);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.member-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 185px;
  padding: 20px;
  background: linear-gradient(180deg, #fffdf8, #f6ead8);
  border: 1px solid rgba(201,132,32,.18);
  border-radius: 6px;
}

.member-card-main {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
}

.member-card-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.member-card img {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(201,132,32,.22);
}

.member-card h3,
.member-name-button {
  font-size: 16px;
  font-weight: 500;
  color: #102033;
}

.member-name-button {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.member-name-button:hover,
.member-name-button:focus-visible {
  color: #b87316;
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

.member-card h3 span {
  display: inline-block;
  margin-left: 6px;
  padding: 4px 7px;
  border-radius: 4px;
  background: rgba(201,132,32,.18);
  color: #b87316;
  font-size: 9px;
  text-transform: uppercase;
}

.role {
  margin: 9px 0 13px;
  color: #48596d;
  font-size: 13px;
}

.role-badge {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 4px;
  background: rgba(201,132,32,.18);
  color: #b87316;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.interest {
  color: #b87316;
  font-weight: 700;
  font-size: 13px;
  margin: 10px 0 5px;
}

.research-interests {
  color: #69798c;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-line;
}

.research-interests.empty {
  color: #69798c;
}

.member-card p {
  /* color: #69798c; */
  font-size: 13px;
  line-height: 1.55;
}

.links {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  color: #39485c;
}

.links a,
.links span {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201,132,32,.18);
  border-radius: 4px;
  background: rgba(255,255,255,.5);
  color: #b87316;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.links span {
  width: auto;
  flex: 0 1 auto;
  padding: 0 8px;
  color: #69798c;
  font-weight: 500;
}

.team-message {
  grid-column: 1 / -1;
  padding: 36px 20px;
  color: #69798c;
  text-align: center;
  border: 1px solid rgba(201,132,32,.18);
  border-radius: 6px;
  background: linear-gradient(180deg, #fffdf8, #f6ead8);
}

body.team-modal-open {
  overflow: hidden;
}

.team-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 32px;
  backdrop-filter: blur(10px);
}

.team-modal-card {
  position: relative;
  width: min(760px, 100%);
  max-height: min(88vh, 840px);
  overflow: auto;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  padding: 28px;
  background: linear-gradient(180deg, #fffdf8, #f6ead8);
  border: 1px solid rgba(201,132,32,.28);
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(16, 32, 51, 0.2);
}

.team-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(201,132,32,.22);
  border-radius: 4px;
  background: rgba(255,255,255,.66);
  color: #b87316;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.team-modal-image {
  width: 190px;
  height: 190px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(201,132,32,.24);
}

.team-modal-details {
  min-width: 0;
  padding-right: 34px;
}

.team-modal-details h2 {
  margin: 0 0 8px;
  color: #102033;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
}

.team-modal-details .links {
  margin-top: 18px;
  padding-top: 0;
}

.team-modal-bio {
  grid-column: 1 / -1;
  padding-top: 22px;
  border-top: 1px solid rgba(201,132,32,.18);
}

.team-modal-bio h3 {
  margin-bottom: 10px;
  color: #b87316;
  font-size: 15px;
  text-transform: uppercase;
}

.team-modal-bio p {
  color: #48596d;
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-line;
  text-align: justify;
}

.stats {
  margin-top: 20px;
  padding: 30px 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(180deg, #fffdf8, #f6ead8);
  border: 1px solid rgba(201,132,32,.18);
  border-radius: 6px;
}

.stats div {
  border-right: 1px solid rgba(201,132,32,.16);
  padding-left: 30px;
}

.stats div:last-child {
  border-right: 0;
}

.stats strong {
  display: block;
  color: #c98420;
  font-size: 32px;
  font-weight: 500;
}

.stats span {
  display: block;
  margin-top: 5px;
  color: #102033;
}

.stats p {
  margin-top: 6px;
  color: #69798c;
}

@media (max-width: 1150px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-toolbar {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
}

@media (max-width: 750px) {
  .navbar {
    height: auto;
    padding: 24px;
    flex-direction: column;
    gap: 18px;
  }

  nav,
  .tabs {
    flex-wrap: wrap;
    gap: 18px;
  }

  .page-hero {
    height: 340px;
  }

  .hero-text {
    margin: 0 28px;
  }

  .hero-text h1 {
    font-size: 48px;
  }



  .team-page {
    padding: 28px;
  }

  .team-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .member-card {
    display: flex;
  }

  .member-card-main {
    grid-template-columns: 80px 1fr;
  }

  .member-card img {
    width: 76px;
    height: 76px;
  }

  .team-modal-overlay {
    padding: 18px;
    align-items: start;
  }

  .team-modal-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
    margin-top: 18px;
  }

  .team-modal-image {
    width: 150px;
    height: 150px;
  }

  .team-modal-details {
    padding-right: 0;
  }

  .search {
    width: 100%;
  }

  .stats div {
    border-right: 0;
    border-bottom: 1px solid rgba(201,132,32,.16);
    padding: 20px 0;
  }
}
