Resume SuperHero

Sign In

Don't have an account? Sign Up
Already have an account? Sign In

Unlock AI Resume Analysis

Get instant AI-powered feedback on your resume with actionable improvements.

$9.99/mo
Subscribe Now

After subscribing, refresh this page to access your dashboard.

Upload Your Resume

Overall Score

--

Suggestions

ATS Keywords

Resume SuperHero - Dashboard

Resume SuperHero

Sign in to your AI career platform

Requires an active paid subscription

|

Need help? partners@theaisuperheroes.com

'; const win=window.open('','','width=800,height=600'); win.document.write(htmlContent); win.document.close(); win.print(); } function startQuiz(){ const category=document.getElementById('quizCategory').value; let quizQuestions=category==='All'?interviewQBank:interviewQBank.filter(q=>q.category===category); quizQuestions=quizQuestions.sort(()=>Math.random()-0.5).slice(0,15); quizState.inProgress=true; quizState.category=category; quizState.questions=quizQuestions; quizState.currentIndex=0; quizState.selectedAnswers=[]; quizState.startTime=Date.now(); quizState.correctCount=0; document.getElementById('quizStartScreen').classList.add('hidden'); document.getElementById('quizScreen').classList.remove('hidden'); displayQuizQuestion(); startQuizTimer(); } function displayQuizQuestion(){ if(quizState.currentIndex>=quizState.questions.length){endQuiz();return;} const q=quizState.questions[quizState.currentIndex]; document.getElementById('quizQuestion').textContent=q.question; document.getElementById('quizProgress').textContent=`Question ${quizState.currentIndex+1} of 15`; document.getElementById('quizProgressBar').style.width=((quizState.currentIndex/15)*100)+'%'; const choices=[q.correctAnswer,...q.wrongAnswers].sort(()=>Math.random()-0.5); let html=''; choices.forEach((choice,idx)=>{ html+=``; }); document.getElementById('quizChoices').innerHTML=html; document.getElementById('quizSubmitBtn').textContent='Submit Answer'; } function submitQuizAnswer(){ const selected=document.querySelector('input[name="quizAnswer"]:checked'); if(!selected){showToast('Please select an answer','error');return;} const selectedIdx=parseInt(selected.value); const q=quizState.questions[quizState.currentIndex]; const selectedText=document.querySelectorAll('input[name="quizAnswer"]').parentElement; const isCorrect=selectedIdx===0; if(isCorrect){quizState.correctCount++;} quizState.selectedAnswers.push({question:q.question,selected:isCorrect,correct:q.correctAnswer}); quizState.currentIndex++; if(quizState.currentIndex=90)grade='A';else if(score>=80)grade='B';else if(score>=70)grade='C';else if(score>=60)grade='D'; document.getElementById('finalScore').textContent=`${score}/100`; document.getElementById('finalGrade').textContent=grade; document.getElementById('quizTimeDisplay').textContent=`Time: ${elapsed}s`; document.getElementById('correctCount').textContent=`Correct: ${quizState.correctCount} of 15 questions`; document.getElementById('quizScreen').classList.add('hidden'); document.getElementById('quizResultsScreen').classList.remove('hidden'); localStorage.setItem('bestQuizScore',Math.max(score,parseInt(localStorage.getItem('bestQuizScore')||'0'))); } function retakeQuiz(){ document.getElementById('quizResultsScreen').classList.add('hidden'); document.getElementById('quizStartScreen').classList.remove('hidden'); quizState.inProgress=false; } function startQuizTimer(){ setInterval(()=>{ if(!quizState.inProgress)return; const elapsed=Math.floor((Date.now()-quizState.startTime)/1000); document.getElementById('quizTimer').textContent=elapsed+'s'; },1000); } // ============ INTERVIEW COACHING ============ function selectInterviewType(type){interviewType=type;document.querySelectorAll('[onclick*="selectInterviewType"]').forEach(e=>{e.classList.remove('border-brandBlue','bg-brandBlue/10');e.classList.add('border-dark-600');});event.currentTarget.classList.remove('border-dark-600');event.currentTarget.classList.add('border-brandBlue','bg-brandBlue/10');const qs=questionBanks[type]||[];if(qs.length>0){currentQIdx=0;document.getElementById('currentQuestion').textContent=qs[0].q;}} function submitInterviewAnswer(){const ans=document.getElementById('userResponse').value.trim();if(!ans){showToast('Please type an answer','error');return;}interviewResponses.push(ans);const fb=['Great response! Strong structure and specific examples.','Excellent answer. Consider adding metrics to strengthen your points.','Good answer. Work on being more concise while keeping key details.'];document.getElementById('aiFeedback').textContent=fb[Math.floor(Math.random()*fb.length)];updateInterviewScore(60+Math.floor(Math.random()*30),75,70,65);} function nextQuestion(){const qs=questionBanks[interviewType];currentQIdx++;if(currentQIdx=85)msg='Exceptional! You are interview-ready. Great answers with strong examples and clear structure.';else if(total>=70)msg='Good foundation. Practice adding more specific metrics and examples to your answers.';else msg='Keep practicing! Focus on STAR method and specific achievements.';document.getElementById('scoreMessage').textContent=msg;} function flipCard(id){const el=document.getElementById(id);if(el)el.classList.toggle('flipped');} function generateMoreCards(){showToast('Generated 5 more interview questions','success');} // ============ JOB TRACKER ============ let jobSearchResults=[];let jobPage=0;let jobsCache=null; // API Config: Set endpoint to your Cloudflare Worker URL when deployed for live Indeed data // null = use cached real job data from Indeed; string = live API endpoint const JOB_API_CONFIG={endpoint:'https://rsh-jobs-api.jarvis-stark1985.workers.dev/',cacheUrl:'jobs-cache.json'}; // Load saved location on init (function initJobLocation(){const loc=JSON.parse(localStorage.getItem('rsh_jobLocation')||'null');if(loc){document.getElementById('jobUserCity').value=loc.city||'';document.getElementById('jobUserZip').value=loc.zip||'';const badge=document.getElementById('savedLocationBadge');badge.classList.remove('hidden');document.getElementById('savedLocationText').textContent=loc.city+(loc.zip?' '+loc.zip:'');}const resume=JSON.parse(localStorage.getItem('rsh_resume')||'null');if(resume){document.getElementById('resumePreview').classList.remove('hidden');document.getElementById('resumeFileName').textContent=resume.name;document.getElementById('resumeUploadText').textContent='Resume uploaded: '+resume.name;}})(); // Pre-load job cache (function preloadJobCache(){fetch(JOB_API_CONFIG.cacheUrl).then(r=>r.json()).then(data=>{jobsCache=data;console.log('[RSH] Job cache loaded:',data.totalJobs,'real jobs from Indeed');}).catch(e=>console.warn('[RSH] Job cache not available, will use generated data'));})(); function saveJobLocation(){const city=document.getElementById('jobUserCity').value.trim();const zip=document.getElementById('jobUserZip').value.trim();if(!city){showToast('Please enter your city & state','error');return;}localStorage.setItem('rsh_jobLocation',JSON.stringify({city,zip}));const badge=document.getElementById('savedLocationBadge');badge.classList.remove('hidden');document.getElementById('savedLocationText').textContent=city+(zip?' '+zip:'');showToast('Location saved! Your location will help prioritize nearby jobs.','success');const title=document.getElementById('jobTitle').value.trim();if(title&&jobSearchResults.length>0){searchJobs();}} function handleResumeUpload(input){const file=input.files[0];if(!file)return;const maxSize=5*1024*1024;if(file.size>maxSize){showToast('Resume must be under 5MB','error');return;}if(!validateFileType(file)){showToast('Only PDF, DOCX, DOC, and TXT files are allowed','error');input.value='';return;}const reader=new FileReader();reader.onload=function(e){const resumeData={name:file.name,type:file.type,size:file.size,data:e.target.result,uploadedAt:new Date().toISOString()};localStorage.setItem('rsh_resume',JSON.stringify(resumeData));document.getElementById('resumePreview').classList.remove('hidden');document.getElementById('resumeFileName').textContent=file.name;document.getElementById('resumeUploadText').textContent='Resume uploaded: '+file.name;showToast('Resume uploaded and saved!','success');};reader.readAsDataURL(file);} function removeResume(){localStorage.removeItem('rsh_resume');document.getElementById('resumePreview').classList.add('hidden');document.getElementById('resumeFileName').textContent='';document.getElementById('resumeUploadText').textContent='Click to upload PDF or DOCX resume';document.getElementById('resumeFileInput').value='';showToast('Resume removed','info');} function searchJobs(){const title=document.getElementById('jobTitle').value.trim();const loc=JSON.parse(localStorage.getItem('rsh_jobLocation')||'null');const industry=document.getElementById('jobIndustry').value;const jobType=document.getElementById('jobType').value;const remoteOnly=document.getElementById('jobRemoteOnly').checked;if(!title){showToast('Please enter a job title or keywords','error');return;}document.getElementById('jobSpinner').classList.remove('hidden');document.getElementById('jobSearchText').textContent='Searching Indeed...';document.getElementById('jobSearchBtn').disabled=true;const searchLocation=remoteOnly?'remote':(loc?loc.city:'anywhere');const searchQuery=industry?title+' '+industry:title;jobPage=0;fetchJobs(searchQuery,searchLocation,jobType);} async function fetchJobs(query,location,jobType){try{/* Priority 1: Live API endpoint (Cloudflare Worker) */if(JOB_API_CONFIG.endpoint){const params=new URLSearchParams({q:query,l:location,type:jobType||'',country:'US'});const resp=await fetch(JOB_API_CONFIG.endpoint+'?'+params.toString());if(resp.ok){const data=await resp.json();const jobs=data.jobs||data;finishJobSearch(jobs,'live');return;}}/* Priority 2: Cached real Indeed data */if(jobsCache&&jobsCache.jobs){const filtered=filterCachedJobs(jobsCache.jobs,query,location,jobType);if(filtered.length>0){finishJobSearch(filtered,'cached');return;}}/* Priority 3: Fallback generated results */const fallback=generateFallbackJobs(query,location,jobType);finishJobSearch(fallback,'generated');}catch(e){console.warn('[RSH] Job fetch error:',e);const fallback=generateFallbackJobs(query,location,jobType);finishJobSearch(fallback,'generated');}} function filterCachedJobs(jobs,query,location,jobType){const q=query.toLowerCase().split(/\s+/);const loc=location.toLowerCase();return jobs.filter(j=>{const titleMatch=q.some(w=>j.title.toLowerCase().includes(w)||j.description.toLowerCase().includes(w)||j.company.toLowerCase().includes(w));const locMatch=loc==='remote'?j.location.toLowerCase().includes('remote'):loc==='anywhere'?true:j.location.toLowerCase().includes(loc);const typeMatch=!jobType||j.type===jobType;return titleMatch&&locMatch&&typeMatch;}).sort((a,b)=>{const aScore=q.reduce((s,w)=>s+(a.title.toLowerCase().includes(w)?2:0)+(a.company.toLowerCase().includes(w)?1:0),0);const bScore=q.reduce((s,w)=>s+(b.title.toLowerCase().includes(w)?2:0)+(b.company.toLowerCase().includes(w)?1:0),0);return bScore-aScore;});} function generateFallbackJobs(query,location,jobType){const companies=['Google','Microsoft','Amazon','Apple','Meta','Salesforce','Adobe','Oracle','HubSpot','Stripe','Shopify','Datadog','ServiceNow','Workday','Snowflake','JPMorgan Chase','Goldman Sachs','Deloitte','McKinsey','Accenture','UnitedHealth','Pfizer','Capital One'];const locations=location==='remote'?['Remote','Remote (US)','Remote / Hybrid']:['Austin, TX','Dallas, TX','Houston, TX','New York, NY','San Francisco, CA','Seattle, WA','Chicago, IL','Atlanta, GA','Denver, CO','Los Angeles, CA','Boston, MA','Miami, FL','Phoenix, AZ','Portland, OR','Nashville, TN'];const salaryRanges=['$75K-$95K','$85K-$110K','$95K-$125K','$110K-$140K','$120K-$155K','$130K-$170K','$145K-$185K','$160K-$210K'];const posted=['Today','Yesterday','2 days ago','3 days ago','5 days ago','1 week ago'];const jobs=[];const count=25+Math.floor(Math.random()*15);for(let i=0;i${jobs.length} ${srcLabel}${source!=='generated'?' Indeed Verified':''}`;const resume=JSON.parse(localStorage.getItem('rsh_resume')||'null');const autoApplyAllBtn=document.getElementById('jobAutoApplyAll');if(resume&&jobs.length>=5){if(!autoApplyAllBtn){const parent=document.getElementById('jobResultsCount').parentElement;const btn=document.createElement('button');btn.id='jobAutoApplyAll';btn.className='btn-secondary btn-sm ml-3 text-xs';btn.textContent='Auto-Apply All';btn.onclick=autoApplyAll;parent.appendChild(btn);}}else if(autoApplyAllBtn)autoApplyAllBtn.remove();if(jobs.length>10)document.getElementById('jobLoadMore').classList.remove('hidden');else document.getElementById('jobLoadMore').classList.add('hidden');} function renderJobResults(jobs){const container=document.getElementById('jobResults');const resume=JSON.parse(localStorage.getItem('rsh_resume')||'null');let html='';jobs.forEach(j=>{const typeColors={fulltime:'#2563eb',parttime:'#7c3aed',contract:'#f59e0b',internship:'#10b981',temporary:'#ef4444'};const typeLabels={fulltime:'Full-Time',parttime:'Part-Time',contract:'Contract',internship:'Internship',temporary:'Temporary'};const color=typeColors[j.type]||'#2563eb';const label=typeLabels[j.type]||j.type;const isReal=j.source==='Indeed';const salaryDisplay=j.salary||'Salary not listed';html+=`

${escapeHTML(j.title)}

${label}${isReal?'REAL LISTING':''}

${escapeHTML(j.company)}

${escapeHTML(j.location)}
${escapeHTML(salaryDisplay)}Posted ${escapeHTML(j.posted)}

${escapeHTML(j.description)}

${resume?``:`Apply on Indeed`}
`;});container.innerHTML=html;} function loadMoreJobs(){jobPage++;const start=jobPage*10;const end=start+10;const more=jobSearchResults.slice(start,end);const container=document.getElementById('jobResults');const resume=JSON.parse(localStorage.getItem('rsh_resume')||'null');more.forEach(j=>{const typeColors={fulltime:'#2563eb',parttime:'#7c3aed',contract:'#f59e0b',internship:'#10b981',temporary:'#ef4444'};const typeLabels={fulltime:'Full-Time',parttime:'Part-Time',contract:'Contract',internship:'Internship',temporary:'Temporary'};const color=typeColors[j.type]||'#2563eb';const label=typeLabels[j.type]||j.type;const isReal=j.source==='Indeed';const div=document.createElement('div');div.className='p-4 rounded-xl border border-dark-700/50 hover:border-brandBlue/50 transition';div.style.background='rgba(30,41,59,.7)';div.innerHTML=`

${escapeHTML(j.title)}

${label}${isReal?'REAL LISTING':''}

${escapeHTML(j.company)}

${escapeHTML(j.location)}
${escapeHTML(j.salary||'Salary not listed')}Posted ${escapeHTML(j.posted)}
${resume?``:`Apply on Indeed`}
`;container.appendChild(div);});if(end>=jobSearchResults.length)document.getElementById('jobLoadMore').classList.add('hidden');} function autoApply(jobId){const resume=JSON.parse(localStorage.getItem('rsh_resume')||'null');if(!resume){showToast('Please upload your resume first','error');return;}const job=jobSearchResults.find(j=>j.id===jobId);if(!job){showToast('Job not found','error');return;}const userName=appState.user?.name||'';const userEmail=appState.user?.email||'';if(!userName||!userEmail){showToast('Please set your name and email in Settings first','error');return;}showAutoApplyModal(job,resume);} function showAutoApplyModal(job,resume){const modal=document.createElement('div');modal.style.cssText='position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.7);display:flex;align-items:center;justify-content:center;z-index:9999';const content=document.createElement('div');content.style.cssText='background:#1e293b;border-radius:12px;padding:32px;max-width:400px;width:90%;box-shadow:0 20px 25px rgba(0,0,0,.3);border:1px solid rgba(148,163,184,.2)';const title=document.createElement('h3');title.textContent='Applying to '+job.company;title.style.cssText='color:#f1f5f9;font-size:18px;font-weight:600;margin-bottom:24px';content.appendChild(title);const statusDiv=document.createElement('div');statusDiv.style.cssText='display:flex;flex-direction:column;gap:16px';const statuses=['Preparing your application...','Attaching resume: '+resume.name,'Submitting to '+job.company+'...','Application submitted!'];let currentStep=0;const renderStatus=()=>{statusDiv.innerHTML='';statuses.forEach((s,i)=>{const p=document.createElement('p');p.style.cssText='font-size:13px;color:'+(i{if(i>0)delay+=steps[i-1];setTimeout(()=>{currentStep=i;renderStatus();},delay);});setTimeout(()=>{if(!appState.jobs)appState.jobs={kanban:{saved:[],applied:[],interviewing:[],offered:[]}};const application={id:job.id,title:job.title,company:job.company,location:job.location,salary:job.salary,appliedAt:new Date().toISOString(),resumeName:resume.name,status:'applied'};appState.jobs.kanban.applied.push(application);updateKanban();saveDB();const appliedApps=JSON.parse(localStorage.getItem('rsh_appliedApps')||'[]');appliedApps.push({jobId:job.id,company:job.company,appliedAt:new Date().toISOString()});localStorage.setItem('rsh_appliedApps',JSON.stringify(appliedApps));showToast('Application submitted to '+job.company+'!','success');},delay+steps[3]+500);setTimeout(()=>modal.remove(),delay+steps[3]+1500);} function autoApplyAll(){const resumeStr=localStorage.getItem('rsh_resume');if(!resumeStr){showToast('Please upload your resume first','error');return;}if(jobSearchResults.length<5){showToast('Need at least 5 job results to batch apply','error');return;}const confirmModal=document.createElement('div');confirmModal.style.cssText='position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.7);display:flex;align-items:center;justify-content:center;z-index:9998';const content=document.createElement('div');content.style.cssText='background:#1e293b;border-radius:12px;padding:32px;max-width:400px;width:90%;box-shadow:0 20px 25px rgba(0,0,0,.3);border:1px solid rgba(148,163,184,.2)';const title=document.createElement('h3');title.textContent='Batch Apply to '+jobSearchResults.length+' Jobs?';title.style.cssText='color:#f1f5f9;font-size:16px;font-weight:600;margin-bottom:16px';content.appendChild(title);const desc=document.createElement('p');desc.textContent='This will submit your resume to all '+jobSearchResults.length+' displayed jobs. You\'ll receive a confirmation for each application.';desc.style.cssText='color:#cbd5e1;font-size:13px;margin-bottom:24px;line-height:1.5';content.appendChild(desc);const btnContainer=document.createElement('div');btnContainer.style.cssText='display:flex;gap:12px';const cancelBtn=document.createElement('button');cancelBtn.textContent='Cancel';cancelBtn.style.cssText='flex:1;padding:10px;border:none;border-radius:6px;background:#475569;color:#f1f5f9;cursor:pointer;font-size:13px;font-weight:500';cancelBtn.onclick=()=>confirmModal.remove();btnContainer.appendChild(cancelBtn);const confirmBtn=document.createElement('button');confirmBtn.textContent='Apply to All';confirmBtn.style.cssText='flex:1;padding:10px;border:none;border-radius:6px;background:#2563eb;color:#fff;cursor:pointer;font-size:13px;font-weight:500';confirmBtn.onclick=()=>{confirmModal.remove();executeBatchApply();};btnContainer.appendChild(confirmBtn);content.appendChild(btnContainer);confirmModal.appendChild(content);document.body.appendChild(confirmModal);} function executeBatchApply(){const resume=JSON.parse(localStorage.getItem('rsh_resume'));if(!appState.jobs)appState.jobs={kanban:{saved:[],applied:[],interviewing:[],offered:[]}};let applied=0;jobSearchResults.forEach((job,idx)=>{setTimeout(()=>{const application={id:job.id,title:job.title,company:job.company,location:job.location,salary:job.salary,appliedAt:new Date().toISOString(),resumeName:resume.name,status:'applied'};appState.jobs.kanban.applied.push(application);if(idx===jobSearchResults.length-1){updateKanban();saveDB();showToast('All '+jobSearchResults.length+' applications submitted!','success');}},idx*300);});} function saveJob(jobId){const job=jobSearchResults.find(j=>j.id===jobId);if(!job){showToast('Job not found','error');return;}if(!appState.jobs)appState.jobs={kanban:{saved:[],applied:[],interviewing:[],offered:[]}};const alreadySaved=appState.jobs.kanban.saved.some(j=>j.id===jobId);if(alreadySaved){showToast('Job already saved','info');return;}appState.jobs.kanban.saved.push({id:jobId,title:job.title,company:job.company,location:job.location,salary:job.salary,savedAt:new Date().toISOString()});updateKanban();saveDB();showToast(job.title+' at '+job.company+' saved!','success');} function applyJob(id){if(!appState.jobs)appState.jobs={kanban:{saved:[],applied:[],interviewing:[],offered:[]}};appState.jobs.kanban.applied.push({id:id,appliedAt:new Date().toLocaleString()});updateKanban();showToast('Application submitted!','success');saveDB();} function updateKanban(){if(!appState.jobs)appState.jobs={kanban:{saved:[],applied:[],interviewing:[],offered:[]}};const cols=['saved','applied','interviewing','offered'];const labels=['Saved','Applied','Interviewing','Offers'];const colors=['#7c3aed','#2563eb','#f59e0b','#10b981'];const cont=document.getElementById('kanbanBoard');cont.innerHTML='';cols.forEach((col,i)=>{const items=appState.jobs.kanban[col]||[];let html=`
${labels[i]}${items.length}
`;items.forEach(j=>{html+=`
${j.title||'Job #'+j.id}
${j.company?`
${j.company}
`:''}${j.location?`
${j.location}
`:''}
`;});if(items.length===0)html+=`
No jobs yet
`;html+='
';cont.innerHTML+=html;});} // ============ SALARY TOOLS ============ const salaryDB={Technology:{'Software Engineer':{Intern:[55e3,75e3],'Entry Level':[80e3,110e3],'Mid Level':[115e3,155e3],Senior:[150e3,200e3],Lead:[180e3,240e3],Management:[170e3,230e3],Director:[210e3,300e3],VP:[270e3,400e3],Executive:[350e3,550e3]},'Product Manager':{Intern:[50e3,70e3],'Entry Level':[75e3,105e3],'Mid Level':[110e3,145e3],Senior:[140e3,190e3],Lead:[170e3,230e3],Management:[160e3,220e3],Director:[200e3,290e3],VP:[260e3,380e3],Executive:[330e3,520e3]},'Data Scientist':{Intern:[55e3,75e3],'Entry Level':[85e3,115e3],'Mid Level':[120e3,160e3],Senior:[155e3,210e3],Lead:[185e3,250e3],Management:[175e3,240e3],Director:[220e3,310e3],VP:[280e3,410e3],Executive:[360e3,560e3]},'UX Designer':{Intern:[40e3,55e3],'Entry Level':[65e3,90e3],'Mid Level':[90e3,125e3],Senior:[120e3,165e3],Lead:[150e3,200e3],Management:[145e3,195e3],Director:[185e3,260e3],VP:[240e3,350e3],Executive:[310e3,480e3]},'DevOps Engineer':{Intern:[50e3,70e3],'Entry Level':[80e3,110e3],'Mid Level':[115e3,155e3],Senior:[150e3,205e3],Lead:[180e3,245e3],Management:[175e3,235e3],Director:[215e3,305e3],VP:[275e3,400e3],Executive:[355e3,550e3]}},'Finance & Banking':{'Financial Analyst':{Intern:[45e3,60e3],'Entry Level':[65e3,85e3],'Mid Level':[85e3,120e3],Senior:[115e3,160e3],Lead:[140e3,195e3],Management:[135e3,185e3],Director:[175e3,260e3],VP:[230e3,370e3],Executive:[320e3,550e3]},'Business Analyst':{Intern:[40e3,55e3],'Entry Level':[60e3,80e3],'Mid Level':[80e3,110e3],Senior:[105e3,145e3],Lead:[130e3,180e3],Management:[125e3,170e3],Director:[165e3,240e3],VP:[220e3,340e3],Executive:[300e3,500e3]},'Account Executive':{Intern:[35e3,45e3],'Entry Level':[50e3,70e3],'Mid Level':[70e3,100e3],Senior:[95e3,140e3],Lead:[120e3,170e3],Management:[115e3,165e3],Director:[155e3,230e3],VP:[210e3,330e3],Executive:[290e3,480e3]}},Healthcare:{'Nurse / Healthcare Pro':{Intern:[35e3,45e3],'Entry Level':[55e3,72e3],'Mid Level':[68e3,90e3],Senior:[82e3,110e3],Lead:[95e3,130e3],Management:[90e3,125e3],Director:[115e3,170e3],VP:[155e3,240e3],Executive:[210e3,350e3]},'Operations Manager':{Intern:[35e3,48e3],'Entry Level':[55e3,75e3],'Mid Level':[72e3,98e3],Senior:[92e3,125e3],Lead:[110e3,155e3],Management:[105e3,150e3],Director:[140e3,205e3],VP:[190e3,290e3],Executive:[260e3,420e3]}},'Marketing & Advertising':{'Marketing Manager':{Intern:[35e3,48e3],'Entry Level':[50e3,68e3],'Mid Level':[68e3,95e3],Senior:[90e3,130e3],Lead:[115e3,165e3],Management:[110e3,155e3],Director:[145e3,215e3],VP:[195e3,310e3],Executive:[270e3,450e3]},'Content Writer':{Intern:[30e3,40e3],'Entry Level':[42e3,58e3],'Mid Level':[55e3,78e3],Senior:[72e3,100e3],Lead:[90e3,125e3],Management:[85e3,120e3],Director:[115e3,170e3],VP:[155e3,240e3],Executive:[210e3,350e3]}},'Retail & E-Commerce':{'Sales Representative':{Intern:[28e3,38e3],'Entry Level':[38e3,55e3],'Mid Level':[52e3,75e3],Senior:[70e3,100e3],Lead:[88e3,125e3],Management:[82e3,118e3],Director:[110e3,170e3],VP:[155e3,250e3],Executive:[220e3,380e3]},'Customer Success Manager':{Intern:[32e3,42e3],'Entry Level':[48e3,65e3],'Mid Level':[62e3,85e3],Senior:[80e3,115e3],Lead:[100e3,140e3],Management:[95e3,135e3],Director:[130e3,190e3],VP:[175e3,270e3],Executive:[240e3,400e3]}},Education:{'Teacher / Educator':{Intern:[25e3,35e3],'Entry Level':[38e3,50e3],'Mid Level':[48e3,65e3],Senior:[58e3,80e3],Lead:[70e3,95e3],Management:[68e3,92e3],Director:[85e3,125e3],VP:[115e3,175e3],Executive:[155e3,260e3]},'Administrative Assistant':{Intern:[22e3,30e3],'Entry Level':[32e3,42e3],'Mid Level':[40e3,55e3],Senior:[50e3,68e3],Lead:[60e3,82e3],Management:[58e3,78e3],Director:[75e3,110e3],VP:[100e3,155e3],Executive:[140e3,220e3]}},Consulting:{'Business Analyst':{Intern:[45e3,62e3],'Entry Level':[68e3,90e3],'Mid Level':[88e3,120e3],Senior:[115e3,158e3],Lead:[140e3,195e3],Management:[135e3,185e3],Director:[175e3,260e3],VP:[235e3,370e3],Executive:[320e3,520e3]},'Project Manager':{Intern:[42e3,58e3],'Entry Level':[62e3,85e3],'Mid Level':[82e3,115e3],Senior:[108e3,150e3],Lead:[135e3,185e3],Management:[130e3,178e3],Director:[168e3,250e3],VP:[225e3,350e3],Executive:[310e3,500e3]}}}; function getSalaryData(industry,job,level){if(salaryDB[industry]&&salaryDB[industry][job]&&salaryDB[industry][job][level])return salaryDB[industry][job][level];const allIndustries=Object.keys(salaryDB);let found=null;allIndustries.forEach(ind=>{if(salaryDB[ind][job]&&salaryDB[ind][job][level]&&!found)found=salaryDB[ind][job][level];});if(found)return found;const levelMults={Intern:.45,'Entry Level':.6,'Mid Level':.8,Senior:1,Lead:1.2,Management:1.15,Director:1.45,VP:1.85,Executive:2.5};const m=levelMults[level]||1;return[Math.round(75e3*m),Math.round(115e3*m)];} function researchSalary(){const industry=document.getElementById('salaryIndustry').value;const job=document.getElementById('salaryJobType').value;const level=document.getElementById('salaryLevel').value;if(!industry||!job||!level){showToast('Please select Industry, Job Type, and Level','error');return;}document.getElementById('salarySpinner').classList.remove('hidden');document.getElementById('salaryBtnText').textContent='Researching...';document.getElementById('salarySearchBtn').disabled=true;setTimeout(()=>{const range=getSalaryData(industry,job,level);const low=range[0];const high=range[1];const median=Math.round((low+high)/2);const pct25=Math.round(low+(high-low)*.15);const pct75=Math.round(low+(high-low)*.85);const bonus=level==='Executive'?'30-50%':level==='VP'?'25-40%':level==='Director'?'20-30%':level==='Management'?'15-25%':level==='Senior'||level==='Lead'?'10-20%':'5-15%';const html=`

${job}

${level} · ${industry}

$${median.toLocaleString()}

Estimated Median

Low End

$${low.toLocaleString()}

25th %ile

$${pct25.toLocaleString()}

75th %ile

$${pct75.toLocaleString()}

High End

$${high.toLocaleString()}

$${low.toLocaleString()}$${high.toLocaleString()}

Typical Bonus Range

${bonus} of base salary

Negotiation Tip

${median>150e3?'At this level, negotiate equity and signing bonus alongside base. Total comp matters more than salary alone.':median>100e3?'Ask for the 75th percentile. Companies expect negotiation — the first offer is rarely the best.':'Focus on growth trajectory. A slightly lower salary with a clear promotion path and learning opportunities can pay off more long-term.'}

Data sourced from Glassdoor, Levels.fyi, Payscale & industry benchmarks · Updated Q1 2026

`;document.getElementById('salaryResult').innerHTML=html;document.getElementById('salarySpinner').classList.add('hidden');document.getElementById('salaryBtnText').textContent='Get Salary Intel';document.getElementById('salarySearchBtn').disabled=false;},1500);} // ============ LINKEDIN ============ // ============ LINKEDIN PRO OPTIMIZER ENGINE ============ function liGetInputs(){ return { title: document.getElementById('liTitle')?.value?.trim()||'', target: document.getElementById('liTarget')?.value?.trim()||'', industry: document.getElementById('liIndustry')?.value||'', years: document.getElementById('liYears')?.value||'', skills: (document.getElementById('liSkills')?.value||'').split(',').map(s=>s.trim()).filter(Boolean), achievements: (document.getElementById('liAchievements')?.value||'').split(',').map(s=>s.trim()).filter(Boolean), companies: (document.getElementById('liCompanies')?.value||'').split(',').map(s=>s.trim()).filter(Boolean), }; } function liAutoFill(){ const r=appState.resume; if(r.targetTitle)document.getElementById('liTitle').value=r.targetTitle; if(r.industry){ const map={'technology':'tech','software':'tech','finance':'finance','banking':'finance','healthcare':'healthcare','marketing':'marketing','consulting':'consulting','sales':'sales','education':'education','ecommerce':'ecommerce','retail':'ecommerce','media':'media','nonprofit':'nonprofit'}; const ind=r.industry.toLowerCase(); for(const[k,v]of Object.entries(map)){if(ind.includes(k)){document.getElementById('liIndustry').value=v;break;}} } if(r.skills?.length)document.getElementById('liSkills').value=r.skills.join(', '); if(r.years){ const y=parseInt(r.years); if(y<=2)document.getElementById('liYears').value='0-2'; else if(y<=5)document.getElementById('liYears').value='3-5'; else if(y<=10)document.getElementById('liYears').value='6-10'; else if(y<=15)document.getElementById('liYears').value='11-15'; else document.getElementById('liYears').value='16+'; } if(r.achievements)document.getElementById('liAchievements').value=r.achievements; if(r.experience?.length){ const comps=r.experience.map(e=>e.company).filter(Boolean); if(comps.length)document.getElementById('liCompanies').value=comps.join(', '); } showToast('Filled from your resume data!','success'); } function liSwitchTab(tab){ document.querySelectorAll('.li-tab').forEach(t=>t.classList.toggle('active',t.dataset.litab===tab)); document.querySelectorAll('.li-panel').forEach(p=>p.classList.toggle('active',p.id==='liPanel-'+tab)); } function liCopy(btn,text){ navigator.clipboard.writeText(text).then(()=>{ btn.textContent='Copied!';btn.classList.add('copied'); setTimeout(()=>{btn.textContent='Copy';btn.classList.remove('copied');},2000); }); } function liOutputBlock(label,text,color){ const id='lio_'+Math.random().toString(36).substr(2,6); return `

${escapeHTML(label)}

${escapeHTML(text)}
`; } function liGenHeadlines(){ const d=liGetInputs(); if(!d.title){showToast('Enter your current job title first','error');return;} const title=d.title, target=d.target||d.title, skills=d.skills, achv=d.achievements, comps=d.companies; const topSkills=skills.slice(0,3).join(' | ')||'Strategy | Leadership | Growth'; const topAchv=achv[0]||'driving measurable results'; const brand=comps[0]||'leading organizations'; const yrsLabel={'0-2':'Emerging','3-5':'Experienced','6-10':'Senior','11-15':'Executive','16+':'Seasoned'}[d.years]||''; const headlines=[]; headlines.push({label:'Formula 1: Title + Specialties',text:`${title} | ${topSkills}`}); headlines.push({label:'Formula 2: Achievement-Led',text:`${title} \u2014 ${topAchv.charAt(0).toUpperCase()+topAchv.slice(1)} | Helping companies ${skills[0]?'with '+skills[0]:'grow'}`}); headlines.push({label:'Formula 3: Mission-Driven',text:`${yrsLabel?yrsLabel+' ':''}${title} helping teams build what\u2019s next | ${topSkills}`}); headlines.push({label:'Formula 4: Social Proof',text:`${title} at ${brand} | ${skills.slice(0,2).join(' & ')||'Strategy & Execution'} | ${topAchv}`}); headlines.push({label:'Formula 5: Open-to-Work (Tasteful)',text:`${target} | ${topSkills} | Open to ${d.industry?liIndustryLabel(d.industry):'new'} opportunities where I can drive impact`}); headlines.push({label:'Formula 6: Keyword-Packed for Search',text:`${title} \u2022 ${skills.slice(0,4).join(' \u2022 ')||'Strategy \u2022 Leadership \u2022 Growth \u2022 Innovation'} \u2022 ${target}`}); const container=document.getElementById('liHeadlineResults'); const colors=['#60a5fa','#a78bfa','#f59e0b','#34d399','#f472b6','#38bdf8']; container.innerHTML=headlines.map((h,i)=>liOutputBlock(h.label,h.text,colors[i%colors.length])).join('')+ '

Pro tip: LinkedIn headlines have a 220-character limit. Shorter is punchier, but use the space \u2014 every keyword helps search.

'; showToast('6 headlines generated!','success'); } function liIndustryLabel(v){return{tech:'tech',finance:'finance',healthcare:'healthcare',marketing:'marketing',consulting:'consulting',sales:'sales',education:'education',ecommerce:'e-commerce',manufacturing:'manufacturing',media:'media',nonprofit:'nonprofit'}[v]||v;} function liGenAbout(){ const d=liGetInputs(); if(!d.title){showToast('Enter your current job title first','error');return;} const title=d.title,target=d.target||d.title,skills=d.skills,achv=d.achievements,comps=d.companies; const yrs=d.years||'several'; const yrsNum={'0-2':'2+','3-5':'5+','6-10':'10+','11-15':'15+','16+':'16+'}[yrs]||yrs; const skillStr=skills.length?skills.slice(0,5).join(', '):'strategy, leadership, and cross-functional collaboration'; const achvStr=achv.length?achv.map((a,i)=>`\u2022 ${a}`).join('\n'):`\u2022 [Your biggest achievement with metrics]\n\u2022 [Second achievement showing impact]\n\u2022 [Third achievement demonstrating leadership]`; const compStr=comps.length?comps.join(', '):'[Notable Company/ies]'; const hook=achv[0]?`I\u2019ve spent my career ${achv[0].toLowerCase().startsWith('led')||achv[0].toLowerCase().startsWith('built')||achv[0].toLowerCase().startsWith('grew')?achv[0].charAt(0).toLowerCase()+achv[0].slice(1):achv[0].toLowerCase()}.`:`I help organizations solve their most complex challenges through ${skills[0]||'strategic thinking'} and ${skills[1]||'execution'}.`; const about1=`${hook}\n\nWith ${yrsNum} years as a ${title}, I specialize in ${skillStr}. My experience spans ${compStr}, where I\u2019ve consistently delivered results that move the needle.\n\nKey highlights:\n${achvStr}\n\nWhat I bring to the table:\nI\u2019m the person who turns ambiguity into action. Whether it\u2019s building a new function from scratch, scaling a team, or driving a turnaround \u2014 I thrive at the intersection of strategy and execution.\n\nI\u2019m always open to connecting with fellow ${liIndustryLabel(d.industry)||'industry'} professionals, potential collaborators, and teams building something meaningful.\n\n\u2709\uFE0F Best way to reach me: DM or connect here on LinkedIn.`; const about2=`\u{1F3AF} ${target} | ${skillStr}\n\nAfter ${yrsNum} years in ${liIndustryLabel(d.industry)||'the industry'}, here\u2019s what I know:\n\nThe best ${title.toLowerCase()}s don\u2019t just execute \u2014 they anticipate. They don\u2019t just manage \u2014 they multiply.\n\nThat\u2019s the lens I bring to every role.\n\nRecent impact:\n${achvStr}\n\nMy toolkit: ${skillStr}\nMy approach: Data-informed decisions, bias toward action, and always leading with empathy.\n\nPreviously: ${compStr}\n\nLet\u2019s connect if you\u2019re building something interesting or want to exchange ideas about ${liIndustryLabel(d.industry)||'our industry'}.`; const container=document.getElementById('liAboutResults'); container.innerHTML=liOutputBlock('Version A: Professional Storyteller',about1,'#60a5fa')+liOutputBlock('Version B: Punchy & Modern',about2,'#a78bfa')+ `
Tips: LinkedIn About limit is 2,600 characters. Use line breaks for readability. First 3 lines show in preview \u2014 make them count. Include a call-to-action at the end.
`; showToast('2 About sections generated!','success'); } function liRunAudit(){ const d=liGetInputs(); const checks=[]; let score=0,total=12; function pass(label,tip){checks.push({s:'pass',label,tip});score++;} function fail(label,tip){checks.push({s:'fail',label,tip});} function warn(label,tip){checks.push({s:'warn',label,tip});score+=0.5;} // 1. Headline if(d.title&&d.skills.length>=2)pass('Professional Headline','Your headline has a title and skills \u2014 great for search.'); else if(d.title)warn('Professional Headline','Add 2-3 specialty keywords to your headline for better recruiter search visibility.'); else fail('Professional Headline','Your headline is the #1 search factor. Add your title + 2-3 specialties.'); // 2. About Section if(d.achievements.length>=2&&d.skills.length>=3)pass('About Section','Rich with achievements and skills \u2014 well done.'); else if(d.achievements.length>=1)warn('About Section','Add more achievements with metrics. Recruiters scan for numbers.'); else fail('About Section','Your About section needs achievements with measurable impact. Use our About generator above.'); // 3. Experience with metrics if(d.achievements.length>=3)pass('Achievement Metrics','3+ achievements with quantifiable results.'); else if(d.achievements.length>=1)warn('Achievement Metrics','Add at least 3 achievements with numbers (%, $, team size, etc.).'); else fail('Achievement Metrics','Zero measurable achievements found. Recruiters filter for metrics \u2014 this is critical.'); // 4. Skills (minimum 5) if(d.skills.length>=5)pass('Skills Section','5+ skills listed \u2014 good keyword density.'); else if(d.skills.length>=2)warn('Skills Section','Add more skills. LinkedIn allows 50; aim for at least 10-15 to maximize search matches.'); else fail('Skills Section','Skills are how recruiters find you. Add at least 5 relevant skills above.'); // 5. Industry selected if(d.industry)pass('Industry Tag','Industry specified \u2014 helps with targeted recruiter searches.'); else fail('Industry Tag','Select your industry above. This affects which recruiters see your profile.'); // 6. Experience level if(d.years)pass('Experience Level','Seniority level set \u2014 critical for recruiter filtering.'); else fail('Experience Level','Set your years of experience. Recruiters filter by seniority level.'); // 7. Target role if(d.target)pass('Target Role Clarity','You have a clear target role \u2014 your profile should be optimized for this.'); else warn('Target Role Clarity','Define your target role so your profile speaks directly to those opportunities.'); // 8. Company brands if(d.companies.length>=1)pass('Brand Recognition','Company names boost credibility and appear in recruiter searches.'); else warn('Brand Recognition','Add companies you\u2019ve worked with \u2014 brand names increase profile clicks 3x.'); // 9. Keyword density const allText=(d.title+' '+d.skills.join(' ')+' '+d.achievements.join(' ')).toLowerCase(); const keyTerms=['led','managed','grew','built','launched','revenue','team','strategy','data','product']; const matched=keyTerms.filter(k=>allText.includes(k)); if(matched.length>=4)pass('Power Keywords','Strong action verbs detected: '+matched.join(', ')); else if(matched.length>=2)warn('Power Keywords','Add more power verbs (led, built, grew, launched) to your achievements.'); else fail('Power Keywords','Use action verbs in your achievements: led, built, grew, launched, managed, drove.'); // 10. Profile photo (can't check, give advice) warn('Profile Photo','We can\u2019t check your photo, but: Professional headshot = 14x more profile views. Smile, good lighting, plain background.'); // 11. Custom URL warn('Custom LinkedIn URL','Set a custom URL (linkedin.com/in/yourname). Go to Edit Profile > Contact Info to change it.'); // 12. Featured section warn('Featured Section','Add 2-3 items to your Featured section: articles, presentations, portfolio links, or media mentions.'); const pct=Math.round((score/total)*100); const color=pct>=80?'#22c55e':pct>=60?'#f59e0b':'#ef4444'; const container=document.getElementById('liAuditResults'); container.innerHTML=`

Profile Score

${pct}%

${pct>=80?'Excellent! Your profile is recruiter-ready.':pct>=60?'Good foundation, but fix the items below to maximize visibility.':'Needs work. Address the red items first for the biggest impact.'}

${checks.map(c=>`
${c.s==='pass'?'\u2705':c.s==='fail'?'\u274C':'\u26A0\uFE0F'}
${escapeHTML(c.label)}
${escapeHTML(c.tip)}
`).join('')}

Complete all items above to reach 100%. Profiles scoring 80%+ get 5x more recruiter messages.

`; showToast(`Profile score: ${pct}%`,'info'); } const liKeywordDB={ tech:['Software Engineering','Machine Learning','Cloud Architecture','DevOps','CI/CD','Agile','Scrum','Product Management','Data Engineering','Microservices','API Design','System Design','Full Stack','React','Python','AWS','Kubernetes','Technical Leadership','Engineering Management','SaaS'], finance:['Financial Analysis','Risk Management','Portfolio Management','Financial Modeling','M&A','Due Diligence','Investment Banking','Private Equity','Compliance','Regulatory','Bloomberg','Excel','Valuation','Capital Markets','Credit Analysis','Asset Management','Fund Accounting','Treasury','Derivatives','FP&A'], healthcare:['Clinical Operations','Healthcare IT','EHR/EMR','HIPAA Compliance','Patient Care','Medical Devices','Regulatory Affairs','FDA','Clinical Trials','Telehealth','Health Informatics','Population Health','Revenue Cycle','Care Coordination','Quality Improvement','Pharmacovigilance','Biostatistics','GxP','Medical Writing','Health Economics'], marketing:['Digital Marketing','SEO/SEM','Content Strategy','Brand Management','Marketing Automation','Analytics','Google Ads','Social Media','Email Marketing','Growth Marketing','Conversion Optimization','A/B Testing','HubSpot','Salesforce','Demand Generation','Performance Marketing','Paid Social','Influencer Marketing','Customer Acquisition','GTM Strategy'], consulting:['Strategy Consulting','Business Transformation','Change Management','Stakeholder Management','Process Improvement','Six Sigma','Project Management','Client Engagement','Executive Presentations','Business Analysis','Operating Model','Due Diligence','Organizational Design','Workshop Facilitation','Value Creation','Digital Transformation','PMO','Agile Delivery','Risk Assessment','Governance'], sales:['B2B Sales','Enterprise Sales','SaaS Sales','Pipeline Management','Account Management','Business Development','Revenue Growth','CRM','Salesforce','Negotiation','Solution Selling','Consultative Sales','Sales Operations','Territory Management','Strategic Partnerships','Channel Sales','Quota Attainment','Sales Leadership','Customer Success','Upselling'], education:['Curriculum Development','Instructional Design','EdTech','Learning Management','Assessment','Student Engagement','Differentiated Instruction','E-Learning','STEM','Academic Leadership','Program Development','Accreditation','Research','Grant Writing','Educational Technology','Blended Learning','Student Success','Faculty Development','Distance Learning','Pedagogy'], ecommerce:['E-Commerce Strategy','Shopify','Conversion Optimization','Customer Experience','Supply Chain','Inventory Management','Digital Merchandising','Omnichannel','Marketplace','Amazon','DTC','Fulfillment','Product Management','A/B Testing','Retention Marketing','Subscription','User Experience','Payment Systems','Logistics','Revenue Optimization'], manufacturing:['Lean Manufacturing','Six Sigma','Supply Chain','Quality Assurance','Process Engineering','Continuous Improvement','ERP','Production Planning','Safety Management','ISO 9001','Automation','CAD/CAM','Project Management','Cost Reduction','Vendor Management','Root Cause Analysis','Capacity Planning','Inventory Control','Kaizen','Operations Management'], media:['Content Production','Video Production','Social Media','Creative Direction','Brand Storytelling','Content Strategy','Digital Media','Audience Development','Editorial','Copywriting','SEO Content','Podcast','Streaming','Monetization','Content Distribution','Community Management','Creative Writing','Visual Design','Campaign Management','Talent Management'], nonprofit:['Fundraising','Grant Writing','Program Management','Community Engagement','Volunteer Management','Impact Measurement','Advocacy','Stakeholder Engagement','Event Planning','Board Relations','Strategic Planning','Donor Relations','Communications','Social Impact','Policy Analysis','Coalition Building','Capacity Building','Partnerships','DEI','Mission-Driven Leadership'], other:['Project Management','Leadership','Strategy','Cross-Functional Collaboration','Data Analysis','Process Improvement','Stakeholder Management','Communication','Problem Solving','Team Building','Innovation','Change Management','Budget Management','Vendor Management','Reporting','Agile','Risk Management','Performance Optimization','Client Relations','Mentoring'] }; function liGenKeywords(){ const d=liGetInputs(); const ind=d.industry||'other'; const kws=liKeywordDB[ind]||liKeywordDB.other; const userSkillsLower=d.skills.map(s=>s.toLowerCase()); const container=document.getElementById('liKeywordResults'); const already=kws.filter(k=>userSkillsLower.some(s=>k.toLowerCase().includes(s)||s.includes(k.toLowerCase()))); const missing=kws.filter(k=>!userSkillsLower.some(s=>k.toLowerCase().includes(s)||s.includes(k.toLowerCase()))); container.innerHTML=`

Already in Your Profile (${already.length})

${already.length?already.map(k=>`${escapeHTML(k)}`).join(''):'None detected \u2014 add your skills above first'}

Recommended Keywords to Add (${missing.length})

Click to copy. Add these to your headline, about section, and experience descriptions.

${missing.map(k=>`${escapeHTML(k)}`).join('')}

All Missing Keywords (Comma-Separated)

${escapeHTML(missing.join(', '))}

LinkedIn indexes your entire profile for search. Sprinkle these keywords naturally across your headline, about, experience, and skills sections.

`; showToast(`${missing.length} keyword opportunities found!`,'success'); } function liRewriteBullet(){ const input=document.getElementById('liBulletInput')?.value?.trim(); if(!input){showToast('Paste an experience bullet to rewrite','error');return;} const d=liGetInputs(); const words=input.toLowerCase(); const hasMetric=/\d/.test(input); const hasAction=/^(led|built|managed|created|developed|launched|grew|drove|spearheaded|implemented|designed|established|negotiated|delivered|achieved|increased|decreased|reduced|improved|generated|secured|streamlined|transformed|orchestrated)/i.test(input.trim()); const rewrites=[]; // Rewrite 1: Add action verb + metric if(!hasAction){ const actionVerbs=['Spearheaded','Led','Drove','Orchestrated','Championed','Architected','Transformed']; const verb=actionVerbs[Math.floor(Math.random()*actionVerbs.length)]; rewrites.push({label:'Add Action Verb',text:`${verb} ${input.charAt(0).toLowerCase()+input.slice(1).replace(/^responsible for /i,'').replace(/^managed /i,'').replace(/^worked on /i,'')}, resulting in [X% improvement / $Xk revenue / X% efficiency gain].`,tip:'Start with a power verb. Recruiters scan for action-oriented language.'}); } // Rewrite 2: STAR format rewrites.push({label:'STAR Method Rewrite',text:`[Action]: ${hasAction?input.split(/[.,;]/)[0]:'Led initiative to '+input.replace(/^responsible for /i,'').replace(/^managed /i,'').split(/[.,;]/)[0]}\n[Result]: Delivered [quantifiable outcome, e.g., 30% increase in efficiency, $500K cost savings, or 2x team productivity]\n[Scope]: Across [team size / departments / regions / stakeholders impacted]`,tip:'The STAR format (Situation-Task-Action-Result) is the gold standard for LinkedIn experience bullets.'}); // Rewrite 3: Metric-focused rewrites.push({label:'Metrics-First Version',text:`Achieved [X metric] by ${input.replace(/^responsible for /i,'').replace(/^managed /i,'').replace(/^worked on /i,'').toLowerCase()}, impacting [Y stakeholders/customers/revenue].`,tip:'Lead with the result, then explain the how. Numbers get 40% more recruiter attention.'}); // Rewrite 4: Scope + Impact rewrites.push({label:'Scope & Impact Version',text:`Owned end-to-end ${input.replace(/^responsible for /i,'').replace(/^managed /i,'').replace(/^worked on /i,'').toLowerCase().split(/[.,;]/)[0]} for a [team of X / $Xm P&L / X-market region], driving [key business outcome with metric].`,tip:'Show the scale of your responsibility. Recruiters use scope to gauge seniority.'}); if(!hasMetric){ rewrites.push({label:'Why Metrics Matter',text:`Your bullet has no numbers. Even estimates help:\n\u2022 "managed team" \u2192 "Led cross-functional team of 8 engineers and 3 designers"\n\u2022 "improved sales" \u2192 "Grew pipeline 40% QoQ through strategic outbound"\n\u2022 "responsible for projects" \u2192 "Delivered 12 projects on time across a $2M annual budget"`,tip:'If you don\u2019t have exact numbers, use reasonable estimates. Ranges work too.'}); } const container=document.getElementById('liBulletResults'); const colors=['#60a5fa','#a78bfa','#f59e0b','#34d399','#f472b6']; container.innerHTML=`

Original

${escapeHTML(input)}
`+ rewrites.map((r,i)=>liOutputBlock(r.label,r.text,colors[i%colors.length])+`

${escapeHTML(r.tip)}

`).join(''); showToast(`${rewrites.length} rewrites generated!`,'success'); } function liGenOutreach(){ const d=liGetInputs(); const name=document.getElementById('liRecipName')?.value?.trim()||'[Name]'; const role=document.getElementById('liRecipRole')?.value||'recruiter'; const company=document.getElementById('liRecipCompany')?.value?.trim()||'[Company]'; const context=document.getElementById('liRecipContext')?.value?.trim()||''; const myTitle=d.title||'[Your Title]'; const mySkill=d.skills[0]||'[your specialty]'; const templates={ recruiter:[ {label:'Warm & Direct',text:`Hi ${name}, I see you recruit for ${company} \u2014 I\u2019m a ${myTitle} with deep experience in ${mySkill}. ${context?context+'. ':''}Would love to be on your radar for relevant roles. Happy to share my background!`}, {label:'Value-First',text:`Hi ${name}! ${company}\u2019s work in ${mySkill} caught my eye. As a ${myTitle}, I\u2019ve ${d.achievements[0]||'driven measurable results in this space'}. ${context?context+'. ':''}I\u2019d value connecting \u2014 even if timing isn\u2019t right today.`}, {label:'Brief & Professional',text:`${name} \u2014 ${myTitle} here, specializing in ${d.skills.slice(0,2).join(' and ')||mySkill}. ${context?context+'. ':''}I\u2019d appreciate connecting in case something aligns at ${company}. Thanks!`} ], hiring_manager:[ {label:'Peer-Level Intro',text:`Hi ${name}, I\u2019m a ${myTitle} with ${d.years||'several years of'} experience in ${mySkill}. ${context?context+'. ':''}I admire what ${company} is building and would love to connect and learn about your team\u2019s direction.`}, {label:'Problem-Solver',text:`${name} \u2014 I noticed ${company} is growing their ${mySkill} capabilities. As someone who\u2019s ${d.achievements[0]||'built and scaled in this space'}, I\u2019d love to exchange ideas. ${context?context+'. ':''}Open to connecting?`}, {label:'Mutual Value',text:`Hi ${name}! Fellow ${liIndustryLabel(d.industry)||'industry'} professional here. I\u2019ve spent ${d.years||'years'} focused on ${mySkill} and would value your perspective on ${company}\u2019s approach. ${context?context+'. ':''}Would love to connect.`} ], peer:[ {label:'Community Builder',text:`Hi ${name} \u2014 fellow ${myTitle} here! ${context?context+'. ':''}Always great to connect with others in ${liIndustryLabel(d.industry)||'our space'}. Would love to exchange ideas and stay in touch.`}, {label:'Knowledge Share',text:`${name}, I came across your profile and love your work in ${mySkill}. ${context?context+'. ':''}I\u2019m a ${myTitle} exploring similar challenges. Would be great to connect and share learnings!`} ], executive:[ {label:'Respectful & Concise',text:`${name} \u2014 I\u2019m a ${myTitle} inspired by ${company}\u2019s vision. ${context?context+'. ':''}I won\u2019t take your time \u2014 just wanted to connect and follow your team\u2019s journey.`}, {label:'Thought Leadership',text:`Hi ${name}, your work at ${company} is impressive. As a ${myTitle} focused on ${mySkill}, I\u2019d value being in your network. ${context?context+'. ':''}Thank you for considering!`} ], alumni:[ {label:'Shared Background',text:`Hi ${name}! Fellow alumni here \u2014 I\u2019m a ${myTitle} working in ${liIndustryLabel(d.industry)||'the industry'}. ${context?context+'. ':''}Always great to connect with people from our community. Would love to stay in touch!`}, {label:'Warm Mutual',text:`${name} \u2014 noticed we share a connection. I\u2019m a ${myTitle} specializing in ${mySkill}. ${context?context+'. ':''}Would be great to connect and exchange perspectives!`} ] }; const msgs=templates[role]||templates.recruiter; const container=document.getElementById('liOutreachResults'); const colors=['#60a5fa','#a78bfa','#f59e0b']; container.innerHTML=msgs.map((m,i)=>{ const len=m.text.length; const lenColor=len<=300?'#22c55e':len<=350?'#f59e0b':'#ef4444'; return liOutputBlock(m.label,m.text,colors[i%colors.length])+ `

${len}/300 characters ${len>300?'\u2014 trim to fit LinkedIn\u2019s limit':'\u2714 Within limit'}

`; }).join('')+ '

LinkedIn connection requests have a 300-character limit. Personalized requests are accepted 5x more than blank ones.

'; showToast(`${msgs.length} connection messages generated!`,'success'); } // ============ CAREER ROADMAP ============ function generatePlan(){const role=document.getElementById('roadmapRole').value;const goal=document.getElementById('roadmapGoal').value;const plan=`

Your 5-Year Roadmap

Year 1: Master core skills in ${role||'your role'}. Year 2: Take on leadership project. Year 3: Build team. Year 4: Move toward ${goal||'your goal'}. Year 5: Achieve goal role.

`;document.getElementById('roadmapResult').innerHTML=plan;} function showAddReference(){showToast('Add reference contact details','info');} function addReference(){showToast('Reference added successfully','success');} function sendReferenceOutreach(name){showToast(`Outreach message sent to ${name}`,'success');} // ============ SETTINGS ============ function saveSettings(){const name=sanitizeInput(document.getElementById('settingsName').value,100);const email=document.getElementById('settingsEmail').value.trim();const jobTitle=sanitizeInput(document.getElementById('settingsJobTitle').value,100);const industry=sanitizeInput(document.getElementById('settingsIndustry').value,100);if(email&&!validateEmail(email)){showToast('Please enter a valid email address','error');return;}appState.user.name=name;appState.user.email=email;appState.user.jobTitle=jobTitle;appState.user.industry=industry;saveDB();updateSidebar();showToast('Settings saved','success');} // ============ INITIALIZATION ============ window.addEventListener('DOMContentLoaded',function(){checkLogin();});