:root {
  --bg-dark: #080c14;
  --bg-card: rgba(18, 26, 44, 0.7);
  --bg-card-hover: rgba(28, 39, 64, 0.85);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(59, 130, 246, 0.4);
  
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  line-height: 1.5;
  background-image: 
    radial-gradient(at 10% 10%, rgba(59, 130, 246, 0.12) 0px, transparent 50%),
    radial-gradient(at 90% 90%, rgba(139, 92, 246, 0.12) 0px, transparent 50%);
  background-attachment: fixed;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-card);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 12, 20, 0.85);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 30%, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.badge-live-rag {
  font-size: 11px;
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: 6px;
  font-weight: 600;
  vertical-align: middle;
  -webkit-text-fill-color: var(--accent-emerald);
}

.mobile-nav-toggle-wrap {
  display: none;
  align-items: center;
  gap: 8px;
}

.btn-mobile-copilot {
  display: none;
}

/* Hamburger Button */
.hamburger-btn {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  transition: all 0.2s ease;
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-glow);
}

.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger-btn.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Navigation Overlay & Drawer */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 14, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-sheet {
  position: absolute;
  top: 0;
  right: 0;
  width: 84%;
  max-width: 340px;
  height: 100%;
  background: #0b1120;
  border-left: 1px solid var(--border-glow);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.85);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-menu-overlay.open .mobile-menu-sheet {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-card);
  margin-bottom: 18px;
}

.mobile-menu-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.mobile-menu-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-nav-item:hover, .mobile-nav-item:active {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateX(3px);
}

.mobile-nav-item-primary {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(124, 58, 237, 0.25));
  border-color: rgba(99, 102, 241, 0.5);
}

.mobile-nav-icon {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
}

.mobile-nav-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.mobile-nav-text small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.mobile-menu-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-card);
  font-size: 11px;
  color: var(--text-subtle);
  text-align: center;
}

/* Horizontal Scroll Container for Clean Mobile Tabs */
.tab-scroll-container {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 2px 6px;
}

.tab-scroll-container::-webkit-scrollbar {
  display: none;
}

.search-chips-row {
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.audience-tabs-row {
  justify-content: center;
}

.nav-actions {
  display: flex;
  gap: 12px;
}

.btn {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--border-card);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Hero Section - Centered Minimal Landing Page */
.hero {
  text-align: center;
  min-height: calc(82vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--accent-blue);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 16px;
  max-width: 900px;
}

.hero-title span {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-emerald));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.5;
}

/* Search & Controls */
.search-container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto 24px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 18px 24px;
  padding-left: 54px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: #fff;
  font-size: 16px;
  outline: none;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.2);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
}

/* Stats Counter Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-align: center;
}

.stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-blue);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* Category Filters */
.category-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 20px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.tab-btn.active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Opportunities Grid */
.opportunities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.card-tag {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.tag-scholarship { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.tag-job { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.tag-grant { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.tag-news { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }

.card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
  color: #fff;
}

.card-summary {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.card-details {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 20px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
}

.detail-label { color: var(--text-subtle); font-weight: 500; }
.detail-val { color: var(--text-main); font-weight: 600; text-align: right; }

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-card);
  padding-top: 16px;
}

.source-badge {
  font-size: 12px;
  color: var(--text-subtle);
  font-weight: 500;
}

/* Slide-over RAG Chat Drawer */
.chat-drawer {
  position: fixed;
  right: -420px;
  top: 0;
  width: 420px;
  height: 100vh;
  background: #0d1322;
  border-left: 1px solid var(--border-card);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  z-index: 100;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.chat-drawer.open {
  right: 0;
}

.chat-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(13, 19, 34, 0.95);
}

.chat-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-msg {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  max-width: 90%;
  line-height: 1.45;
}

.msg-user {
  align-self: flex-end;
  background: var(--accent-blue);
  color: #fff;
  border-bottom-right-radius: 2px;
}

.msg-bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  border-bottom-left-radius: 2px;
  white-space: pre-wrap;
}

.chat-footer {
  padding: 16px;
  border-top: 1px solid var(--border-card);
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  color: #fff;
  font-size: 14px;
  outline: none;
}

/* =========================================================
   Mobile Optimization & Clean Responsive Rules
   ========================================================= */

@media (max-width: 992px) {
  .hero-title { font-size: 34px; }
  .opportunities-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
}

@media (max-width: 860px) {
  .container {
    padding: 0 16px;
  }

  /* Compact Clean Header with Hamburger */
  .navbar {
    padding: 12px 0;
  }

  .nav-actions {
    display: none;
  }

  .mobile-nav-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .btn-mobile-copilot {
    display: inline-flex;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 20px;
    align-items: center;
    gap: 4px;
    height: 36px;
  }

  .hamburger-btn {
    display: flex;
  }

  /* Ultra-Clean Hero */
  .hero {
    min-height: auto;
    padding: 24px 0 14px;
  }

  .hero-badge {
    margin-bottom: 12px;
  }

  .hero-badge span {
    font-size: 11px;
    padding: 4px 10px;
  }

  .hero-title {
    font-size: 26px;
    line-height: 1.25;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
  }

  .hero-sub {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 18px;
    padding: 0 4px;
    color: var(--text-muted);
  }

  .search-container {
    margin-bottom: 16px;
  }

  .search-input {
    padding: 12px 14px 12px 42px;
    font-size: 13px;
    border-radius: 12px;
  }

  .search-icon {
    left: 14px;
    font-size: 15px;
  }

  .search-chips-row {
    justify-content: flex-start;
    flex-wrap: nowrap;
    margin-top: 10px;
  }

  /* Clean Mobile Stats 2x2 */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
  }

  .stat-card {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .stat-num {
    font-size: 18px;
  }

  .stat-label {
    font-size: 10px;
  }

  /* Swipeable Tab Bars on Mobile */
  .audience-tabs-row {
    justify-content: flex-start;
  }

  .category-tabs {
    justify-content: flex-start;
    margin-bottom: 20px;
  }

  .tab-btn {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Single Column Opportunity Cards */
  .opportunities-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card-header {
    margin-bottom: 10px;
  }

  .card-title {
    font-size: 16px;
    line-height: 1.35;
    margin-bottom: 8px;
  }

  .card-summary {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 12px;
  }

  .card-footer {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-top: 12px;
  }

  .card-footer .btn {
    flex: 1;
    padding: 8px 10px;
    font-size: 12px;
    justify-content: center;
    min-height: 38px;
  }

  /* Full Width Mobile Chat Drawer */
  .chat-drawer {
    width: 100vw;
    right: -100vw;
  }

  /* Touch-Optimized Modals */
  .modal-card {
    padding: 20px 16px;
    width: 95%;
    max-height: 88vh;
    border-radius: 16px;
  }

  .analytics-grid-2col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 23px;
  }

  .brand-title {
    font-size: 17px;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .stat-card {
    padding: 8px 10px;
  }

  .stat-num {
    font-size: 16px;
  }

  .modal-card {
    padding: 18px 12px;
  }
}

/* Modal Notification Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 14, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.modal-card {
  background: #0f172a;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  transform: scale(0.92);
  transition: transform 0.25s ease;
}

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

.modal-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.modal-message {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Visitor Analytics Dashboard Styles */
.analytics-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .analytics-grid-2col {
    grid-template-columns: 1fr;
  }
}

.analytics-card-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px;
}

.analytics-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13px;
}

.metric-row:last-child {
  border-bottom: none;
}

.metric-bar-container {
  flex: 1;
  margin: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  height: 6px;
  border-radius: 4px;
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transition: width 0.4s ease;
}

.live-stream-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 8px;
  font-size: 12px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.live-stream-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(59, 130, 246, 0.3);
}

.live-stream-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

