'use client';

import { motion } from 'framer-motion';
import { FaSpotify, FaYoutube, FaInstagram } from 'react-icons/fa';
import { SiApplemusic } from 'react-icons/si';
import { artistBio } from '@/lib/data';

export default function Biography() {
  return (
    <section className="py-20 px-4 md:px-8" id="bio">
      <div className="max-w-6xl mx-auto">
        <motion.div
          initial={{ opacity: 0, y: 20 }}
          whileInView={{ opacity: 1, y: 0 }}
          transition={{ duration: 0.6 }}
          viewport={{ once: true }}
          className="paper-card p-8 md:p-12 cardboard-texture"
        >
          <div className="grid md:grid-cols-2 gap-12 items-center">
            {/* Image Section */}
            <motion.div
              initial={{ opacity: 0, x: -20 }}
              whileInView={{ opacity: 1, x: 0 }}
              transition={{ duration: 0.6, delay: 0.2 }}
              viewport={{ once: true }}
              className="relative"
            >
              <div className="aspect-square bg-paper-brown flex items-center justify-center border-4 border-paper-dark shadow-paper-lg">
                <div className="text-6xl md:text-8xl font-bold text-paper-dark/20">
                  {artistBio.name}
                </div>
              </div>
            </motion.div>

            {/* Bio Section */}
            <div className="space-y-6">
              <motion.div
                initial={{ opacity: 0, x: 20 }}
                whileInView={{ opacity: 1, x: 0 }}
                transition={{ duration: 0.6, delay: 0.3 }}
                viewport={{ once: true }}
              >
                <h1 className="text-4xl md:text-5xl font-bold text-paper-dark mb-2 tracking-tight border-b-4 border-paper-dark inline-block pb-1">
                  {artistBio.name}
                </h1>
                <p className="text-lg text-paper-gray mb-2 mt-3">{artistBio.nickname}</p>
                <p className="text-xl text-paper-brown mb-6 font-medium">{artistBio.title}</p>
              </motion.div>

              <motion.div
                initial={{ opacity: 0, x: 20 }}
                whileInView={{ opacity: 1, x: 0 }}
                transition={{ duration: 0.6, delay: 0.4 }}
                viewport={{ once: true }}
                className="space-y-4 text-paper-dark leading-relaxed"
              >
                {artistBio.bio.split('\n\n').map((paragraph, idx) => (
                  <p key={idx}>{paragraph}</p>
                ))}
              </motion.div>

              {/* Social Links */}
              <motion.div
                initial={{ opacity: 0, y: 20 }}
                whileInView={{ opacity: 1, y: 0 }}
                transition={{ duration: 0.6, delay: 0.5 }}
                viewport={{ once: true }}
                className="flex gap-4 pt-6"
              >
                <a
                  href={artistBio.socialLinks.spotify}
                  className="p-3 bg-paper-light border-2 border-paper-brown hover:bg-paper-brown hover:border-paper-dark transition-all shadow-paper"
                  aria-label="Spotify"
                >
                  <FaSpotify className="text-2xl text-paper-dark" />
                </a>
                <a
                  href={artistBio.socialLinks.youtube}
                  className="p-3 bg-paper-light border-2 border-paper-brown hover:bg-paper-brown hover:border-paper-dark transition-all shadow-paper"
                  aria-label="YouTube"
                >
                  <FaYoutube className="text-2xl text-paper-dark" />
                </a>
                <a
                  href={artistBio.socialLinks.instagram}
                  className="p-3 bg-paper-light border-2 border-paper-brown hover:bg-paper-brown hover:border-paper-dark transition-all shadow-paper"
                  aria-label="Instagram"
                >
                  <FaInstagram className="text-2xl text-paper-dark" />
                </a>
                <a
                  href="#"
                  className="p-3 bg-paper-light border-2 border-paper-brown hover:bg-paper-brown hover:border-paper-dark transition-all shadow-paper"
                  aria-label="Apple Music"
                >
                  <SiApplemusic className="text-2xl text-paper-dark" />
                </a>
              </motion.div>
            </div>
          </div>
        </motion.div>
      </div>
    </section>
  );
}
