{{ $prev := .Page.NextInSection }}
{{ $next := .Page.PrevInSection }}

<nav class="pagination" aria-label="Page navigation"
     style="display:flex;justify-content:space-between;gap:1rem;margin-top:2rem;">
  <div>
    {{ if $prev }}
    <a href="{{ $prev.RelPermalink }}">← {{ or $prev.LinkTitle $prev.Title }}</a>
    {{ end }}
  </div>
  <div style="margin-left:auto;">
    {{ if $next }}
    <a href="{{ $next.RelPermalink }}">{{ or $next.LinkTitle $next.Title }} →</a>
    {{ end }}
  </div>
</nav>
