{{- $quotes := .Site.Data.quotes.quotes -}}

<footer class="mt-16 frosted-bar border-t py-12 relative z-20">
  <div class="container mx-auto px-4">
    <div class="grid grid-cols-1 md:grid-cols-3 gap-8 mb-8">

      <!-- Column 1: Fortune Cookie -->
      <div>
        <p class="font-mono text-xs text-text-dim mb-2">$ fortune danix</p>
        <div id="fortune-quote" aria-live="polite" data-quotes='{{ $quotes | jsonify }}'>
          <blockquote>
            <p class="fortune-text font-mono text-sm text-text italic leading-relaxed">
              "{{ (index $quotes 0).text }}"
            </p>
            <cite class="fortune-author font-mono text-xs text-text-dim not-italic mt-2 block">
              — {{ (index $quotes 0).author }}
            </cite>
          </blockquote>
        </div>
      </div>

      <!-- Column 2: About (Terminal Readout) -->
      <div>
        <dl class="space-y-1">
          <div class="flex gap-2">
            <dt class="text-text-dim font-mono text-xs w-20 shrink-0">{{ i18n "footer_about_role" }}:</dt>
            <dd class="text-text font-mono text-xs">{{ i18n "footer_about_role_value" }}</dd>
          </div>
          <div class="flex gap-2">
            <dt class="text-text-dim font-mono text-xs w-20 shrink-0">{{ i18n "footer_about_cert" }}:</dt>
            <dd class="text-accent2 font-mono text-xs font-semibold">eJPT</dd>
          </div>
          <div class="flex gap-2">
            <dt class="text-text-dim font-mono text-xs w-20 shrink-0">{{ i18n "footer_about_os" }}:</dt>
            <dd class="text-text font-mono text-xs">{{ i18n "footer_about_os_value" }} <span class="text-text-dim">({{ i18n "footer_about_os_year" }})</span></dd>
          </div>
          <div class="flex gap-2">
            <dt class="text-text-dim font-mono text-xs w-20 shrink-0">{{ i18n "footer_about_focus" }}:</dt>
            <dd class="text-text font-mono text-xs">{{ i18n "footer_about_focus_value" }}</dd>
          </div>
        </dl>
      </div>

      <!-- Column 3: Stack & Feature Badges -->
      <div>
        <p class="text-text-dim font-mono text-xs mb-1">{{ i18n "footer_built_with" }}</p>
        <div class="flex flex-wrap gap-1.5 mb-3">
          <span class="badge-footer-accent">Hugo</span>
          <span class="badge-footer-accent">Tailwind CSS</span>
          <span class="badge-footer-accent">Alpine.js</span>
          <span class="badge-footer-accent">HTML5</span>
          <span class="badge-footer-accent">CSS3</span>
          <span class="badge-footer-accent">JavaScript</span>
        </div>

        <p class="text-text-dim font-mono text-xs mb-1">{{ i18n "footer_features" }}</p>
        <div class="flex flex-wrap gap-1.5">
          <span class="badge-footer-accent2">WCAG 2.1 AA</span>
          <span class="badge-footer-accent2">Open Source</span>
          <span class="badge-footer-accent2">Privacy Friendly</span>
          <span class="badge-footer-accent2">Claude Code</span>
        </div>
      </div>
    </div>

    <!-- Copyright Bar -->
    <div class="pt-8 border-t border-border text-center text-xs text-text-dim space-y-1">
      <p>
        {{ i18n "footer_made_with" }} <span aria-hidden="true">❤️</span><span class="sr-only">{{ i18n "footer_love" }}</span>,
        {{ i18n "footer_lack_of" }} <span aria-hidden="true">😴</span><span class="sr-only">{{ i18n "footer_sleep" }}</span>,
        {{ i18n "footer_lots_of" }} <span aria-hidden="true">☕</span><span class="sr-only">{{ i18n "footer_coffee" }}</span>
        {{ i18n "footer_by" }} <a href="{{ .Site.LanguagePrefix }}/is/" class="text-accent hover:text-accent2 transition-colors py-2 px-1">danix</a>
      </p>
      <p>&copy; {{ now.Year }} {{ .Site.Params.author }}. {{ i18n "allRightsReserved" }}</p>
    </div>
  </div>

  <!-- Fortune.js: Pick a random quote on each page load -->
  {{- $fortuneJS := resources.Get "js/fortune.js" | minify -}}
  <script src="{{ $fortuneJS.RelPermalink }}"></script>
</footer>
