'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="glass-effect rounded-2xl p-8 md:p-12"
        >
          <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 rounded-xl overflow-hidden bg-gradient-to-br from-accent-orange/20 to-accent-cyan/20 flex items-center justify-center border-2 border-accent-cyan/50 glow-cyan">
                <div className="text-6xl md:text-8xl font-bold text-accent-cyan/30">
                  {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-transparent bg-clip-text bg-gradient-to-r from-accent-cyan to-accent-orange mb-2">
                  {artistBio.name}
                </h1>
                <p className="text-xl text-accent-cyan/80 mb-6">{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-gray-300 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 glass-effect rounded-lg hover:bg-accent-cyan/20 transition-all hover:glow-cyan"
                  aria-label="Spotify"
                >
                  <FaSpotify className="text-2xl text-accent-cyan" />
                </a>
                <a
                  href={artistBio.socialLinks.youtube}
                  className="p-3 glass-effect rounded-lg hover:bg-accent-orange/20 transition-all hover:glow-orange"
                  aria-label="YouTube"
                >
                  <FaYoutube className="text-2xl text-accent-orange" />
                </a>
                <a
                  href={artistBio.socialLinks.instagram}
                  className="p-3 glass-effect rounded-lg hover:bg-accent-cyan/20 transition-all hover:glow-cyan"
                  aria-label="Instagram"
                >
                  <FaInstagram className="text-2xl text-accent-cyan" />
                </a>
                <a
                  href="#"
                  className="p-3 glass-effect rounded-lg hover:bg-accent-orange/20 transition-all hover:glow-orange"
                  aria-label="Apple Music"
                >
                  <SiApplemusic className="text-2xl text-accent-orange" />
                </a>
              </motion.div>
            </div>
          </div>
        </motion.div>
      </div>
    </section>
  );
}
