"use client"; import { useState, useEffect } from 'react'; import { motion } from 'framer-motion'; import NavigationBar from './components/NavigationBar'; import HeroSection from './components/HeroSection'; import AboutSection from './components/AboutSection'; import SkillsSection from './components/SkillsSection'; import ProjectsSection from './components/ProjectsSection'; import EducationSection from './components/EducationSection'; import ContactSection from './components/ContactSection'; import Footer from './components/Footer'; import { useTheme } from './Contexts/ThemeContext'; import { RESUME_DATA } from './data/resume-data'; import ExperienceSection from './components/ExperienceSection'; export default function Portfolio() { const { theme } = useTheme(); const [activeSection, setActiveSection] = useState('home'); const [isLoading, setIsLoading] = useState(true); useEffect(() => { // Simulate loading to ensure smooth animations const timer = setTimeout(() => { setIsLoading(false); }, 1000); // Add scroll event listener for setting active section const handleScroll = () => { const sections = document.querySelectorAll('section[id]'); const scrollPosition = window.scrollY + 100; sections.forEach((section) => { const sectionTop = (section as HTMLElement).offsetTop; const sectionHeight = (section as HTMLElement).offsetHeight; const sectionId = section.getAttribute('id') || ''; if (scrollPosition >= sectionTop && scrollPosition < sectionTop + sectionHeight) { setActiveSection(sectionId); } }); }; window.addEventListener('scroll', handleScroll); return () => { clearTimeout(timer); window.removeEventListener('scroll', handleScroll); }; }, []); if (isLoading) { return (