File size: 2,544 Bytes
a866b8e
974c87c
a866b8e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
974c87c
 
a866b8e
 
974c87c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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

document.addEventListener('DOMContentLoaded', () => {
    // Add vibe mode toggle
    const body = document.body;
    let vibeMode = false;
    
    // Create vibe mode toggle button
    const vibeToggle = document.createElement('button');
    vibeToggle.innerHTML = '🎵';
    vibeToggle.style.cssText = `
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
        border: none;
        font-size: 24px;
        cursor: pointer;
        z-index: 1000;
        transition: all 0.3s;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    `;
    
    vibeToggle.addEventListener('click', () => {
        vibeMode = !vibeMode;
        if (vibeMode) {
            body.classList.add('vibe-mode');
            vibeToggle.style.transform = 'scale(1.2) rotate(360deg)';
            document.querySelectorAll('.feature-card, .primary-button, .logo').forEach(el => {
                el.classList.add('vibe-mode');
            });
        } else {
            body.classList.remove('vibe-mode');
            vibeToggle.style.transform = 'scale(1) rotate(0deg)';
            document.querySelectorAll('.vibe-mode').forEach(el => {
                el.classList.remove('vibe-mode');
            });
        }
    });
    
    document.body.appendChild(vibeToggle);
    
// Typewriter effect
    const typewriter = document.getElementById('typewriter');
    if (typewriter) {
        const texts = ["🎸 Jam", "🎵 Vibe", "🎹 Code", "🎤 Flow"];
let count = 0;
        let index = 0;
        let currentText = '';
        let letter = '';
        
        (function type() {
            if (count === texts.length) {
                count = 0;
            }
            currentText = texts[count];
            letter = currentText.slice(0, ++index);
            
            typewriter.textContent = letter;
            if (letter.length === currentText.length) {
                count++;
                index = 0;
                setTimeout(type, 1500);
            } else {
                setTimeout(type, 150);
            }
        })();
    }
    
    // Smooth scrolling for anchor links
    document.querySelectorAll('a[href^="#"]').forEach(anchor => {
        anchor.addEventListener('click', function (e) {
            e.preventDefault();
            document.querySelector(this.getAttribute('href')).scrollIntoView({
                behavior: 'smooth'
            });
        });
    });
});