/* ═══════════════════════════════════════════════════════════
   Moonotic — style.css  v3
   Dark editorial · DM Serif + DM Mono · Premium feel
═══════════════════════════════════════════════════════════ */

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

:root {
  --bg:         #080b10;
  --bg-card:    #0e1219;
  --bg-hover:   #131822;
  --bg-elevated:#161d28;
  --border:     #1e2535;
  --border-2:   #2a3448;

  --white:   #f0f4ff;
  --gray-1:  #b8c4d8;
  --gray-2:  #6e7f99;
  --gray-3:  #3a4558;

  /* Electric teal accent — distinctive & premium */
  --accent:     #00e5c3;
  --accent-2:   #00b89d;
  --accent-dim: rgba(0,229,195,0.07);
  --accent-glow:rgba(0,229,195,0.18);

  --green:      #3dffa0;
  --green-bg:   rgba(61,255,160,0.07);
  --red:        #ff5f7e;
  --red-bg:     rgba(255,95,126,0.07);
  --amber:      #ffb740;
  --amber-bg:   rgba(255,183,64,0.07);
  --blue:       #5eb0ff;
  --blue-bg:    rgba(94,176,255,0.07);

  --font:  'DM Sans', sans-serif;
  --serif: 'DM Serif Display', serif;
  --mono:  'DM Mono', monospace;

  --r:    12px;
  --r-sm: 8px;
  --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;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0,229,195,0.06) 0%, transparent 60%),
    radial-gradient(circle at 0% 100%, rgba(94,176,255,0.04) 0%, transparent 40%),
    linear-gradient(180deg, #080b10 0%, #060910 100%);
  background-attachment: fixed;
}

/* ── Fine dot grid overlay ─────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* ── Nav ───────────────────────────────────────────────── */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 3rem;
  border-bottom: 1px solid var(--border);
  background: rgba(8,11,16,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.logo {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo-icon { color: var(--accent); font-size: 1rem; }

.menu {
  display: flex;
  gap: 2rem;
}
.menu span {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-2);
  cursor: pointer;
  transition: color 0.2s;
}
.menu span:hover { color: var(--gray-1); }

.status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.status .active {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0,229,195,0.2);
  padding: 4px 12px;
  border-radius: 999px;
}
.status .pro {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: #080b10;
  background: var(--accent);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 500;
}

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 5rem 2rem 3.5rem;
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-2);
}
.eyebrow-line {
  width: 40px;
  height: 1px;
  background: var(--border-2);
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 1.25rem;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 1rem;
  color: var(--gray-1);
  line-height: 1.75;
  font-weight: 300;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Workspace ─────────────────────────────────────────── */
.workspace {
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 1.5rem;
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 3rem 6rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

/* ── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-2); }

.card-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray-2);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.step-num {
  color: var(--accent);
  font-weight: 500;
}

/* ── Upload Zone ───────────────────────────────────────── */
.upload-zone {
  border: 1.5px dashed var(--border-2);
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.015);
  padding: 2.25rem 1rem;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s;
  margin-bottom: 0.75rem;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 4px var(--accent-glow), inset 0 0 30px rgba(0,229,195,0.03);
}

.upload-icon {
  color: var(--gray-3);
  margin-bottom: 0.75rem;
  transition: color 0.2s, transform 0.2s;
  display: flex;
  justify-content: center;
}
.upload-zone:hover .upload-icon {
  color: var(--accent);
  transform: translateY(-3px);
}

.upload-text {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 0.25rem;
}
.upload-hint {
  font-size: 0.75rem;
  color: var(--gray-2);
}

.upload-done {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.done-icon {
  width: 32px; height: 32px;
  background: var(--green-bg);
  border: 1px solid rgba(61,255,160,0.2);
  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);
  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.6rem;
  color: var(--gray-3);
  text-align: center;
  letter-spacing: 0.05em;
}

/* ── Role Input ────────────────────────────────────────── */
.role-field {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 400;
  padding: 0.8rem 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 1rem;
}
.role-field::placeholder { color: var(--gray-3); }
.role-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.quick-roles { }
.qr-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--gray-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.55rem;
}
.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.qr-chip {
  font-family: var(--mono);
  font-size: 0.66rem;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  color: var(--gray-1);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  letter-spacing: 0.04em;
}
.qr-chip:hover, .qr-chip.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(0,229,195,0.3);
}

/* ── Analyze Button ────────────────────────────────────── */
.btn-run {
  width: 100%;
  background: var(--accent);
  color: #060a0d;
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.95rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s, transform 0.15s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}
.btn-run::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.btn-run:hover {
  background: #00f0cf;
  box-shadow: 0 0 32px rgba(0,229,195,0.35), 0 4px 20px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}
.btn-run:active { transform: translateY(0); box-shadow: none; }
.btn-run:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-arrow { font-size: 1rem; }

/* ── Results Column ────────────────────────────────────── */
.col-results {
  min-height: 480px;
  position: relative;
}

/* ── Idle State ────────────────────────────────────────── */
.state-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 440px;
  text-align: center;
  gap: 1rem;
}

.idle-orb {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(0,229,195,0.15), rgba(0,229,195,0.03));
  border: 1px solid rgba(0,229,195,0.15);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.5rem;
}
.idle-glyph {
  font-size: 2rem;
  color: rgba(0,229,195,0.4);
}

.idle-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--white);
}
.idle-sub {
  font-size: 0.85rem;
  color: var(--gray-2);
  font-weight: 300;
}
.idle-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}
.idle-tags span {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--gray-2);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-card);
}

/* ── Loading ───────────────────────────────────────────── */
.state-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  min-height: 440px;
}

.spinner {
  width: 38px; height: 38px;
  border: 2px solid var(--border-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-msg {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--gray-2);
  letter-spacing: 0.05em;
}

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

.results-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.results-for {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--gray-1);
}
.btn-back {
  font-family: var(--mono);
  font-size: 0.68rem;
  background: none;
  border: 1px solid var(--border-2);
  color: var(--gray-2);
  padding: 5px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.04em;
}
.btn-back:hover { color: var(--white); border-color: var(--gray-2); }

/* ── Score Gauge ───────────────────────────────────────── */
.top-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.score-card {
  text-align: center;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gauge-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0.5rem auto 0;
}

.gauge-svg {
  width: 130px;
  height: 130px;
  transform: rotate(-90deg);
}

.gauge-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}

.gauge-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 301.59; /* 2π×48 */
  stroke-dashoffset: 301.59;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4,0,0.2,1) 0.2s, stroke 0.4s;
  filter: drop-shadow(0 0 6px rgba(0,229,195,0.5));
}

.gauge-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-big {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
  color: var(--white);
  letter-spacing: -0.03em;
}

.score-grade {
  font-family: var(--mono);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  margin-top: 0.4rem;
  display: inline-block;
}

/* Metrics trio */
.metrics-trio {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.metric-card {
  padding: 1rem 1.25rem;
  margin-bottom: 0;
}

.metric-lbl {
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray-2);
  margin-bottom: 0.3rem;
}

.metric-num {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.55rem;
}

.mbar-wrap {
  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.84rem;
  color: var(--gray-1);
  line-height: 1.65;
  font-weight: 300;
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}
.summary-item .s-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 7px;
}
.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; }

.matched-card { border-top: 2px solid rgba(61,255,160,0.25); }
.missing-card  { border-top: 2px solid rgba(255,95,126,0.25); }

.skills-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.sh-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.sh-dot.green { background: var(--green); box-shadow: 0 0 6px rgba(61,255,160,0.5); }
.sh-dot.red   { background: var(--red);   box-shadow: 0 0 6px rgba(255,95,126,0.5); }

.sh-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--white);
  flex: 1;
}
.sh-count {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--gray-2);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 2px 9px;
  border-radius: 999px;
}

.roadmap-badge {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0,229,195,0.2);
  padding: 2px 10px;
  border-radius: 999px;
}

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

.tag {
  font-family: var(--mono);
  font-size: 0.67rem;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 400;
  opacity: 0;
  animation: tagPop 0.25s var(--ease) forwards;
  cursor: default;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}
.tag-green  { background: var(--green-bg);  color: var(--green);  border-color: rgba(61,255,160,0.15);  }
.tag-red    { background: var(--red-bg);    color: var(--red);    border-color: rgba(255,95,126,0.15);  }
.tag-amber  { background: var(--amber-bg);  color: var(--amber);  border-color: rgba(255,183,64,0.15);  }
.tag-blue   { background: var(--blue-bg);   color: var(--blue);   border-color: rgba(94,176,255,0.15);  }
.tag-lime   { background: var(--accent-dim); color: var(--accent); border-color: rgba(0,229,195,0.15);  }

/* ── 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.9rem;
  padding: 0.9rem 1.1rem;
  background: rgba(255,255,255,0.02);
  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-elevated);
}

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

.rm-text {
  flex: 1;
  font-size: 0.83rem;
  color: var(--gray-1);
  line-height: 1.6;
  font-weight: 300;
}
.rm-text strong { color: var(--white); font-weight: 500; }

.rm-badge {
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 5px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  border: 1px solid transparent;
}
.badge-high   { background: var(--red-bg);   color: var(--red);   border-color: rgba(255,95,126,0.2);  }
.badge-medium { background: var(--amber-bg); color: var(--amber); border-color: rgba(255,183,64,0.2);  }
.badge-low    { background: var(--blue-bg);  color: var(--blue);  border-color: rgba(94,176,255,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.62rem;
  color: var(--gray-3);
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
}
.footer-brand { color: var(--accent); letter-spacing: 0.1em; }

/* ── Toast ─────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(20, 8, 12, 0.95);
  border: 1px solid rgba(255,95,126,0.3);
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.76rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--r-sm);
  opacity: 0;
  transition: all 0.25s var(--ease);
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Keyframes ─────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0);    }
}
@keyframes tagPop {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1);    }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-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: 960px) {
  .workspace {
    grid-template-columns: 1fr;
    padding: 1.5rem 1.5rem 4rem;
  }
  .top-row { grid-template-columns: 160px 1fr; }
  .top-nav { padding: 1rem 1.5rem; }
  .menu { display: none; }
  .footer { flex-direction: column; gap: 0.4rem; padding: 1.25rem 1.5rem; text-align: center; }
}

@media (max-width: 640px) {
  .top-row { grid-template-columns: 1fr; }
  .score-card {
    flex-direction: row;
    gap: 1.5rem;
    text-align: left;
    align-items: center;
  }
  .skills-grid { grid-template-columns: 1fr; }
  .summary-card { flex-direction: column; gap: 0.75rem; }
  .summary-divider { display: none; }
  .hero-title { font-size: 2.2rem; }
  .gauge-wrap { margin: 0; }
}
