/* ═══════════════════════════════════════════════════════════
   SkillGap AI — style.css
   Dark background · High contrast white text · Sharp & clean
═══════════════════════════════════════════════════════════ */

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

:root {
  /* backgrounds */
  --bg:       #0a0a0a;
  --bg-card:  #111111;
  --bg-hover: #161616;
  --border:   #242424;
  --border-2: #303030;

  /* text — HIGH CONTRAST, always readable */
  --white:    #ffffff;
  --gray-1:   #cccccc;   /* secondary text  */
  --gray-2:   #888888;   /* tertiary / hints */
  --gray-3:   #444444;   /* very subtle      */

  /* accent — electric lime, pops on dark */
  --accent:   #c8ff00;
  --accent-2: #a8d900;
  --accent-dim: rgba(200, 255, 0, 0.08);

  /* status colors — vivid, not pastel */
  --green:    #4ade80;
  --green-bg: rgba(74,222,128,0.08);
  --red:      #f87171;
  --red-bg:   rgba(248,113,113,0.08);
  --amber:    #fbbf24;
  --amber-bg: rgba(251,191,36,0.08);
  --blue:     #60a5fa;
  --blue-bg:  rgba(96,165,250,0.08);

  /* type */
  --font:  'Sora', sans-serif;
  --mono:  'JetBrains Mono', monospace;

  --r:    10px;
  --r-sm: 6px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  /* dot grid background — gives depth without noise */
  background-image: radial-gradient(circle, #1e1e1e 1px, transparent 1px);
  background-size: 28px 28px;
  background-attachment: fixed;
}

/* ── Nav ─────────────────────────────────────────────────── */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--white);
}
.logo-mark { color: var(--accent); font-size: 1.2rem; }
.logo-accent { color: var(--accent); }

.nav-pill {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--gray-2);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* ── Hero ────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 5rem 2rem 3.5rem;
  max-width: 780px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(200,255,0,0.25);
  background: var(--accent-dim);
  padding: 5px 16px;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--white);
  margin-bottom: 1.1rem;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 700;
}

.hero-sub {
  font-size: 1rem;
  color: var(--gray-1);         /* #cccccc — clearly visible */
  line-height: 1.7;
  font-weight: 300;
}

/* ── Workspace ───────────────────────────────────────────── */

.workspace {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 2.5rem 4rem;
  align-items: start;
}

/* ── Cards ───────────────────────────────────────────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1rem;
}

.card-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-2);
  margin-bottom: 1rem;
}

/* ── Upload Zone ─────────────────────────────────────────── */

.upload-zone {
  border: 1.5px dashed var(--border-2);
  border-radius: var(--r-sm);
  background: #0d0d0d;
  padding: 1.75rem 1rem;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
  margin-bottom: 0.75rem;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upload-arrow {
  font-size: 1.8rem;
  color: var(--gray-3);
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}
.upload-zone:hover .upload-arrow { color: var(--accent); }

.upload-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);         /* WHITE — fully visible */
  margin-bottom: 0.25rem;
}
.upload-hint {
  font-size: 0.75rem;
  color: var(--gray-2);        /* still readable */
}

.upload-done {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.done-icon {
  width: 30px; height: 30px;
  background: var(--green-bg);
  border: 1px solid rgba(74,222,128,0.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
  font-size: 0.85rem;
  flex-shrink: 0;
}
.done-name {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--green);         /* bright green — very visible */
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.done-clear {
  background: none; border: none;
  color: var(--gray-2); cursor: pointer;
  font-size: 0.8rem; padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.done-clear:hover { color: var(--red); background: var(--red-bg); }

.upload-note {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--gray-2);
  text-align: center;
}

/* ── Role Input ──────────────────────────────────────────── */

.role-field {
  width: 100%;
  background: #0d0d0d;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--white);          /* WHITE text in input */
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.7rem 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 0.9rem;
}
.role-field::placeholder { color: var(--gray-3); }
.role-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.quick-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.qr-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--gray-2);
  margin-right: 0.2rem;
}
.qr-chip {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 4px 10px;
  border-radius: 5px;
  background: #161616;
  color: var(--gray-1);        /* #cccccc — readable on dark */
  border: 1px solid var(--border-2);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.qr-chip:hover, .qr-chip.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(200,255,0,0.3);
}

/* ── Analyze Button ──────────────────────────────────────── */

.btn-run {
  width: 100%;
  background: var(--accent);
  color: #0a0a0a;               /* BLACK text on lime — max contrast */
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-run:hover {
  background: #d4ff1a;
  box-shadow: 0 0 28px rgba(200,255,0,0.25);
  transform: translateY(-1px);
}
.btn-run:active { transform: translateY(0); }

/* ── Results Column ──────────────────────────────────────── */

.col-results {
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

/* ── Idle State ──────────────────────────────────────────── */

.state-idle {
  border: 1px dashed var(--border-2);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem;
  flex: 1;
  animation: fadeUp 0.4s var(--ease);
}
.idle-glyph {
  font-size: 2.5rem;
  color: var(--gray-3);
  margin-bottom: 1.25rem;
}
.idle-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);          /* WHITE */
  margin-bottom: 0.5rem;
}
.idle-sub {
  font-size: 0.85rem;
  color: var(--gray-2);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}
.idle-tags {
  display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center;
}
.idle-tags span {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  color: var(--gray-2);
}

/* ── Loading ─────────────────────────────────────────────── */

.state-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  animation: fadeUp 0.3s var(--ease);
}
.spinner {
  width: 40px; height: 40px;
  border: 2px solid var(--border-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin-bottom: 1.2rem;
}
.loading-msg {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--gray-2);
}

/* ── Results ─────────────────────────────────────────────── */

.state-results { animation: fadeUp 0.4s var(--ease); }

.results-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.results-for {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-1);       /* #cccccc */
}
.btn-back {
  font-family: var(--mono);
  font-size: 0.7rem;
  background: none;
  border: 1px solid var(--border-2);
  color: var(--gray-2);
  padding: 5px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-back:hover { color: var(--white); border-color: var(--gray-2); }

/* ── Top Row: Score + Metrics ────────────────────────────── */

.top-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.score-card { text-align: center; margin-bottom: 0; }

.score-big {
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--white);          /* STARK WHITE */
  margin: 0.5rem 0 0.6rem;
}

.score-bar-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.score-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  width: 0%;
  transition: width 1s var(--ease) 0.2s;
}

.score-grade {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 4px 14px;
  border-radius: 999px;
  display: inline-block;
}

/* Metrics trio */
.metrics-trio {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.metric-card {
  padding: 0.85rem 1.1rem;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.metric-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);          /* WHITE */
  min-width: 54px;
  letter-spacing: -0.03em;
}
.metric-lbl {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--gray-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  min-width: 70px;
}
.mbar-wrap {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.mbar {
  height: 100%;
  border-radius: 999px;
  width: 0%;
  transition: width 0.9s var(--ease) 0.3s;
}

/* ── Summary Card ────────────────────────────────────────── */

.summary-card {
  margin-bottom: 1rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.summary-item {
  flex: 1;
  font-size: 0.85rem;
  color: var(--gray-1);        /* #cccccc — readable */
  line-height: 1.6;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.summary-item .s-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}
.summary-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
}

/* ── Skills Grid ─────────────────────────────────────────── */

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.skills-card { margin-bottom: 0; }

.skills-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.sh-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.sh-dot.green { background: var(--green); }
.sh-dot.red   { background: var(--red); }
.sh-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--white);         /* WHITE */
  flex: 1;
}
.sh-count {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--gray-2);
  background: #161616;
  border: 1px solid var(--border);
  padding: 2px 9px;
  border-radius: 999px;
}

.tags-box { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  font-weight: 400;
  opacity: 0;
  animation: tagPop 0.25s var(--ease) forwards;
  cursor: default;
  border: 1px solid transparent;
}

/* Tag colors — vivid text, clearly legible */
.tag-green  { background: var(--green-bg);  color: var(--green);  border-color: rgba(74,222,128,0.2);  }
.tag-red    { background: var(--red-bg);    color: var(--red);    border-color: rgba(248,113,113,0.2); }
.tag-amber  { background: var(--amber-bg);  color: var(--amber);  border-color: rgba(251,191,36,0.2);  }
.tag-blue   { background: var(--blue-bg);   color: var(--blue);   border-color: rgba(96,165,250,0.2);  }
.tag-lime   { background: var(--accent-dim); color: var(--accent); border-color: rgba(200,255,0,0.2);  }

/* ── Roadmap ─────────────────────────────────────────────── */

.roadmap-card { margin-bottom: 0; }
.roadmap-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }

.rm-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: border-color 0.15s, background 0.15s;
  opacity: 0;
  animation: tagPop 0.3s var(--ease) forwards;
}
.rm-item:hover { border-color: var(--border-2); background: var(--bg-hover); }

.rm-icon { font-size: 1rem; flex-shrink: 0; line-height: 1.6; }

.rm-text {
  flex: 1;
  font-size: 0.84rem;
  color: var(--gray-1);        /* #cccccc — always readable */
  line-height: 1.55;
  font-weight: 300;
}
.rm-text strong { color: var(--white); font-weight: 600; }

.rm-badge {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}
.badge-high   { background: var(--red-bg);   color: var(--red);   border: 1px solid rgba(248,113,113,0.2); }
.badge-medium { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(251,191,36,0.2);  }
.badge-low    { background: var(--blue-bg);  color: var(--blue);  border: 1px solid rgba(96,165,250,0.2);  }

/* ── Footer ──────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--gray-2);
}

/* ── Toast ───────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #1a0808;
  border: 1px solid rgba(248,113,113,0.3);
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.65rem 1.2rem;
  border-radius: var(--r-sm);
  opacity: 0;
  transition: all 0.25s var(--ease);
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Keyframes ───────────────────────────────────────────── */

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

@keyframes tagPop {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1);    }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-3); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; padding: 1.5rem 1.25rem; }
  .top-row   { grid-template-columns: 1fr; }
  .score-card { display: flex; align-items: center; gap: 1.5rem; text-align: left; }
  .score-big  { font-size: 3rem; }
  .nav        { padding: 1rem 1.25rem; }
  .footer     { flex-direction: column; gap: 0.5rem; padding: 1.25rem; }
}

@media (max-width: 600px) {
  .skills-grid { grid-template-columns: 1fr; }
  .summary-card { flex-direction: column; gap: 0.75rem; }
  .summary-divider { display: none; }
  .hero-title { font-size: 2rem; }
  .metrics-trio .metric-card { flex-wrap: wrap; }
}
