@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Manrope:wght@400;600&display=swap");

:root {
  /* Core palette - Hybrid Professional */
  --pg-primary: #0a1628;
  --pg-secondary: #1e3a5f;
  --pg-accent: #3b82f6;
  --pg-accent-light: #60a5fa;
  --pg-muted: #64748b;
  --pg-surface: #0f172a;

  /* Warm accent for CTAs and emphasis */
  --pg-warm: #f59e0b;
  --pg-warm-light: #fbbf24;

  /* Semantic colors */
  --pg-success: #10b981;
  --pg-success-light: #34d399;

  /* Legacy support */
  --pg-card-bg: rgba(15, 27, 63, 0.9);
  --pg-radius: 12px;

  /* Refined shadows - softer, more modern */
  --pg-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --pg-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --pg-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
  --pg-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --pg-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);

  /* Typography */
  --md-typeset-font-family: "Manrope", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --md-code-font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;

  /* Light mode tile colors */
  --tile-bg-light: #f8fafc;
  --tile-text-light: #0f172a;
  --tile-border-light: rgba(59, 130, 246, 0.08);

  /* Dark mode tile colors */
  --tile-bg-dark: #1e293b;
  --tile-text-dark: #e2e8f0;
  --tile-border-dark: rgba(59, 130, 246, 0.15);
}

/* Dark mode support */
[data-md-color-scheme="slate"] {
  --tile-bg-light: var(--tile-bg-dark);
  --tile-text-light: var(--tile-text-dark);
  --tile-border-light: var(--tile-border-dark);
  --pg-accent: #60a5fa;
  --pg-accent-light: #93c5fd;
}

/* Layout & typography scale */
.md-content {
  max-width: 1100px;
}

.md-typeset h1 {
  font-family: "Space Grotesk", "Manrope", system-ui, sans-serif;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.md-typeset h2,
.md-typeset h3 {
  font-family: "Space Grotesk", "Manrope", system-ui, sans-serif;
  letter-spacing: -0.01em;
}

.md-typeset h2 {
  font-weight: 700;
}

.md-typeset h3 {
  font-weight: 600;
}

/* Body text - reduced weight for better readability */
.md-typeset p,
.md-typeset li {
  font-weight: 400;
  line-height: 1.7;
}

/* Cards and callouts */
.md-typeset .card,
.md-typeset .admonition,
.md-typeset details {
  border-radius: var(--pg-radius);
  box-shadow: var(--pg-shadow);
}

.md-typeset .admonition {
  border-left: 4px solid var(--pg-accent);
}

/* Hero CTA links */
.md-typeset a {
  color: var(--pg-accent);
  transition: color 150ms ease;
}

.md-typeset a:hover {
  color: var(--pg-accent-light);
}

/* Card links */
.card a,
.stat-tile a {
  color: var(--pg-accent) !important;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.card a:hover,
.stat-tile a:hover {
  color: var(--pg-accent-light) !important;
}

/* Tables - Improved styling */
.md-typeset table {
  border-radius: var(--pg-radius);
  overflow: hidden;
  box-shadow: var(--pg-shadow);
  width: 100%;
  font-size: 0.9rem;
}

.md-typeset table th {
  background: linear-gradient(135deg, var(--pg-primary), var(--pg-secondary));
  color: #f1f5f9;
  border: none;
  padding: 0.875rem 1rem;
  font-weight: 600;
  text-align: left;
}

.md-typeset table td {
  border: none;
  padding: 0.75rem 1rem;
  vertical-align: top;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.md-typeset table tr:last-child td {
  border-bottom: none;
}

/* Dark mode table headers */
[data-md-color-scheme="slate"] .md-typeset table th {
  background: linear-gradient(135deg, #1e3a5f, #3b82f6);
}

[data-md-color-scheme="slate"] .md-typeset table td {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

/* Table wrapper for horizontal scroll on mobile */
.md-typeset .section-panel table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

@media screen and (max-width: 768px) {
  .md-typeset table {
    font-size: 0.85rem;
  }
  .md-typeset table th,
  .md-typeset table td {
    padding: 0.5rem 0.75rem;
  }
}

/* Badges for pending/complete */
.badge-pending {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}

[data-md-color-scheme="slate"] .badge-pending {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
}

.badge-complete {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}

[data-md-color-scheme="slate"] .badge-complete {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
}

/* Section dividers */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--pg-accent), transparent);
  margin: var(--space-6) 0;
  opacity: 0.3;
}

/* Buttons - Refined with softer shadows */
.md-typeset .btn-primary,
.md-typeset .btn-ghost {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.md-typeset .btn-primary {
  background: var(--pg-accent);
  color: #ffffff;
  box-shadow: var(--pg-shadow);
}

.md-typeset .btn-primary:hover {
  background: var(--pg-accent-light);
  box-shadow: var(--pg-shadow-md);
  transform: translateY(-1px);
  color: #ffffff;
}

.md-typeset .btn-ghost {
  border: 1.5px solid var(--pg-accent);
  color: var(--pg-accent);
  background: transparent;
}

.md-typeset .btn-ghost:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: var(--pg-accent-light);
  color: var(--pg-accent-light);
}

/* Warm CTA button variant */
.md-typeset .btn-warm {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  background: var(--pg-warm);
  color: #ffffff;
  box-shadow: var(--pg-shadow);
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.md-typeset .btn-warm:hover {
  background: var(--pg-warm-light);
  box-shadow: var(--pg-shadow-md);
  transform: translateY(-1px);
  color: #ffffff;
}

/* Stat tiles - Refined cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
  margin: var(--space-6) 0;
}

.stat-tile {
  background: var(--tile-bg-light);
  border-radius: var(--pg-radius);
  padding: var(--space-5);
  box-shadow: var(--pg-shadow-sm);
  border: 1px solid var(--tile-border-light);
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--pg-shadow-lg);
  border-color: var(--pg-accent);
}

.stat-tile .label {
  color: var(--pg-muted);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.stat-tile .value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--tile-text-light);
}

.stat-tile .subtext {
  color: var(--tile-text-light);
  opacity: 0.75;
  font-size: 0.875rem;
}

.stat-tile small {
  display: block;
  margin-top: var(--space-3);
  font-size: 0.8rem;
  color: var(--pg-muted);
  line-height: 1.5;
}

/* Section panels */
.section-panel {
  background: none;
  border: none;
  border-radius: var(--pg-radius);
  padding: var(--space-5) 0;
  box-shadow: none;
  line-height: 1.8;
}

.section-panel ul {
  margin-top: var(--space-4);
  padding-left: var(--space-5);
}

.section-panel li {
  margin-bottom: var(--space-3);
}

.section-panel strong {
  color: var(--pg-accent);
  font-weight: 600;
}

.section-break {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.4), transparent);
  margin: var(--space-8) 0;
  border-radius: 99px;
}

/* Blockquotes - Styled for testimonials */
.md-typeset blockquote {
  border-left: 4px solid var(--pg-warm);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(245, 158, 11, 0.02));
  padding: var(--space-5);
  margin: var(--space-6) 0;
  border-radius: 0 var(--pg-radius) var(--pg-radius) 0;
  font-style: normal;
}

.md-typeset blockquote p {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--tile-text-light);
  margin: 0;
}

.md-typeset blockquote p:first-child {
  margin-bottom: var(--space-3);
}

.md-typeset blockquote strong {
  color: var(--pg-warm);
}

[data-md-color-scheme="slate"] .md-typeset blockquote {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
}

/* Tags - Clean, minimal */
.tag-chip {
  display: inline-block;
  padding: 0.2rem 0.625rem;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.1);
  color: #1e40af;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-right: 0.375rem;
  margin-bottom: 0.375rem;
}

[data-md-color-scheme="slate"] .tag-chip {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -99px; /* Hide it further off-screen */
  left: 0;
  background: var(--pg-accent);
  color: #ffffff;
  padding: 0.25rem 0.75rem; /* Reduced padding */
  z-index: 9999;
  font-size: 0.875rem; /* Smaller font */
  font-weight: 500; /* Less bold */
  text-decoration: none;
  border-radius: 0 0 4px 0;
  transition: top 0.1s ease-in-out;
}

.skip-link:focus {
  top: 0;
}

/* Responsive - Mobile */
@media screen and (max-width: 640px) {
  .stat-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .stat-tile {
    padding: var(--space-4);
  }

  .md-typeset h1 {
    font-size: 1.75rem;
    line-height: 1.2;
  }

  .md-typeset h2 {
    font-size: 1.375rem;
    margin-top: var(--space-6);
  }

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

  /* Improved tag chip mobile sizing */
  .tag-chip {
    font-size: 0.65rem;
    padding: 0.125rem 0.4rem;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
  }

  /* Better tag chip container wrapping */
  .stat-tile p:has(.tag-chip) {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    line-height: 1.8;
  }

  /* Mobile table improvements */
  .md-typeset table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    font-size: 0.8rem;
  }

  .md-typeset table th,
  .md-typeset table td {
    padding: 0.5rem 0.625rem;
    min-width: 100px;
  }

  /* Ensure tables in content scroll properly */
  .md-content__inner {
    overflow-x: hidden;
  }

  .md-typeset blockquote {
    padding: var(--space-4);
    margin: var(--space-5) 0;
  }

  .skip-link:focus {
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    border-radius: 0;
  }
}

/* Responsive - Tablet */
@media screen and (min-width: 641px) and (max-width: 1024px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Responsive - Desktop */
@media screen and (min-width: 1025px) {
  .stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

/* Motion respect */
@media (prefers-reduced-motion: reduce) {
  .stat-tile,
  .md-typeset .btn-primary,
  .md-typeset .btn-ghost,
  .md-typeset .btn-warm,
  .md-typeset a {
    transition: none;
    transform: none !important;
  }
}

/* Print styles */
@media print {
  .stat-tile {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #e2e8f0;
  }

  .section-break {
    display: none;
  }

  .md-typeset blockquote {
    background: #f8fafc;
    border-left-color: #64748b;
  }
}

/* Focus states for accessibility */
.md-typeset a:focus,
.md-typeset .btn-primary:focus,
.md-typeset .btn-ghost:focus,
.md-typeset .btn-warm:focus {
  outline: 2px solid var(--pg-accent);
  outline-offset: 2px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Status badges for project cards */
.status-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  vertical-align: middle;
}

[data-md-color-scheme="default"] .status-badge {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

[data-md-color-scheme="slate"] .status-badge {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
}

/* Skills grid for ATS keywords */
.skills-grid {
  display: grid;
  gap: 0.75rem;
}

.skills-grid p {
  margin: 0;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(100, 116, 139, 0.1);
}

.skills-grid p:last-child {
  border-bottom: none;
}

.skills-grid strong {
  color: var(--pg-accent);
  font-weight: 600;
}

[data-md-color-scheme="slate"] .skills-grid strong {
  color: var(--pg-accent-light);
}

/* ============================================
   Mermaid Diagram Styling
   ============================================ */

/* Container: full-width and centered */
.md-typeset .mermaid {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: var(--space-6) 0;
  padding: var(--space-4);
  background: var(--tile-bg-light);
  border-radius: var(--pg-radius);
  border: 1px solid var(--tile-border-light);
  box-shadow: var(--pg-shadow);
  overflow-x: auto;
}

/* SVG inside: scale to fit container width */
.md-typeset .mermaid svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Dark mode support */
[data-md-color-scheme="slate"] .md-typeset .mermaid {
  background: var(--tile-bg-dark);
  border-color: var(--tile-border-dark);
}

/* Ensure subgraphs have readable text in dark mode */
[data-md-color-scheme="slate"] .md-typeset .mermaid .nodeLabel,
[data-md-color-scheme="slate"] .md-typeset .mermaid .label {
  color: var(--tile-text-dark);
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
  .md-typeset .mermaid {
    padding: var(--space-3);
    margin: var(--space-4) 0;
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
  }

  .md-typeset .mermaid svg {
    min-width: 600px;
  }
}

/* ============================================
   Feature Grid for Homepage
   ============================================ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-5); /* Use existing spacing variable */
  margin: var(--space-6) 0;
}

.feature-tile {
  background: var(--tile-bg-light);
  border-radius: var(--pg-radius);
  padding: var(--space-5);
  box-shadow: var(--pg-shadow-sm);
  border: 1px solid var(--tile-border-light);
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--pg-shadow-lg);
  border-color: var(--pg-accent);
}

.feature-tile h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  font-size: 1.1rem; /* Slightly larger for feature titles */
  color: var(--tile-text-light);
}

.feature-tile p {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--pg-muted); /* Use muted color for less emphasis */
  line-height: 1.6;
}

/* ============================================
   Accessibility Fixes (WCAG 2.1 AA)
   ============================================ */

/*
 * Admonition contrast fixes - ensure 4.5:1 minimum ratio
 * Overrides MkDocs Material defaults that fail contrast checks
 */

/* Note admonitions - increase title contrast */
.md-typeset .admonition.note,
.md-typeset details.note {
  border-color: #1e40af;
}

.md-typeset .admonition.note > .admonition-title,
.md-typeset details.note > summary {
  background-color: rgba(30, 64, 175, 0.15);
  color: #1e3a8a;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.note > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.note > summary {
  background-color: rgba(96, 165, 250, 0.2);
  color: #bfdbfe;
}

/* Info admonitions */
.md-typeset .admonition.info,
.md-typeset details.info {
  border-color: #0369a1;
}

.md-typeset .admonition.info > .admonition-title,
.md-typeset details.info > summary {
  background-color: rgba(3, 105, 161, 0.15);
  color: #0c4a6e;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.info > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.info > summary {
  background-color: rgba(56, 189, 248, 0.2);
  color: #bae6fd;
}

/* Tip admonitions */
.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-color: #047857;
}

.md-typeset .admonition.tip > .admonition-title,
.md-typeset details.tip > summary {
  background-color: rgba(4, 120, 87, 0.15);
  color: #064e3b;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.tip > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.tip > summary {
  background-color: rgba(52, 211, 153, 0.2);
  color: #a7f3d0;
}

/* Success admonitions */
.md-typeset .admonition.success,
.md-typeset details.success {
  border-color: #15803d;
}

.md-typeset .admonition.success > .admonition-title,
.md-typeset details.success > summary {
  background-color: rgba(21, 128, 61, 0.15);
  color: #14532d;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.success > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.success > summary {
  background-color: rgba(74, 222, 128, 0.2);
  color: #bbf7d0;
}

/* Warning admonitions - critical for contrast */
.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-color: #b45309;
}

.md-typeset .admonition.warning > .admonition-title,
.md-typeset details.warning > summary {
  background-color: rgba(180, 83, 9, 0.15);
  color: #78350f;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.warning > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.warning > summary {
  background-color: rgba(251, 191, 36, 0.2);
  color: #fef3c7;
}

/* Danger/Error admonitions */
.md-typeset .admonition.danger,
.md-typeset .admonition.error,
.md-typeset details.danger,
.md-typeset details.error {
  border-color: #b91c1c;
}

.md-typeset .admonition.danger > .admonition-title,
.md-typeset .admonition.error > .admonition-title,
.md-typeset details.danger > summary,
.md-typeset details.error > summary {
  background-color: rgba(185, 28, 28, 0.15);
  color: #7f1d1d;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.danger > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset .admonition.error > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.danger > summary,
[data-md-color-scheme="slate"] .md-typeset details.error > summary {
  background-color: rgba(248, 113, 113, 0.2);
  color: #fecaca;
}

/* Abstract/Summary/TLDR admonitions */
.md-typeset .admonition.abstract,
.md-typeset .admonition.summary,
.md-typeset .admonition.tldr,
.md-typeset details.abstract,
.md-typeset details.summary,
.md-typeset details.tldr {
  border-color: #0891b2;
}

.md-typeset .admonition.abstract > .admonition-title,
.md-typeset .admonition.summary > .admonition-title,
.md-typeset .admonition.tldr > .admonition-title,
.md-typeset details.abstract > summary,
.md-typeset details.summary > summary,
.md-typeset details.tldr > summary {
  background-color: rgba(8, 145, 178, 0.15);
  color: #164e63;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.abstract > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset .admonition.summary > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset .admonition.tldr > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.abstract > summary,
[data-md-color-scheme="slate"] .md-typeset details.summary > summary,
[data-md-color-scheme="slate"] .md-typeset details.tldr > summary {
  background-color: rgba(34, 211, 238, 0.2);
  color: #cffafe;
}

/* Question admonitions */
.md-typeset .admonition.question,
.md-typeset details.question {
  border-color: #7c3aed;
}

.md-typeset .admonition.question > .admonition-title,
.md-typeset details.question > summary {
  background-color: rgba(124, 58, 237, 0.15);
  color: #4c1d95;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.question > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.question > summary {
  background-color: rgba(167, 139, 250, 0.2);
  color: #ddd6fe;
}

/* Example admonitions */
.md-typeset .admonition.example,
.md-typeset details.example {
  border-color: #7c3aed;
}

.md-typeset .admonition.example > .admonition-title,
.md-typeset details.example > summary {
  background-color: rgba(124, 58, 237, 0.15);
  color: #4c1d95;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.example > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.example > summary {
  background-color: rgba(167, 139, 250, 0.2);
  color: #ddd6fe;
}

/* Quote admonitions */
.md-typeset .admonition.quote,
.md-typeset details.quote {
  border-color: #6b7280;
}

.md-typeset .admonition.quote > .admonition-title,
.md-typeset details.quote > summary {
  background-color: rgba(107, 114, 128, 0.15);
  color: #374151;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.quote > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.quote > summary {
  background-color: rgba(156, 163, 175, 0.2);
  color: #e5e7eb;
}

/* Admonition body text contrast */
.md-typeset .admonition,
.md-typeset details {
  color: #1f2937;
}

[data-md-color-scheme="slate"] .md-typeset .admonition,
[data-md-color-scheme="slate"] .md-typeset details {
  color: #e5e7eb;
}

/*
 * Icon-only link accessibility
 * Ensures icon buttons have visible focus states
 */
.md-header__button,
.md-nav__link,
.md-footer__link,
.md-social__link {
  position: relative;
}

.md-social__link:focus,
.md-header__button:focus {
  outline: 2px solid var(--pg-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Ensure navigation links have sufficient contrast */
.md-nav__link {
  color: #374151;
}

[data-md-color-scheme="slate"] .md-nav__link {
  color: #d1d5db;
}

.md-nav__link:hover,
.md-nav__link--active {
  color: var(--pg-accent);
}

[data-md-color-scheme="slate"] .md-nav__link:hover,
[data-md-color-scheme="slate"] .md-nav__link--active {
  color: var(--pg-accent-light);
}

/* Search dialog accessibility */
.md-search__form {
  position: relative;
}

/* Ensure search input has visible label (screen reader accessible) */
.md-search__input::placeholder {
  color: #6b7280;
}

[data-md-color-scheme="slate"] .md-search__input::placeholder {
  color: #9ca3af;
}

/* Enhanced focus states for interactive elements */
.md-tabs__link:focus,
.md-nav__link:focus {
  outline: 2px solid var(--pg-accent);
  outline-offset: 2px;
}

/* Code block contrast improvements */
.md-typeset code {
  color: #be185d;
  background-color: rgba(190, 24, 93, 0.1);
}

[data-md-color-scheme="slate"] .md-typeset code {
  color: #f9a8d4;
  background-color: rgba(249, 168, 212, 0.15);
}

/*
 * Link accessibility — underlines for non-color distinction
 * Fixes: "Links rely on color to be distinguishable" (WCAG 1.4.1)
 */

/* Content area links - always underlined */
.md-typeset a:not(.md-button):not(.md-nav__link):not(.md-header__button):not(.md-logo):not(.md-footer__link):not(.md-social__link):not(.md-tabs__link):not(.headerlink):not(.btn-ghost):not(.btn-primary) {
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.md-typeset a:not(.md-button):not(.md-nav__link):not(.md-header__button):not(.md-logo):not(.md-footer__link):not(.md-social__link):not(.md-tabs__link):not(.headerlink):not(.btn-ghost):not(.btn-primary):hover {
  text-decoration-thickness: 2px;
}

/* Admonition and details links */
.md-typeset .admonition a,
.md-typeset details a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Table links */
.md-typeset table a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Navigation links - underline on focus for keyboard users */
.md-nav__link:focus,
.md-tabs__link:focus {
  text-decoration: underline;
}

/* Footer links - underlined for accessibility */
.md-footer a:not(.md-social__link):not(.md-footer__link--prev):not(.md-footer__link--next) {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* TOC links - subtle underline on hover */
.md-nav--secondary .md-nav__link:hover {
  text-decoration: underline;
}
