import type { Metadata } from "next";
import { Space_Grotesk, Inter } from "next/font/google";
import "./globals.css";
import { Nav } from "@/components/site/Nav";
import { Footer } from "@/components/site/Footer";

const spaceGrotesk = Space_Grotesk({
  subsets: ["latin"],
  weight: ["300", "400", "500", "700"],
  variable: "--font-headline",
  display: "swap",
});

const inter = Inter({
  subsets: ["latin"],
  weight: ["300", "400", "500", "600", "700"],
  variable: "--font-body",
  display: "swap",
});

export const metadata: Metadata = {
  metadataBase: new URL(
    process.env.NEXT_PUBLIC_SITE_URL ?? "http://localhost:3000",
  ),
  title: {
    default:
      "Jason Woltje — Systems thinker. Builder. IT leader turning into a software engineer.",
    template: "%s — Jason Woltje",
  },
  description:
    "A multidisciplinary architect of digital ecosystems and agricultural infrastructures. Engineering growth through technological mastery and strategic leadership.",
};

export default function FrontendLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html
      lang="en"
      className={`dark ${spaceGrotesk.variable} ${inter.variable}`}
      style={{ ["--font-label" as string]: "var(--font-headline)" }}
      suppressHydrationWarning
    >
      <body className="bg-background text-on-surface min-h-screen">
        <Nav />
        {children}
        <Footer />
      </body>
    </html>
  );
}
