import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import Navbar from "@/components/navbar";
import Footer from "@/components/footer";

const geistSans = Geist({
  variable: "--font-geist-sans",
  subsets: ["latin"],
});

const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  title: {
    default: "Gabriel Kaszewski | Software Engineer",
    template: "%s | Gabriel Kaszewski",
  },
  description:
    "The portfolio of Gabriel Kaszewski, a software engineer specializing in Rust, Python, and modern web technologies.",
  keywords: [
    "Gabriel Kaszewski",
    "Software Engineer",
    "Rust Developer",
    "Python Developer",
    "Next.js",
    "Portfolio",
  ],
  alternates: {
    canonical: "https://gabrielkaszewski.dev",
  },
  openGraph: {
    title: "Gabriel Kaszewski | Software Engineer",
    description:
      "Welcome to my portfolio. Discover my projects, skills, and journey.",
    url: "https://gabrielkaszewski.dev",
    siteName: "Gabriel Kaszewski's Portfolio",
    locale: "en_US",
    type: "website",
  },

  twitter: {
    card: "summary_large_image",
    title: "Gabriel Kaszewski | Software Engineer",
    description:
      "Explore my work as a software engineer, from web apps to game development.",
  },

  robots: {
    index: true,
    follow: true,
    googleBot: {
      index: true,
      follow: true,
      "max-video-preview": -1,
      "max-image-preview": "large",
      "max-snippet": -1,
    },
  },
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  const jsonLd = {
    "@context": "https://schema.org",
    "@type": "Person",
    name: "Gabriel Kaszewski",
    url: "https://gabrielkaszewski.dev",
    sameAs: [
      "https://github.com/GKaszewski",
      "https://www.linkedin.com/in/gabriel-kaszewski-5344b3183",
    ],
    jobTitle: "Software Engineer",
    alumniOf: "University of Gdańsk",
    knowsAbout: [
      "Rust",
      "Python",
      "Next.js",
      "React",
      "Tailwind CSS",
      "Game Development",
      "Web Development",
    ],
  };

  return (
    <html lang="en">
      <body
        className={`${geistSans.variable} ${geistMono.variable} antialiased relative`}
      >
        <script
          type="application/ld+json"
          dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
        />

        <Navbar />
        {children}
        <Footer />
      </body>
    </html>
  );
}
