/* ================================================================
   CORPUS PORTFOLIO REVIEW — STYLES
   Premium fintech dark theme
   ================================================================ */

/* ---------- Reset & Global ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: #0A0A0A;
  color: #c8c8d4;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; letter-spacing: -0.02em; }
h1 { font-weight: 700; }
h2, h3 { font-weight: 600; }

/* ---------- Noise texture ---------- */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; opacity: 0.025; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Subtle gradient background ---------- */
body::after {
  content: ''; position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
  z-index: -2; pointer-events: none;
  background: radial-gradient(ellipse at 20% 0%, rgba(96,165,250,0.04) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 100%, rgba(96,165,250,0.03) 0%, transparent 50%);
}

/* ---------- Animations ---------- */
.fade-in { animation: fadeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.stagger-1 { animation-delay: 0.06s; }
.stagger-2 { animation-delay: 0.12s; }
.stagger-3 { animation-delay: 0.2s; }
.stagger-4 { animation-delay: 0.28s; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(96,165,250,0.04) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

/* ---------- Cards ---------- */
.card {
  background: #111118;
  border: 1px solid #1e1e2e;
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.card:hover {
  border-color: rgba(96,165,250,0.2);
  box-shadow: 0 4px 24px -4px rgba(0,0,0,0.4), 0 0 0 1px rgba(96,165,250,0.05);
}
.card-interactive { cursor: pointer; }
.card-interactive:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px -8px rgba(96,165,250,0.12), 0 0 0 1px rgba(96,165,250,0.15);
}

/* ---------- Glow effects ---------- */
.glow-blue { box-shadow: 0 0 40px -8px rgba(96,165,250,0.15), 0 0 80px -16px rgba(96,165,250,0.06); }
.glow-blue-sm { box-shadow: 0 0 20px -5px rgba(96,165,250,0.1); }

/* ---------- Gradient borders ---------- */
.gradient-border {
  position: relative;
  border: 1px solid transparent;
  background: linear-gradient(#111118, #111118) padding-box,
              linear-gradient(135deg, rgba(96,165,250,0.25), rgba(96,165,250,0.03), rgba(96,165,250,0.12)) border-box;
}

/* ---------- Upload drop zone ---------- */
.drop-zone {
  position: relative; overflow: hidden;
  border: 2px dashed #2a2a3a;
  border-radius: 16px;
  transition: all 0.3s;
}
.drop-zone:hover {
  border-color: rgba(96,165,250,0.4);
  background: rgba(96,165,250,0.02);
}
.drop-zone::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; opacity: 0;
  background: radial-gradient(circle at center, rgba(96,165,250,0.06) 0%, transparent 70%);
  transition: opacity 0.4s;
  pointer-events: none;
}
.drop-zone:hover::before { opacity: 1; }

/* ---------- Health-score ring ---------- */
.score-ring { transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 1, 0.36, 1); }

/* ---------- Thinking steps ---------- */
.step-dot { width: 10px; height: 10px; border-radius: 50%; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.step-active .step-dot { animation: pulse 1.2s ease-in-out infinite; }

/* ---------- Chat bubbles ---------- */
.bubble-user { background: #60a5fa; color: #fff; border-radius: 16px 16px 4px 16px; }
.bubble-assistant { background: #16161f; color: #e0e0e8; border-radius: 16px 16px 16px 4px; border: 1px solid #1e1e2e; }

/* ---------- Progress bar ---------- */
.progress-bar { transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1); }

/* ---------- Stat counter ---------- */
@keyframes countUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.stat-value { animation: countUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ---------- File input ---------- */
input[type="file"] { font-family: 'DM Sans', sans-serif; font-size: 13px; color: #6a6a80; }
input[type="file"]::file-selector-button {
  font-family: 'DM Sans', sans-serif; font-weight: 500; font-size: 13px;
  padding: 8px 18px; border-radius: 8px;
  border: 1px solid #2a2a3a;
  background: #16161f; color: #60a5fa;
  cursor: pointer; transition: all 0.2s;
  margin-right: 12px;
}
input[type="file"]::file-selector-button:hover {
  background: rgba(96,165,250,0.1);
  border-color: #60a5fa;
}

/* ---------- Text inputs ---------- */
input[type="password"], input[type="text"], input[type="number"], select {
  background: #0e0e16;
  border: 1px solid #1e1e2e;
  color: #e0e0e8;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus {
  outline: none;
  border-color: rgba(96,165,250,0.5);
  box-shadow: 0 0 0 3px rgba(96,165,250,0.08);
}

/* ---------- Buttons ---------- */
button, .btn {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
button:active:not(:disabled) { transform: scale(0.98); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a3a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a50; }

/* ---------- Selection ---------- */
::selection { background: rgba(96,165,250,0.2); color: #fff; }

/* ---------- Table ---------- */
table { border-collapse: collapse; width: 100%; }
th { font-family: 'DM Sans', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; font-size: 11px; }
td { font-family: 'DM Sans', sans-serif; }

/* ---------- Badge/pill styles ---------- */
.badge {
  display: inline-flex; align-items: center;
  font-family: 'DM Sans', sans-serif; font-weight: 600;
  font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  h1 { font-size: 1.75rem; }
  .grid { gap: 12px; }
}
