{{ define "main" }}
<article class="prose max-w-3xl mx-auto py-12 px-4">
  <h1 style="font-family:var(--ifk-font);font-size:2.75rem;font-weight:600;line-height:1.15;letter-spacing:-0.01em;margin-bottom:1.5rem">
    {{ with .Params.subtitle }}{{ . }}{{ else }}{{ .Title }}{{ end }}
  </h1>
  <div class="home-content">{{ .Content }}</div>

  <div class="mt-12">
    <h2>{{ i18n "recent_posts" | default "Recent Articles" }}</h2>
    <div class="grid gap-8">
      {{ range first 5 .Site.RegularPages }}
      <article class="border-b pb-8">
        <h3 class="text-2xl font-newsreader mb-2">
          <a href="{{ .Permalink }}" class="text-ifk-accent hover:text-ifk-accent-hover">
            {{ .Title }}
          </a>
        </h3>
        <div class="text-sm text-gray-600 mb-4">
          <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 2, 2006" }}</time>
          {{ with .Params.author }}— {{ . }}{{ end }}
        </div>
        <p class="text-lg font-newsreader leading-relaxed">
          {{ .Summary }}
        </p>
        <a href="{{ .Permalink }}" class="inline-block mt-4 text-ifk-accent hover:text-ifk-accent-hover font-medium">
          {{ i18n "read_more" | default "Read more" }} →
        </a>
      </article>
      {{ end }}
    </div>
  </div>
</article>
{{ end }}
