/* ==========================================================================
   Harsh Verma - Executive Visual Styling & Look-and-Feel Modernization
   File: css/hv-executive-refinements.css
   - Neo-Minimalist Aesthetics & Subtle Glassmorphism (blur: 12px)
   - Refined Card Hover Elevations with Subtle Glow Effects
   - Enhanced Dark/Light Mode Contrast & Typography
   - Executive Command Palette (Cmd+K Global Omnisearch) Modal Styling
   ========================================================================== */

:root {
  --hv-glass-bg: rgba(255, 255, 255, 0.82);
  --hv-glass-border: rgba(226, 232, 240, 0.85);
  --hv-glass-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.06);
  --hv-glow-primary: rgba(37, 99, 235, 0.18);
  --hv-glow-accent: rgba(99, 102, 241, 0.22);
  --hv-card-hover-border: rgba(37, 99, 235, 0.35);
  --hv-search-modal-bg: rgba(255, 255, 255, 0.96);
  --hv-search-modal-border: rgba(226, 232, 240, 0.95);
  --hv-search-item-hover: rgba(241, 245, 249, 0.9);
  --hv-search-item-active: rgba(238, 242, 255, 0.95);
  --hv-text-high-contrast: #0f172a;
}

body.dark,
body.dark-mode,
html.dark-mode,
html.dark,
[data-theme="dark"],
.dark {
  --hv-glass-bg: rgba(15, 23, 42, 0.88);
  --hv-glass-border: rgba(255, 255, 255, 0.1);
  --hv-glass-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.55);
  --hv-glow-primary: rgba(56, 189, 248, 0.25);
  --hv-glow-accent: rgba(129, 140, 248, 0.3);
  --hv-card-hover-border: rgba(56, 189, 248, 0.5);
  --hv-search-modal-bg: rgba(15, 23, 42, 0.98);
  --hv-search-modal-border: rgba(51, 65, 85, 0.9);
  --hv-search-item-hover: rgba(30, 41, 59, 0.85);
  --hv-search-item-active: rgba(30, 58, 138, 0.45);
  --hv-text-high-contrast: #f8fafc;
}

/* ==========================================================================
   1. Neo-Minimalist Glassmorphism Surfaces
   ========================================================================== */
.glass-panel-refined,
.career-infographic-card,
.patent-showcase-box,
.profile-card-item,
.speaker-record-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: var(--hv-glass-bg) !important;
  border-color: var(--hv-glass-border) !important;
  box-shadow: var(--hv-glass-shadow);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease;
}

/* ==========================================================================
   2. Refined Card Hover Elevations & Glow Effects
   ========================================================================== */
.card-hover-glow:hover,
.profile-card-item:hover,
.patent-card:hover,
.speaker-record-card:hover,
.book-card-item:hover,
.media-feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--hv-card-hover-border) !important;
  box-shadow: 0 18px 38px -12px var(--hv-glow-primary),
              0 0 0 1px var(--hv-glow-accent) !important;
}

/* Selected image element styling */
div:nth-of-type(3) > img:nth-of-type(1) {
  border-radius: 14px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.12);
}

div:nth-of-type(3) > img:nth-of-type(1):hover {
  transform: scale(1.015);
  box-shadow: 0 14px 32px -8px var(--hv-glow-primary);
}

/* ==========================================================================
   3. Global Search Button & Input Element Styling (Universal Viewports)
   Requirement: font-style: italic; font-weight: normal; font-family: inherit;
   ========================================================================== */
#navGlobalSearchBtn,
#navGlobalSearchBtn *,
#navGlobalSearchBtn input,
#navGlobalSearchBtn .nav-search-input,
#navGlobalSearchBtn span,
#navGlobalSearchBtn .search-label-text,
button#navGlobalSearchBtn,
button#navGlobalSearchBtn input,
.nav-global-search-btn,
.nav-global-search-btn input,
.nav-global-search-btn span,
.nav-global-search-btn .search-label-text,
.nav-search-input,
.nav-search-input::placeholder,
.nav-global-search-btn-mobile,
#hvOmnisearchInput,
.hv-omnisearch-input,
.hv-omnisearch-input::placeholder {
  font-style: italic !important;
  font-weight: normal !important;
  font-family: inherit !important;
}

#navGlobalSearchBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid rgba(203, 213, 225, 0.7);
  color: #334155;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  outline: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.4;
  vertical-align: middle;
  min-height: 38px;
}

#navGlobalSearchBtn input,
.nav-search-input {
  border: none;
  background: transparent;
  outline: none;
  box-shadow: none;
  color: #334155;
  font-size: 13px;
  width: 72px;
  padding: 0;
  margin: 0;
  line-height: 1.4;
  cursor: pointer;
  letter-spacing: 0.1px;
}

#navGlobalSearchBtn input::placeholder,
.nav-search-input::placeholder {
  color: #64748b;
  opacity: 0.9;
}

body.dark #navGlobalSearchBtn input,
body.dark-mode #navGlobalSearchBtn input,
html.dark-mode #navGlobalSearchBtn input,
[data-theme="dark"] #navGlobalSearchBtn input,
body.dark .nav-search-input,
body.dark-mode .nav-search-input,
html.dark-mode .nav-search-input,
[data-theme="dark"] .nav-search-input {
  color: #f1f5f9;
}

body.dark #navGlobalSearchBtn input::placeholder,
body.dark-mode #navGlobalSearchBtn input::placeholder,
html.dark-mode #navGlobalSearchBtn input::placeholder,
[data-theme="dark"] #navGlobalSearchBtn input::placeholder,
body.dark .nav-search-input::placeholder,
body.dark-mode .nav-search-input::placeholder,
html.dark-mode .nav-search-input::placeholder,
[data-theme="dark"] .nav-search-input::placeholder {
  color: #94a3b8;
}

.nav-global-search-btn span,
.nav-global-search-btn .search-label-text,
#navGlobalSearchBtn > span,
nav#navbar div#navbarCollapse ul li button#navGlobalSearchBtn > span {
  font-weight: normal !important;
  font-style: italic !important;
  font-family: inherit !important;
  letter-spacing: 0.1px;
}

.nav-global-search-btn-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.8);
  color: #2563eb;
  font-size: 20px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0;
}

body.dark .nav-global-search-btn-mobile,
body.dark-mode .nav-global-search-btn-mobile,
html.dark-mode .nav-global-search-btn-mobile,
[data-theme="dark"] .nav-global-search-btn-mobile {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  box-shadow: 0 4px 14px -3px rgba(0, 0, 0, 0.5);
}

body.dark .nav-global-search-btn,
body.dark-mode .nav-global-search-btn,
html.dark-mode .nav-global-search-btn,
[data-theme="dark"] .nav-global-search-btn {
  background: rgba(30, 41, 59, 0.88);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f1f5f9;
}

.nav-global-search-btn:hover {
  background: #ffffff;
  border-color: #2563eb;
  color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -4px var(--hv-glow-primary);
}

body.dark .nav-global-search-btn:hover,
body.dark-mode .nav-global-search-btn:hover,
html.dark-mode .nav-global-search-btn:hover,
[data-theme="dark"] .nav-global-search-btn:hover {
  background: #1e293b;
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 8px 22px -4px var(--hv-glow-primary);
}

.nav-global-search-btn i {
  font-size: 15px;
  color: #2563eb;
}

body.dark .nav-global-search-btn i,
body.dark-mode .nav-global-search-btn i,
html.dark-mode .nav-global-search-btn i,
[data-theme="dark"] .nav-global-search-btn i {
  color: #38bdf8;
}

.nav-global-search-btn .nav-kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #64748b;
  padding: 1.5px 5px;
  border-radius: 4px;
  letter-spacing: -0.2px;
}

body.dark .nav-global-search-btn .nav-kbd,
body.dark-mode .nav-global-search-btn .nav-kbd,
html.dark-mode .nav-global-search-btn .nav-kbd,
[data-theme="dark"] .nav-global-search-btn .nav-kbd {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

/* ==========================================================================
   4. Executive Command Palette (Cmd+K Global Omnisearch) Modal
   ========================================================================== */
#hvOmnisearchModal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 16px 24px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

#hvOmnisearchModal.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

/* Backdrop */
.hv-omnisearch-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10051;
}

/* Floating Palette Dialog */
.hv-omnisearch-dialog {
  position: relative;
  z-index: 10052;
  width: 100%;
  max-width: 760px;
  background: var(--hv-search-modal-bg);
  border: 1px solid var(--hv-search-modal-border);
  border-radius: 18px;
  box-shadow: 0 25px 70px -15px rgba(0, 0, 0, 0.38),
              0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transform: translateY(-12px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 120px);
}

#hvOmnisearchModal.active .hv-omnisearch-dialog {
  transform: translateY(0) scale(1);
}

/* Header & Search Input */
.hv-omnisearch-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hv-search-modal-border);
  background: transparent;
  gap: 12px;
}

.hv-omnisearch-icon {
  font-size: 22px;
  color: #2563eb;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

body.dark .hv-omnisearch-icon,
body.dark-mode .hv-omnisearch-icon,
html.dark-mode .hv-omnisearch-icon,
[data-theme="dark"] .hv-omnisearch-icon {
  color: #38bdf8;
}

body.dark .hv-omnisearch-dialog,
body.dark-mode .hv-omnisearch-dialog,
html.dark-mode .hv-omnisearch-dialog,
[data-theme="dark"] .hv-omnisearch-dialog {
  background: var(--hv-search-modal-bg);
  border-color: rgba(56, 189, 248, 0.28);
  box-shadow: 0 25px 70px -15px rgba(0, 0, 0, 0.8),
              0 0 0 1px rgba(56, 189, 248, 0.2),
              0 0 35px -5px rgba(56, 189, 248, 0.15);
}

.hv-omnisearch-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  font-weight: 400 !important;
  font-style: italic !important;
  color: var(--hv-text-high-contrast);
  padding: 0;
  line-height: 1.5;
  font-family: inherit;
}

.hv-omnisearch-input::placeholder {
  color: #94a3b8;
  font-weight: 400 !important;
  font-style: italic !important;
  opacity: 0.95;
}

body.dark .hv-omnisearch-input,
body.dark-mode .hv-omnisearch-input,
html.dark-mode .hv-omnisearch-input,
[data-theme="dark"] .hv-omnisearch-input {
  color: #f8fafc;
}

body.dark .hv-omnisearch-input::placeholder,
body.dark-mode .hv-omnisearch-input::placeholder,
html.dark-mode .hv-omnisearch-input::placeholder,
[data-theme="dark"] .hv-omnisearch-input::placeholder {
  color: #94a3b8;
}

.hv-omnisearch-close-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
  line-height: 1;
}

.hv-omnisearch-close-btn:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.05);
}

body.dark .hv-omnisearch-close-btn,
body.dark-mode .hv-omnisearch-close-btn,
html.dark-mode .hv-omnisearch-close-btn,
[data-theme="dark"] .hv-omnisearch-close-btn {
  color: #94a3b8;
}

body.dark .hv-omnisearch-close-btn:hover,
body.dark-mode .hv-omnisearch-close-btn:hover,
html.dark-mode .hv-omnisearch-close-btn:hover,
[data-theme="dark"] .hv-omnisearch-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

/* Category Filter Pills */
.hv-omnisearch-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--hv-search-modal-border);
  overflow-x: auto;
  white-space: nowrap;
  background: rgba(248, 250, 252, 0.6);
  -webkit-overflow-scrolling: touch;
}

body.dark .hv-omnisearch-pills,
body.dark-mode .hv-omnisearch-pills,
html.dark-mode .hv-omnisearch-pills,
[data-theme="dark"] .hv-omnisearch-pills {
  background: rgba(15, 23, 42, 0.75);
  border-bottom-color: rgba(51, 65, 85, 0.7);
}

.hv-filter-pill {
  border: 1px solid rgba(203, 213, 225, 0.8);
  background: #ffffff;
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
  flex-shrink: 0;
}

body.dark .hv-filter-pill,
body.dark-mode .hv-filter-pill,
html.dark-mode .hv-filter-pill,
[data-theme="dark"] .hv-filter-pill {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
}

.hv-filter-pill:hover {
  border-color: #2563eb;
  color: #2563eb;
}

body.dark .hv-filter-pill:hover,
body.dark-mode .hv-filter-pill:hover,
html.dark-mode .hv-filter-pill:hover,
[data-theme="dark"] .hv-filter-pill:hover {
  border-color: #38bdf8;
  color: #38bdf8;
  background: rgba(30, 41, 59, 1);
}

.hv-filter-pill.active {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  border-color: transparent;
  color: #ffffff !important;
  box-shadow: 0 3px 10px -2px rgba(37, 99, 235, 0.4);
}

body.dark .hv-filter-pill.active,
body.dark-mode .hv-filter-pill.active,
html.dark-mode .hv-filter-pill.active,
[data-theme="dark"] .hv-filter-pill.active {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  border-color: rgba(56, 189, 248, 0.4);
  color: #ffffff !important;
  box-shadow: 0 3px 14px -2px rgba(56, 189, 248, 0.45);
}

/* Results Container */
.hv-omnisearch-results {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  max-height: 480px;
  scroll-behavior: smooth;
}

/* Dark mode custom scrollbar for results */
body.dark .hv-omnisearch-results::-webkit-scrollbar,
body.dark-mode .hv-omnisearch-results::-webkit-scrollbar,
html.dark-mode .hv-omnisearch-results::-webkit-scrollbar,
[data-theme="dark"] .hv-omnisearch-results::-webkit-scrollbar {
  width: 6px;
}

body.dark .hv-omnisearch-results::-webkit-scrollbar-thumb,
body.dark-mode .hv-omnisearch-results::-webkit-scrollbar-thumb,
html.dark-mode .hv-omnisearch-results::-webkit-scrollbar-thumb,
[data-theme="dark"] .hv-omnisearch-results::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 3px;
}

body.dark .hv-omnisearch-results::-webkit-scrollbar-thumb:hover,
body.dark-mode .hv-omnisearch-results::-webkit-scrollbar-thumb:hover,
html.dark-mode .hv-omnisearch-results::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] .hv-omnisearch-results::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.5);
}

/* Results Group Header */
.hv-group-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
  padding: 10px 12px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.dark .hv-group-header,
body.dark-mode .hv-group-header,
html.dark-mode .hv-group-header,
[data-theme="dark"] .hv-group-header {
  color: #94a3b8;
  border-top-color: rgba(51, 65, 85, 0.5);
}

body.dark .hv-group-header .badge,
body.dark-mode .hv-group-header .badge,
html.dark-mode .hv-group-header .badge,
[data-theme="dark"] .hv-group-header .badge {
  background: rgba(30, 41, 59, 0.9) !important;
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Individual Search Result Item */
.hv-search-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none !important;
  color: inherit;
  transition: background 0.14s ease, transform 0.14s ease, border-color 0.14s ease;
  cursor: pointer;
  margin-bottom: 3px;
  position: relative;
  border: 1px solid transparent;
}

.hv-search-item:hover,
.hv-search-item.selected {
  background: var(--hv-search-item-hover);
  transform: translateX(2px);
}

.hv-search-item.selected {
  background: var(--hv-search-item-active);
  box-shadow: inset 3px 0 0 #2563eb;
}

body.dark .hv-search-item:hover,
body.dark-mode .hv-search-item:hover,
html.dark-mode .hv-search-item:hover,
[data-theme="dark"] .hv-search-item:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.2);
}

body.dark .hv-search-item.selected,
body.dark-mode .hv-search-item.selected,
html.dark-mode .hv-search-item.selected,
[data-theme="dark"] .hv-search-item.selected {
  background: rgba(30, 58, 138, 0.45);
  box-shadow: inset 3px 0 0 #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.hv-item-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  margin-top: 2px;
}

body.dark .hv-item-icon-box,
body.dark-mode .hv-item-icon-box,
html.dark-mode .hv-item-icon-box,
[data-theme="dark"] .hv-item-icon-box {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.hv-item-body {
  flex: 1;
  min-width: 0;
}

.hv-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.hv-item-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--hv-text-high-contrast);
  margin: 0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dark .hv-item-title,
body.dark-mode .hv-item-title,
html.dark-mode .hv-item-title,
[data-theme="dark"] .hv-item-title {
  color: #f8fafc;
}

.hv-item-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Dark mode badges in results */
body.dark .hv-item-badge.badge-primary,
body.dark-mode .hv-item-badge.badge-primary,
html.dark-mode .hv-item-badge.badge-primary,
[data-theme="dark"] .hv-item-badge.badge-primary {
  background: rgba(14, 165, 233, 0.22) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

body.dark .hv-item-badge.badge-info,
body.dark-mode .hv-item-badge.badge-info,
html.dark-mode .hv-item-badge.badge-info,
[data-theme="dark"] .hv-item-badge.badge-info {
  background: rgba(6, 182, 212, 0.2) !important;
  color: #22d3ee !important;
  border: 1px solid rgba(34, 211, 238, 0.35) !important;
}

body.dark .hv-item-badge.badge-success,
body.dark-mode .hv-item-badge.badge-success,
html.dark-mode .hv-item-badge.badge-success,
[data-theme="dark"] .hv-item-badge.badge-success {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(74, 222, 128, 0.35) !important;
}

body.dark .hv-item-badge.badge-warning,
body.dark-mode .hv-item-badge.badge-warning,
html.dark-mode .hv-item-badge.badge-warning,
[data-theme="dark"] .hv-item-badge.badge-warning {
  background: rgba(234, 179, 8, 0.2) !important;
  color: #facc15 !important;
  border: 1px solid rgba(250, 204, 21, 0.35) !important;
}

body.dark .hv-item-badge.badge-danger,
body.dark-mode .hv-item-badge.badge-danger,
html.dark-mode .hv-item-badge.badge-danger,
[data-theme="dark"] .hv-item-badge.badge-danger {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #f87171 !important;
  border: 1px solid rgba(248, 113, 113, 0.35) !important;
}

body.dark .hv-item-badge.badge-secondary,
body.dark-mode .hv-item-badge.badge-secondary,
html.dark-mode .hv-item-badge.badge-secondary,
[data-theme="dark"] .hv-item-badge.badge-secondary {
  background: rgba(148, 163, 184, 0.2) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(203, 213, 225, 0.25) !important;
}

.hv-item-subtitle {
  font-size: 12.5px;
  color: #64748b;
  margin-bottom: 3px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dark .hv-item-subtitle,
body.dark-mode .hv-item-subtitle,
html.dark-mode .hv-item-subtitle,
[data-theme="dark"] .hv-item-subtitle {
  color: #94a3b8;
}

.hv-item-desc {
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.dark .hv-item-desc,
body.dark-mode .hv-item-desc,
html.dark-mode .hv-item-desc,
[data-theme="dark"] .hv-item-desc {
  color: #cbd5e1;
}

.hv-highlight-match {
  background: rgba(254, 240, 138, 0.7);
  color: #854d0e;
  font-weight: 700;
  padding: 0 2px;
  border-radius: 2px;
}

body.dark .hv-highlight-match,
body.dark-mode .hv-highlight-match,
html.dark-mode .hv-highlight-match,
[data-theme="dark"] .hv-highlight-match {
  background: rgba(202, 138, 4, 0.45);
  color: #fef08a;
  box-shadow: 0 0 6px rgba(254, 240, 138, 0.25);
}

.hv-item-arrow {
  font-size: 16px;
  color: #94a3b8;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.15s ease;
  margin-top: 10px;
}

.hv-search-item:hover .hv-item-arrow,
.hv-search-item.selected .hv-item-arrow {
  opacity: 1;
  transform: translateX(0);
  color: #2563eb;
}

body.dark .hv-search-item:hover .hv-item-arrow,
body.dark .hv-search-item.selected .hv-item-arrow,
body.dark-mode .hv-search-item:hover .hv-item-arrow,
body.dark-mode .hv-search-item.selected .hv-item-arrow,
html.dark-mode .hv-search-item:hover .hv-item-arrow,
html.dark-mode .hv-search-item.selected .hv-item-arrow,
[data-theme="dark"] .hv-search-item:hover .hv-item-arrow,
[data-theme="dark"] .hv-search-item.selected .hv-item-arrow {
  color: #38bdf8;
}

/* Empty State & Suggestions */
.hv-omnisearch-empty {
  padding: 36px 20px;
  text-align: center;
}

.hv-empty-icon {
  font-size: 38px;
  color: #94a3b8;
  margin-bottom: 12px;
}

body.dark .hv-empty-icon,
body.dark-mode .hv-empty-icon,
html.dark-mode .hv-empty-icon,
[data-theme="dark"] .hv-empty-icon {
  color: #64748b;
}

.hv-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--hv-text-high-contrast);
  margin-bottom: 6px;
}

body.dark .hv-empty-title,
body.dark-mode .hv-empty-title,
html.dark-mode .hv-empty-title,
[data-theme="dark"] .hv-empty-title {
  color: #f8fafc;
}

.hv-empty-desc {
  font-size: 13px;
  color: #64748b;
  max-width: 440px;
  margin: 0 auto 18px;
  line-height: 1.5;
}

body.dark .hv-empty-desc,
body.dark-mode .hv-empty-desc,
html.dark-mode .hv-empty-desc,
[data-theme="dark"] .hv-empty-desc {
  color: #94a3b8;
}

.hv-suggestions-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 580px;
  margin: 0 auto;
}

.hv-suggest-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid rgba(203, 213, 225, 0.8);
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
}

body.dark .hv-suggest-chip,
body.dark-mode .hv-suggest-chip,
html.dark-mode .hv-suggest-chip,
[data-theme="dark"] .hv-suggest-chip {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.hv-suggest-chip:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  transform: translateY(-1px);
}

body.dark .hv-suggest-chip:hover,
body.dark-mode .hv-suggest-chip:hover,
html.dark-mode .hv-suggest-chip:hover,
[data-theme="dark"] .hv-suggest-chip:hover {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 4px 14px -2px rgba(56, 189, 248, 0.4);
}

/* Footer / Keyboard Helpers */
.hv-omnisearch-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-top: 1px solid var(--hv-search-modal-border);
  background: rgba(248, 250, 252, 0.7);
  font-size: 11.5px;
  color: #64748b;
}

body.dark .hv-omnisearch-footer,
body.dark-mode .hv-omnisearch-footer,
html.dark-mode .hv-omnisearch-footer,
[data-theme="dark"] .hv-omnisearch-footer {
  background: rgba(15, 23, 42, 0.85);
  border-top-color: rgba(51, 65, 85, 0.7);
  color: #94a3b8;
}

.hv-footer-hints {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hv-hint-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hv-hint-item kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: #475569;
  padding: 1px 4px;
  border-radius: 3px;
}

body.dark .hv-hint-item kbd,
body.dark-mode .hv-hint-item kbd,
html.dark-mode .hv-hint-item kbd,
[data-theme="dark"] .hv-hint-item kbd {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

.hv-footer-meta {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   5. Mobile Responsiveness & Touch Optimization
   ========================================================================== */
@media (max-width: 768px) {
  #hvOmnisearchModal {
    padding: 16px 10px 12px;
    align-items: flex-start;
  }

  .hv-omnisearch-dialog {
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    border-radius: 16px;
  }

  .hv-omnisearch-header {
    padding: 12px 14px;
    gap: 10px;
  }

  .hv-omnisearch-input {
    font-size: 16px !important;
    font-style: italic !important;
    font-weight: 400 !important;
  }

  .hv-omnisearch-input::placeholder {
    font-size: 14px;
    font-style: italic !important;
    font-weight: 400 !important;
  }

  .hv-omnisearch-results {
    max-height: calc(100dvh - 180px);
    padding: 8px;
  }

  .hv-search-item {
    padding: 9px 10px;
    gap: 10px;
  }

  .hv-item-icon-box {
    width: 34px;
    height: 34px;
    font-size: 17px;
    border-radius: 8px;
  }

  .hv-item-title {
    font-size: 14px;
  }

  .hv-item-subtitle {
    font-size: 12px;
  }

  .hv-item-desc {
    font-size: 11.5px;
  }
}

/* ==========================================================================
   Responsive Navbar Search Layout (Collapsible Menu & Viewport Breakpoints)
   ========================================================================== */
@media (max-width: 991px) {
  /* Allow top-right container in collapsed mobile navbar to wrap seamlessly */
  .navbar-collapse .top-right,
  #navbarCollapse .top-right {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    width: 100% !important;
    padding-top: 14px;
    padding-bottom: 12px;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
  }

  body.dark .navbar-collapse .top-right,
  body.dark-mode .navbar-collapse .top-right,
  html.dark-mode .navbar-collapse .top-right,
  [data-theme="dark"] #navbarCollapse .top-right {
    border-top-color: rgba(255, 255, 255, 0.08);
  }

  /* Make search container full-width on mobile collapsible menu */
  .navbar-collapse .nav-search-li,
  #navbarCollapse .nav-search-li {
    flex: 1 1 100% !important;
    width: 100% !important;
    margin-right: 0 !important;
    margin-bottom: 14px !important;
  }

  /* Touch-friendly full-width search button inside mobile dropdown */
  #navGlobalSearchBtn,
  button#navGlobalSearchBtn,
  .nav-global-search-btn {
    display: flex !important;
    width: 100% !important;
    min-height: 48px !important;
    padding: 10px 16px !important;
    border-radius: 24px !important;
    justify-content: flex-start !important;
    align-items: center !important;
    box-sizing: border-box !important;
    font-style: italic !important;
    font-weight: normal !important;
    font-family: inherit !important;
  }

  /* Search input element expands smoothly with comfortable touch size & no-zoom font */
  #navGlobalSearchBtn input,
  #navGlobalSearchBtn .nav-search-input,
  .nav-search-input {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-height: 36px !important;
    font-size: 16px !important;
    font-style: italic !important;
    font-weight: normal !important;
    font-family: inherit !important;
  }

  #navGlobalSearchBtn input::placeholder,
  .nav-search-input::placeholder {
    font-size: 15px !important;
    font-style: italic !important;
    font-weight: normal !important;
    font-family: inherit !important;
  }

  #navGlobalSearchBtn i,
  .nav-global-search-btn i {
    font-size: 18px !important;
    margin-right: 8px !important;
  }
}

@media (max-width: 576px) {
  #hvOmnisearchModal {
    padding: 8px 6px;
  }

  .hv-omnisearch-dialog {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 14px;
  }

  .hv-omnisearch-header {
    padding: 10px 12px;
    gap: 8px;
  }

  .hv-omnisearch-icon {
    font-size: 19px;
  }

  .hv-omnisearch-close-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    padding: 0;
  }

  .hv-omnisearch-pills {
    padding: 8px 10px;
    gap: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .hv-omnisearch-pills::-webkit-scrollbar {
    display: none;
  }

  .hv-filter-pill {
    padding: 5px 10px;
    min-height: 32px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
  }

  .hv-omnisearch-results {
    padding: 6px;
    max-height: calc(100dvh - 155px);
  }

  .hv-group-header {
    padding: 8px 10px 4px;
    font-size: 10px;
  }

  .hv-search-item {
    padding: 10px;
    min-height: 48px;
    gap: 10px;
  }

  .hv-item-icon-box {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 16px;
    border-radius: 8px;
  }

  .hv-item-title {
    font-size: 13.5px;
  }

  .hv-item-badge {
    font-size: 9.5px;
    padding: 1.5px 5px;
  }

  .hv-item-subtitle {
    font-size: 11.5px;
    margin-bottom: 2px;
  }

  .hv-item-desc {
    font-size: 11px;
    -webkit-line-clamp: 2;
  }

  .hv-item-arrow {
    display: none;
  }

  .hv-omnisearch-footer {
    padding: 8px 12px;
    font-size: 11px;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    text-align: center;
  }

  .hv-footer-hints {
    display: none;
  }

  .hv-footer-meta {
    justify-content: center;
    font-size: 11px;
  }

  /* Compact Navbar Search Button on very small viewports */
  .nav-global-search-btn-mobile {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  #navGlobalSearchBtn,
  button#navGlobalSearchBtn,
  .nav-global-search-btn {
    min-height: 46px !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    font-weight: normal !important;
    font-style: italic !important;
    font-family: inherit !important;
  }

  #navGlobalSearchBtn input,
  .nav-search-input {
    font-size: 16px !important;
    font-weight: normal !important;
    font-style: italic !important;
    font-family: inherit !important;
  }

  .nav-global-search-btn span,
  .nav-global-search-btn .search-label-text,
  #navGlobalSearchBtn > span {
    font-weight: normal !important;
    font-style: italic !important;
    font-family: inherit !important;
  }

  .nav-global-search-btn i {
    font-size: 16px;
    font-style: normal !important;
  }
}

/* ==========================================================================
   4. High-Visibility Theme-Compliant Preview Buttons & Overlays
   Ensures card hover Preview buttons & zoom actions use brand primary blues
   and remain sharp, radiant, and readable in both light and dark themes.
   ========================================================================== */
.portfolio-overlay .btn-outline-light,
.portfolio-overlay a.mfp-image,
.portfolio-thumb-wrap .portfolio-overlay a:last-child {
  background: rgba(37, 99, 235, 0.22) !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(147, 197, 253, 0.85) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.portfolio-overlay .btn-outline-light:hover,
.portfolio-overlay a.mfp-image:hover,
.portfolio-thumb-wrap .portfolio-overlay a:last-child:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.65), 0 0 12px rgba(96, 165, 250, 0.5) !important;
}

.portfolio-overlay .btn-outline-light svg,
.portfolio-overlay .btn-outline-light i,
.portfolio-overlay a.mfp-image svg,
.portfolio-overlay a.mfp-image i,
.portfolio-thumb-wrap .portfolio-overlay a:last-child svg,
.portfolio-thumb-wrap .portfolio-overlay a:last-child i {
  stroke: currentColor !important;
  color: currentColor !important;
}

/* Bottom Card Preview Action Buttons */
.btn-proj-preview {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  line-height: 1.45;
  border-radius: 9999px;
  background: #ffffff;
  color: #2563eb !important;
  border: 1px solid #bfdbfe;
  display: inline-flex;
  align-items: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none !important;
  white-space: nowrap;
}

.btn-proj-preview:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4) !important;
}

.btn-proj-preview svg,
.btn-proj-preview i {
  stroke: currentColor !important;
  color: currentColor !important;
  width: 11px !important;
  height: 11px !important;
  font-size: 12px !important;
}

a.btn-proj-github.btn-proj-advisory,
.btn-proj-advisory {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  color: #ffffff !important;
  border-color: #059669 !important;
}

a.btn-proj-github.btn-proj-advisory:hover,
.proj-card-actions a.btn-proj-advisory:hover,
html.dark-mode a.btn-proj-github.btn-proj-advisory:hover,
body.dark-mode a.btn-proj-github.btn-proj-advisory:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%) !important;
  color: #ffffff !important;
  border-color: #34d399 !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.45) !important;
}

/* Certificate Overlay Preview Link & Zoom Actions */
.cert-overlay-preview-link {
  background: rgba(255, 255, 255, 0.95);
  color: #1e40af !important;
  border: 1px solid rgba(191, 219, 254, 0.85);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.cert-overlay-preview-link:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45) !important;
  transform: translateY(-1px);
}

.cert-zoom-btn:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.45) !important;
}

/* Universal Generic Preview Buttons & Badges */
.btn-preview:hover,
.preview-btn:hover,
a.preview-link:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45) !important;
}

/* Dark Mode Harmonization */
html.dark-mode .portfolio-overlay .btn-outline-light,
body.dark-mode .portfolio-overlay .btn-outline-light,
html.dark-mode .portfolio-overlay a.mfp-image,
body.dark-mode .portfolio-overlay a.mfp-image,
html.dark-mode .portfolio-thumb-wrap .portfolio-overlay a:last-child,
body.dark-mode .portfolio-thumb-wrap .portfolio-overlay a:last-child {
  background: rgba(37, 99, 235, 0.3) !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(96, 165, 250, 0.85) !important;
}

html.dark-mode .portfolio-overlay .btn-outline-light:hover,
body.dark-mode .portfolio-overlay .btn-outline-light:hover,
html.dark-mode .portfolio-overlay a.mfp-image:hover,
body.dark-mode .portfolio-overlay a.mfp-image:hover,
html.dark-mode .portfolio-thumb-wrap .portfolio-overlay a:last-child:hover,
body.dark-mode .portfolio-thumb-wrap .portfolio-overlay a:last-child:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border-color: #93c5fd !important;
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.75), 0 0 14px rgba(96, 165, 250, 0.6) !important;
}

html.dark-mode .btn-proj-preview,
body.dark-mode .btn-proj-preview {
  background: #1e293b;
  color: #93c5fd !important;
  border-color: rgba(96, 165, 250, 0.4);
}

html.dark-mode .btn-proj-preview:hover,
body.dark-mode .btn-proj-preview:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.55) !important;
}

html.dark-mode .cert-overlay-preview-link,
body.dark-mode .cert-overlay-preview-link {
  background: #1e293b;
  color: #93c5fd !important;
  border-color: rgba(96, 165, 250, 0.4);
}

html.dark-mode .cert-overlay-preview-link:hover,
body.dark-mode .cert-overlay-preview-link:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
}

html.dark-mode .cert-zoom-btn,
body.dark-mode .cert-zoom-btn {
  background: #1e293b;
  color: #f1f5f9;
}

html.dark-mode .cert-zoom-btn:hover,
body.dark-mode .cert-zoom-btn:hover {
  background: #2563eb !important;
  color: #ffffff !important;
}

/* ==========================================================================
   5. Hero Banner & Academic Profile Action Buttons
   Ensures Academia, ResearchGate, and related hero outline buttons
   remain high-contrast and transition to theme royal blue on hover.
   ========================================================================== */
.scholar-hero-card .btn-outline-light,
.awards-hero-section .btn-outline-light,
.author-hero-card .btn-outline-light,
.author-hero-card .btn-outline-info,
section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2),
section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(3),
section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(4) {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.45) !important;
  color: #ffffff !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.scholar-hero-card .btn-outline-light:hover,
.awards-hero-section .btn-outline-light:hover,
.author-hero-card .btn-outline-light:hover,
.author-hero-card .btn-outline-info:hover,
section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2):hover,
section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(3):hover,
section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(4):hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6), 0 0 12px rgba(96, 165, 250, 0.5) !important;
}

.scholar-hero-card .btn-outline-light i,
.awards-hero-section .btn-outline-light i,
.author-hero-card .btn-outline-light i,
.author-hero-card .btn-outline-info i,
section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2) i,
section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(3) i,
section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(4) i {
  color: #ffffff !important;
}

/* Dark Mode Overrides for Hero Banner Action Buttons */
html.dark-mode .scholar-hero-card .btn-outline-light,
body.dark-mode .scholar-hero-card .btn-outline-light,
html.dark-mode .awards-hero-section .btn-outline-light,
body.dark-mode .awards-hero-section .btn-outline-light,
html.dark-mode .author-hero-card .btn-outline-light,
body.dark-mode .author-hero-card .btn-outline-light,
html.dark-mode .author-hero-card .btn-outline-info,
body.dark-mode .author-hero-card .btn-outline-info,
html.dark-mode section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2),
body.dark-mode section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2),
html.dark-mode section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(3),
body.dark-mode section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(3),
html.dark-mode section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(4),
body.dark-mode section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(4) {
  background: rgba(37, 99, 235, 0.2) !important;
  border: 1.5px solid rgba(96, 165, 250, 0.55) !important;
  color: #f8fafc !important;
}

html.dark-mode .scholar-hero-card .btn-outline-light:hover,
body.dark-mode .scholar-hero-card .btn-outline-light:hover,
html.dark-mode .awards-hero-section .btn-outline-light:hover,
body.dark-mode .awards-hero-section .btn-outline-light:hover,
html.dark-mode .author-hero-card .btn-outline-light:hover,
body.dark-mode .author-hero-card .btn-outline-light:hover,
html.dark-mode .author-hero-card .btn-outline-info:hover,
body.dark-mode .author-hero-card .btn-outline-info:hover,
html.dark-mode section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2):hover,
body.dark-mode section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(2):hover,
html.dark-mode section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(3):hover,
body.dark-mode section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(3):hover,
html.dark-mode section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(4):hover,
body.dark-mode section:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(4):hover {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
  border-color: #93c5fd !important;
  color: #ffffff !important;
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.75), 0 0 14px rgba(96, 165, 250, 0.6) !important;
  transform: translateY(-2px);
}

/* ==========================================================================
   6. Universal Interactive Button System & High-Contrast Hover Transitions
   Ensures ALL buttons across the entire website transition to a consistent,
   high-contrast, theme-appropriate royal blue (#1d4ed8 / #2563eb) on hover
   in both light and dark modes, eliminating invisible or low-contrast states.
   ========================================================================== */

/* Base transition for all interactive buttons */
.btn,
.btn-primary,
.btn-secondary,
.btn-light,
.btn-dark,
.btn-info,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-light,
.btn-outline-dark,
.btn-outline-info,
.btn-outline-warning,
.btn-outline-success,
.btn-pub-outline,
.btn-pub-primary,
.btn-pub-action,
.btn-hub-primary,
.btn-hub-outline,
.btn-hub-action,
.btn-proj-preview,
.btn-proj-github,
.preview-btn,
.btn-preview,
a.preview-link,
.btn-award-link,
.btn-filter-pill,
.filter-btn-pill,
.filter-btn,
.home-award-filter-btn,
.btn-topic-pill,
.btn-verify,
.btn-verify-primary,
.btn-verify-secondary,
.btn-cite-media,
.btn-copy-cite,
.btn-inspect-cert,
.btn-star-card,
.btn-details,
.btn-event-link,
.btn-media-primary,
.btn-collab-action,
.btn-collab-adplist,
.btn-adplist-book,
.btn-adplist-outline,
.btn-roadmap-inquire,
.btn-mandate-inquire,
.btn-waitlist,
.about-btn,
.hero-btn-primary,
.hero-btn-secondary,
.membership-hero-btn-accent,
.membership-hero-btn-outline,
.membership-hero-btn-primary,
.hv-btn-external,
.hv-btn-slides,
.hv-btn-stage,
.hv-btn-youtube,
.hv-btn-icon,
.pagination .page-link,
.modal-content .btn {
  transition: background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.25s ease,
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Light Mode: Universal Theme-Appropriate High-Contrast Hover (#1d4ed8 / #2563eb) */
.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-light:hover,
.btn-outline-dark:hover,
.btn-outline-info:hover,
.btn-light:hover,
.btn-secondary:hover,
.btn-pub-outline:hover,
.btn-pub-primary:hover,
.btn-pub-action:hover,
.btn-hub-primary:hover,
.btn-hub-outline:hover,
.btn-hub-action:hover,
.btn-proj-preview:hover,
.btn-proj-github:hover,
.preview-btn:hover,
.btn-preview:hover,
a.preview-link:hover,
.btn-award-link:hover,
.btn-filter-pill:hover,
.filter-btn-pill:hover,
.filter-btn:hover,
.home-award-filter-btn:hover,
.btn-topic-pill:hover,
.btn-verify:hover,
.btn-verify-primary:hover,
.btn-verify-secondary:hover,
.btn-cite-media:hover,
.btn-copy-cite:hover,
.btn-inspect-cert:hover,
.btn-star-card:hover,
.btn-details:hover,
.btn-event-link:hover,
.btn-media-primary:hover,
.btn-collab-action:hover,
.btn-collab-adplist:hover,
.btn-adplist-book:hover,
.btn-adplist-outline:hover,
.btn-roadmap-inquire:hover,
.btn-mandate-inquire:hover,
.btn-waitlist:hover,
.about-btn:hover,
.hero-btn-primary:hover,
.hero-btn-secondary:hover,
.membership-hero-btn-accent:hover,
.membership-hero-btn-outline:hover,
.membership-hero-btn-primary:hover,
.hv-btn-external:hover,
.hv-btn-slides:hover,
.hv-btn-stage:hover,
.hv-btn-youtube:hover,
.pagination .page-link:hover,
.modal-content .btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  background-color: #1d4ed8 !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.38) !important;
  transform: translateY(-1px);
}

.btn-outline-primary:hover *,
.btn-outline-secondary:hover *,
.btn-outline-light:hover *,
.btn-outline-dark:hover *,
.btn-outline-info:hover *,
.btn-light:hover *,
.btn-secondary:hover *,
.btn-pub-outline:hover *,
.btn-hub-outline:hover *,
.btn-proj-preview:hover *,
.btn-proj-github:hover *,
.preview-btn:hover *,
.btn-preview:hover *,
a.preview-link:hover *,
.btn-filter-pill:hover *,
.filter-btn-pill:hover *,
.filter-btn:hover *,
.home-award-filter-btn:hover *,
.pagination .page-link:hover * {
  color: #ffffff !important;
  stroke: #ffffff !important;
  fill: currentColor;
}

/* Primary buttons hover refinement */
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
  background-color: #1d4ed8 !important;
  border-color: #1e40af !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(29, 78, 216, 0.5) !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   7. Dark Theme: Universal Button Hover & Contrast System
   Guarantees that NO button in dark mode hovers to murky backgrounds
   ========================================================================== */
html.dark-mode .btn-primary:hover,
body.dark-mode .btn-primary:hover,
html.dark-mode .btn-secondary:hover,
body.dark-mode .btn-secondary:hover,
html.dark-mode .btn-light:hover,
body.dark-mode .btn-light:hover,
html.dark-mode .btn-dark:hover,
body.dark-mode .btn-dark:hover,
html.dark-mode .btn-outline-primary:hover,
body.dark-mode .btn-outline-primary:hover,
html.dark-mode .btn-outline-secondary:hover,
body.dark-mode .btn-outline-secondary:hover,
html.dark-mode .btn-outline-light:hover,
body.dark-mode .btn-outline-light:hover,
html.dark-mode .btn-outline-dark:hover,
body.dark-mode .btn-outline-dark:hover,
html.dark-mode .btn-outline-info:hover,
body.dark-mode .btn-outline-info:hover,
html.dark-mode .btn-outline-paper:hover,
body.dark-mode .btn-outline-paper:hover,
html.dark-mode .btn-pub-outline:hover,
body.dark-mode .btn-pub-outline:hover,
html.dark-mode .btn-pub-primary:hover,
body.dark-mode .btn-pub-primary:hover,
html.dark-mode .btn-pub-action:hover,
body.dark-mode .btn-pub-action:hover,
html.dark-mode .btn-hub-primary:hover,
body.dark-mode .btn-hub-primary:hover,
html.dark-mode .btn-hub-outline:hover,
body.dark-mode .btn-hub-outline:hover,
html.dark-mode .btn-hub-action:hover,
body.dark-mode .btn-hub-action:hover,
html.dark-mode .btn-proj-preview:hover,
body.dark-mode .btn-proj-preview:hover,
html.dark-mode .btn-proj-github:hover,
body.dark-mode .btn-proj-github:hover,
html.dark-mode .preview-btn:hover,
body.dark-mode .preview-btn:hover,
html.dark-mode .btn-preview:hover,
body.dark-mode .btn-preview:hover,
html.dark-mode a.preview-link:hover,
body.dark-mode a.preview-link:hover,
html.dark-mode .btn-award-link:hover,
body.dark-mode .btn-award-link:hover,
html.dark-mode .btn-filter-pill:hover,
body.dark-mode .btn-filter-pill:hover,
html.dark-mode .filter-btn-pill:hover,
body.dark-mode .filter-btn-pill:hover,
html.dark-mode .filter-btn:hover,
body.dark-mode .filter-btn:hover,
html.dark-mode .home-award-filter-btn:hover,
body.dark-mode .home-award-filter-btn:hover,
html.dark-mode .btn-topic-pill:hover,
body.dark-mode .btn-topic-pill:hover,
html.dark-mode .btn-verify:hover,
body.dark-mode .btn-verify:hover,
html.dark-mode .btn-verify-primary:hover,
body.dark-mode .btn-verify-primary:hover,
html.dark-mode .btn-verify-secondary:hover,
body.dark-mode .btn-verify-secondary:hover,
html.dark-mode .btn-cite-media:hover,
body.dark-mode .btn-cite-media:hover,
html.dark-mode .btn-copy-cite:hover,
body.dark-mode .btn-copy-cite:hover,
html.dark-mode .btn-inspect-cert:hover,
body.dark-mode .btn-inspect-cert:hover,
html.dark-mode .btn-star-card:hover,
body.dark-mode .btn-star-card:hover,
html.dark-mode .btn-details:hover,
body.dark-mode .btn-details:hover,
html.dark-mode .btn-event-link:hover,
body.dark-mode .btn-event-link:hover,
html.dark-mode .btn-media-primary:hover,
body.dark-mode .btn-media-primary:hover,
html.dark-mode .btn-collab-action:hover,
body.dark-mode .btn-collab-action:hover,
html.dark-mode .btn-collab-adplist:hover,
body.dark-mode .btn-collab-adplist:hover,
html.dark-mode .btn-adplist-book:hover,
body.dark-mode .btn-adplist-book:hover,
html.dark-mode .btn-adplist-outline:hover,
body.dark-mode .btn-adplist-outline:hover,
html.dark-mode .btn-roadmap-inquire:hover,
body.dark-mode .btn-roadmap-inquire:hover,
html.dark-mode .btn-mandate-inquire:hover,
body.dark-mode .btn-mandate-inquire:hover,
html.dark-mode .btn-waitlist:hover,
body.dark-mode .btn-waitlist:hover,
html.dark-mode .about-btn:hover,
body.dark-mode .about-btn:hover,
html.dark-mode .hero-btn-primary:hover,
body.dark-mode .hero-btn-primary:hover,
html.dark-mode .hero-btn-secondary:hover,
body.dark-mode .hero-btn-secondary:hover,
html.dark-mode .membership-hero-btn-accent:hover,
body.dark-mode .membership-hero-btn-accent:hover,
html.dark-mode .membership-hero-btn-outline:hover,
body.dark-mode .membership-hero-btn-outline:hover,
html.dark-mode .membership-hero-btn-primary:hover,
body.dark-mode .membership-hero-btn-primary:hover,
html.dark-mode .hv-btn-external:hover,
body.dark-mode .hv-btn-external:hover,
html.dark-mode .hv-btn-slides:hover,
body.dark-mode .hv-btn-slides:hover,
html.dark-mode .hv-btn-stage:hover,
body.dark-mode .hv-btn-stage:hover,
html.dark-mode .hv-btn-youtube:hover,
body.dark-mode .hv-btn-youtube:hover,
html.dark-mode .pagination .page-link:hover,
body.dark-mode .pagination .page-link:hover,
html.dark-mode .modal-content .btn:hover,
body.dark-mode .modal-content .btn:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
  background-color: #1d4ed8 !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.65), 0 0 12px rgba(96, 165, 250, 0.45) !important;
  transform: translateY(-1px);
}

html.dark-mode .btn:hover *,
body.dark-mode .btn:hover *,
html.dark-mode .btn-outline-light:hover *,
body.dark-mode .btn-outline-light:hover *,
html.dark-mode .btn-outline-secondary:hover *,
body.dark-mode .btn-outline-secondary:hover *,
html.dark-mode .btn-light:hover *,
body.dark-mode .btn-light:hover *,
html.dark-mode .btn-proj-preview:hover *,
body.dark-mode .btn-proj-preview:hover *,
html.dark-mode .btn-proj-github:hover *,
body.dark-mode .btn-proj-github:hover *,
html.dark-mode .preview-btn:hover *,
body.dark-mode .preview-btn:hover *,
html.dark-mode .filter-btn-pill:hover *,
body.dark-mode .filter-btn-pill:hover *,
html.dark-mode .home-award-filter-btn:hover *,
body.dark-mode .home-award-filter-btn:hover * {
  color: #ffffff !important;
  stroke: #ffffff !important;
  fill: currentColor;
}

/* ==========================================================================
   8. Dark Theme: Universal Card Styling & Elevation Refinements
   Applies executive surface design, crisp border highlights, and elegant
   hover elevation across all card components in dark mode.
   ========================================================================== */
html.dark-mode .card,
body.dark-mode .card,
html.dark-mode .b-box,
body.dark-mode .b-box,
html.dark-mode .award-card,
body.dark-mode .award-card,
html.dark-mode .publication-card,
body.dark-mode .publication-card,
html.dark-mode .membership-card,
body.dark-mode .membership-card,
html.dark-mode .media-card,
body.dark-mode .media-card,
html.dark-mode .blog-card,
body.dark-mode .blog-card,
html.dark-mode .deck-card,
body.dark-mode .deck-card,
html.dark-mode .ecosystem-card,
body.dark-mode .ecosystem-card,
html.dark-mode .event-hub-card,
body.dark-mode .event-hub-card,
html.dark-mode .profile-hub-card,
body.dark-mode .profile-hub-card,
html.dark-mode .briefing-card,
body.dark-mode .briefing-card,
html.dark-mode .public-profile,
body.dark-mode .public-profile,
html.dark-mode .about-hero-card,
body.dark-mode .about-hero-card,
html.dark-mode .cert-card,
body.dark-mode .cert-card,
html.dark-mode .timeline-phase-card,
body.dark-mode .timeline-phase-card,
html.dark-mode .custom-project-card,
body.dark-mode .custom-project-card,
html.dark-mode .portfolio-project-card,
body.dark-mode .portfolio-project-card,
html.dark-mode .author-channel-card,
body.dark-mode .author-channel-card,
html.dark-mode .author-mission-card,
body.dark-mode .author-mission-card,
html.dark-mode .author-stat-card,
body.dark-mode .author-stat-card,
html.dark-mode .award-highlight-card,
body.dark-mode .award-highlight-card,
html.dark-mode .pillar-card,
body.dark-mode .pillar-card,
html.dark-mode .book-showcase-card,
body.dark-mode .book-showcase-card,
html.dark-mode .total-reach-hero-card,
body.dark-mode .total-reach-hero-card,
html.dark-mode .hv-cadence-step-card,
body.dark-mode .hv-cadence-step-card,
html.dark-mode .advisory-expertise-card,
body.dark-mode .advisory-expertise-card,
html.dark-mode .hv-audience-card,
body.dark-mode .hv-audience-card,
html.dark-mode .hv-format-card,
body.dark-mode .hv-format-card,
html.dark-mode .hv-speaker-white-section-card,
body.dark-mode .hv-speaker-white-section-card,
html.dark-mode .education-interactive-card,
body.dark-mode .education-interactive-card,
html.dark-mode .exp-card,
body.dark-mode .exp-card,
html.dark-mode .portrait-credential-card,
body.dark-mode .portrait-credential-card {
  background-color: #111a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease !important;
}

/* Card hover states across all cards */
html.dark-mode .card:hover,
body.dark-mode .card:hover,
html.dark-mode .b-box:hover,
body.dark-mode .b-box:hover,
html.dark-mode .award-card:hover,
body.dark-mode .award-card:hover,
html.dark-mode .publication-card:hover,
body.dark-mode .publication-card:hover,
html.dark-mode .membership-card:hover,
body.dark-mode .membership-card:hover,
html.dark-mode .media-card:hover,
body.dark-mode .media-card:hover,
html.dark-mode .blog-card:hover,
body.dark-mode .blog-card:hover,
html.dark-mode .deck-card:hover,
body.dark-mode .deck-card:hover,
html.dark-mode .ecosystem-card:hover,
body.dark-mode .ecosystem-card:hover,
html.dark-mode .event-hub-card:hover,
body.dark-mode .event-hub-card:hover,
html.dark-mode .profile-hub-card:hover,
body.dark-mode .profile-hub-card:hover,
html.dark-mode .briefing-card:hover,
body.dark-mode .briefing-card:hover,
html.dark-mode .cert-card:hover,
body.dark-mode .cert-card:hover,
html.dark-mode .portfolio-project-card:hover,
body.dark-mode .portfolio-project-card:hover,
html.dark-mode .award-highlight-card:hover,
body.dark-mode .award-highlight-card:hover,
html.dark-mode .pillar-card:hover,
body.dark-mode .pillar-card:hover,
html.dark-mode .advisory-expertise-card:hover,
body.dark-mode .advisory-expertise-card:hover,
html.dark-mode .hv-audience-card:hover,
body.dark-mode .hv-audience-card:hover,
html.dark-mode .hv-format-card:hover,
body.dark-mode .hv-format-card:hover,
html.dark-mode .hv-speaker-white-section-card:hover,
body.dark-mode .hv-speaker-white-section-card:hover,
html.dark-mode .education-interactive-card:hover,
body.dark-mode .education-interactive-card:hover,
html.dark-mode .exp-card:hover,
body.dark-mode .exp-card:hover {
  transform: translateY(-3px) !important;
  border-color: rgba(96, 165, 250, 0.4) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.58), 0 0 18px rgba(37, 99, 235, 0.22) !important;
}

/* Card typography & inner elements in Dark Mode */
html.dark-mode .card .card-title,
body.dark-mode .card .card-title,
html.dark-mode .card h3,
body.dark-mode .card h3,
html.dark-mode .card h4,
body.dark-mode .card h4,
html.dark-mode .card h5,
body.dark-mode .card h5,
html.dark-mode .card h6,
body.dark-mode .card h6,
html.dark-mode .award-card h5,
body.dark-mode .award-card h5,
html.dark-mode .publication-card h5,
body.dark-mode .publication-card h5,
html.dark-mode .membership-card h5,
body.dark-mode .membership-card h5,
html.dark-mode .media-card h5,
body.dark-mode .media-card h5 {
  color: #f8fafc !important;
}

html.dark-mode .card p,
body.dark-mode .card p,
html.dark-mode .card-body p,
body.dark-mode .card-body p,
html.dark-mode .award-card p,
body.dark-mode .award-card p,
html.dark-mode .publication-card p,
body.dark-mode .publication-card p,
html.dark-mode .membership-card p,
body.dark-mode .membership-card p,
html.dark-mode .media-card p,
body.dark-mode .media-card p {
  color: #cbd5e1 !important;
}

html.dark-mode .card-body,
body.dark-mode .card-body,
html.dark-mode .award-card-body,
body.dark-mode .award-card-body,
html.dark-mode .cert-card-body,
body.dark-mode .cert-card-body {
  background: transparent !important;
}

/* ==========================================================================
   9. Dark Theme: Navigation Elements Refinement
   Enforces high-contrast navbar, crisp navigation links, themed dropdowns,
   mobile navigation styling, and interactive active/focus feedback.
   ========================================================================== */
html.dark-mode .navbar-custom,
body.dark-mode .navbar-custom {
  background-color: rgba(11, 16, 27, 0.95) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html.dark-mode .navbar-brand,
body.dark-mode .navbar-brand {
  color: #ffffff !important;
}

html.dark-mode .navbar-custom .navbar-nav .nav-item .nav-link,
body.dark-mode .navbar-custom .navbar-nav .nav-item .nav-link {
  color: #cbd5e1 !important;
  transition: all 0.2s ease !important;
}

html.dark-mode .navbar-custom .navbar-nav .nav-item .nav-link:hover,
html.dark-mode .navbar-custom .navbar-nav .nav-item .nav-link:focus,
body.dark-mode .navbar-custom .navbar-nav .nav-item .nav-link:hover,
body.dark-mode .navbar-custom .navbar-nav .nav-item .nav-link:focus {
  color: #ffffff !important;
  background-color: rgba(37, 99, 235, 0.22) !important;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}

html.dark-mode .navbar-custom .navbar-nav .nav-item.active .nav-link,
body.dark-mode .navbar-custom .navbar-nav .nav-item.active .nav-link,
html.dark-mode .navbar-custom .navbar-nav .nav-item .nav-link.active,
body.dark-mode .navbar-custom .navbar-nav .nav-item .nav-link.active {
  color: #ffffff !important;
  background-color: rgba(37, 99, 235, 0.32) !important;
  box-shadow: inset 0 0 0 1.5px rgba(96, 165, 250, 0.55) !important;
  border-radius: 6px;
}

/* Dropdown Menus in Dark Mode */
html.dark-mode .dropdown-menu,
html.dark-mode .nav-custom-dropdown,
body.dark-mode .dropdown-menu,
body.dark-mode .nav-custom-dropdown {
  background-color: #0f172a !important;
  border: 1px solid rgba(59, 130, 246, 0.28) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.72) !important;
  border-radius: 12px !important;
  overflow: hidden;
}

html.dark-mode .nav-dropdown-item,
body.dark-mode .nav-dropdown-item,
html.dark-mode .dropdown-item,
body.dark-mode .dropdown-item {
  color: #cbd5e1 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html.dark-mode .nav-dropdown-item:hover,
html.dark-mode .nav-dropdown-item:focus,
body.dark-mode .nav-dropdown-item:hover,
body.dark-mode .nav-dropdown-item:focus,
html.dark-mode .dropdown-item:hover,
html.dark-mode .dropdown-item:focus,
body.dark-mode .dropdown-item:hover,
body.dark-mode .dropdown-item:focus {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25) 0%, rgba(29, 78, 216, 0.35) 100%) !important;
  color: #ffffff !important;
  padding-left: 1.25rem !important;
  box-shadow: inset 3px 0 0 #3b82f6 !important;
}

html.dark-mode .nav-dropdown-item:hover .dropdown-item-title,
body.dark-mode .nav-dropdown-item:hover .dropdown-item-title,
html.dark-mode .dropdown-item:hover .dropdown-item-title,
body.dark-mode .dropdown-item:hover .dropdown-item-title {
  color: #ffffff !important;
}

html.dark-mode .nav-dropdown-item:hover .dropdown-item-desc,
body.dark-mode .nav-dropdown-item:hover .dropdown-item-desc,
html.dark-mode .dropdown-item:hover .dropdown-item-desc,
body.dark-mode .dropdown-item:hover .dropdown-item-desc {
  color: #bfdbfe !important;
}

/* Nav Social Action Buttons */
html.dark-mode .nav-social-btn,
body.dark-mode .nav-social-btn {
  background-color: rgba(30, 41, 59, 0.8) !important;
  color: #93c5fd !important;
  border-color: rgba(59, 130, 246, 0.35) !important;
}

html.dark-mode .nav-social-btn:hover,
body.dark-mode .nav-social-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  background-color: #1d4ed8 !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5) !important;
}

/* ==========================================================================
   MDI Icon Compatibility Fallbacks (v3.2.89 Font Glyph Mappings)
   Ensures missing or newer MDI classes cleanly resolve to valid webfont glyphs
   ========================================================================== */
.mdi-hexagon-multiple-outline:before { content: "\F6E0" !important; }
.mdi-graph-outline:before { content: "\F4AA" !important; }
.mdi-fingerprint-off:before { content: "\F237" !important; }
.mdi-book-check-outline:before { content: "\F0C1" !important; }
.mdi-bookshelf:before { content: "\F0BB" !important; }
.mdi-view-grid-outline:before { content: "\F570" !important; }
.mdi-account-edit-outline:before { content: "\F6BB" !important; }
.mdi-shield-search:before { content: "\F565" !important; }
.mdi-account-tie:before { content: "\F017" !important; }
.mdi-chart-timeline-variant:before { content: "\F66E" !important; }
.mdi-chart-box-outline:before { content: "\F128" !important; }
.mdi-email-newsletter:before { content: "\F1F0" !important; }
.mdi-rotate-3d-variant:before { content: "\F464" !important; }
.mdi-shield-bug:before { content: "\F99C" !important; }
.mdi-tools:before { content: "\FBBC" !important; }
