{{ $articleType := .Params.type | default "life" }}
{{ $typeConfig := .Site.Params.articleTypes }}
{{ $typeData := index $typeConfig $articleType }}
{{ $hasType := .Params.type }}

<div class="mb-8">
  <!-- Title with accent corner -->
  <div class="relative mb-6">
    <!-- Vertical accent line (left side) -->
    {{ if and $typeData $hasType }}
    <div
      class="absolute left-0 top-0 bottom-0 w-1 rounded-full"
      style="background-color: var(--type-{{ $articleType }});"
    ></div>
    {{ end }}

    <!-- Horizontal accent line (bottom, 50% width with fade) -->
    {{ if and $typeData $hasType }}
    <div
      class="absolute left-0 bottom-0 h-1 rounded-full"
      style="width: 50%; background: linear-gradient(to right, var(--type-{{ $articleType }}), var(--type-{{ $articleType }}) 0%, transparent 100%);"
    ></div>
    {{ end }}

    <h1 class="text-4xl md:text-5xl font-bold text-accent pl-6 pt-2">
      {{ .Title }}
    </h1>
  </div>
</div>
