/* Workshop Generative Models Documentation Custom Styles */
/* Scientific/ML documentation enhancements for generative modeling */

/* Scientific equation styling */
.arithmatex {
  margin: 1em 0;
}

/* Code block enhancements for scientific computing */
.highlight .hll {
  background-color: #ffffcc
}

.highlight .c {
  color: #408080;
  font-style: italic
}

/* Comment */
.highlight .k {
  color: #008000;
  font-weight: bold
}

/* Keyword */
.highlight .o {
  color: #666666
}

/* Operator */
.highlight .cm {
  color: #408080;
  font-style: italic
}

/* Comment.Multiline */
.highlight .cp {
  color: #BC7A00
}

/* Comment.Preproc */
.highlight .c1 {
  color: #408080;
  font-style: italic
}

/* Comment.Single */
.highlight .cs {
  color: #408080;
  font-style: italic
}

/* Comment.Special */

/* Scientific/ML array styling */
.highlight .nd {
  color: #AA22FF
}

/* Name.Decorator */
.highlight .nf {
  color: #0000FF
}

/* Name.Function */
.highlight .nn {
  color: #0000FF;
  font-weight: bold
}

/* Name.Namespace */

/* Mathematical symbols and ML notation */
.math {
  font-family: 'Computer Modern', 'Latin Modern Math', serif;
}

/* Enhanced admonition styling for ML/scientific content */
.md-typeset .admonition.note {
  border-left: 4px solid #448aff;
}

.md-typeset .admonition.tip {
  border-left: 4px solid #00c853;
}

.md-typeset .admonition.warning {
  border-left: 4px solid #ff9100;
}

.md-typeset .admonition.danger {
  border-left: 4px solid #ff5252;
}

/* Generative Model specific styling */
.model-info {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  padding: 1em;
  border-radius: 4px;
  margin: 1em 0;
}

.performance-warning {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
  padding: 1em;
  border-radius: 4px;
  margin: 1em 0;
}

.training-note {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  padding: 1em;
  border-radius: 4px;
  margin: 1em 0;
}

/* Model type badges for generative models */
.model-vae {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  padding: 0.5em 1em;
  border-radius: 4px;
  font-weight: bold;
  display: inline-block;
  margin: 0.25em;
}

.model-gan {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
  padding: 0.5em 1em;
  border-radius: 4px;
  font-weight: bold;
  display: inline-block;
  margin: 0.25em;
}

.model-diffusion {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: white;
  padding: 0.5em 1em;
  border-radius: 4px;
  font-weight: bold;
  display: inline-block;
  margin: 0.25em;
}

.model-flow {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  padding: 0.5em 1em;
  border-radius: 4px;
  font-weight: bold;
  display: inline-block;
  margin: 0.25em;
}

.model-ebm {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: white;
  padding: 0.5em 1em;
  border-radius: 4px;
  font-weight: bold;
  display: inline-block;
  margin: 0.25em;
}

.model-autoregressive {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
  padding: 0.5em 1em;
  border-radius: 4px;
  font-weight: bold;
  display: inline-block;
  margin: 0.25em;
}

/* Pipeline/architecture diagrams */
.pipeline-diagram {
  text-align: center;
  margin: 2em 0;
}

.pipeline-diagram svg {
  max-width: 100%;
  height: auto;
}

/* Performance metrics styling */
.performance-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1em;
  margin: 1em 0;
}

.metric-card {
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 4px;
  padding: 1em;
  text-align: center;
}

.metric-value {
  font-size: 2em;
  font-weight: bold;
  color: var(--md-primary-fg-color);
}

.metric-label {
  font-size: 0.9em;
  color: var(--md-default-fg-color--light);
  margin-top: 0.5em;
}

/* Training quality indicators */
.quality-high {
  color: #059669;
  font-weight: bold;
}

.quality-medium {
  color: #d97706;
  font-weight: bold;
}

.quality-low {
  color: #dc2626;
  font-weight: bold;
}

/* Training results table styling */
.results-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.results-table th,
.results-table td {
  padding: 0.75em;
  text-align: left;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.results-table th {
  background: var(--md-default-bg-color--light);
  font-weight: bold;
}

.results-table .metric-name {
  font-family: 'Roboto Mono', monospace;
  font-weight: bold;
  color: var(--md-primary-fg-color);
}

.results-table .value {
  font-family: 'Roboto Mono', monospace;
}

/* Model architecture styling */
.architecture-block {
  background: var(--md-code-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 4px;
  padding: 1em;
  margin: 0.5em 0;
}

.architecture-block .block-title {
  font-weight: bold;
  color: var(--md-primary-fg-color);
  margin-bottom: 0.5em;
}

.architecture-block .block-description {
  font-size: 0.9em;
  color: var(--md-default-fg-color--light);
}

/* Framework badges */
.framework-jax {
  background: #d97706;
  color: white;
  padding: 0.25em 0.5em;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
}

.framework-flax {
  background: #6366f1;
  color: white;
  padding: 0.25em 0.5em;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
}

.framework-nnx {
  background: #8b5cf6;
  color: white;
  padding: 0.25em 0.5em;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
}

/* Code annotation enhancements */
.md-typeset .md-annotation {
  font-size: 0.8em;
  line-height: 1.4;
}

/* ML/DL badge styling */
.ml-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0.125rem;
}

/* Configuration YAML highlighting */
.config-structure {
  background: var(--md-code-bg-color);
  border-left: 4px solid var(--md-primary-fg-color);
  padding: 1em;
  margin: 1em 0;
  font-family: 'Roboto Mono', monospace;
}

/* Improve code block readability */
.md-typeset code {
  font-size: 0.85em;
}

/* Better spacing for API documentation */
.md-typeset .doc-contents {
  padding-left: 1rem;
}

/* Improve table of contents */
.md-nav__link {
  font-size: 0.9em;
}

/* Better heading hierarchy */
.md-typeset h1 {
  color: var(--md-primary-fg-color);
}

.md-typeset h2 {
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  padding-bottom: 0.3rem;
}

/* Sampling method badges */
.sampling-ancestral {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  padding: 0.25em 0.5em;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
}

.sampling-diffusion {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: white;
  padding: 0.25em 0.5em;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
}

.sampling-mcmc {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
  padding: 0.25em 0.5em;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
}

/* Loss function styling */
.loss-reconstruction {
  background: #059669;
  color: white;
  padding: 0.25em 0.5em;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
}

.loss-adversarial {
  background: #dc2626;
  color: white;
  padding: 0.25em 0.5em;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
}

.loss-kldiv {
  background: #0891b2;
  color: white;
  padding: 0.25em 0.5em;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
}

.loss-perceptual {
  background: #7c3aed;
  color: white;
  padding: 0.25em 0.5em;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
}

/* Responsive design for mobile */
@media screen and (max-width: 768px) {
  .performance-metrics {
    grid-template-columns: 1fr;
  }

  .pipeline-diagram {
    overflow-x: auto;
  }

  .results-table {
    font-size: 0.9em;
  }

  .ml-badge {
    font-size: 0.7em;
    padding: 0.2rem 0.4rem;
  }
}

/* Dark mode specific adjustments */
[data-md-color-scheme="slate"] {
  .model-info {
    background: linear-gradient(135deg, #4338ca, #7c3aed);
  }

  .performance-warning {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
  }

  .training-note {
    background: linear-gradient(135deg, #047857, #059669);
  }

  .metric-card {
    background: var(--md-code-bg-color);
  }

  .architecture-block {
    background: var(--md-code-bg-color);
  }
}

/* Print styles for documentation */
@media print {

  .md-header,
  .md-tabs,
  .md-footer {
    display: none;
  }

  .md-content {
    margin: 0;
  }

  .pipeline-diagram {
    page-break-inside: avoid;
  }

  .results-table {
    page-break-inside: avoid;
  }

  .architecture-block {
    page-break-inside: avoid;
  }
}

/* Modality badges */
.modality-image {
  background: #6366f1;
  color: white;
  padding: 0.25em 0.5em;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
}

.modality-text {
  background: #059669;
  color: white;
  padding: 0.25em 0.5em;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
}

.modality-audio {
  background: #d97706;
  color: white;
  padding: 0.25em 0.5em;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
}

.modality-multimodal {
  background: #7c3aed;
  color: white;
  padding: 0.25em 0.5em;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
}

.modality-protein {
  background: #0891b2;
  color: white;
  padding: 0.25em 0.5em;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
}

/* Benchmark result styling */
.benchmark-results {
  margin: 1em 0;
  padding: 1em;
  background: var(--md-code-bg-color);
  border-radius: 4px;
  border-left: 4px solid var(--md-primary-fg-color);
}

.benchmark-title {
  font-weight: bold;
  color: var(--md-primary-fg-color);
  margin-bottom: 0.5em;
}
