import { useState, useEffect, useRef } from 'react' import { motion, AnimatePresence } from 'framer-motion' import { FiTerminal, FiX, FiMinus, FiMaximize2 } from 'react-icons/fi' import resumePDF from '../assets/Resume.pdf' const PROFILE = { name: 'Parthib Karak', title: 'Software & AI Engineer', location: 'West Bengal, India', college: 'IEM Kolkata (B.Tech CSE)', cgpa: '8.9', email: 'parthibkarak2004@gmail.com', github: 'https://github.com/babaiii07', linkedin: 'https://www.linkedin.com/in/parthib-karak', leetcode: 'https://leetcode.com/u/Parthib_007', } const COMMANDS = { help: { desc: 'Show all available commands', run: () => [ { type: 'title', text: '๐ Available Commands' }, { type: 'divider' }, { type: 'cmd', text: 'whoami โ Who is Parthib?' }, { type: 'cmd', text: 'skills โ Technical skill stack' }, { type: 'cmd', text: 'projects โ Featured AI projects' }, { type: 'cmd', text: 'experience โ Work experience' }, { type: 'cmd', text: 'education โ Academic background' }, { type: 'cmd', text: 'contact โ Get in touch' }, { type: 'cmd', text: 'resume โ Download resume' }, { type: 'cmd', text: 'leetcode โ DSA stats' }, { type: 'cmd', text: 'hire โ Why hire Parthib?' }, { type: 'cmd', text: 'clear โ Clear terminal' }, { type: 'cmd', text: 'help โ Show this menu' }, { type: 'divider' }, { type: 'info', text: '๐ก Tip: Use โ โ arrow keys for command history' }, ], }, whoami: { desc: 'Who is Parthib?', run: () => [ { type: 'title', text: '๐ค Parthib Karak' }, { type: 'divider' }, { type: 'kv', key: 'Role ', value: 'Software & AI Engineer' }, { type: 'kv', key: 'Location', value: 'West Bengal, India' }, { type: 'kv', key: 'College ', value: 'IEM Kolkata โ B.Tech CSE' }, { type: 'kv', key: 'CGPA ', value: '8.9 / 10.0' }, { type: 'kv', key: 'Status ', value: '๐ข Open to Opportunities' }, { type: 'divider' }, { type: 'text', text: 'Building production-grade AI systems that don\'t break in the' }, { type: 'text', text: 'real world. Specialising in RAG, multi-agent systems, and LLM' }, { type: 'text', text: 'engineering with LangChain, LangGraph, and Groq.' }, ], }, skills: { desc: 'Technical skill stack', run: () => [ { type: 'title', text: '๐ ๏ธ Technical Skills' }, { type: 'divider' }, { type: 'category', text: 'AI / ML / LLMs' }, { type: 'tags', items: ['LangChain', 'LangGraph', 'Groq', 'RAG', 'AutoGen', 'HuggingFace', 'Transformers'] }, { type: 'category', text: 'Backend' }, { type: 'tags', items: ['FastAPI', 'Django', 'Go / Gin', 'REST APIs', 'WebSockets'] }, { type: 'category', text: 'Databases & Vector Stores' }, { type: 'tags', items: ['MongoDB', 'MySQL', 'FAISS', 'ChromaDB', 'Pinecone'] }, { type: 'category', text: 'Languages' }, { type: 'tags', items: ['Python', 'JavaScript', 'TypeScript', 'Go', 'C++'] }, { type: 'category', text: 'Tools & DevOps' }, { type: 'tags', items: ['Docker', 'Git', 'GitHub', 'Postman', 'VS Code'] }, ], }, projects: { desc: 'Featured AI projects', run: () => [ { type: 'title', text: '๐ Featured Projects' }, { type: 'divider' }, { type: 'proj', num: '01', name: 'Healthcare Chatbot', tech: 'RAG ยท Pinecone ยท LangChain ยท Groq', url: 'https://parthib07-multiagent-healthcare-chatbot.hf.space' }, { type: 'proj', num: '02', name: 'AI Virtual Dev POD', tech: 'Multi-Agent ยท LangGraph ยท ChromaDB', url: 'https://agnik28-ai-virtual-pod.hf.space/' }, { type: 'proj', num: '03', name: 'Virtual Research Assistant', tech: 'AutoGen ยท Groq ยท MySQL', url: 'https://parthib07-virtual-research-paper-assistant.hf.space/' }, { type: 'proj', num: '04', name: 'OwnGPT', tech: 'FastAPI ยท LangGraph ยท MongoDB ยท Google Auth', url: 'https://parthib07-owngpt-v2.hf.space' }, { type: 'proj', num: '05', name: 'CodeFusion', tech: 'DeepSeek AI ยท FastAPI ยท React', url: 'https://codefusion-v2-parthib.onrender.com' }, { type: 'proj', num: '06', name: 'AnySITE', tech: 'FastAPI ยท React ยท AI Models', url: 'https://anysite-vibecoding-parthib.onrender.com' }, { type: 'divider' }, { type: 'info', text: '๐ Run "contact" to connect or visit GitHub for source code' }, ], }, experience: { desc: 'Work experience', run: () => [ { type: 'title', text: '๐ผ Work Experience' }, { type: 'divider' }, { type: 'kv', key: 'Company ', value: 'BAAR Technologies' }, { type: 'kv', key: 'Role ', value: 'Jr. Automation Engineer' }, { type: 'kv', key: 'Type ', value: 'Full-time' }, { type: 'kv', key: 'Period ', value: 'Feb 2026 โ Mar 2026 ยท 2 mos' }, { type: 'kv', key: 'Location', value: 'Kolkata, West Bengal ยท On-site' }, { type: 'text', text: '' }, { type: 'text', text: 'โ Built automation-driven backend systems using Python & Django' }, { type: 'text', text: 'โ Managed high-performance databases with Microsoft SQL Server' }, { type: 'text', text: 'โ Developed scalable APIs and optimised SQL queries & procedures' }, { type: 'text', text: 'โ Collaborated cross-functionally to deliver reliable automation solutions' }, ], }, education: { desc: 'Academic background', run: () => [ { type: 'title', text: '๐ Education' }, { type: 'divider' }, { type: 'kv', key: 'Degree ', value: 'B.Tech โ Computer Science & Engineering' }, { type: 'kv', key: 'College ', value: 'Institute of Engineering & Management, Kolkata' }, { type: 'kv', key: 'CGPA ', value: '8.9 / 10.0' }, { type: 'kv', key: 'Year ', value: '2021 โ 2025' }, { type: 'divider' }, { type: 'kv', key: 'Class XII', value: '93.6% โ Kapsit High School (2021)' }, { type: 'kv', key: 'Class X ', value: '84.5% โ Kamarpukur RKM School (2019)' }, ], }, contact: { desc: 'Get in touch', run: () => [ { type: 'title', text: '๐ฌ Contact Parthib' }, { type: 'divider' }, { type: 'link', label: 'Email ', value: 'parthibkarak2004@gmail.com', href: 'mailto:parthibkarak2004@gmail.com' }, { type: 'link', label: 'LinkedIn', value: 'linkedin.com/in/parthib-karak', href: 'https://www.linkedin.com/in/parthib-karak' }, { type: 'link', label: 'GitHub ', value: 'github.com/babaiii07', href: 'https://github.com/babaiii07' }, { type: 'link', label: 'LeetCode', value: 'leetcode.com/u/Parthib_007', href: 'https://leetcode.com/u/Parthib_007' }, { type: 'divider' }, { type: 'info', text: '๐ Available for freelance, internship & full-time roles' }, ], }, resume: { desc: 'Download resume', run: () => { setTimeout(() => { window.open(resumePDF, '_blank') }, 300) return [ { type: 'title', text: '๐ Resume' }, { type: 'divider' }, { type: 'success', text: 'โ Opening resume in a new tab...' }, { type: 'info', text: '๐ฅ Download will start automatically' }, ] }, }, leetcode: { desc: 'DSA stats', run: () => [ { type: 'title', text: 'โก LeetCode Stats' }, { type: 'divider' }, { type: 'kv', key: 'Profile ', value: 'leetcode.com/u/Parthib_007' }, { type: 'kv', key: 'Solved ', value: '500+ Problems' }, { type: 'kv', key: 'Strength', value: 'Arrays ยท DP ยท Graphs ยท Trees ยท Strings' }, { type: 'divider' }, { type: 'text', text: 'โ Strong DSA foundation for system design & optimization' }, { type: 'text', text: 'โ Active in competitive programming contests' }, ], }, hire: { desc: 'Why hire Parthib?', run: () => [ { type: 'title', text: '๐ Why Hire Parthib?' }, { type: 'divider' }, { type: 'text', text: 'โฆ Builds production-ready AI โ not just demos' }, { type: 'text', text: 'โฆ Specialised in RAG, Agents, LangChain & LangGraph' }, { type: 'text', text: 'โฆ 500+ LeetCode โ strong algorithmic foundations' }, { type: 'text', text: 'โฆ CGPA 8.9 โ academic excellence under real workload' }, { type: 'text', text: 'โฆ End-to-end: from LLM to Docker to production deploy' }, { type: 'text', text: 'โฆ Fast learner, self-driven, ships things that work' }, { type: 'divider' }, { type: 'success', text: '๐ Ready to contribute from day one โ run "contact" to connect!' }, ], }, clear: { desc: 'Clear terminal', run: () => null, }, } function renderLine(line, i) { const base = { fontSize: '0.78rem', lineHeight: 1.7, fontFamily: 'var(--font-mono)' } switch (line.type) { case 'title': return