"use client"

import { useRef } from "react"
import { motion, useInView } from "framer-motion"
import Image from "next/image"
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"

export default function Team() {
  const ref = useRef(null)
  const isInView = useInView(ref, { once: true, amount: 0.2 })

  return (
    <section id="team" className="container py-24 sm:py-32" ref={ref}>
      <motion.div
        initial={{ opacity: 0, y: 20 }}
        animate={isInView ? { opacity: 1, y: 0 } : { opacity: 0, y: 20 }}
        transition={{ duration: 0.5 }}
        className="mx-auto max-w-4xl text-center"
      >
        <h2 className="text-3xl font-bold tracking-tight sm:text-4xl">Who We Are</h2>
        <p className="mt-4 text-lg text-muted-foreground">
          Built by a single founder with a legion of specialised AI tools – lean, capital-efficient, and relentlessly
          focused on maximising exit value.
        </p>
      </motion.div>

      <motion.div
        initial={{ opacity: 0, y: 20 }}
        animate={isInView ? { opacity: 1, y: 0 } : { opacity: 0, y: 20 }}
        transition={{ duration: 0.5, delay: 0.2 }}
        className="mx-auto mt-16 max-w-3xl"
      >
        <Card>
          <CardHeader className="md:flex md:flex-row md:items-center md:gap-6">
            <div className="mx-auto mb-4 overflow-hidden rounded-full md:mb-0 md:mx-0">
              <Image
                src="/images/lukasz-dziewiecki.jpeg"
                alt="Lukasz Dziewiecki"
                width={200}
                height={200}
                className="h-32 w-32 object-cover"
              />
            </div>
            <div className="text-center md:text-left">
              <CardTitle>Lukasz Dziewiecki, M.Sc.</CardTitle>
              <CardDescription>Founder / Inventor / CEO</CardDescription>
            </div>
          </CardHeader>
          <CardContent className="text-center md:text-left">
            <p className="text-muted-foreground">
              Seasoned Senior Project & Programme Manager with 20+ years in Investment Banking at Barclays, BNP Paribas
              and MUFG, specialising in Risk, Finance, Treasury and Payments. Accredited in PRINCE2®, MSP®, BCS ISEB
              ISPM and Six Sigma Black Belt; Agile Product Owner and Scrum Master. Author of Project Management for
              Managers and AI & Machine Learning in Project Management. Fluent in English and Polish, with an M.Sc. in
              IT and a pending Patent Application for a quantum-secure payments architecture.
            </p>
            <p className="mt-4 text-sm text-muted-foreground">
              Everything else – code, research, docs, automation – is executed by purpose-built LLM workflows.
            </p>
          </CardContent>
        </Card>
      </motion.div>
    </section>
  )
}
