forked from alishaarora56/alisha-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
363 lines (333 loc) · 13.1 KB
/
script.js
File metadata and controls
363 lines (333 loc) · 13.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
const state = {
currentCompany: "Open to mission-driven teams",
};
const selectors = {
glow: document.querySelector(".page-glow"),
currentCompany: document.querySelector("[data-current-company]"),
year: document.querySelector("[data-year]"),
modal: document.querySelector("[data-modal]"),
modalOpeners: document.querySelectorAll("[data-modal-open]"),
modalCloser: document.querySelector("[data-modal-close]"),
chatWindow: document.querySelector("[data-chat-window]"),
chatForm: document.querySelector("[data-chat-form]"),
experienceCards: document.querySelectorAll("[data-experience-card]"),
experienceModal: document.querySelector("[data-experience-modal]"),
experienceClose: document.querySelector("[data-experience-close]"),
experienceImage: document.querySelector("[data-modal-experience-image]"),
experienceCompany: document.querySelector("[data-modal-experience-company]"),
experienceRole: document.querySelector("[data-modal-experience-role]"),
experienceSummary: document.querySelector("[data-modal-experience-summary]"),
experienceLink: document.querySelector("[data-modal-experience-link]"),
experienceYear: document.querySelector("[data-modal-experience-year]"),
};
const experienceData = {
shopify: {
year: "Sep 2025 - Dec 2025, Bellevue WA",
company: "Shopify",
role: "Machine Learning Engineering Intern",
summary:
"Currently building transformer-based recommendation models and a context-aware tokenizer that powers richer product discovery for millions of users.",
image: "assets/2.svg",
alt: "Shopify storefront collage",
link: "https://www.shopify.com/",
},
telus: {
year: "Jan 2025 - Apr 2025, Toronto ON",
company: "TELUS",
role: "ML & Software Intern",
summary:
"Worked on generative and computer vision systems using LLaMA-3 and SAM to optimize wildfire detection and reduce compute costs across large-scale AI infrastructure.",
image: "assets/3.svg",
alt: "Telus digital experience visual",
link: "https://www.telus.com/",
},
vitala: {
year: "May 2023 - Aug 2023, Toronto ON",
company: "Vitala Global",
role: "Founding Engineering Intern",
summary:
"Built the backend of a women's pregnancy care app enabling secure, offline access to maternal health support in low-connectivity regions.",
image: "assets/4.svg",
alt: "Vitala Global founders speaking on stage",
link: "https://www.vitalaglobal.org/",
},
microsoft: {
year: "Summer 2022, Redmond WA",
company: "Microsoft",
role: "Software Engineering Research Intern",
summary:
"Developed predictive models on maternal health data and deployed them as fast, scalable microservices on Azure using Docker and Kubernetes.",
image: "assets/5.svg",
alt: "Microsoft campus skyline",
link: "https://www.microsoft.com/",
},
pg: {
year: "Nov 2022 - Feb 2023, Remote",
company: "Procter & Gamble",
role: "Application & Software Engineering Intern",
summary:
"Created data-driven ad and partnership tools with Python, Vue.js, and AWS that improved user engagement and drove measurable revenue growth.",
image: "assets/6.svg",
alt: "P&G laboratory workspace",
link: "https://www.pg.com/",
},
mit: {
year: "Sep 2022 - Dec 2022, Cambridge MA",
company: "MIT AI Lab",
role: "ML Research Assistant",
summary:
"Collaborated with PhD researchers to train deep learning models on 12,000+ microbiome samples, achieving 84% accuracy in predicting schizophrenia risk.",
image: "assets/7.svg",
alt: "MIT AI Lab logo",
link: "https://www.csail.mit.edu/",
},
};
const chatKnowledge = [
{
prompt: ["who", "you", "alisha", "intro", "about"],
response:
"Hi, I’m Alisha — a Systems Design Engineering student at the University of Waterloo. I build at the intersection of AI systems, software, and impact. Currently at Shopify working on transformer-based recommendation models, recognized as one of Canada’s Top 100 Most Powerful Women and a Rising Star in AI by Women in AI North America.",
},
{
prompt: ["goal", "dream", "future", "vision", "mission"],
response:
"My mission is to build intelligent systems that push what’s possible — from agents and inference models to technologies that serve people in health, climate, and beyond. Long term, I want to lead AI innovation that scales safely and meaningfully.",
},
{
prompt: ["project", "work", "build", "ship", "portfolio"],
response:
"You can explore my projects below — I’ve built everything from JobMatch AI (a full-stack COT reasoning platform) and Project Flourish (a Microsoft-supported model detecting suicidal ideation) to LLM optimization pipelines, multi-agent climate systems, and EmotionNet for brainwave emotion detection.",
},
{
prompt: ["skills", "tech", "languages", "stack", "tools"],
response:
"Alisha’s technical toolkit includes Python, Java, C++, TypeScript, and SQL. She works across AWS, Azure, React, Flask, FastAPI, Docker, Kubernetes, MongoDB, and Redis — with strong experience in PyTorch, TensorFlow, NumPy, and Pandas.",
},
{
prompt: ["experience", "internship", "resume", "jobs", "companies", "work"],
response:
"Alisha’s interned across Shopify (MLE), TELUS (ML & Software), Microsoft, MIT AI Lab, Vitala Global, and Procter & Gamble — shipping ML models, recommendation systems, and scalable backend infrastructure at every stage.",
},
{
prompt: ["unicef", "wef", "hopesisters", "leadership", "beyond"],
response:
"Beyond engineering, Alisha serves as a UNICEF Youth Ambassador shaping global AI & policy conversations, a World Economic Forum AI Council Member judging the Smart Toy Awards alongside will.i.am, and Founder of The HopeSisters — a Forbes-recognized nonprofit delivering hope to thousands across Canada.",
},
{
prompt: ["contact", "connect", "reach", "email", "linkedin"],
response:
"You can reach Alisha at alisha.arora@uwaterloo.ca or connect on LinkedIn — links are in the footer. She loves meeting other builders, founders, and curious minds.",
},
{
prompt: ["fun", "outside", "life", "balance", "hobbies"],
response:
"Outside of engineering, Alisha enjoys listening to music, going on runs, and reading articles on everything from travel and philosophy to technology.",
},
];
const starterMessages = [
{
author: "alisha",
text: "Hey there! I’m Alisha’s curated AI twin. Ask about her experience, projects, or what’s inspiring her lately.",
},
{
author: "alisha",
text: "Try asking: “What are Alisha's technical skills? ”",
},
];
function handleCursorGlow(event) {
if (!selectors.glow) return;
const xPercent = (event.clientX / window.innerWidth) * 100;
const yPercent = (event.clientY / window.innerHeight) * 100;
selectors.glow.style.background = `radial-gradient(circle at ${xPercent}% ${yPercent}%, rgba(100, 100, 100, 0.15), transparent 65%)`;
}
function setCurrentCompany() {
if (!selectors.currentCompany) return;
selectors.currentCompany.textContent = state.currentCompany;
}
function setYear() {
if (selectors.year) {
selectors.year.textContent = new Date().getFullYear();
}
}
function getExperienceDetails(card) {
if (!card) return null;
const id = card.dataset.experienceCard;
const base = experienceData[id] || {};
const imageEl = card.querySelector("img");
const titleEl = card.querySelector(".experience-card__overlay h3");
const roleEl = card.querySelector(".experience-card__overlay p");
const details = {
year: card.dataset.experienceYear || base.year || "",
company:
card.dataset.experienceCompany ||
base.company ||
titleEl?.textContent?.trim() ||
"",
role:
card.dataset.experienceRole ||
base.role ||
roleEl?.textContent?.trim() ||
"",
summary: card.dataset.experienceSummary || base.summary || "",
image:
card.dataset.experienceImage ||
base.image ||
imageEl?.getAttribute("src") ||
"",
alt:
card.dataset.experienceAlt ||
base.alt ||
imageEl?.getAttribute("alt") ||
"",
link: card.dataset.experienceLink || base.link || "#",
};
// Persist merged values back onto the card for future reads.
card.dataset.experienceYear = details.year;
card.dataset.experienceCompany = details.company;
card.dataset.experienceRole = details.role;
card.dataset.experienceSummary = details.summary;
card.dataset.experienceImage = details.image;
card.dataset.experienceAlt = details.alt;
card.dataset.experienceLink = details.link;
return details;
}
function openExperienceModal(card) {
if (!selectors.experienceModal) return;
const data = getExperienceDetails(card);
if (!data) return;
if (selectors.experienceImage) {
selectors.experienceImage.src = data.image;
selectors.experienceImage.alt = data.alt;
}
if (selectors.experienceCompany) {
selectors.experienceCompany.textContent = data.company;
}
if (selectors.experienceRole) {
selectors.experienceRole.textContent = data.role;
}
if (selectors.experienceSummary) {
selectors.experienceSummary.textContent = data.summary;
}
if (selectors.experienceLink) {
selectors.experienceLink.href = data.link;
}
if (selectors.experienceYear) {
selectors.experienceYear.textContent = data.year;
}
selectors.experienceModal.setAttribute("data-open", "true");
document.body.style.overflow = "hidden";
}
function closeExperienceModal() {
if (!selectors.experienceModal) return;
selectors.experienceModal.setAttribute("data-open", "false");
document.body.style.overflow = "";
}
function toggleModal(open) {
if (!selectors.modal) return;
selectors.modal.setAttribute("data-open", open ? "true" : "false");
document.body.style.overflow = open ? "hidden" : "";
if (open) {
selectors.chatForm?.querySelector("input")?.focus();
}
}
function addChatMessage(author, text) {
if (!selectors.chatWindow) return;
const wrapper = document.createElement("div");
wrapper.className = "chat-message";
wrapper.dataset.author = author;
wrapper.innerHTML = `
<span class="author">${author === "user" ? "You" : "Alisha.ai"}</span>
<div class="bubble">${text}</div>
`;
selectors.chatWindow.appendChild(wrapper);
selectors.chatWindow.scrollTo({
top: selectors.chatWindow.scrollHeight,
behavior: "smooth",
});
}
function getChatResponse(prompt) {
const normalized = prompt.toLowerCase();
// Split input into individual words for better matching
const words = normalized.split(/\s+/);
for (const item of chatKnowledge) {
if (
item.prompt.some(
(keyword) =>
words.includes(keyword) || normalized === keyword || normalized.includes(" " + keyword + " ")
)
) {
return item.response;
}
}
return "That’s a great question! I don’t have that in my current dataset, but Alisha probably does — feel free to reach out at alisha.arora@uwaterloo.ca or connect on LinkedIn!";
}
function initChat() {
if (!selectors.chatForm || !selectors.chatWindow) return;
selectors.chatWindow.innerHTML = "";
starterMessages.forEach((msg) => addChatMessage(msg.author, msg.text));
selectors.chatForm.addEventListener("submit", (event) => {
event.preventDefault();
const input = event.target.prompt;
const value = input.value.trim();
if (!value) return;
addChatMessage("user", value);
input.value = "";
setTimeout(() => {
addChatMessage("alisha", getChatResponse(value));
}, 260);
});
}
function initModal() {
selectors.modalOpeners.forEach((btn) =>
btn.addEventListener("click", () => toggleModal(true))
);
selectors.modalCloser?.addEventListener("click", () => toggleModal(false));
selectors.modal?.addEventListener("click", (event) => {
if (event.target === selectors.modal) {
toggleModal(false);
}
});
window.addEventListener("keydown", (event) => {
if (event.key === "Escape") {
toggleModal(false);
closeExperienceModal();
}
});
}
function initExperiences() {
if (!selectors.experienceCards || !selectors.experienceModal) return;
selectors.experienceCards.forEach((card) => {
card.addEventListener("click", () => {
openExperienceModal(card);
});
});
selectors.experienceClose?.addEventListener("click", closeExperienceModal);
selectors.experienceModal.addEventListener("click", (event) => {
if (event.target === selectors.experienceModal) {
closeExperienceModal();
}
});
}
function initSmoothScroll() {
const scrollLinks = document.querySelectorAll("[data-scroll]");
scrollLinks.forEach((link) => {
link.addEventListener("click", (event) => {
const targetSelector = link.getAttribute("data-scroll");
const target = targetSelector
? document.querySelector(targetSelector)
: null;
if (!target) return;
event.preventDefault();
target.scrollIntoView({ behavior: "smooth", block: "start" });
});
});
}
document.addEventListener("DOMContentLoaded", () => {
window.addEventListener("pointermove", handleCursorGlow);
setCurrentCompany();
setYear();
initModal();
initChat();
initExperiences();
initSmoothScroll();
});