html {
  scroll-behavior: smooth;
}

/* Custom primary color override for Material for MkDocs */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #0D1117;
  --md-primary-fg-color--light: #21262d;
  --md-primary-fg-color--dark: #010409;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #0D1117;
  --md-primary-fg-color--light: #21262d;
  --md-primary-fg-color--dark: #010409;
  --md-default-bg-color: #0D1117;
}

/* Main content background - only for dark mode */
[data-md-color-scheme="slate"] .md-main {
  background-color: #0D1117;
}

/* Container background - only for dark mode */
[data-md-color-scheme="slate"] .md-container {
  background-color: #0D1117;
}

/* Subtle grey border between navbar and main content */
.md-header {
  border-bottom: 1px solid #30363d;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Left sidebar with subtle border */
.md-sidebar--primary {
  background-color: var(--md-default-bg-color);
  border-right: 1px solid #30363d;
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.05);
  min-height: 100vh;
}

/* Right sidebar (table of contents) with subtle border */
.md-sidebar--secondary {
  background-color: var(--md-default-bg-color);
  border-left: 1px solid #30363d;
  box-shadow: -1px 0 0 rgba(255, 255, 255, 0.05);
  min-height: 100vh;
}

/* Footer navigation (next/previous pages) - same for both modes */
.md-footer-nav {
  background-color: #0D1117;
  margin-top: 1px;
  padding: 0 !important;
  width: 100% !important;
}

/* Footer inner navigation (the actual next/prev buttons) - same for both modes */
.md-footer__inner {
  background-color: #0D1117 !important;
  border-top: 2px solid #30363d !important;
  padding: 1rem !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

/* Alternative: Add border to main content bottom */
.md-main__inner {
  margin-bottom: 0;
}

/* Main footer - same for both modes */
.md-footer {
  background-color: #161b22;
}

/* Footer meta information (copyright section) - same for both modes */
.md-footer-meta {
  background-color: #161b22;
  border-top: 1px solid #30363d;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.05);
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

/* Footer meta inner container */
.md-footer-meta__inner {
  padding: 1rem !important;
  margin: 0 auto !important;
  width: 100% !important;
  max-width: none !important;
}

/* Navigation items */
.md-nav__item {
  position: relative;
  margin: 1px 0;
}

/* Progress bar for navigation items */
.md-nav__item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

/* Active/current page progress bar */
.md-nav__item--active::before {
  background-color: #007acc;
  box-shadow: 0 0 8px rgba(0, 122, 204, 0.3);
}

/* Hover effect for navigation items */
.md-nav__item:hover::before {
  background-color: rgba(0, 122, 204, 0.5);
  width: 4px;
}

/* Navigation links styling */
.md-nav__link {
  position: relative;
  padding-left: 1rem;
  border-radius: 4px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active link styling */
.md-nav__link--active {
  font-weight: 500;
}

/* Dark mode adjustments */
[data-md-color-scheme="slate"] .md-nav__item--active::before {
  background-color: #4fc3f7;
  box-shadow: 0 0 8px rgba(79, 195, 247, 0.3);
}

[data-md-color-scheme="slate"] .md-nav__item:hover::before {
  background-color: rgba(79, 195, 247, 0.5);
}