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

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

:root {
  --background: #090812;
  --background-secondary: #111022;

  --panel: rgba(24, 21, 45, 0.94);
  --panel-light: rgba(35, 31, 62, 0.92);

  --purple: #9f73ff;
  --purple-bright: #c5a9ff;
  --cyan: #52e7f2;
  --cyan-soft: rgba(82, 231, 242, 0.18);

  --gold: #f6ca6a;
  --rose: #d993a9;

  --text: #f5f3ff;
  --text-muted: #aaa5c3;

  --border: rgba(159, 115, 255, 0.34);
  --border-bright: rgba(82, 231, 242, 0.52);

  --shadow:
    0 18px 50px rgba(0, 0, 0, 0.42);

  --glow-purple:
    0 0 20px rgba(159, 115, 255, 0.22);

  --glow-cyan:
    0 0 18px rgba(82, 231, 242, 0.22);

  --radius-large: 24px;
  --radius-medium: 16px;
  --radius-small: 10px;
}

html {
  min-height: 100%;
}

.site-nav-link {
  display: inline-block;

  margin-bottom: 18px;
  padding: 10px 16px;

  border: 1px solid currentColor;
  border-radius: 999px;

  color: inherit;
  text-decoration: none;

  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav-link:hover {
  transform: translateY(-1px);
}

body {
  min-height: 100vh;
  margin: 0;

  color: var(--text);

  font-family:
    Inter,
    "Segoe UI",
    Arial,
    sans-serif;

  background:
    radial-gradient(
      circle at top left,
      rgba(159, 115, 255, 0.18),
      transparent 34%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(82, 231, 242, 0.11),
      transparent 32%
    ),
    var(--background);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}


/* =========================================================
   GENERAL PAGE LAYOUT
========================================================= */

.page-shell {
  width: min(1500px, calc(100% - 40px));
  margin: 0 auto;
  padding: 50px 0 80px;
}

.page-view {
  animation: pageFade 260ms ease;
}

.page-view[hidden] {
  display: none;
}

@keyframes pageFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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


/* =========================================================
   DIRECTORY HEADER
========================================================= */

.page-header {
  max-width: 850px;
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 8px;

  color: var(--cyan);

  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.page-header h1,
.profile-header h1 {
  margin: 0;

  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.header-description {
  max-width: 700px;
  margin: 22px 0 0;

  color: var(--text-muted);

  font-size: 1.05rem;
  line-height: 1.65;
}


/* =========================================================
   DIRECTORY TOOLBAR
========================================================= */

.directory-toolbar {
  display: flex;
  justify-content: flex-end;

  margin-bottom: 28px;
}

.search-box {
  display: grid;
  gap: 8px;

  width: min(420px, 100%);

  color: var(--text-muted);

  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-box input {
  width: 100%;
  padding: 14px 16px;

  color: var(--text);

  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  outline: none;

  background: rgba(15, 13, 29, 0.84);

  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.search-box input:focus {
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
}


/* =========================================================
   MEMBER DIRECTORY GRID
========================================================= */

.member-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fill, minmax(235px, 1fr));

  gap: 22px;
}

.member-tile {
  position: relative;
  overflow: hidden;

  padding: 0;

  text-align: left;

  border: 1px solid var(--border);
  border-radius: var(--radius-medium);

  background:
    linear-gradient(
      145deg,
      rgba(35, 31, 62, 0.96),
      rgba(15, 13, 29, 0.97)
    );

  box-shadow: var(--shadow);

  cursor: pointer;

  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.member-tile::after {
  content: "";

  position: absolute;
  inset: 0;

  pointer-events: none;

  background:
    linear-gradient(
      120deg,
      transparent 30%,
      rgba(255, 255, 255, 0.04),
      transparent 68%
    );

  transform: translateX(-100%);
  transition: transform 420ms ease;
}

.member-tile:hover,
.member-tile:focus-visible {
  transform: translateY(-6px);

  border-color: var(--cyan);

  box-shadow:
    var(--shadow),
    var(--glow-cyan);
}

.member-tile:hover::after,
.member-tile:focus-visible::after {
  transform: translateX(100%);
}

.member-tile:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.member-tile-image {
  display: grid;
  place-items: center;

  min-height: 110px;

  border-bottom: 1px solid var(--border);

  background:
    radial-gradient(
      circle,
      rgba(159, 115, 255, 0.22),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      rgba(159, 115, 255, 0.08),
      rgba(82, 231, 242, 0.04)
    );
}

.member-tile-icon {
  width: 96px;
  height: 96px;

  object-fit: cover;

  border: 1px solid var(--cyan);
  border-radius: 4px;

  box-shadow: var(--glow-cyan);
}

.member-tile-icon-fallback {
  display: grid;
  place-items: center;

  width: 96px;
  height: 96px;

  color: var(--purple-bright);

  border: 1px solid var(--purple);
  border-radius: 4px;

  background: rgba(9, 8, 18, 0.58);

  font-size: 1.35rem;
  font-weight: 900;
}

.portrait-placeholder {
  display: grid;
  place-items: center;

  width: 128px;
  aspect-ratio: 1;

  color: var(--purple-bright);

  border: 2px solid var(--purple);
  border-radius: 50%;

  background: rgba(9, 8, 18, 0.58);

  box-shadow:
    var(--glow-purple),
    inset 0 0 25px rgba(159, 115, 255, 0.12);

  font-size: 3.4rem;
  font-weight: 900;
}

.member-tile-info {
  padding: 20px;
}

.member-tile-info h2 {
  margin: 0 0 7px;

  font-size: 1.25rem;
}

.member-owner {
  margin: 0;

  color: var(--cyan);

  font-size: 0.94rem;
  font-weight: 750;
}

.member-tile-summary {
  margin: 13px 0 0;

  color: var(--text-muted);

  font-size: 0.85rem;
}

.empty-message {
  padding: 30px;

  color: var(--text-muted);
  text-align: center;

  border: 1px dashed var(--border);
  border-radius: var(--radius-medium);
}


/* =========================================================
   PROFILE PAGE
========================================================= */

.back-button {
  margin-bottom: 22px;
  padding: 12px 18px;

  color: var(--cyan);

  border: 1px solid var(--border-bright);
  border-radius: var(--radius-small);

  background: rgba(82, 231, 242, 0.07);

  cursor: pointer;

  transition:
    background 180ms ease,
    transform 180ms ease;
}

.back-button:hover,
.back-button:focus-visible {
  transform: translateX(-3px);

  background: rgba(82, 231, 242, 0.14);
}

.profile-card {
  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: var(--radius-large);

  background:
    linear-gradient(
      155deg,
      rgba(29, 25, 53, 0.98),
      rgba(11, 10, 22, 0.98)
    );

  box-shadow: var(--shadow);
}

.profile-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;

  padding: 32px 38px;

  border-bottom: 1px solid var(--border);

  background:
    linear-gradient(
      110deg,
      rgba(159, 115, 255, 0.19),
      rgba(82, 231, 242, 0.06)
    );
}

.profile-header h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.member-number {
  color: var(--text-muted);

  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.member-number span {
  margin-left: 7px;

  color: var(--cyan);

  font-size: 1rem;
}


/* =========================================================
   IDENTITY PANEL
========================================================= */

.identity-panel {
  display: grid;
  grid-template-columns: 260px minmax(280px, 1fr) 280px;
  align-items: center;
  gap: 34px;

  padding: 38px;

  border-bottom: 1px solid var(--border);
}


/* -------------------------
   PORTRAIT
------------------------- */

.portrait-frame {
  display: grid;
  place-items: center;

  min-height: 310px;
  padding: 18px;

  border: 1px solid var(--border-bright);
  border-radius: var(--radius-medium);

  background:
    radial-gradient(
      circle,
      rgba(159, 115, 255, 0.2),
      transparent 63%
    ),
    rgba(9, 8, 18, 0.74);

  box-shadow:
    var(--glow-cyan),
    inset 0 0 35px rgba(82, 231, 242, 0.04);
}

.profile-portrait {
  display: grid;
  place-items: center;

  width: 100%;
  height: 274px;

  overflow: hidden;

  border-radius: var(--radius-medium);

  font-size: 4.7rem;
}

.profile-portrait-image {
  width: 100%;
  height: 100%;

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

  border-radius: var(--radius-medium);
}


/* -------------------------
   MEMBER IDENTITY
------------------------- */

.identity-details {
  min-width: 0;
}

.identity-label {
  margin: 0 0 8px;

  color: var(--text-muted);

  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.identity-details h2 {
  margin: 0;

  font-size: clamp(2.2rem, 5vw, 4.3rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.profile-owner {
  margin: 13px 0 0;

  color: var(--cyan);

  font-size: 1.25rem;
  font-weight: 800;
}


/* -------------------------
   OPTIONAL CLUB POSITION
------------------------- */

.profile-role {
  max-width: 620px;
  margin: 22px 0 0;
}

.profile-role-label {
  margin: 0 0 5px;

  color: var(--text-muted);

  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.profile-role h3 {
  margin: 0;

  color: var(--purple-bright);

  font-size: 1.08rem;
}

.profile-role > p:last-child {
  margin: 8px 0 0;

  color: var(--text-muted);

  line-height: 1.55;
}

.profile-bio {
  margin-top: 18px;
}

.profile-bio-label {
  margin: 0 0 6px;

  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;

  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.profile-bio p:last-child {
  margin: 0;

  max-width: 620px;

  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* -------------------------
   PROFILE OVERVIEW
------------------------- */

.profile-overview {
  display: grid;
  gap: 12px;

  width: 280px;
  margin: 0;

  justify-self: end;
  align-self: center;
}

.profile-overview div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 14px 16px;

  border: 1px solid rgba(159, 115, 255, 0.22);
  border-radius: var(--radius-small);

  background: rgba(9, 8, 18, 0.46);
}

.profile-overview dt {
  color: var(--text-muted);

  font-size: 0.8rem;
  font-weight: 700;
}

.profile-overview dd {
  margin: 0;

  color: var(--purple-bright);

  font-size: 1.05rem;
  font-weight: 900;
}


/* =========================================================
   PROFILE SECTIONS
========================================================= */

.profile-section {
  padding: 34px 38px;
}

.section-heading {
  margin-bottom: 23px;
}

.section-heading h2 {
  margin: 4px 0 0;

  font-size: 1.65rem;
}

.section-kicker {
  margin: 0;

  color: var(--cyan);

  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stat-grid {
  display: grid;
  grid-template-columns:
    repeat(6, minmax(120px, 1fr));

  gap: 14px;
}

.stat-card {
  display: grid;
  gap: 8px;

  min-height: 115px;
  padding: 19px;

  border: 1px solid rgba(159, 115, 255, 0.24);
  border-radius: var(--radius-small);

  background:
    linear-gradient(
      150deg,
      rgba(45, 38, 78, 0.7),
      rgba(14, 12, 27, 0.75)
    );
}

.stat-label {
  color: var(--text-muted);

  font-size: 0.76rem;
  font-weight: 750;
}

.stat-card strong {
  align-self: end;

  color: var(--text);

  font-size: 1.55rem;
}

.stat-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.stat-breakdown {
  color: var(--cyan);

  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr;

  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.split-section > .profile-section + .profile-section {
  border-left: 1px solid var(--border);
}


/* =========================================================
   NEXT TITLE PROGRESS
========================================================= */

.title-progress-list {
  display: grid;
  gap: 20px;
}

.title-progress-item {
  position: relative;

  padding: 20px;

  border: 1px solid rgba(159, 115, 255, 0.25);
  border-radius: var(--radius-medium);

  background: rgba(9, 8, 18, 0.43);
}

.progress-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 14px;
}

.progress-heading h3 {
  margin: 0;

  font-size: 1.08rem;
}

.progress-heading p {
  margin: 4px 0 0;

  color: var(--text-muted);

  font-size: 0.79rem;
}

.progress-heading > strong {
  color: var(--cyan);

  font-size: 1.08rem;
}

.progress-track {
  overflow: hidden;

  height: 16px;

  border: 1px solid rgba(82, 231, 242, 0.25);
  border-radius: 999px;

  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 12px,
      transparent 12px,
      transparent 16px
    ),
    rgba(0, 0, 0, 0.34);
}

.progress-fill {
  height: 100%;

  border-radius: inherit;

  background:
    repeating-linear-gradient(
      90deg,
      var(--cyan) 0,
      var(--cyan) 12px,
      rgba(82, 231, 242, 0.72) 12px,
      rgba(82, 231, 242, 0.72) 16px
    );

  box-shadow: var(--glow-cyan);

  transition: width 500ms ease;
}

.progress-value {
  margin: 9px 0 0;

  color: var(--text-muted);

  font-size: 0.8rem;
}

.almost-there-label {
  display: none;

  margin: 10px 0 0;

  color: var(--gold);

  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.title-progress-item.near-unlock {
  border-color: rgba(246, 202, 106, 0.62);

  box-shadow:
    0 0 22px rgba(246, 202, 106, 0.11);
}

.title-progress-item.near-unlock .progress-fill {
  background:
    repeating-linear-gradient(
      90deg,
      var(--gold) 0,
      var(--gold) 12px,
      rgba(246, 202, 106, 0.7) 12px,
      rgba(246, 202, 106, 0.7) 16px
    );

  box-shadow:
    0 0 16px rgba(246, 202, 106, 0.42);

  animation: nearUnlockPulse 2.2s ease-in-out infinite;
}

.title-progress-item.near-unlock .progress-heading > strong {
  color: var(--gold);
}

.title-progress-item.near-unlock .almost-there-label {
  display: block;
}

@keyframes nearUnlockPulse {
  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.35);
  }
}


/* =========================================================
   ACHIEVEMENTS
========================================================= */

.achievement-list {
  display: grid;
  gap: 14px;

  margin: 0;
  padding: 0;

  list-style: none;
}

.achievement-list li {
  display: flex;
  align-items: flex-start;
  gap: 13px;

  padding: 15px;

  border: 1px solid rgba(159, 115, 255, 0.2);
  border-radius: var(--radius-small);

  background: rgba(9, 8, 18, 0.39);
}

.achievement-marker {
  color: var(--purple-bright);

  line-height: 1.4;
}

.achievement-list strong,
.achievement-list span {
  display: block;
}

.achievement-list div span {
  margin-top: 4px;

  color: var(--text-muted);

  font-size: 0.78rem;
  line-height: 1.4;
}


/* =========================================================
   CAREER HIGHLIGHTS
========================================================= */

.highlight-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(160px, 1fr));

  gap: 14px;
}

.highlight-card {
  display: grid;
  gap: 9px;

  min-height: 100px;
  padding: 18px;

  border: 1px solid rgba(82, 231, 242, 0.2);
  border-radius: var(--radius-small);

  background:
    linear-gradient(
      145deg,
      rgba(82, 231, 242, 0.07),
      rgba(159, 115, 255, 0.08)
    );
}

.highlight-card span {
  color: var(--text-muted);

  font-size: 0.76rem;
  font-weight: 700;
}

.highlight-card strong {
  align-self: end;

  color: var(--cyan);

  font-size: 1.05rem;
}

.reserved-card {
  visibility: hidden;
}

/* =========================================================
   RESPONSIVE LAYOUT
========================================================= */

@media (max-width: 1120px) {
  .identity-panel {
    grid-template-columns: 220px 1fr;
  }

  .profile-overview {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, 1fr);
  }

  .profile-overview div {
    display: grid;
    gap: 8px;
  }

  .stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 24px, 1500px);
    padding-top: 28px;
  }

  .profile-header,
  .identity-panel,
  .profile-section {
    padding-left: 22px;
    padding-right: 22px;
  }

  .identity-panel {
    grid-template-columns: 1fr;
  }

  .portrait-frame {
    min-height: 250px;
  }

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

  .split-section {
    grid-template-columns: 1fr;
  }

  .split-section > .profile-section + .profile-section {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

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

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 18px, 1500px);
  }

  .profile-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .directory-toolbar {
    justify-content: stretch;
  }

  .search-box {
    width: 100%;
  }

  .member-grid {
    grid-template-columns: 1fr;
  }

  .member-tile-image {
    min-height: 150px;
  }

  .stat-grid,
  .profile-overview,
  .highlight-grid {
    grid-template-columns: 1fr;
  }

  .profile-card {
    border-radius: 16px;
  }
}