---
const defaultTitle = "Jan-Marlon Leibl • Fullstack Software Developer | PHP & TypeScript Expert";
const defaultDescription = "Experienced Fullstack Developer specializing in PHP and TypeScript. Creating high-performance web applications and digital experiences with modern technologies.";
const defaultImage = "/images/profile-image.jpg";
const siteUrl = "https://jleibl.net";

interface Props {
  title?: string;
  description?: string;
  image?: string;
  canonicalUrl?: string;
  type?: "website" | "article";
  publishedDate?: string;
  modifiedDate?: string;
  keywords?: string[];
}

const {
  title = defaultTitle,
  description = defaultDescription,
  image = defaultImage,
  canonicalUrl = siteUrl,
  type = "website",
  publishedDate,
  modifiedDate,
  keywords = [
    "Software Development", 
    "PHP Developer", 
    "TypeScript", 
    "Fullstack Engineer", 
    "Web Development", 
    "System Architecture", 
    "MySQL", 
    "React", 
    "Performance Optimization"
  ]
} = Astro.props;

const structuredDataPerson = {
  "@context": "https://schema.org",
  "@type": "Person",
  "name": "Jan-Marlon Leibl",
  "url": siteUrl,
  "image": `${siteUrl}${image}`,
  "jobTitle": "Fullstack Software Developer",
  "worksFor": {
    "@type": "Organization",
    "name": "team neusta"
  },
  "description": "Fullstack Software Developer specializing in PHP and TypeScript",
  "sameAs": [
    "https://github.com/AtomicWasTaken",
    "https://www.linkedin.com/in/janmarlonleibl/",
  ],
  "knowsAbout": ["PHP", "TypeScript", "Web Development", "System Architecture", "Database Design"]
};

const structuredDataWebsite = {
  "@context": "https://schema.org",
  "@type": type,
  "headline": title,
  "description": description,
  "image": `${siteUrl}${image}`,
  "url": canonicalUrl,
  "author": {
    "@type": "Person",
    "name": "Jan-Marlon Leibl",
    "url": siteUrl
  },
  ...(publishedDate && {"datePublished": publishedDate}),
  ...(modifiedDate && {"dateModified": modifiedDate})
};
---

<title>{title}</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<meta name="title" content={title} />
<meta name="description" content={description} />
<meta name="keywords" content={keywords.join(", ")} />
<meta name="author" content="Jan-Marlon Leibl" />
<meta name="robots" content="index, follow" />
<meta name="color-scheme" content="dark light" />
<meta name="theme-color" content="#0A0A0A" />
<meta name="generator" content={Astro.generator} />

<link rel="canonical" href={canonicalUrl} />

<meta property="og:type" content={type} />
<meta property="og:url" content={canonicalUrl} />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:image" content={`${siteUrl}${image}`} />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="Jan-Marlon Leibl - Fullstack Software Developer" />
<meta property="og:site_name" content="Jan-Marlon Leibl" />

<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />

<script type="application/ld+json" set:html={JSON.stringify(structuredDataPerson)} />
<script type="application/ld+json" set:html={JSON.stringify(structuredDataWebsite)} />

<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="manifest" href="/manifest.json" /> 