<meta charset="utf-8">
<meta name="htmx-config" content='{"globalViewTransitions":true,"scrollBehavior":"smooth"}'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#FF1A8C">

<title>
  {{- if .IsHome -}}
    {{- .Site.Title }} — {{ .Site.Params.tagline -}}
  {{- else -}}
    {{- .Title }} — {{ .Site.Title -}}
  {{- end -}}
</title>

<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
<meta name="author" content="{{ with .Params.author }}{{ . }}{{ else }}{{ .Site.Params.author }}{{ end }}">
{{- if .Site.Params.robots }}<meta name="robots" content="{{ .Site.Params.robots }}">{{ end }}

<!-- Open Graph -->
<meta property="og:site_name"  content="{{ .Site.Title }}">
<meta property="og:title"      content="{{ if .IsHome }}{{ .Site.Title }} — {{ .Site.Params.tagline }}{{ else }}{{ .Title }}{{ end }}">
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
<meta property="og:url"        content="{{ .Permalink }}">
<meta property="og:type"       content="{{ if .IsPage }}article{{ else }}website{{ end }}">
<meta property="og:locale"     content="{{ .Site.LanguageCode | default "en_US" | replaceRE "-" "_" }}">
{{- $ogImage := .Site.Params.ogImage -}}
{{- $ogImageAlt := .Site.Title -}}
{{- with .Params.banner -}}
  {{- $ogImage = .src -}}
  {{- $ogImageAlt = $.Title -}}
{{- end -}}
<meta property="og:image"      content="{{ $ogImage | absURL }}">
<meta property="og:image:alt"  content="{{ $ogImageAlt }}">
<meta property="og:image:width"  content="1200">
<meta property="og:image:height" content="630">

{{- if .IsPage }}
<meta property="article:published_time"  content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
<meta property="article:modified_time"   content="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">
{{- with .Params.author }}<meta property="article:author" content="{{ . }}">{{ end }}
{{- range .Params.categories }}<meta property="article:section" content="{{ . }}">{{ end }}
{{- range .Params.tags }}<meta property="article:tag"     content="{{ . }}">{{ end }}
{{- end }}

<!-- Twitter / X Card -->
<meta name="twitter:card"        content="summary_large_image">
{{- with .Site.Params.twitterHandle }}
<meta name="twitter:site"        content="@{{ . }}">
{{- end }}
<meta name="twitter:title"       content="{{ if .IsHome }}{{ .Site.Title }} — {{ .Site.Params.tagline }}{{ else }}{{ .Title }}{{ end }}">
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
<meta name="twitter:image"       content="{{ $ogImage | absURL }}">
<meta name="twitter:image:alt"   content="{{ $ogImageAlt }}">

<!-- Canonical -->
<link rel="canonical" href="{{ .Permalink }}">

<!-- JSON-LD structured data -->
{{- partial "schema.html" . -}}

<!-- Fonts — Bebas Neue + Barlow + Share Tech Mono (non-render-blocking) -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Share+Tech+Mono&display=swap">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Share+Tech+Mono&display=swap" media="print" onload="this.media='all'">
<noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Share+Tech+Mono&display=swap"></noscript>

<!-- CSS via Hugo Pipes + PostCSS + Tailwind v4 -->
{{- $css := resources.Get "css/main.css" | css.PostCSS -}}
{{- if eq hugo.Environment "production" -}}
  {{- $css = $css | minify | fingerprint "sha256" -}}
{{- end -}}
<link rel="stylesheet" href="{{ $css.RelPermalink }}"{{ if eq hugo.Environment "production" }} integrity="{{ $css.Data.Integrity }}"{{ end }}>

<!-- Favicon & PWA -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="manifest" href="/site.webmanifest">
<meta name="msapplication-TileColor" content="#050510">
