:root {
  --text: #ffffff;
  --muted: #a5acc2;
  --line: rgba(255, 255, 255, 0.15);
  --glass: rgba(8, 12, 32, 0.42);
}


/* =========================================================
   RESET
========================================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;

  color: var(--text);

  font-family: var(--vp-font);

  background:
    radial-gradient(
      ellipse 80% 70% at 0% 0%,
      #142e9a 0%,
      #0b1b61 30%,
      #05091f 65%,
      transparent 100%
    ),

    radial-gradient(
      ellipse 70% 60% at 100% 100%,
      #07164e 0%,
      #020510 65%,
      transparent 100%
    ),

    linear-gradient(
      135deg,
      #02030a 0%,
      #030615 45%,
      #000105 100%
    );

  background-attachment: fixed;

  overflow-x: hidden;
}


/* =========================================================
   TEAM PAGE
========================================================= */
.team-page {
  width: 100%;

  min-height: 100vh;

  padding-top: 125px;

  padding-bottom: 120px;
}


/* =========================================================
   VP REVOLVER
   CENTERED BELOW NAVBAR
========================================================= */

.vp-selector {
  position: absolute;

  top: 142px;
  right: 80px;
  left: auto;

  transform: none;

  width: 168px;
  height: 112px;

  margin: 0;
  z-index: 50;
  overflow: hidden;
  touch-action: none;
}

/* Liquid glass oval, same recipe as the navbar. The next VP shows
   half-faded below the current one through the window's fade. */
.vp-display {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0.03) 48%,
      rgba(255, 255, 255, 0.06)
    );
  backdrop-filter: blur(10px) saturate(185%) brightness(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(185%) brightness(1.08);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.18),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.55),
    inset 0 -1.5px 1px rgba(255, 255, 255, 0.2),
    inset 0 10px 18px -8px rgba(255, 255, 255, 0.18),
    inset 0 -12px 20px -10px rgba(170, 190, 255, 0.16);
}

/* Specular rim, as on the navbar */
.vp-display::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.2px;
  border-radius: inherit;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.85),
      rgba(255, 255, 255, 0.12) 22%,
      rgba(255, 255, 255, 0.04) 50%,
      rgba(255, 255, 255, 0.12) 78%,
      rgba(255, 255, 255, 0.6)
    );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.vp-window {
  position: relative;
  width: 100%;
  height: 88px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
}

.vp-track {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(-22px);
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.vp-item {
  width: 100%;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  color: rgba(219, 226, 246, 0.42);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  transition: color 420ms ease, font-size 420ms ease, font-weight 420ms ease;
  user-select: none;
}

.vp-item.is-active {
  color: #fff;
  font-size: 1.75rem;
  font-weight: 600;
}


/* =========================================================
   REMOVE OLD VP ELEMENTS
========================================================= */

.vp-arrow,
.vp-label,
.vp-display h1,
.vp-dots {

  display: none !important;
}


.vp-selector::after {

  display: none !important;
}


/* =========================================================
   TEAM CONTENT
========================================================= */

.vp-content {

  width:
    calc(100% - 80px);

  margin:
    315px auto 0;
}


/* =========================================================
   SIX PEOPLE — ONE ROW
========================================================= */

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  width: 100%;
}


/* =========================================================
   PERSON CARD
========================================================= */

.person-card {

  width: 100%;

  min-width: 0;

  overflow: hidden;

  border:
    1px solid
    rgba(255,255,255,0.14);

  border-radius: 24px;

  background:

    linear-gradient(
      145deg,
      rgba(35,48,115,0.20),
      rgba(5,8,23,0.62)
    );

  backdrop-filter:
    blur(18px)
    saturate(140%);

  -webkit-backdrop-filter:
    blur(18px)
    saturate(140%);

  box-shadow:

    0 20px 50px
    rgba(0,0,0,0.22),

    inset 0 1px 0
    rgba(255,255,255,0.10);

  transition:

    transform 0.35s ease,

    border-color 0.35s ease;
}


/* =========================================================
   REMOVE HIERARCHY
========================================================= */

.captain,
.vice-captain,
.management-lead,
.subsystem-card {

  transform: none;

  grid-column: auto;

  grid-row: auto;

  width: 100%;
}


.person-card:hover {

  transform:
    translateY(-7px);

  border-color:
    rgba(255,255,255,0.28);
}


/* =========================================================
   PERSON PHOTO
========================================================= */

.person-photo {
  position: relative;

  width: 55%;
  aspect-ratio: 4 / 5;

  overflow: hidden;

  margin: 20px auto 0;

  border-radius: 16px;

  background: #070b20;

  /* Force identical rendering area */
  min-height: 0;
}

.photo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  visibility: hidden;
  color: rgba(226, 233, 255, 0.9);
  font-size: clamp(1.5rem, 3vw, 2.75rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  background: linear-gradient(145deg, rgba(58, 78, 155, 0.72), rgba(10, 16, 44, 0.95));
}

.person-photo.photo-missing img {
  display: none;
}

.person-photo.photo-missing .photo-fallback {
  visibility: visible;
}


.person-photo::after {
  content: "";

  position: absolute;

  inset: 0;

  background:
    linear-gradient(
      180deg,
      transparent 55%,
      rgba(2, 3, 10, 0.55)
    );

  pointer-events: none;
}


.person-photo img {
  width: 100%;
  height: 100%;

  display: block;

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

  /* Prevent browser interpolation differences */
  image-rendering: auto;

  transition:
    transform 0.5s ease;
}



.person-card:hover .person-photo img {
  transform: scale(1.04);
}


/* =========================================================
   NAME + ROLE
========================================================= */

.person-info {

  padding:
    17px 8px 20px;

  text-align: center;
}


.person-info h3 {

  margin: 0;

  color: #ffffff;

  font-size:
    clamp(
      0.9rem,
      1.15vw,
      1.25rem
    );

  font-weight: 500;

  letter-spacing: -0.035em;

  white-space: nowrap;
}


.person-role {

  display: block;

  margin-top: 7px;

  color: #8994b7;

  font-size: 0.52rem;

  font-weight: 600;

  letter-spacing: 0.13em;

  text-transform: uppercase;

  white-space: nowrap;
}


/* =========================================================
   CONTACT ICONS (email + LinkedIn)
   Small glass buttons under the name. Placeholder links
   (#name-gmail / #name-linkedin) do nothing until filled in.
========================================================= */

.person-links {
  display: flex;
  justify-content: center;
  gap: 10px;

  margin-top: -6px;
  padding: 0 8px 18px;
}

.person-link {
  display: grid;
  place-items: center;

  width: 34px;
  height: 34px;

  border-radius: 50%;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.14),
      rgba(255, 255, 255, 0.04)
    );

  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.45),
    inset 0 -1px 1px rgba(255, 255, 255, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.25);

  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.person-link img {
  display: block;

  width: 16px;
  height: 16px;

  opacity: 0.9;
}

.person-link:hover {
  transform: translateY(-2px);

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.24),
      rgba(255, 255, 255, 0.08)
    );
}

.person-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}


/* =========================================================
   LARGE DESKTOP
   SIX MEMBERS IN ONE ROW
========================================================= */

@media (min-width: 1101px) {
  .team-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
  }
}


/* =========================================================
   LAPTOP
========================================================= */

@media (max-width: 1250px) {

  .vp-content {

    width:
      calc(100% - 50px);

    margin:
      315px 25px 0;
  }


  .team-grid {

    gap: 14px;
  }


  .person-photo {

    width: 55%;
  }


  .person-info h3 {

    font-size: 0.9rem;
  }


  .person-role {

    font-size: 0.48rem;

    letter-spacing: 0.10em;
  }

}


/* Navbar sizing lives in navbar.css. */

/* =========================================================
   TEAM INTRO — DECRYPT TITLE
========================================================= */

.team-intro {
  position: absolute;

  top: 200px;   /* moved up from 330px */
  left: 0;

  width: 100%;

  display: flex;
  justify-content: center;
  align-items: center;

  pointer-events: none;
  z-index: 10;
}

.decrypt-title {
  color: rgba(255, 255, 255, 0.92);

  font-family: var(--vp-font);

  /* Bigger */
  font-size: clamp(2.3rem, 2.9vw, 5.8rem);

  /* Bold like the headings on the other pages */
  font-weight: 800;

  letter-spacing: 0;

  text-align: center;
  white-space: nowrap;
  text-transform: uppercase;

  text-shadow:
    0 0 12px rgba(130, 155, 255, 0.22),
    0 0 30px rgba(80, 110, 255, 0.10);

  opacity: 0;

  transform: translateY(12px);

  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.decrypt-title.active {
  opacity: 1;
  transform: translateY(0);
}

/* Same spacing while scrambling, so the title keeps its width. */
.decrypt-title.decrypting {
  letter-spacing: 0;
}
/* =========================================================
   TEAM DIVISION NAVIGATION
   One liquid glass bar like the navbar, with the same glass
   pill (.nav-pill in navbar.css) gliding to the selected
   division. The pill is added by team.js.
========================================================= */

.division-nav {
  position: absolute;
  top: 335px;
  left: 50%;

  transform: translateX(-50%);

  width: max-content;
  max-width: calc(100% - 28px);

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;

  padding: 6px;

  border-radius: 999px;

  /* Same glass recipe as the navbar */
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0.03) 48%,
      rgba(255, 255, 255, 0.06)
    );

  backdrop-filter: blur(10px) saturate(185%) brightness(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(185%) brightness(1.08);

  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.18),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.55),
    inset 0 -1.5px 1px rgba(255, 255, 255, 0.2),
    inset 0 10px 18px -8px rgba(255, 255, 255, 0.18),
    inset 0 -12px 20px -10px rgba(170, 190, 255, 0.16);

  z-index: 20;
}

/* Specular rim, as on the navbar */
.division-nav::before {
  content: "";

  position: absolute;
  inset: 0;

  padding: 1.2px;

  border-radius: inherit;

  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.85),
      rgba(255, 255, 255, 0.12) 22%,
      rgba(255, 255, 255, 0.04) 50%,
      rgba(255, 255, 255, 0.12) 78%,
      rgba(255, 255, 255, 0.6)
    );

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;

  pointer-events: none;
}

.division-btn {
  position: relative;
  z-index: 1;

  height: 46px;
  padding: 0 24px;

  border: 0;
  border-radius: 999px;

  background: none;

  color: rgba(255, 255, 255, 0.62);

  font-family: var(--vp-font);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;

  cursor: pointer;

  transition: color 0.25s ease;
}

.division-btn:hover,
.division-btn.active {
  color: #fff;
}

.division-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}


/* =========================================================
   DIVISION SWITCH
   Cards slide sideways like the page switch (team.js). The
   page clips them at the screen edge, so no sideways scroll.
========================================================= */

.team-page {
  overflow-x: clip;
}

.vp-content {
  position: relative;
}

/* Frosted cards pause their blur while sliding, which keeps the
   slide smooth; over the dark background it isn't visible. */
.vp-content.is-sliding .person-card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}


/* =========================================================
   STACKED LAYOUT (small laptops)
   Kept last so it overrides the title and filter styles above.
   Stack: navbar → VP selector → title → filters → cards.
   Offsets follow the navbar height (navbar.css).
========================================================= */

@media (max-width: 1100px) {

  /* Navbar ends at ~117px */
  .vp-selector {
    top: 132px;
    left: 50%;
    right: auto;

    transform: translateX(-50%);

    width: 150px;
    height: 96px;
  }

  .team-intro {
    top: 244px;
    padding: 0 14px;
  }

  /* One line that scales with the screen, so the scramble never re-wraps. */
  .decrypt-title,
  .decrypt-title.decrypting {
    font-size: clamp(0.78rem, 3.6vw, 1.6rem);
    letter-spacing: 0;
  }

  .division-nav {
    top: 292px;

    gap: 2px;
    padding: 5px;
  }

  .division-btn {
    height: 36px;
    padding: 0 12px;

    font-size: 0.74rem;
    letter-spacing: 0.01em;
  }

  .vp-content {
    margin-top: 235px;
  }

}


/* =========================================================
   PHONES
   Kept last so it overrides everything above. Top to bottom,
   each block starts where the one before it ends:
     VP switch   64px, 46px tall          -> ends 110px
     title       126px                     -> ends ~150px
     filters     170px, two rows of 36px   -> ends ~252px
     cards       125px page padding + 143px = 268px
========================================================= */

@media (max-width: 700px) {

  /* ---------- VP switch: VP4 | VP3 | VP2, tap to pick ---------- */

  .vp-selector {
    top: 64px;
    left: 50%;
    right: auto;

    transform: translateX(-50%);

    width: min(228px, calc(100% - 32px));
    height: 46px;

    overflow: visible;
    touch-action: manipulation;  /* page scrolls normally over it */
  }

  .vp-display {
    display: block;
    padding: 4px;
  }

  .vp-window {
    height: 100%;

    -webkit-mask-image: none;
    mask-image: none;
  }

  .vp-track {
    position: static;

    flex-direction: row;
    gap: 2px;

    height: 100%;

    transform: none !important;  /* the revolver offset is set inline */
    transition: none;
  }

  .vp-item {
    flex: 1 1 0;
    height: 100%;

    border-radius: 999px;

    color: rgba(255, 255, 255, 0.62);

    font-size: 0.95rem;
    font-weight: 600;

    cursor: pointer;

    transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;

    -webkit-tap-highlight-color: transparent;
  }

  /* Selected segment: the same glass pill as the filters */
  .vp-item.is-active {
    color: #fff;

    font-size: 0.95rem;
    font-weight: 600;

    background:
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.22),
        rgba(255, 255, 255, 0.07) 55%,
        rgba(255, 255, 255, 0.12)
      );

    box-shadow:
      0 6px 18px rgba(0, 0, 0, 0.28),
      inset 0 1px 1px rgba(255, 255, 255, 0.7),
      inset 0 -1px 1px rgba(255, 255, 255, 0.22),
      inset 0 0 12px rgba(255, 255, 255, 0.08);
  }

  /* ---------- Title ---------- */

  .team-intro {
    top: 126px;
    padding: 0 16px;
  }

  .decrypt-title,
  .decrypt-title.decrypting {
    font-size: clamp(0.95rem, 4.6vw, 1.25rem);
  }

  /* ---------- Filters: an even 3 x 2 grid ---------- */

  .division-nav {
    top: 170px;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;

    width: calc(100% - 32px);
    max-width: 420px;

    border-radius: 22px;
  }

  .division-btn {
    width: 100%;
    height: 36px;
    padding: 0 6px;

    font-size: 0.8rem;
  }

  /* ---------- Cards: two across ---------- */

  .vp-content {
    width: calc(100% - 32px);
    margin: 143px 16px 0;
  }

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

  .person-card {
    border-radius: 20px;
  }

  /* No lift on tap: hover sticks after a touch on phones */
  .person-card:hover {
    transform: none;
  }

  .person-photo {
    width: 62%;
  }

  .photo-fallback {
    font-size: 1.6rem;
  }

  .person-info {
    padding: 14px 8px 14px;
  }

  .person-info h3 {
    font-size: 0.95rem;
    line-height: 1.25;
    white-space: normal;
  }

  .person-role {
    margin-top: 5px;

    font-size: 0.6rem;
    letter-spacing: 0.1em;
    line-height: 1.4;
    white-space: normal;
  }

  .person-links {
    margin-top: 0;
    padding-bottom: 16px;
  }

}
