{{ define "main" }}
<div class="max-w-3xl mx-auto py-12 px-4">
  <header class="mb-12">
    <h1 class="text-4xl font-newsreader font-semibold mb-4">{{ .Title }}</h1>
    {{ with .Description }}
    <p class="text-lg text-gray-600">{{ . }}</p>
    {{ end }}
  </header>

  <div class="space-y-8">
    {{ range .Paginator.Pages }}
    <article class="pb-8 border-b last:border-b-0">
      <h2 class="text-2xl font-newsreader font-semibold mb-2">
        <a href="{{ .Permalink }}" class="text-ifk-accent hover:text-ifk-accent-hover">
          {{ .Title }}
        </a>
      </h2>
      <div class="text-sm text-gray-600 mb-3">
        <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 2, 2006" }}</time>
        {{ with .Params.author }}— {{ . }}{{ end }}
        {{ if .ReadingTime }}— {{ .ReadingTime }} min read{{ end }}
      </div>
      <p class="text-lg font-newsreader leading-relaxed mb-3">
        {{ .Summary }}
      </p>
      <a href="{{ .Permalink }}" class="inline-block text-ifk-accent hover:text-ifk-accent-hover font-medium">
        {{ i18n "read_more" | default "Read more" }} →
      </a>
    </article>
    {{ end }}
  </div>

  {{ template "_internal/pagination.html" . }}
</div>
{{ end }}
