<!-- Custom head content -->
<!-- viewport is defined in layouts; avoid duplicates that can cause inconsistencies -->


<!-- Favicon -->
<link rel="icon" type="image/png" sizes="32x32" href="{{ '/icons/favicon-32.png' | relative_url }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ '/icons/favicon-16.png' | relative_url }}">
<link rel="icon" type="image/png" sizes="64x64" href="{{ '/icons/favicon-64.png' | relative_url }}">
<link rel="icon" type="image/png" sizes="48x48" href="{{ '/icons/favicon-48.png' | relative_url }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ '/icons/icon-128.png' | relative_url }}">
<meta name="theme-color" content="#0366d6">

<!-- Syntax highlighting for code blocks -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script>
  // Configure Prism autoloader to load from the CDN components directory
  window.Prism = window.Prism || {};
  Prism.plugins = Prism.plugins || {};
  Prism.plugins.autoloader = Prism.plugins.autoloader || {};
  Prism.plugins.autoloader.languages_path = 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/';

  // Aliases:
  // - MDL (custom language) -> treat as JavaScript for highlighting
  // - mcfunction is not officially supported; fall back to none (plain text) to avoid failed loads
  Prism.languages.mdl = Prism.languages.javascript;
  Prism.languages.mcfunction = Prism.languages.none;

  // Preload a few common languages used in the docs to reduce autoloader fetches
  (function preload(langFiles) {
    var head = document.head || document.getElementsByTagName('head')[0];
    langFiles.forEach(function(file) {
      var s = document.createElement('script');
      s.defer = true;
      s.src = 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/' + file;
      head.appendChild(s);
    });
  })([
    'prism-clike.min.js',
    'prism-javascript.min.js',
    'prism-bash.min.js',
    'prism-python.min.js'
  ]);
</script>

<!-- Custom styles -->
<style>
/* Navigation styles are defined in navigation.html include */

/* Feature grid styles */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.feature {
  padding: 1.5rem;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  background: #f6f8fa;
  text-align: center;
}

.feature h3 {
  margin-top: 0;
  color: #24292e;
}

.feature p {
  margin-bottom: 0;
  color: #586069;
}

/* Code block improvements */
pre[class*="language-"] {
  border-radius: 6px;
  border: 1px solid #e1e4e8;
}

code[class*="language-"] {
  font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .features {
    grid-template-columns: 1fr;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .feature {
    background: #2d3748;
    border-color: #4a5568;
  }
  
  .feature h3 {
    color: #e2e8f0;
  }
  
  .feature p {
    color: #a0aec0;
  }
}

/* Remove any weird theme shadows and let the default theme handle it */
.main-content {
  box-shadow: none !important;
}

.page-content {
  box-shadow: none !important;
}

main {
  box-shadow: none !important;
}

/* Force navigation links to be white on home page */
.nav-link,
.nav-link:visited,
.nav-link:hover,
.nav-link:active {
  color: rgba(255, 255, 255, 0.85) !important;
}

.nav-link:hover {
  color: #ffffff !important;
}

.nav-link.active {
  color: #ffffff !important;
}
</style>
