import type { Metadata } from 'next'

import { CapabilityRows } from '@/components/portfolio/CapabilityRows'
import { ClosingCta } from '@/components/portfolio/ClosingCta'
import { CommandPalette } from '@/components/portfolio/CommandPalette'
import { ContactTerminal } from '@/components/portfolio/ContactTerminal'
import { FeaturedDossier } from '@/components/portfolio/FeaturedDossier'
import { FieldNotes } from '@/components/portfolio/FieldNotes'
import { Hero } from '@/components/portfolio/Hero'
import { Manifesto } from '@/components/portfolio/Manifesto'
import { OperatorProfile } from '@/components/portfolio/OperatorProfile'
import { PortfolioNav } from '@/components/portfolio/PortfolioNav'
import { StatusBar } from '@/components/portfolio/StatusBar'
import { WorkIndex } from '@/components/portfolio/WorkIndex'
import { getPosts } from '@/lib/posts'
import { hero } from '@/lib/portfolio'

export const metadata: Metadata = {
  title: 'Krishna Ayyalasomayajula — Systems Engineer',
  description: hero.subline,
  openGraph: {
    images: ['/og.png'],
  },
}

export default async function HomePage() {
  const posts = (await getPosts()).slice(0, 4)

  return (
    <div className="min-h-screen bg-blacksite-bg text-blacksite-text">
      <StatusBar />
      <PortfolioNav />
      <Hero />
      <FeaturedDossier />
      <WorkIndex />
      <Manifesto />
      <CapabilityRows />
      <OperatorProfile />
      <FieldNotes posts={posts} />
      <ContactTerminal />
      <ClosingCta />
      <CommandPalette />
    </div>
  )
}
