import React from 'react';
import { PROFILE_SUMMARY } from '../data/cvData';
import { Mail, Phone, MapPin, Globe, ExternalLink, Dna } from 'lucide-react';
import { PageId } from './Navbar';

interface ContactFooterProps {
  setActivePage?: (page: PageId) => void;
}

export default function ContactFooter({ setActivePage }: ContactFooterProps) {
  return (
    <footer className="bg-slate-900 text-slate-300 dark:bg-slate-950 border-t border-slate-800 transition-colors">
      <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12 lg:py-16">
        
        <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-12 gap-10 mb-12">
          
          {/* Col 1: Doctor Photo, Bio & Credentials */}
          <div className="lg:col-span-5 space-y-3">
            <div className="flex items-center gap-3">
              <img
                src={PROFILE_SUMMARY.photoUrl}
                alt="Prof. Dr. N. Thajuddin"
                className="w-12 h-12 rounded-full object-cover object-top border-2 border-emerald-400 shrink-0"
                referrerPolicy="no-referrer"
              />
              <div>
                <div className="text-white font-bold text-base">Prof. Dr. N. Thajuddin</div>
                <div className="text-xs font-mono text-emerald-400">Ph.D., D.Sc. · Former Pro-Vice Chancellor</div>
              </div>
            </div>

            <p className="text-xs text-slate-400 leading-relaxed">
              Former Pro-Vice Chancellor, B.S. Abdur Rahman Crescent Institute of Science & Technology. Formerly Head & Professor of Microbiology, Dean of Science, Engineering & Technology, Bharathidasan University. Founder & Principal Investigator of NRMC-F.
            </p>
            
            <div className="text-xs font-mono text-amber-300 font-semibold">
              Stanford Top 2% Scientist in Microbiology (2020 – 2025)
            </div>
          </div>

          {/* Col 2: Research Identifiers */}
          <div className="lg:col-span-3">
            <h4 className="text-xs font-mono font-bold uppercase text-slate-400 mb-3 tracking-wider">
              Research Identifiers
            </h4>
            <ul className="space-y-2 text-xs font-mono text-slate-300">
              <li>
                <span className="text-slate-500">ORCID iD: </span>
                <a href={`https://orcid.org/${PROFILE_SUMMARY.contact.orcid}`} target="_blank" rel="noreferrer" className="text-emerald-400 hover:underline">
                  {PROFILE_SUMMARY.contact.orcid}
                </a>
              </li>
              <li>
                <span className="text-slate-500">Scopus ID: </span>
                <span className="text-slate-200">{PROFILE_SUMMARY.contact.scopusId}</span>
              </li>
              <li>
                <span className="text-slate-500">Web of Science: </span>
                <span className="text-slate-200">{PROFILE_SUMMARY.contact.webOfScienceId}</span>
              </li>
              <li>
                <span className="text-slate-500">Live DNA Profile: </span>
                <span className="text-slate-200">{PROFILE_SUMMARY.contact.liveDna}</span>
              </li>
            </ul>
          </div>

          {/* Col 3: Academic Office Contact */}
          <div className="lg:col-span-4">
            <h4 className="text-xs font-mono font-bold uppercase text-slate-400 mb-3 tracking-wider">
              Academic Office Contact
            </h4>
            <ul className="space-y-2.5 text-xs text-slate-300">
              <li className="flex items-start gap-2">
                <MapPin className="w-4 h-4 text-emerald-400 shrink-0 mt-0.5" />
                <span>Crescent Institute, Chennai & Bharathidasan University, Tiruchirappalli, Tamil Nadu, India</span>
              </li>
              <li className="flex items-center gap-2">
                <Mail className="w-4 h-4 text-emerald-400 shrink-0" />
                <span>nthaju2002@yahoo.com / nthaju2002@bdu.ac.in</span>
              </li>
              <li className="flex items-center gap-2">
                <Phone className="w-4 h-4 text-emerald-400 shrink-0" />
                <span className="font-mono">+91 98423 79719</span>
              </li>
            </ul>

            {setActivePage && (
              <div className="mt-4">
                <button
                  onClick={() => {
                    setActivePage('contact');
                    window.scrollTo({ top: 0, behavior: 'smooth' });
                  }}
                  className="inline-flex items-center gap-2 px-3.5 py-2 text-xs font-semibold rounded-lg bg-emerald-600 text-white hover:bg-emerald-500 transition-colors"
                >
                  <Mail className="w-3.5 h-3.5" />
                  <span>Go to Contact Page</span>
                </button>
              </div>
            )}
          </div>

        </div>

        {/* Bottom Copyright & Agency Attribution Row */}
        <div className="pt-8 border-t border-slate-800 flex flex-col sm:flex-row items-center justify-between gap-4 text-xs text-slate-400 font-mono">
          <div>
            © {new Date().getFullYear()} Prof. Dr. N. Thajuddin. All rights reserved.
          </div>
          
          <div className="flex items-center gap-1.5 text-slate-300">
            <span>Designed and Developed by</span>
            <a
              href="https://thooya.io"
              target="_blank"
              rel="noopener noreferrer"
              className="text-emerald-400 hover:text-emerald-300 font-bold hover:underline transition-colors flex items-center gap-1"
            >
              <span>Thooya Vortex Pvt Ltd</span>
              <ExternalLink className="w-3 h-3" />
            </a>
          </div>
        </div>

      </div>
    </footer>
  );
}
