/* ============================================================
   ProjectMatch — Design System
   Premium dark-mode interface with glassmorphism, micro-animations
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-base:       #060C1A;
  --bg-surface:    #0C1628;
  --bg-card:       #111E38;
  --bg-card-hover: #152540;
  --bg-overlay:    rgba(6, 12, 26, 0.8);

  /* Borders */
  --border-subtle:  rgba(255, 255, 255, 0.06);
  --border-medium:  rgba(255, 255, 255, 0.10);
  --border-accent:  rgba(0, 212, 255, 0.25);

  /* Accent colors */
  --cyan:       #00D4FF;
  --cyan-dim:   rgba(0, 212, 255, 0.15);
  --cyan-glow:  0 0 20px rgba(0, 212, 255, 0.3);
  --purple:     #7B61FF;
  --purple-dim: rgba(123, 97, 255, 0.15);
  --amber:      #FFB547;
  --amber-dim:  rgba(255, 181, 71, 0.15);
  --green:      #00E5A0;
  --green-dim:  rgba(0, 229, 160, 0.12);
  --red:        #FF4D6A;
  --red-dim:    rgba(255, 77, 106, 0.12);

  /* Typography */
  --text-primary:   #F0F4FF;
  --text-secondary: #8899BB;
  --text-muted:     #4A5A78;
  --text-accent:    var(--cyan);

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-fast:   0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-medium: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-slow:   0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 32px rgba(0, 212, 255, 0.15);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Background Pattern ──────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(123, 97, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0, 212, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 100% 60% at 50% 50%, rgba(0, 229, 160, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-8);
  height: 60px;
  background: rgba(6, 12, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo {
  font-size: 20px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.nav-breadcrumb {
  flex: 1;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ── Main Content ──────────────────────────────────────────── */
#main {
  flex: 1;
  transition: opacity var(--ease-medium);
}

#main.view-enter {
  animation: fadeSlideIn var(--ease-medium) forwards;
}

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

/* ── Page Container ─────────────────────────────────────────── */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-8);
}

.page-narrow {
  max-width: 700px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-8);
}

.page-wide {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-8);
}

/* ── Typography ─────────────────────────────────────────────── */
.page-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.page-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Cards / Glass ──────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: background var(--ease-fast), border-color var(--ease-fast), box-shadow var(--ease-fast);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.card-glass {
  background: rgba(17, 30, 56, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.card-accent {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--ease-fast);
  border: none;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.25);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0, 212, 255, 0.35);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  padding: 8px 14px;
  font-size: 13px;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(255, 77, 106, 0.2);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(255, 77, 106, 0.2);
}

.btn-amber {
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid rgba(255, 181, 71, 0.2);
}

.btn-amber:hover:not(:disabled) {
  background: rgba(255, 181, 71, 0.25);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.btn-full { width: 100%; justify-content: center; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-strong-fit {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(0, 229, 160, 0.25);
}

.badge-growth-pick {
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid rgba(255, 181, 71, 0.25);
}

.badge-uncovered {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(255, 77, 106, 0.25);
}

.badge-cyan {
  background: var(--cyan-dim);
  color: var(--cyan);
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.badge-purple {
  background: var(--purple-dim);
  color: var(--purple);
  border: 1px solid rgba(123, 97, 255, 0.2);
}

.badge-neutral {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* ── Forms ───────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  transition: border-color var(--ease-fast), box-shadow var(--ease-fast);
  outline: none;
  width: 100%;
}

.form-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-input::placeholder { color: var(--text-muted); }

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238899BB' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ── Range Slider ─────────────────────────────────────────── */
.slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: var(--radius-full);
  background: linear-gradient(to right, var(--cyan), var(--purple));
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
  cursor: pointer;
  transition: box-shadow var(--ease-fast);
}

.slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.6);
}

.slider-value {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan);
}

/* ── Skill Level Dots ────────────────────────────────────── */
.skill-dots {
  display: flex;
  gap: 4px;
}

.skill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-medium);
  transition: background var(--ease-fast);
}

.skill-dot.filled {
  background: var(--cyan);
  box-shadow: 0 0 6px rgba(0, 212, 255, 0.4);
}

/* ── Progress / Coverage Bars ────────────────────────────── */
.bar-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  flex: 1;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-fill-cyan   { background: linear-gradient(90deg, var(--cyan), #0090b3); }
.bar-fill-green  { background: linear-gradient(90deg, var(--green), #00a870); }
.bar-fill-amber  { background: linear-gradient(90deg, var(--amber), #e09000); }
.bar-fill-purple { background: linear-gradient(90deg, var(--purple), #5540cc); }
.bar-fill-red    { background: linear-gradient(90deg, var(--red), #cc2040); }

.bar-label-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.bar-label-text {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 140px;
}

.bar-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 36px;
  text-align: right;
}

/* ── Avatar ──────────────────────────────────────────────── */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 16px;
}

/* ── Tags ─────────────────────────────────────────────────── */
.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--ease-fast);
  user-select: none;
}

.tag:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.tag.active {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
}

.tag-remove {
  font-size: 14px;
  line-height: 1;
  opacity: 0.6;
  cursor: pointer;
  margin-left: 2px;
}

.tag-remove:hover { opacity: 1; }

/* ── Availability Grid ───────────────────────────────────── */
.avail-grid {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.avail-day {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--text-muted);
  transition: all var(--ease-fast);
  user-select: none;
}

.avail-day:hover { border-color: var(--cyan); color: var(--text-secondary); }

.avail-day.active {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.2);
}

/* ── Code Block ──────────────────────────────────────────── */
.code-block {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-medium);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #c9d1d9;
  white-space: pre;
  margin: var(--space-4) 0;
}

/* ── Data Table ──────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: var(--space-4) 0;
}

.data-table th {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: background var(--ease-fast);
}

.data-table tr:hover td { background: rgba(255,255,255,0.02); }

.data-table tr.row-alert td { color: var(--text-primary); }
.data-table tr.row-caution td { color: var(--text-primary); }

.row-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.row-tag.normal   { background: var(--green-dim); color: var(--green); }
.row-tag.caution  { background: var(--amber-dim); color: var(--amber); }
.row-tag.alert    { background: var(--red-dim); color: var(--red); }

/* ── Challenge UI ────────────────────────────────────────── */
.challenge-stage-progress {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.stage-pip {
  height: 4px;
  flex: 1;
  border-radius: var(--radius-full);
  background: var(--border-medium);
  transition: background var(--ease-medium);
}

.stage-pip.done    { background: var(--green); }
.stage-pip.active  { background: var(--cyan); box-shadow: var(--cyan-glow); }

.challenge-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.challenge-phase-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 5px 14px;
  background: var(--cyan-dim);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.04em;
}

.challenge-timer {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 14px;
}

.challenge-timer.warning { color: var(--amber); border-color: rgba(255,181,71,0.3); }
.challenge-timer.danger  { color: var(--red); border-color: rgba(255,77,106,0.3); }

.option-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--ease-fast);
  margin-bottom: var(--space-3);
  background: var(--bg-card);
  user-select: none;
}

.option-card:hover:not(.disabled) {
  border-color: var(--cyan);
  background: var(--bg-card-hover);
  transform: translateX(2px);
}

.option-card.selected {
  border-color: var(--cyan);
  background: var(--cyan-dim);
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.3);
}

.option-card.correct {
  border-color: var(--green);
  background: var(--green-dim);
  box-shadow: 0 0 0 1px rgba(0, 229, 160, 0.3);
}

.option-card.incorrect {
  border-color: var(--red);
  background: var(--red-dim);
}

.option-card.disabled { cursor: default; }

.option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  flex-shrink: 0;
  transition: all var(--ease-fast);
  color: var(--text-secondary);
}

.option-card.selected  .option-letter { background: var(--cyan);  color: #fff; border-color: var(--cyan); }
.option-card.correct   .option-letter { background: var(--green); color: #fff; border-color: var(--green); }
.option-card.incorrect .option-letter { background: var(--red);   color: #fff; border-color: var(--red); }

.option-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  flex: 1;
}

.option-card.selected  .option-text { color: var(--text-primary); }

.feedback-box {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  margin: var(--space-4) 0;
  font-size: 14px;
  line-height: 1.6;
  animation: fadeSlideIn var(--ease-medium) forwards;
}

.feedback-box.correct {
  background: var(--green-dim);
  border: 1px solid rgba(0, 229, 160, 0.3);
  color: var(--green);
}

.feedback-box.incorrect {
  background: var(--red-dim);
  border: 1px solid rgba(255, 77, 106, 0.25);
  color: var(--text-primary);
}

/* ── Reference Box ───────────────────────────────────────── */
.reference-box {
  background: rgba(0, 212, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-5);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.new-info-box {
  background: rgba(255, 181, 71, 0.06);
  border: 1px solid rgba(255, 181, 71, 0.2);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  animation: fadeSlideIn var(--ease-slow) forwards;
}

/* ── Dashboard ───────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.team-roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
}

.member-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all var(--ease-fast);
  position: relative;
  overflow: hidden;
}

.member-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  opacity: 0;
  transition: opacity var(--ease-fast);
}

.member-card:hover { background: var(--bg-card-hover); }
.member-card:hover::before { opacity: 1; }

.member-card.growth-pick-card::before {
  background: linear-gradient(90deg, var(--amber), #ff9500);
  opacity: 1;
}

.member-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.member-info { flex: 1; min-width: 0; }

.member-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-role {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.evidence-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.evidence-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.evidence-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.evidence-label-declared  { color: var(--cyan); }
.evidence-label-demonstrated { color: var(--amber); }

/* ── Coverage Visualization ──────────────────────────────── */
.coverage-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.coverage-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.coverage-skill {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 160px;
  flex-shrink: 0;
}

.coverage-importance-dots {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.importance-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-medium);
}

.importance-dot.filled { background: var(--amber); }

/* ── Outcome States ──────────────────────────────────────── */
.outcome-hero {
  text-align: center;
  padding: var(--space-12) var(--space-6);
}

.outcome-icon {
  font-size: 56px;
  margin-bottom: var(--space-4);
  line-height: 1;
}

.outcome-headline {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
}

.outcome-explanation {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
}

.outcome-next {
  margin-top: var(--space-8);
  padding: var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  text-align: left;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Landing ─────────────────────────────────────────────── */
.landing-hero {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-8);
  text-align: center;
}

.landing-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: var(--space-4);
}

.landing-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: var(--space-5);
}

.landing-title .gradient-text {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 50%, var(--amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: var(--space-12);
}

.role-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  max-width: 680px;
  width: 100%;
}

.role-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  position: relative;
  overflow: hidden;
}

.role-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.role-card.student-card::before {
  background: radial-gradient(circle at 30% 30%, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
}

.role-card.organizer-card::before {
  background: radial-gradient(circle at 70% 30%, rgba(123, 97, 255, 0.08) 0%, transparent 70%);
}

.role-card:hover { border-color: var(--border-accent); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.role-card:hover::before { opacity: 1; }

.role-card-icon {
  font-size: 32px;
  margin-bottom: var(--space-4);
  line-height: 1;
}

.role-card-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}

.role-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.role-card-cta {
  margin-top: var(--space-5);
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}

.landing-flow-diagram {
  margin-top: var(--space-16);
  max-width: 640px;
  width: 100%;
}

.flow-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.flow-step-bubble {
  padding: 5px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.flow-step-bubble.highlight {
  background: var(--cyan-dim);
  border-color: var(--border-accent);
  color: var(--cyan);
}

.flow-arrow {
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Skill Row (profile form) ────────────────────────────── */
.skill-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  transition: border-color var(--ease-fast);
}

.skill-row:hover { border-color: var(--border-medium); }

.skill-row-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
}

.skill-level-slider {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.skill-dots-interactive {
  display: flex;
  gap: 5px;
}

.skill-dot-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all var(--ease-fast);
  background: var(--border-medium);
  padding: 0;
}

.skill-dot-btn.active {
  background: var(--cyan);
  box-shadow: 0 0 6px rgba(0, 212, 255, 0.5);
}

/* ── Importance Stars ────────────────────────────────────── */
.importance-stars {
  display: flex;
  gap: 4px;
}

.star {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--border-medium);
  cursor: pointer;
  transition: background var(--ease-fast);
}

.star.active { background: var(--amber); }

/* ── Stats Row ───────────────────────────────────────────── */
.stats-row {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 120px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-6) 0;
}

/* ── Why This Team ───────────────────────────────────────── */
.why-body {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.why-body strong, .why-body b { color: var(--text-primary); font-weight: 600; }
.why-body em { color: var(--cyan); font-style: normal; }

/* ── Requirement rows (organizer create) ─────────────────── */
.req-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
}

.req-skill-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  font-weight: 500;
}

.req-skill-input::placeholder { color: var(--text-muted); }

/* ── Toast / Notification ─────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  max-width: 320px;
}

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

.toast.hiding {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(8px); }
}

/* ── Swap Diff ───────────────────────────────────────────── */
.swap-diff {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 12px;
}

.swap-diff-before { color: var(--red);  text-decoration: line-through; }
.swap-diff-after  { color: var(--green); }

/* ── Empty / Loading States ─────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--text-muted);
}

.empty-state-icon { font-size: 40px; margin-bottom: var(--space-3); }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: var(--space-2); }
.empty-state-desc  { font-size: 14px; }

/* ── Collapsible Section ─────────────────────────────────── */
.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: var(--space-4) 0;
}

.collapsible-header:hover .section-title { color: var(--cyan); }

.collapsible-chevron {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform var(--ease-fast);
}

.collapsible-chevron.open { transform: rotate(180deg); }

.collapsible-body {
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity var(--ease-medium);
}

.collapsible-body.closed { max-height: 0; opacity: 0; }

/* ── Project Info Strip ──────────────────────────────────── */
.project-strip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.project-strip-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex: 1;
}

.project-strip-meta {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
}

.project-strip-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .page, .page-narrow, .page-wide {
    padding: var(--space-6) var(--space-4);
  }

  .role-cards {
    grid-template-columns: 1fr;
  }

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

  .landing-title { font-size: 38px; }

  .stats-row { gap: var(--space-2); }

  .nav { padding: 0 var(--space-4); }

  .project-strip { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
}

@media (max-width: 480px) {
  .flow-steps { flex-direction: column; }
  .landing-subtitle { font-size: 15px; }
}

/* ── Utility ─────────────────────────────────────────────── */
.flex    { display: flex; }
.flex-col{ display: flex; flex-direction: column; }
.gap-2   { gap: var(--space-2); }
.gap-3   { gap: var(--space-3); }
.gap-4   { gap: var(--space-4); }
.gap-6   { gap: var(--space-6); }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1  { flex: 1; }
.mb-2    { margin-bottom: var(--space-2); }
.mb-3    { margin-bottom: var(--space-3); }
.mb-4    { margin-bottom: var(--space-4); }
.mb-6    { margin-bottom: var(--space-6); }
.mb-8    { margin-bottom: var(--space-8); }
.mt-2    { margin-top: var(--space-2); }
.mt-4    { margin-top: var(--space-4); }
.mt-6    { margin-top: var(--space-6); }
.mt-8    { margin-top: var(--space-8); }
.text-center { text-align: center; }
.hidden  { display: none !important; }
.w-full  { width: 100%; }

.gradient-text {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-cyan   { color: var(--cyan); }
.text-amber  { color: var(--amber); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-muted  { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-bold  { font-weight: 700; }
.text-sm    { font-size: 13px; }
.text-xs    { font-size: 11px; }

/* ═══════════════════════════════════════════════════════════
   UI POLISH — Phase 9
   New components added by app.js rewrite
   ═══════════════════════════════════════════════════════════ */

/* ── Firebase Status Indicator ────────────────────────────── */
.fb-status-dot {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 3px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: color var(--ease-medium);
}

/* ── Nav: polished brand mark ─────────────────────────────── */
.nav-logo-mark {
  font-size: 22px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.nav-tagline {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ── Nav: center flex area ────────────────────────────────── */
.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ── Step Progress (in nav, for multi-step flows) ─────────── */
.nav-progress {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-step {
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0.4;
  transition: opacity var(--ease-fast);
}

.nav-step.active  { opacity: 1; }
.nav-step.done    { opacity: 0.7; }

.nav-step-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--ease-fast);
}

.nav-step.active .nav-step-dot {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
}

.nav-step.done .nav-step-dot {
  background: var(--green-dim);
  border-color: var(--green);
  color: var(--green);
}

.nav-step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.nav-step.active .nav-step-label { color: var(--text-primary); }
.nav-step.done   .nav-step-label { color: var(--green); }

.nav-step-line {
  width: 20px;
  height: 1px;
  background: var(--border-subtle);
  margin: 0 2px;
}

/* ── Landing: eyebrow with dots ──────────────────────────── */
.landing-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

.eyebrow-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.5;
}

/* ── Role Card header row ──────────────────────────────────── */
.role-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.role-card-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px 10px;
}

/* ── Role Card mini-steps ─────────────────────────────────── */
.role-card-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-4);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.rc-step {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  white-space: nowrap;
}

.rc-step.highlight {
  color: var(--cyan);
  background: var(--cyan-dim);
  border-color: var(--border-accent);
}

.rc-arrow {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Demo Strip ──────────────────────────────────────────── */
.landing-demo-strip {
  max-width: 680px;
  width: 100%;
  margin-top: var(--space-8);
  padding: var(--space-5) var(--space-6);
  background: rgba(0, 212, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  gap: var(--space-6);
  justify-content: space-between;
  flex-wrap: wrap;
}

.demo-strip-left { flex: 1; min-width: 200px; }

.demo-strip-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.demo-strip-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── How It Works / Engine Diagram ──────────────────────────── */
.landing-how {
  margin-top: var(--space-16);
  max-width: 880px;
  width: 100%;
}

.engine-diagram {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  justify-content: center;
}

.engine-input-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
  min-width: 180px;
  max-width: 220px;
}

.engine-core-col,
.engine-output-col {
  flex: 1;
  min-width: 180px;
  max-width: 220px;
}

.engine-arrow-col {
  font-size: 22px;
  color: var(--text-muted);
  flex-shrink: 0;
  font-weight: 300;
}

.engine-plus {
  text-align: center;
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1;
}

.engine-block {
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.engine-block-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.engine-block-value {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.5;
}

.input-block   { border-color: var(--border-subtle); }

.highlight-block {
  border-color: rgba(255, 181, 71, 0.25);
  background: rgba(255, 181, 71, 0.05);
}

.core-block {
  border-color: var(--border-accent);
  background: var(--cyan-dim);
  text-align: center;
  padding: var(--space-5) var(--space-4);
}

.output-block {
  border-color: rgba(0, 229, 160, 0.25);
  background: rgba(0, 229, 160, 0.05);
}

/* ── Formula Row ─────────────────────────────────────────── */
.formula-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
}

.formula-pill {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  flex-wrap: wrap;
}

.formula-label {
  color: var(--cyan);
  font-weight: 500;
}

.formula-eq {
  color: var(--text-muted);
}

/* ── Differentiators ─────────────────────────────────────── */
.landing-differentiators {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--space-4);
  max-width: 880px;
  width: 100%;
  margin-top: var(--space-12);
}

.diff-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-5);
  text-align: left;
  transition: border-color var(--ease-fast), transform var(--ease-fast);
}

.diff-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.diff-icon {
  font-size: 24px;
  margin-bottom: var(--space-3);
  line-height: 1;
}

.diff-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.diff-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Student.js Experience Dots Fix ──────────────────────── */
/* The experience section in student profile uses .experience-dots-wrapper
   which wasn't rendered. We fix layout for the static dots here. */
.experience-level-row {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-2) 0;
}

/* ── Nav responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-progress  { display: none; }
  .nav-center    { display: none; }
  .nav-tagline   { display: none; }
  .fb-status-dot { display: none; }
  .nav-actions .btn-ghost { display: none; }
}

@media (max-width: 600px) {
  .engine-diagram    { flex-direction: column; }
  .engine-arrow-col  { transform: rotate(90deg); }
  .landing-demo-strip { flex-direction: column; }
  .diff-card         { padding: var(--space-4); }
}

