/* ============================================================
   OpportuMap — Global Design System
   Theme: Dark mode, glassmorphism, vibrant accents
   ============================================================ */

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

/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Colors */
  --clr-bg:         #080814;
  --clr-bg-2:       #0e0e22;
  --clr-bg-3:       #12122a;
  --clr-surface:    rgba(255, 255, 255, 0.04);
  --clr-surface-2:  rgba(255, 255, 255, 0.07);
  --clr-border:     rgba(255, 255, 255, 0.08);
  --clr-border-2:   rgba(255, 255, 255, 0.14);

  --clr-primary:    #7C6FFF;
  --clr-primary-d:  #5b50cc;
  --clr-primary-g:  linear-gradient(135deg, #7C6FFF 0%, #9b8fff 100%);

  --clr-accent:     #00D4AA;
  --clr-accent-d:   #00a882;
  --clr-accent-g:   linear-gradient(135deg, #00D4AA 0%, #00f5c7 100%);

  --clr-warn:       #FF6B6B;
  --clr-gold:       #FFD700;

  --clr-text:       #f0f0ff;
  --clr-text-2:     #a0a0c0;
  --clr-text-3:     #6a6a90;

  /* Glassmorphism */
  --glass-bg:       rgba(255, 255, 255, 0.045);
  --glass-border:   rgba(255, 255, 255, 0.1);
  --glass-shadow:   0 8px 32px rgba(0, 0, 0, 0.4);
  --glass-blur:     blur(20px);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Border radius */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-full: 9999px;

  /* Typography */
  --font-base: 'Inter', sans-serif;

  /* Transitions */
  --transition-fast:   all 0.15s ease;
  --transition-base:   all 0.25s ease;
  --transition-slow:   all 0.4s ease;
}

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

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

body {
  font-family: var(--font-base);
  background-color: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img { max-width: 100%; display: block; }

button, input, select, textarea {
  font-family: var(--font-base);
}

ul { list-style: none; }

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--clr-bg-2); }
::-webkit-scrollbar-thumb { background: var(--clr-primary); border-radius: var(--radius-full); }

/* ─── Background Mesh Gradient ──────────────────────────────── */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(124, 111, 255, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(0, 212, 170, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(124, 111, 255, 0.05) 0%, transparent 70%),
    var(--clr-bg);
}

/* ─── Layout ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.container--wide {
  max-width: 1400px;
}

.section {
  padding: var(--space-9) 0;
}

/* ─── Navigation ────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-4) 0;
  background: rgba(8, 8, 20, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--clr-border);
  transition: var(--transition-base);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.navbar__logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--clr-primary-g);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.navbar__logo .logo-text {
  background: linear-gradient(135deg, #fff 0%, var(--clr-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.navbar__link {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-text-2);
  transition: var(--transition-fast);
}

.navbar__link:hover,
.navbar__link.active {
  color: var(--clr-text);
  background: var(--clr-surface-2);
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.navbar__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* Mobile nav */
@media (max-width: 768px) {
  .navbar__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--clr-bg-2);
    border-bottom: 1px solid var(--clr-border);
    padding: var(--space-4) var(--space-5);
    gap: var(--space-2);
  }
  .navbar__nav.open { display: flex; }
  .navbar__link { width: 100%; }
  .navbar__hamburger { display: flex; }
  .navbar__actions .btn-outline { display: none; }
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px var(--space-5);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: var(--transition-fast);
}

.btn:hover::after {
  background: rgba(255,255,255,0.06);
}

.btn--primary {
  background: var(--clr-primary-g);
  color: #fff;
  box-shadow: 0 4px 24px rgba(124, 111, 255, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124, 111, 255, 0.5);
}

.btn--accent {
  background: var(--clr-accent-g);
  color: #0a2a24;
  font-weight: 700;
  box-shadow: 0 4px 24px rgba(0, 212, 170, 0.3);
}

.btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 212, 170, 0.5);
}

.btn--outline {
  background: transparent;
  color: var(--clr-text);
  border: 1px solid var(--clr-border-2);
}

.btn--outline:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  transform: translateY(-1px);
}

.btn--ghost {
  background: var(--clr-surface);
  color: var(--clr-text-2);
  border: 1px solid var(--clr-border);
}

.btn--ghost:hover {
  background: var(--clr-surface-2);
  color: var(--clr-text);
}

.btn--lg {
  padding: 16px 36px;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn--sm {
  padding: 8px var(--space-4);
  font-size: 0.8rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ─── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  transition: var(--transition-base);
}

.card:hover {
  border-color: rgba(124, 111, 255, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(124, 111, 255, 0.1);
  transform: translateY(-3px);
}

.card--flat {
  transform: none !important;
}

/* ─── Badges / Tags ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge--primary { background: rgba(124,111,255,0.15); color: #a89fff; border: 1px solid rgba(124,111,255,0.25); }
.badge--accent  { background: rgba(0,212,170,0.12);  color: #00e6bc; border: 1px solid rgba(0,212,170,0.25); }
.badge--warn    { background: rgba(255,107,107,0.12); color: #ff8f8f; border: 1px solid rgba(255,107,107,0.25); }
.badge--gold    { background: rgba(255,215,0,0.12);   color: #ffd700; border: 1px solid rgba(255,215,0,0.25); }
.badge--neutral { background: var(--clr-surface-2);   color: var(--clr-text-2); border: 1px solid var(--clr-border); }

/* ─── Form Elements ─────────────────────────────────────────── */
.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--clr-text-2);
}

.input {
  width: 100%;
  padding: 12px 16px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  color: var(--clr-text);
  font-size: 0.9rem;
  transition: var(--transition-fast);
  outline: none;
}

.input:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(124, 111, 255, 0.12);
  background: var(--clr-surface-2);
}

.input::placeholder { color: var(--clr-text-3); }

.input-icon-wrap {
  position: relative;
}

.input-icon-wrap .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--clr-text-3);
  font-size: 0.95rem;
  pointer-events: none;
}

.input-icon-wrap .input {
  padding-left: 40px;
}

select.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='%236a6a90' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

select.input option {
  background: var(--clr-bg-2);
  color: var(--clr-text);
}

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

/* Checkbox */
.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--clr-text-2);
}

.checkbox-wrap input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--clr-primary);
  cursor: pointer;
}

/* ─── Skill Tags ────────────────────────────────────────────── */
.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: rgba(124,111,255,0.1);
  border: 1px solid rgba(124,111,255,0.2);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  color: #c0b8ff;
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.skill-tag:hover,
.skill-tag.active {
  background: rgba(124,111,255,0.25);
  border-color: rgba(124,111,255,0.5);
  color: #fff;
}

/* ─── Section Headers ───────────────────────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-primary);
  margin-bottom: var(--space-3);
}

.section-label::before,
.section-label::after {
  content: '';
  flex: 0 0 24px;
  height: 1px;
  background: var(--clr-primary);
  opacity: 0.5;
}

h1, h2, h3, h4, h5 {
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.heading-xl {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.heading-lg { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.heading-md { font-size: clamp(1.3rem, 3vw, 1.8rem); }

/* ─── Grid Layouts ──────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-5); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

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

/* ─── Flex Utilities ────────────────────────────────────────── */
.flex       { display: flex; }
.flex-col   { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.wrap { flex-wrap: wrap; }

/* ─── Spacing Utilities ─────────────────────────────────────── */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }

/* ─── Text Utilities ────────────────────────────────────────── */
.text-muted   { color: var(--clr-text-2); }
.text-faint   { color: var(--clr-text-3); }
.text-primary { color: var(--clr-primary); }
.text-accent  { color: var(--clr-accent); }
.text-center  { text-align: center; }
.text-sm      { font-size: 0.85rem; }
.text-xs      { font-size: 0.75rem; }
.font-bold    { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* ─── Animations ────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(124, 111, 255, 0.3); }
  50%       { box-shadow: 0 0 40px rgba(124, 111, 255, 0.6); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-up { animation: fadeInUp 0.6s ease forwards; }
.animate-fade    { animation: fadeIn 0.5s ease forwards; }
.animate-float   { animation: float 4s ease-in-out infinite; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ─── Skeleton Loader ───────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--clr-surface) 25%,
    var(--clr-surface-2) 50%,
    var(--clr-surface) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ─── Toast Notifications ───────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px 18px;
  background: var(--clr-bg-3);
  border: 1px solid var(--clr-border-2);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  font-size: 0.88rem;
  font-weight: 500;
  animation: fadeInUp 0.3s ease;
  max-width: 320px;
}

.toast--success { border-color: rgba(0,212,170,0.4); }
.toast--success .toast-icon { color: var(--clr-accent); }
.toast--error   { border-color: rgba(255,107,107,0.4); }
.toast--error   .toast-icon { color: var(--clr-warn); }

/* ─── Empty State ───────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-9) var(--space-5);
  text-align: center;
  color: var(--clr-text-2);
}

.empty-state .empty-icon {
  font-size: 3rem;
  opacity: 0.4;
}

/* ─── Page Header ───────────────────────────────────────────── */
.page-header {
  padding: 140px 0 60px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--space-3);
}

.page-header p {
  font-size: 1.05rem;
  color: var(--clr-text-2);
  max-width: 560px;
  margin: 0 auto;
}

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--clr-bg-2);
  border-top: 1px solid var(--clr-border);
  padding: var(--space-9) 0 var(--space-6);
  margin-top: var(--space-9);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-7);
  margin-bottom: var(--space-7);
}

.footer__brand p {
  color: var(--clr-text-2);
  font-size: 0.9rem;
  margin-top: var(--space-3);
  line-height: 1.7;
  max-width: 280px;
}

.footer__col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-text-3);
  margin-bottom: var(--space-4);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__links a {
  font-size: 0.9rem;
  color: var(--clr-text-2);
  transition: var(--transition-fast);
}

.footer__links a:hover { color: var(--clr-primary); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-5);
  border-top: 1px solid var(--clr-border);
  font-size: 0.82rem;
  color: var(--clr-text-3);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer__bottom {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }
}

/* ─── Stat Cards ────────────────────────────────────────────── */
.stat-card {
  padding: var(--space-5);
  text-align: center;
}

.stat-card .stat-value {
  font-size: 2.4rem;
  font-weight: 800;
  background: var(--clr-primary-g);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--clr-text-2);
  margin-top: var(--space-2);
}

/* ─── Avatar ────────────────────────────────────────────────── */
.avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--clr-primary-g);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: white;
  flex-shrink: 0;
}

.avatar--lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar--sm { width: 36px; height: 36px; font-size: 0.8rem; }

/* ─── Progress Bar ──────────────────────────────────────────── */
.progress {
  height: 6px;
  background: var(--clr-surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  background: var(--clr-primary-g);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* ─── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-base);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--clr-bg-2);
  border: 1px solid var(--clr-border-2);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: var(--transition-base);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

/* ─── Results Count (shared) ────────────────────────────────── */
.results-count {
  font-size: 0.9rem;
  color: var(--clr-text-2);
}

/* ─── Misc ──────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

.highlight {
  color: var(--clr-primary);
}

.highlight-accent {
  color: var(--clr-accent);
}
