:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-glass: rgba(255,255,255,0.65);
  --text: #14161a;
  --text-muted: #6b7280;
  --border: rgba(20,22,26,0.08);
  --primary: #16a34a;
  --primary-dark: #0f7a37;
  --accent: #2563eb;
  --shadow: 0 10px 30px rgba(20,22,26,0.06);
  --shadow-lg: 0 20px 50px rgba(20,22,26,0.12);
  --radius: 18px;
}
[data-theme="dark"] {
  --bg: #0b0d10;
  --surface: #14171c;
  --surface-glass: rgba(20,23,28,0.65);
  --text: #f2f3f5;
  --text-muted: #9aa1ab;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 10px 30px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.55);
}

* { box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  transition: background .25s ease, color .25s ease;
}
a { color: var(--accent); }

/* ---- Navbar ---- */
.cv-navbar {
  background: var(--surface-glass);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
}
.cv-navbar .navbar-brand { font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.cv-navbar .nav-link { color: var(--text-muted) !important; font-weight: 500; }
.cv-navbar .nav-link:hover, .cv-navbar .nav-link.active { color: var(--text) !important; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); cursor: pointer;
  transition: transform .2s ease;
}
.theme-toggle:hover { transform: rotate(20deg) scale(1.05); }

/* ---- Glass Cards ---- */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.glass-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* ---- Hero ---- */
.hero-section {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 5rem 2.5rem;
  background: radial-gradient(circle at 20% 20%, rgba(22,163,74,0.35), transparent 40%),
              radial-gradient(circle at 80% 30%, rgba(37,99,235,0.35), transparent 45%),
              linear-gradient(135deg, #0f2027, #16a34a 60%, #0f7a37);
  color: #fff;
}
.hero-section::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 22px 22px;
  animation: drift 30s linear infinite;
  opacity: .5;
}
@keyframes drift { from { background-position: 0 0; } to { background-position: 200px 200px; } }
.hero-section h1 { font-weight: 800; letter-spacing: -0.03em; font-size: 3rem; }
.hero-search { position: relative; z-index: 2; }
.hero-search input {
  border-radius: 999px; border: none; padding: 1rem 1.5rem; box-shadow: var(--shadow-lg);
}
.hero-search button { border-radius: 999px; }

/* ---- Stat counters ---- */
.stat-card { text-align: center; padding: 1.75rem 1rem; }
.stat-number { font-size: 2.2rem; font-weight: 800; color: var(--primary); letter-spacing: -0.02em; }
.stat-label { color: var(--text-muted); font-size: .9rem; }

/* ---- Buttons ---- */
.btn-primary { background: var(--primary); border-color: var(--primary); border-radius: 12px; font-weight: 600; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); border-radius: 12px; font-weight: 600; }
.btn-outline-primary:hover { background: var(--primary); }
.btn, .form-control, .form-select { border-radius: 12px; }
.badge { font-weight: 600; padding: .45em .8em; }
.bg-orange { background: #fd7e14 !important; }

/* ---- Candidate cards ---- */
.candidate-card .photo-wrap { height: 220px; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.candidate-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.candidate-card:hover img { transform: scale(1.07); }
.trust-ring { width: 54px; height: 54px; border-radius: 50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.85rem; color:#fff; }

/* ---- Section headers ---- */
.section-title { font-weight: 800; letter-spacing: -0.02em; }
.section-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: var(--primary); font-weight: 700; }

/* ---- Profile cover ---- */
.profile-cover { height: 260px; border-radius: var(--radius); object-fit: cover; width: 100%; }
.profile-pic { width: 130px; height: 130px; border-radius: 50%; border: 5px solid var(--surface); object-fit: cover; margin-top: -75px; box-shadow: var(--shadow-lg); }

/* ---- Timeline ---- */
.timeline { border-left: 2px solid var(--border); padding-left: 1.5rem; }
.timeline-item { position: relative; padding-bottom: 1.5rem; }
.timeline-item::before {
  content: ""; position: absolute; left: -1.62rem; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary);
}

/* ---- Chat ---- */
.chat-shell { height: 70vh; display: flex; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.chat-sidebar { width: 300px; background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; }
.chat-thread { flex: 1; display: flex; flex-direction: column; background: var(--bg); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.25rem; }
.chat-conversation-item { padding: .85rem 1rem; border-bottom: 1px solid var(--border); cursor: pointer; }
.chat-conversation-item:hover, .chat-conversation-item.active { background: rgba(22,163,74,0.08); }
.bubble { max-width: 70%; padding: .6rem 1rem; border-radius: 16px; margin-bottom: .6rem; }
.bubble.mine { background: var(--primary); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.bubble.theirs { background: var(--surface); border: 1px solid var(--border); margin-right: auto; border-bottom-left-radius: 4px; }
.typing-indicator span { display:inline-block; width:6px; height:6px; background: var(--text-muted); border-radius:50%; margin-right:3px; animation: blink 1.4s infinite; }
.typing-indicator span:nth-child(2){animation-delay:.2s;} .typing-indicator span:nth-child(3){animation-delay:.4s;}
@keyframes blink { 0%,80%,100%{opacity:.2;} 40%{opacity:1;} }

/* ---- Sidebar (admin) ---- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 260px; background: var(--surface); border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 1.5rem 1rem;
}
.admin-sidebar .nav-link { color: var(--text-muted); border-radius: 12px; padding: .65rem 1rem; font-weight: 500; margin-bottom: .25rem; }
.admin-sidebar .nav-link.active, .admin-sidebar .nav-link:hover { background: rgba(22,163,74,0.1); color: var(--primary); }
.admin-content { flex: 1; padding: 2rem; }

/* ---- Misc ---- */
.avatar-sm { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.avatar-md { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
/* ---- Scroll reveal (self-contained, no external CDN dependency) ----
   Elements are visible by default. Only once our own JS confirms it has
   run do we switch to a hidden-then-reveal animation — this way, if any
   script fails to load, content is never permanently invisible. */
[data-aos] { opacity: 1; transform: none; }
body.js-anim-ready [data-aos] {
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
body.js-anim-ready [data-aos="fade-left"] { transform: translateX(-24px); }
body.js-anim-ready [data-aos="fade-right"] { transform: translateX(24px); }
body.js-anim-ready [data-aos="zoom-in"] { transform: scale(.92); }
body.js-anim-ready [data-aos].in-view { opacity: 1; transform: none; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body.js-anim-ready [data-aos] { transition: none; opacity: 1; transform: none; }
}
footer.site-footer { background: #0b0d10; color: #cbd5e1; }
footer.site-footer a { color: #cbd5e1; text-decoration:none; }
footer.site-footer a:hover { color: #fff; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select { border-radius: 10px; border: 1px solid var(--border); }
table.dataTable { color: var(--text); }
