// app/layout.tsx

import Link from 'next/link';
import Navbar from './components/Navbar';
import { ThemeProvider } from './components/ThemeProvider';
import './globals.css';

export const metadata = {
  title: 'Soderberg Tech',
  description: 'William Söderberg, Technical high school engineer from Höganäs, Sweden',
  icons: {
    icon: '/assets/logos/logo.svg',
    shortcut: '/assets/logos/logo.svg',
    apple: '/assets/logos/logo.svg',
  },
};

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en" suppressHydrationWarning>
      <body className="flex flex-col min-h-screen m-0 p-0 font-sans bg-slate-50 dark:bg-[#0d1117] transition-colors duration-300">
        <ThemeProvider>
          <Navbar />

          <main className="flex flex-col flex-1">
            {children}
          </main>

          <footer className="w-full relative z-50 mt-auto border-t border-slate-200 dark:border-white/5 transition-colors duration-300">
            <div className="bg-slate-100 dark:bg-[#0d1117] flex justify-center items-center h-10 transition-colors duration-300">
              <Link className="text-slate-500 dark:text-[#a0aab6] no-underline flex font-medium items-center hover:text-slate-900 dark:hover:text-white transition-colors text-sm tracking-widest uppercase" href="/">
                © William Söderberg {new Date().getFullYear()}
              </Link>
            </div>
          </footer>
        </ThemeProvider>
      </body>
    </html>
  );
}