Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ // Smooth scroll for internal links
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
+ anchor.addEventListener('click', function (e) {
+ e.preventDefault();
+ document.querySelector(this.getAttribute('href')).scrollIntoView({
+ behavior: 'smooth'
+ });
+ });
+ });
+
+ // Animate interest cards on scroll
+ const cards = document.querySelectorAll('.interest-card');
+
+ const observerOptions = {
+ threshold: 0.1,
+ rootMargin: '0px 0px -50px 0px'
+ };
+
+ const observer = new IntersectionObserver((entries) => {
+ entries.forEach(entry => {
+ if (entry.isIntersecting) {
+ entry.target.style.opacity = '1';
+ entry.target.style.transform = 'translateY(0)';
+ }
+ });
+ }, observerOptions);
+
+ cards.forEach(card => {
+ card.style.opacity = '0';
+ card.style.transform = 'translateY(20px)';
+ observer.observe(card);
+ });
+
+ // Create floating hearts animation
+ function createHeart() {
+ const heart = document.createElement('div');
+ heart.innerHTML = '❤️';
+ heart.style.position = 'absolute';
+ heart.style.left = Math.random() * 100 + '%';
+ heart.style.animation = `float ${Math.random() * 2 + 3}s linear`;
+ document.querySelector('.hearts-animation').appendChild(heart);
+
+ setTimeout(() => {
+ heart.remove();
+ }, 5000);
+ }
+
+ setInterval(createHeart, 1000);
+ });
+
+ @keyframes float {
+ 0% {
+ transform: translateY(0) rotate(0deg);
+ opacity: 1;
+ }
+ 100% {
+ transform: translateY(-50px) rotate(360deg);
+ opacity: 0;
+ }
+ }