:root {
  --bg: #0a0e18;
  --bg2: #121a29;
  --panel: rgba(22, 31, 48, 0.82);
  --border: rgba(120, 160, 220, 0.18);
  --text: #e8eefc;
  --muted: #8d9cb8;
  --gold: #e8c766;
  --gold-soft: rgba(232, 199, 102, 0.15);
  --radius: 18px;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 12% -10%, #16233a 0%, transparent 60%),
    radial-gradient(900px 500px at 92% 0%, #1d2138 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Trebuchet MS", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
  pointer-events: none;
  z-index: 0;
  animation: float 18s ease-in-out infinite;
}
.orb1 { width: 420px; height: 420px; background: #2b6cff; top: -120px; left: -100px; }
.orb2 { width: 360px; height: 360px; background: #9b5cff; bottom: -120px; right: -80px; animation-delay: -6s; }
.orb3 { width: 300px; height: 300px; background: #ffb44a; top: 42%; right: 18%; opacity: 0.14; animation-delay: -11s; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(24px, -30px, 0) scale(1.07); }
}

/* ===== Topbar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(10, 14, 24, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

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

.logo {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(140deg, #e8c766, #b98b2f);
  color: #1a1205;
  font-size: 22px;
  box-shadow: 0 8px 22px rgba(232, 199, 102, 0.35);
}

.brand h1 {
  margin: 0;
  font-size: clamp(18px, 2.4vw, 23px);
  letter-spacing: 0.5px;
}

.tagline { margin: 2px 0 0; font-size: 12px; color: var(--muted); letter-spacing: 1.2px; text-transform: uppercase; }

.search-wrap input {
  width: min(320px, 60vw);
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(18, 26, 41, 0.9);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrap input:focus { border-color: rgba(232, 199, 102, 0.6); box-shadow: 0 0 0 3px rgba(232, 199, 102, 0.12); }

/* ===== Layout ===== */
main {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 42px) clamp(16px, 4vw, 48px) 60px;
}

.hero { text-align: center; margin-bottom: 30px; }
.hero h2 {
  margin: 8px 0 12px;
  font-size: clamp(26px, 4.6vw, 44px);
  line-height: 1.15;
  background: linear-gradient(100deg, #fff 10%, #e8c766 55%, #7fc4ff 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { max-width: 640px; margin: 0 auto; color: var(--muted); line-height: 1.65; font-size: 15px; }

.stats-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.stat-pill {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(22, 31, 48, 0.7);
  font-size: 13px;
  color: var(--muted);
}
.stat-pill strong { color: var(--gold); }

/* ===== Filters ===== */
.filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(10px);
}

.filter-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(12, 18, 30, 0.7);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
}
.chip:hover { color: var(--text); border-color: rgba(232, 199, 102, 0.4); }
.chip.active {
  background: linear-gradient(120deg, rgba(232, 199, 102, 0.22), rgba(232, 199, 102, 0.08));
  border-color: rgba(232, 199, 102, 0.65);
  color: var(--gold);
  font-weight: 600;
}
.chip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }

/* ===== Grid & cards ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.loading, .empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--muted);
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
  animation: rise 0.45s backwards;
}
.card:hover { transform: translateY(-6px); border-color: var(--accent, #e8c766); box-shadow: 0 20px 40px rgba(0,0,0,0.5); }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 0%, var(--accent, #e8c766) 0%, transparent 62%);
  opacity: 0.14;
  transition: opacity 0.25s;
}
.card:hover .card-glow { opacity: 0.26; }

.card-body { position: relative; padding: 18px 18px 20px; }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }

.portrait {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 22px; font-weight: 700;
  color: #0b1018;
  background: linear-gradient(140deg, var(--accent, #e8c766), rgba(255,255,255,0.55));
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  flex: 0 0 auto;
}

.tier {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(12, 18, 30, 0.8);
  border: 1px solid var(--border);
  color: var(--gold);
}

.card h3 { margin: 14px 0 4px; font-size: 18px; }
.card .title-line { font-size: 12.5px; color: var(--muted); min-height: 32px; line-height: 1.4; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.badge {
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(12, 18, 30, 0.72);
  border: 1px solid var(--border);
  color: #b9c6dd;
}
.badge.el { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.stars { color: var(--gold); font-size: 12px; letter-spacing: 1px; margin-top: 10px; }

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 7, 12, 0.78);
  backdrop-filter: blur(6px);
}
.modal-backdrop.open { display: flex; animation: fadeIn 0.2s; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.modal {
  position: relative;
  width: min(880px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #131c2c 0%, #0d1421 100%);
  box-shadow: var(--shadow);
  animation: pop 0.28s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop { from { opacity: 0; transform: scale(0.95) translateY(14px) } }

.close {
  position: absolute;
  top: 14px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(10, 14, 24, 0.8);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s;
}
.close:hover { background: rgba(232, 199, 102, 0.2); }

.modal-head {
  position: relative;
  padding: 26px 28px 22px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at 88% -20%, var(--accent) 0%, transparent 62%);
}
.modal-head .eyebrow { font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.modal-head h2 { margin: 8px 0 6px; font-size: clamp(24px, 4vw, 34px); }
.modal-head .sub { color: var(--muted); font-size: 14px; }
.quote {
  margin: 16px 0 0;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: #cfd9ea;
  font-size: 14px;
  line-height: 1.55;
}

.tabs { display: flex; gap: 6px; padding: 14px 22px 0; flex-wrap: wrap; }
.tab {
  padding: 9px 16px;
  border-radius: 12px 12px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13.5px;
  font-family: inherit;
  transition: all 0.18s;
}
.tab:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.tab.active { color: var(--accent); background: rgba(255,255,255,0.05); border-color: var(--border); }

.tab-panel { padding: 20px 26px 28px; display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.22s; }

.section { margin-bottom: 20px; }
.section:last-child { margin-bottom: 0; }
.section h4 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--gold);
}
.section p { margin: 0; line-height: 1.7; color: #c6d2e6; font-size: 14.5px; }

.kv {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px 14px;
  font-size: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
}
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: #dbe4f3; line-height: 1.5; }

.mate {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}
.mate .av {
  width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px; color: #0b1018;
  background: linear-gradient(140deg, var(--accent), rgba(255,255,255,0.6));
}
.mate b { display: block; font-size: 14px; margin-bottom: 3px; }
.mate span { font-size: 13px; color: var(--muted); line-height: 1.5; }

.team-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(120deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  margin-bottom: 10px;
}
.team-card b { color: var(--accent); font-size: 14px; }
.team-card .members { margin: 6px 0 4px; font-size: 14px; color: #dbe4f3; }
.team-card small { color: var(--muted); font-size: 12.5px; }

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 26px 16px 40px;
  color: #5f6d85;
  font-size: 12.5px;
  border-top: 1px solid var(--border);
}

@media (max-width: 620px) {
  .topbar { justify-content: center; }
  .search-wrap input { width: 100%; }
  .search-wrap { width: 100%; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
  .modal { max-height: 94vh; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}
