/* AprovaCV — Premium UI System */

:root {
  --brand: #1947f5;
  --brand-dark: #1336d8;
  --ink-900: #0A0B0E;
  --ink-800: #111318;
  --ink-500: #4a4f5c;
  --ink-300: #9ca3af;
  --ink-200: #e5e7eb;
  --ink-100: #f3f4f6;
  --ink-50:  #fafafa;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif; }

/* Selection */
::selection { background: #1947f5; color: white; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d4d8; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Subtle grid background */
.bg-grid {
  background-image:
    linear-gradient(rgba(15,23,42,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* Radial gradient hero */
.hero-glow {
  background:
    radial-gradient(60% 60% at 50% 0%, rgba(47, 99, 255, 0.12) 0%, rgba(47, 99, 255, 0) 60%),
    radial-gradient(40% 40% at 80% 30%, rgba(47, 99, 255, 0.08) 0%, rgba(47, 99, 255, 0) 70%);
}

/* Gradient text */
.text-gradient {
  background: linear-gradient(135deg, #0A0B0E 0%, #1947f5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animated underline */
.link-underline {
  position: relative;
  display: inline-block;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s ease;
}
.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }

/* Card hover */
.card-lift { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.card-lift:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -20px rgba(16,24,40,0.18); border-color: #d4d4d8; }

/* Button reset */
.btn-primary {
  background: #0A0B0E; color: white;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.4rem; border-radius: 0.75rem;
  font-weight: 600; font-size: 0.95rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 0 rgba(255,255,255,0.1) inset, 0 6px 16px -6px rgba(10,11,14,0.4);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px rgba(10,11,14,0.5); }

.btn-secondary {
  background: white; color: #0A0B0E;
  border: 1px solid #e5e7eb;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.4rem; border-radius: 0.75rem;
  font-weight: 600; font-size: 0.95rem;
  transition: all 0.2s ease;
}
.btn-secondary:hover { background: #fafafa; border-color: #d4d4d8; }

.btn-brand {
  background: #1947f5; color: white;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.4rem; border-radius: 0.75rem;
  font-weight: 600; font-size: 0.95rem;
  transition: all 0.2s ease;
  box-shadow: 0 8px 24px -8px rgba(25,71,245,0.5);
}
.btn-brand:hover { background: #1336d8; transform: translateY(-1px); box-shadow: 0 14px 32px -10px rgba(25,71,245,0.6); }

/* Score ring */
.score-ring {
  --p: 0;
  --c: #1947f5;
  width: 140px; aspect-ratio: 1;
  position: relative; display: grid; place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(var(--c) calc(var(--p) * 1%), #f3f4f6 0);
}
.score-ring::before {
  content: "";
  position: absolute; inset: 10px;
  border-radius: 50%;
  background: white;
}
.score-ring > * { position: relative; z-index: 1; }

/* Bar */
.bar { height: 8px; background: #f3f4f6; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, #2f63ff, #1947f5); border-radius: 999px; transition: width 0.6s cubic-bezier(.2,.8,.2,1); }

/* Tabs */
.tab { padding: 0.6rem 1rem; border-radius: 0.6rem; font-weight: 600; font-size: 0.9rem; color: #4a4f5c; cursor: pointer; transition: all 0.15s ease; border: 1px solid transparent; }
.tab:hover { background: #f3f4f6; color: #0A0B0E; }
.tab.active { background: white; color: #0A0B0E; border-color: #e5e7eb; box-shadow: 0 1px 2px rgba(16,24,40,0.06); }

/* Marquee */
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.marquee { display: flex; gap: 3rem; animation: marquee 30s linear infinite; width: max-content; }

/* Fade-in on load */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.6s cubic-bezier(.2,.8,.2,1) both; }
.fade-up.d1 { animation-delay: 0.06s; }
.fade-up.d2 { animation-delay: 0.12s; }
.fade-up.d3 { animation-delay: 0.18s; }
.fade-up.d4 { animation-delay: 0.24s; }

/* Pulse dot */
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 0 rgba(22,163,74,0.5); animation: pulseDot 2s infinite; }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,0.5); } 70% { box-shadow: 0 0 0 10px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }

/* CV Preview document */
.cv-doc {
  background: white;
  font-family: Arial, Helvetica, sans-serif;
  color: #0A0B0E;
  padding: 56px 64px;
  line-height: 1.5;
  font-size: 11pt;
  min-height: 1100px;
  box-shadow: 0 30px 80px -30px rgba(16,24,40,0.25);
  border-radius: 6px;
}
.cv-doc h1 { font-size: 22pt; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 4px; }
.cv-doc h2 { font-size: 11pt; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; border-bottom: 1.5px solid #0A0B0E; padding-bottom: 4px; margin-top: 18px; margin-bottom: 10px; }
.cv-doc h3 { font-size: 11pt; font-weight: 700; }
.cv-doc p, .cv-doc li { font-size: 10.5pt; }
.cv-doc ul { list-style: disc; padding-left: 18px; margin: 4px 0 8px; }
.cv-doc li { margin-bottom: 3px; }
.cv-doc .role-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.cv-doc .meta { color: #4a4f5c; font-size: 10pt; }
.cv-doc .contact { color: #4a4f5c; font-size: 10pt; margin-bottom: 6px; }

/* Print */
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; inset: 0; box-shadow: none !important; border-radius: 0 !important; }
  @page { margin: 0; size: A4; }
}

/* Loader */
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.4); border-top-color: white; border-radius: 50%; animation: spin 0.8s linear infinite; }
.spinner.dark { border-color: rgba(10,11,14,0.2); border-top-color: #0A0B0E; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast { position: fixed; bottom: 24px; right: 24px; background: #0A0B0E; color: white; padding: 0.85rem 1.1rem; border-radius: 0.75rem; box-shadow: 0 20px 40px -10px rgba(0,0,0,0.3); transform: translateY(20px); opacity: 0; transition: all 0.3s; z-index: 100; font-size: 0.9rem; font-weight: 500; display: flex; align-items: center; gap: 0.6rem; }
.toast.show { transform: translateY(0); opacity: 1; }

/* Diff highlight */
.diff-bad { background: #fef2f2; color: #991b1b; padding: 1px 4px; border-radius: 3px; text-decoration: line-through; text-decoration-color: #fca5a5; }
.diff-good { background: #ecfdf5; color: #065f46; padding: 1px 4px; border-radius: 3px; font-weight: 500; }

/* Section divider */
.section-line { height: 1px; background: linear-gradient(90deg, transparent, #e5e7eb, transparent); }

/* Glass nav */
.glass-nav { backdrop-filter: saturate(180%) blur(14px); background: rgba(255,255,255,0.78); border-bottom: 1px solid rgba(15,23,42,0.06); }

/* Hide scrollbar utility */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* Editor textarea */
.editor-area { font-family: 'Inter', monospace; font-size: 14px; line-height: 1.6; }

/* Chip */
.chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.7rem; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 999px; font-size: 0.78rem; font-weight: 500; color: #4a4f5c; }
.chip-brand { background: #eef4ff; border-color: #dae6ff; color: #1336d8; }
.chip-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.chip-good { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.chip-bad  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
