Text effects can transform ordinary content into visually captivating elements that grab attention and enhance user experience. From subtle shadows to bold animations, these effects can make a significant impact.
In this article, we will explore 10 text effect examples that can elevate your design projects. Whether you're a seasoned designer or just starting, these examples will inspire and guide you in creating stunning text effects.
CODE1
Here's the code:
CODETEXT1
CODE2
Here's the code:
CODETEXT2
CODE3
Here's the code:
CODETEXT3
CODE4
Here's the code:
CODETEXT4
CODE5
Here's the code:
CODETEXT5
Subframe's drag-and-drop interface and intuitive, responsive canvas empower designers and developers to create pixel-perfect UI effortlessly. Loved by professionals, it ensures stunning results every time.
Ready to elevate your design game? Start for free today!
CODE6
Here's the code:
CODETEXT6
CODE7
Here's the code:
CODETEXT7
CODE8
Here's the code:
CODETEXT8
CODE9
Here's the code:
CODETEXT9
CODE10
Here's the code:
CODETEXT10
Unlock the power of Subframe and design stunning UIs with ease. With its drag-and-drop interface, you can create pixel-perfect designs and captivating text effects in no time.
Experience unparalleled efficiency and start creating immediately. Ready to elevate your design game? Start for free today!
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Orbital - AI-Powered Workflow Automation</title> <style> :root { --primary-gradient: linear-gradient(90deg, #FF416C 0%, #FF4B2B 100%); --secondary-gradient: linear-gradient(90deg, #4A00E0 0%, #8E2DE2 100%); --tertiary-gradient: linear-gradient(90deg, #00C9FF 0%, #92FE9D 100%); --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: var(--font-primary); background-color: #0F0F12; color: #F5F5F7; height: 100%; overflow-x: hidden; line-height: 1.6; } .container { max-width: 700px; margin: 0 auto; padding: 0 20px; height: 100%; } header { padding: 25px 0; position: sticky; top: 0; z-index: 100; background: rgba(15, 15, 18, 0.8); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, 0.05); } nav { display: flex; justify-content: space-between; align-items: center; } .logo { font-weight: 800; font-size: 24px; background: var(--primary-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -0.5px; display: flex; align-items: center; gap: 8px; } .logo-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-gradient); display: flex; align-items: center; justify-content: center; } .nav-links { display: flex; align-items: center; gap: 20px; } .nav-link { text-decoration: none; color: #F5F5F7; font-weight: 500; font-size: 15px; transition: var(--transition-smooth); position: relative; } .nav-link::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -4px; left: 0; background: var(--primary-gradient); transition: var(--transition-smooth); } .nav-link:hover::after { width: 100%; } .btn { padding: 10px 22px; border-radius: 8px; font-weight: 600; font-size: 15px; cursor: pointer; transition: var(--transition-smooth); border: none; outline: none; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; } .btn-primary { background: var(--primary-gradient); color: white; box-shadow: 0 6px 14px rgba(255, 65, 108, 0.3); } .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 65, 108, 0.4); } .hero { padding: 60px 0 40px; position: relative; } .gradient-heading { font-size: 50px; font-weight: 800; line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 20px; background-image: var(--primary-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; transition: var(--transition-smooth); text-shadow: 0 2px 12px rgba(255, 65, 108, 0.15); } .subheading { font-size: 18px; font-weight: 400; color: rgba(245, 245, 247, 0.8); margin-bottom: 30px; max-width: 550px; } .hero-actions { display: flex; gap: 15px; margin-bottom: 40px; } .btn-secondary { background-color: rgba(255, 255, 255, 0.1); color: white; border: 1px solid rgba(255, 255, 255, 0.2); } .btn-secondary:hover { background-color: rgba(255, 255, 255, 0.15); transform: translateY(-2px); } .features { padding: 40px 0; } .feature-heading { font-size: 30px; font-weight: 700; margin-bottom: 15px; letter-spacing: -0.5px; background-image: var(--secondary-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; transition: var(--transition-smooth); text-shadow: 0 2px 12px rgba(74, 0, 224, 0.15); } .feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; margin-top: 30px; } .feature-card { background: rgba(255, 255, 255, 0.05); border-radius: 14px; padding: 25px; transition: var(--transition-smooth); border: 1px solid rgba(255, 255, 255, 0.1); } .feature-card:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.08); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); } .feature-icon { width: 50px; height: 50px; border-radius: 12px; background: var(--secondary-gradient); display: flex; align-items: center; justify-content: center; margin-bottom: 15px; box-shadow: 0 5px 15px rgba(74, 0, 224, 0.2); } .feature-title { font-size: 18px; font-weight: 600; margin-bottom: 10px; } .feature-desc { font-size: 15px; color: rgba(245, 245, 247, 0.7); } .testimonials { padding: 50px 0; } .testimonial-heading { font-size: 30px; font-weight: 700; margin-bottom: 40px; text-align: center; letter-spacing: -0.5px; background-image: var(--tertiary-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; transition: var(--transition-smooth); text-shadow: 0 2px 12px rgba(0, 201, 255, 0.15); } .testimonial-card { background: rgba(255, 255, 255, 0.05); border-radius: 14px; padding: 30px; margin-bottom: 25px; border: 1px solid rgba(255, 255, 255, 0.1); transition: var(--transition-smooth); } .testimonial-card:hover { transform: scale(1.02); background: rgba(255, 255, 255, 0.08); } .testimonial-text { font-size: 16px; line-height: 1.7; margin-bottom: 20px; color: rgba(245, 245, 247, 0.9); } .testimonial-author { display: flex; align-items: center; gap: 15px; } .author-avatar { width: 45px; height: 45px; border-radius: 50%; background: var(--tertiary-gradient); overflow: hidden; } .author-info { display: flex; flex-direction: column; } .author-name { font-weight: 600; font-size: 16px; } .author-role { font-size: 14px; color: rgba(245, 245, 247, 0.6); } .cta { padding: 40px 0 60px; } .cta-content { background: linear-gradient(rgba(15, 15, 18, 0.8), rgba(15, 15, 18, 0.8)), var(--primary-gradient); border-radius: 20px; padding: 40px; text-align: center; box-shadow: 0 15px 40px rgba(255, 65, 108, 0.2); border: 1px solid rgba(255, 255, 255, 0.1); } .cta-heading { font-size: 32px; font-weight: 800; margin-bottom: 15px; letter-spacing: -0.5px; } .cta-subheading { font-size: 16px; margin-bottom: 30px; max-width: 450px; margin-left: auto; margin-right: auto; color: rgba(245, 245, 247, 0.8); } .floating-shapes { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: -1; } .shape { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.3; } .shape-1 { width: 300px; height: 300px; background: #FF416C; top: -150px; right: -100px; } .shape-2 { width: 250px; height: 250px; background: #4A00E0; bottom: -100px; left: -50px; } /* Custom cursor effect */ .custom-cursor { position: fixed; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); mix-blend-mode: difference; transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease; } @media (max-width: 600px) { .gradient-heading { font-size: 36px; } .feature-grid { grid-template-columns: 1fr; } .hero-actions { flex-direction: column; } .custom-cursor { display: none; } } /* Particles */ #particles-js { position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: -1; } /* Animated glow on hover for buttons */ .btn-primary::after { content: ''; position: absolute; top: -5px; left: -5px; right: -5px; bottom: -5px; background: var(--primary-gradient); border-radius: 13px; z-index: -1; opacity: 0; transition: opacity 0.3s ease; } .btn-primary:hover::after { opacity: 0.5; animation: pulse 2s infinite; } @keyframes pulse { 0% { transform: scale(1); opacity: 0.3; } 50% { transform: scale(1.05); opacity: 0.5; } 100% { transform: scale(1); opacity: 0.3; } } </style> </head> <body> <div class="custom-cursor"></div> <div class="floating-shapes"> <div class="shape shape-1"></div> <div class="shape shape-2"></div> </div> <div id="particles-js"></div> <header> <div class="container"> <nav> <div class="logo"> <div class="logo-icon"></div> Orbital </div> <div class="nav-links"> <a href="#features" class="nav-link">Features</a> <a href="#" class="nav-link">Pricing</a> <a href="#" class="btn btn-primary">Get Started</a> </div> </nav> </div> </header> <section class="hero"> <div class="container"> <h1 class="gradient-heading">Automate workflows with AI that understands your business</h1> <p class="subheading">Orbital's machine learning algorithms adapt to your unique processes, automating complex workflows with 93% greater efficiency than traditional solutions.</p> <div class="hero-actions"> <a href="#" class="btn btn-primary"> Start Free Trial <svg width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14 5l7 7m0 0l-7 7m7-7H3"/> </svg> </a> <a href="#" class="btn btn-secondary"> <svg width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"/> </svg> Watch Demo </a> </div> </div> </section> <section class="features" id="features"> <div class="container"> <h2 class="feature-heading">Intelligent automation for modern teams</h2> <div class="feature-grid"> <div class="feature-card"> <div class="feature-icon"> <svg width="24" height="24" fill="none" viewBox="0 0 24 24" stroke="white"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/> </svg> </div> <h3 class="feature-title">Smart Process Mining</h3> <p class="feature-desc">Our AI analyzes your team's workflows to identify bottlenecks and automation opportunities with minimal setup.</p> </div> <div class="feature-card"> <div class="feature-icon"> <svg width="24" height="24" fill="none" viewBox="0 0 24 24" stroke="white"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"/> </svg> </div> <h3 class="feature-title">Contextual Integration</h3> <p class="feature-desc">Connect with 200+ tools and platforms with intelligent content parsing that understands context, not just keywords.</p> </div> <div class="feature-card"> <div class="feature-icon"> <svg width="24" height="24" fill="none" viewBox="0 0 24 24" stroke="white"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/> </svg> </div> <h3 class="feature-title">Adaptive Scheduling</h3> <p class="feature-desc">Dynamic workflow scheduling that adapts to your team's changing priorities and workloads in real-time.</p> </div> <div class="feature-card"> <div class="feature-icon"> <svg width="24" height="24" fill="none" viewBox="0 0 24 24" stroke="white"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"/> </svg> </div> <h3 class="feature-title">Proactive Security</h3> <p class="feature-desc">Industry-leading encryption with behavioral analysis to protect your data while maintaining seamless workflow.</p> </div> </div> </div> </section> <section class="testimonials"> <div class="container"> <h2 class="testimonial-heading">Trusted by forward-thinking teams</h2> <div class="testimonial-card"> <p class="testimonial-text">"Orbital reduced our approval workflows from 3 days to 6 hours while cutting errors by 87%. The adaptive learning model means it gets smarter the more we use it — exactly what we needed."</p> <div class="testimonial-author"> <div class="author-avatar"></div> <div class="author-info"> <div class="author-name">Sarah Chen</div> <div class="author-role">CTO, Ripple Finance</div> </div> </div> </div> </div> </section> <section class="cta"> <div class="container"> <div class="cta-content"> <h2 class="cta-heading">Ready to transform your workflow?</h2> <p class="cta-subheading">Start with a 14-day free trial. No credit card required. Full access to all features.</p> <a href="#" class="btn btn-primary"> Get Started Now <svg width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14 5l7 7m0 0l-7 7m7-7H3"/> </svg> </a> </div> </div> </section> <script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script> <script> // Gradient heading effect on scroll const gradientHeadings = document.querySelectorAll('.gradient-heading, .feature-heading, .testimonial-heading'); const primaryGradient = 'linear-gradient(90deg, #FF416C 0%, #FF4B2B 100%)'; const secondaryGradient = 'linear-gradient(90deg, #4A00E0 0%, #8E2DE2 100%)'; const tertiaryGradient = 'linear-gradient(90deg, #00C9FF 0%, #92FE9D 100%)'; const gradients = [ 'linear-gradient(90deg, #FF416C 0%, #FF4B2B 100%)', 'linear-gradient(90deg, #FC5C7D 0%, #6A82FB 100%)', 'linear-gradient(90deg, #4A00E0 0%, #8E2DE2 100%)', 'linear-gradient(90deg, #00C9FF 0%, #92FE9D 100%)', 'linear-gradient(90deg, #F857A6 0%, #FF5858 100%)' ]; // Initialize particles.js particlesJS('particles-js', { "particles": { "number": { "value": 40, "density": { "enable": true, "value_area": 800 } }, "color": { "value": "#ffffff" }, "shape": { "type": "circle", "stroke": { "width": 0, "color": "#000000" }, }, "opacity": { "value": 0.2, "random": true, "anim": { "enable": true, "speed": 1, "opacity_min": 0.1, "sync": false } }, "size": { "value": 3, "random": true, "anim": { "enable": true, "speed": 2, "size_min": 0.1, "sync": false } }, "line_linked": { "enable": true, "distance": 150, "color": "#ffffff", "opacity": 0.1, "width": 1 }, "move": { "enable": true, "speed": 1, "direction": "none", "random": true, "straight": false, "out_mode": "out", "bounce": false, } }, "interactivity": { "detect_on": "canvas", "events": { "onhover": { "enable": true, "mode": "grab" }, "resize": true }, "modes": { "grab": { "distance": 140, "line_linked": { "opacity": 0.3 } } } }, "retina_detect": true }); // Smooth scrolling for navigation links document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function(e) { e.preventDefault(); const targetId = this.getAttribute('href'); if (targetId === '#') return; const targetElement = document.querySelector(targetId); if (targetElement) { window.scrollTo({ top: targetElement.offsetTop - 100, behavior: 'smooth' }); } }); }); // Custom cursor effect const cursor = document.querySelector('.custom-cursor'); document.addEventListener('mousemove', (e) => { cursor.style.left = e.clientX + 'px'; cursor.style.top = e.clientY + 'px'; }); document.addEventListener('mousedown', () => { cursor.style.transform = 'translate(-50%, -50%) scale(0.8)'; }); document.addEventListener('mouseup', () => { cursor.style.transform = 'translate(-50%, -50%) scale(1)'; }); document.querySelectorAll('a, button, .feature-card').forEach(item => { item.addEventListener('mouseenter', () => { cursor.style.width = '40px'; cursor.style.height = '40px'; cursor.style.backgroundColor = 'rgba(255, 65, 108, 0.3)'; }); item.addEventListener('mouseleave', () => { cursor.style.width = '30px'; cursor.style.height = '30px'; cursor.style.backgroundColor = 'rgba(255, 255, 255, 0.2)'; }); }); // Gradient shift on scroll let lastScrollTop = 0; let gradientIndex = 0; window.addEventListener('scroll', () => { const st = window.pageYOffset || document.documentElement.scrollTop; // Determine scroll direction if (st > lastScrollTop) { // Scrolling down gradientIndex = (gradientIndex + 1) % gradients.length; } else { // Scrolling up gradientIndex = gradientIndex === 0 ? gradients.length - 1 : gradientIndex - 1; } // Apply gradient to visible headings gradientHeadings.forEach(heading => { const rect = heading.getBoundingClientRect(); if (rect.top < window.innerHeight && rect.bottom > 0) { // Determine which gradient to use based on heading type if (heading.classList.contains('gradient-heading')) { heading.style.backgroundImage = gradients[gradientIndex]; } else if (heading.classList.contains('feature-heading')) { heading.style.backgroundImage = secondaryGradient; } else if (heading.classList.contains('testimonial-heading')) { heading.style.backgroundImage = tertiaryGradient; } } }); lastScrollTop = st <= 0 ? 0 : st; }, false); // Intersection Observer for animations const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.style.opacity = 1; entry.target.style.transform = 'translateY(0)'; } }); }, { threshold: 0.1 }); document.querySelectorAll('.feature-card, .testimonial-card, .cta-content').forEach(item => { item.style.opacity = 0; item.style.transform = 'translateY(20px)'; item.style.transition = 'opacity 0.6s ease, transform 0.6s ease'; observer.observe(item); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>E-Commerce Product Showcase</title> <style> :root { --primary: #1a1a1a; --secondary: #f4f4f4; --accent: #ff6b6b; --highlight: #4ecdc4; --transition: 0.35s cubic-bezier(0.33, 1, 0.68, 1); } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; } body { background-color: var(--secondary); color: var(--primary); display: flex; justify-content: center; align-items: center; min-height: 700px; padding: 20px; overflow-x: hidden; } .container { max-width: 650px; width: 100%; } header { margin-bottom: 40px; text-align: center; } h1 { font-size: 2.2rem; margin-bottom: 15px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; } .tagline { font-size: 1.1rem; color: #555; max-width: 500px; margin: 0 auto; line-height: 1.6; } .products { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 25px; } .product { position: relative; background-color: white; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); transition: transform var(--transition), box-shadow var(--transition); } .product:hover { transform: translateY(-8px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08); } .product-image { width: 100%; aspect-ratio: 1/1; object-fit: cover; background-color: #f9f9f9; transition: transform var(--transition); } .product:hover .product-image { transform: scale(1.05); } .product-info { padding: 20px; } .product-category { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: #888; margin-bottom: 8px; font-weight: 600; } .product-name-wrapper { position: relative; display: inline-block; cursor: pointer; margin-bottom: 10px; } .product-name { font-size: 1.2rem; font-weight: 600; margin-bottom: 5px; transition: color var(--transition); } .product-name-line { position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background-color: var(--primary); transition: width var(--transition), background-color var(--transition); } .product-name-wrapper:hover .product-name { color: var(--accent); } .product-name-wrapper:hover .product-name-line { width: 100%; background-color: var(--accent); } .product-price { font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; } .original-price { text-decoration: line-through; color: #999; font-size: 0.9rem; font-weight: 400; } .sale-price { color: var(--accent); } .badge { position: absolute; top: 15px; right: 15px; background-color: var(--accent); color: white; font-size: 0.7rem; font-weight: 600; padding: 5px 10px; border-radius: 20px; z-index: 2; transform: translateY(0); animation: float 3s ease-in-out infinite; } .badge.new { background-color: var(--highlight); animation-delay: 0.5s; } .quick-view { position: absolute; bottom: 0; left: 0; width: 100%; padding: 15px; background-color: var(--primary); color: white; text-align: center; transform: translateY(100%); transition: transform var(--transition); font-weight: 500; font-size: 0.85rem; cursor: pointer; } .product:hover .quick-view { transform: translateY(0); } .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); display: flex; justify-content: center; align-items: center; z-index: 10; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; } .modal.active { opacity: 1; pointer-events: auto; } .modal-content { background-color: white; max-width: 600px; width: 90%; border-radius: 12px; padding: 30px; position: relative; transform: translateY(20px); opacity: 0; transition: transform 0.4s ease, opacity 0.3s ease; } .modal.active .modal-content { transform: translateY(0); opacity: 1; } .close-modal { position: absolute; top: 20px; right: 20px; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: #777; transition: color 0.2s; } .close-modal:hover { color: var(--accent); } .modal-product { display: flex; gap: 30px; } @media (max-width: 600px) { .modal-product { flex-direction: column; } } .modal-image { flex: 1; max-width: 250px; border-radius: 8px; overflow: hidden; } .modal-image img { width: 100%; height: auto; object-fit: cover; } .modal-info { flex: 1.5; } .modal-category { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: #888; margin-bottom: 10px; } .modal-name { font-size: 1.8rem; font-weight: 700; margin-bottom: 15px; line-height: 1.2; } .modal-price { font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; color: var(--primary); } .modal-description { color: #555; line-height: 1.6; margin-bottom: 25px; } .modal-action { display: inline-block; background-color: var(--primary); color: white; padding: 12px 25px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: background-color 0.3s; } .modal-action:hover { background-color: var(--accent); } @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } } @media (max-width: 700px) { .products { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; } h1 { font-size: 1.8rem; } .tagline { font-size: 0.95rem; } .product-info { padding: 15px; } .product-name { font-size: 1rem; } } </style> </head> <body> <div class="container"> <header> <h1>Monochrome Maven Collection</h1> <p class="tagline">Elevate your style with our curated selection of minimal, premium products that balance form and function.</p> </header> <div class="products"> <div class="product" data-id="1"> <div class="badge sale">20% OFF</div> <img class="product-image" src="https://images.unsplash.com/photo-1594035910387-fea47794261f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80" alt="Obsidian Wireless Earbuds"> <div class="product-info"> <div class="product-category">Audio</div> <div class="product-name-wrapper"> <div class="product-name">Obsidian Wireless Earbuds</div> <div class="product-name-line"></div> </div> <div class="product-price"> <span class="sale-price">$119</span> <span class="original-price">$149</span> </div> </div> <div class="quick-view">Quick View</div> </div> <div class="product" data-id="2"> <div class="badge new">NEW</div> <img class="product-image" src="https://images.unsplash.com/photo-1543512214-318c7553f230?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80" alt="Minimalist Chronograph Watch"> <div class="product-info"> <div class="product-category">Accessories</div> <div class="product-name-wrapper"> <div class="product-name">Minimalist Chronograph Watch</div> <div class="product-name-line"></div> </div> <div class="product-price">$249</div> </div> <div class="quick-view">Quick View</div> </div> <div class="product" data-id="3"> <img class="product-image" src="https://images.unsplash.com/photo-1591337676887-a217a6970a8a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80" alt="Carbon Fiber Wallet"> <div class="product-info"> <div class="product-category">Accessories</div> <div class="product-name-wrapper"> <div class="product-name">Carbon Fiber Wallet</div> <div class="product-name-line"></div> </div> <div class="product-price">$79</div> </div> <div class="quick-view">Quick View</div> </div> <div class="product" data-id="4"> <div class="badge sale">15% OFF</div> <img class="product-image" src="https://images.unsplash.com/photo-1565849904461-04a58ad377e0?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80" alt="Stealth Noise-Cancelling Headphones"> <div class="product-info"> <div class="product-category">Audio</div> <div class="product-name-wrapper"> <div class="product-name">Stealth Noise-Cancelling Headphones</div> <div class="product-name-line"></div> </div> <div class="product-price"> <span class="sale-price">$195</span> <span class="original-price">$229</span> </div> </div> <div class="quick-view">Quick View</div> </div> <div class="product" data-id="5"> <img class="product-image" src="https://images.unsplash.com/photo-1593642633279-1796119d5482?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80" alt="Monolith Portable SSD"> <div class="product-info"> <div class="product-category">Tech</div> <div class="product-name-wrapper"> <div class="product-name">Monolith Portable SSD</div> <div class="product-name-line"></div> </div> <div class="product-price">$159</div> </div> <div class="quick-view">Quick View</div> </div> <div class="product" data-id="6"> <div class="badge new">NEW</div> <img class="product-image" src="https://images.unsplash.com/photo-1583394838336-acd977736f90?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80" alt="Precision Matte Stylus"> <div class="product-info"> <div class="product-category">Accessories</div> <div class="product-name-wrapper"> <div class="product-name">Precision Matte Stylus</div> <div class="product-name-line"></div> </div> <div class="product-price">$59</div> </div> <div class="quick-view">Quick View</div> </div> </div> </div> <div class="modal" id="productModal"> <div class="modal-content"> <button class="close-modal">×</button> <div class="modal-product"> <div class="modal-image"> <img id="modalImage" src="" alt="Product Image"> </div> <div class="modal-info"> <div id="modalCategory" class="modal-category"></div> <h2 id="modalName" class="modal-name"></h2> <div id="modalPrice" class="modal-price"></div> <p id="modalDescription" class="modal-description"></p> <div class="modal-action">Add to Cart</div> </div> </div> </div> </div> <script> // Product data const productData = { 1: { name: "Obsidian Wireless Earbuds", category: "Audio", price: "$119", originalPrice: "$149", image: "https://images.unsplash.com/photo-1594035910387-fea47794261f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80", description: "Experience immersive audio with our sleek Obsidian Wireless Earbuds. Featuring 8 hours of battery life, active noise cancellation, and a pocketable charging case in a sophisticated matte black finish." }, 2: { name: "Minimalist Chronograph Watch", category: "Accessories", price: "$249", image: "https://images.unsplash.com/photo-1543512214-318c7553f230?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80", description: "This elegant timepiece combines precision engineering with minimalist design. Featuring a scratch-resistant sapphire crystal face, stainless steel construction, and 50m water resistance – perfect for the modern professional." }, 3: { name: "Carbon Fiber Wallet", category: "Accessories", price: "$79", image: "https://images.unsplash.com/photo-1591337676887-a217a6970a8a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80", description: "Ultra-slim and incredibly durable, our Carbon Fiber Wallet holds up to 12 cards and features RFID blocking technology. Weighing just 25 grams, it's the perfect blend of functionality and sophisticated style." }, 4: { name: "Stealth Noise-Cancelling Headphones", category: "Audio", price: "$195", originalPrice: "$229", image: "https://images.unsplash.com/photo-1565849904461-04a58ad377e0?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80", description: "Immerse yourself in pristine audio with our premium headphones. Featuring 40mm custom drivers, industry-leading noise cancellation, and memory foam ear cushions for all-day comfort during extended listening sessions." }, 5: { name: "Monolith Portable SSD", category: "Tech", price: "$159", image: "https://images.unsplash.com/photo-1593642633279-1796119d5482?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80", description: "Store and transfer files at lightning speed with our Monolith SSD. Encased in a shock-resistant aluminum body, this 1TB drive delivers read/write speeds up to 1000MB/s through USB-C connectivity – all in a pocket-sized form factor." }, 6: { name: "Precision Matte Stylus", category: "Accessories", price: "$59", image: "https://images.unsplash.com/photo-1583394838336-acd977736f90?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80", description: "The ultimate tool for digital artists and note-takers. With 4096 levels of pressure sensitivity and tilt recognition, this stylus offers unparalleled precision on compatible devices. Includes two programmable buttons and USB-C quick charging." } }; // DOM elements const modal = document.getElementById('productModal'); const closeModalBtn = document.querySelector('.close-modal'); const quickViewButtons = document.querySelectorAll('.quick-view'); const modalImage = document.getElementById('modalImage'); const modalCategory = document.getElementById('modalCategory'); const modalName = document.getElementById('modalName'); const modalPrice = document.getElementById('modalPrice'); const modalDescription = document.getElementById('modalDescription'); // Open modal with product data function openModal(productId) { const product = productData[productId]; modalImage.src = product.image; modalImage.alt = product.name; modalCategory.textContent = product.category; modalName.textContent = product.name; if (product.originalPrice) { modalPrice.innerHTML = `<span style="color: var(--accent)">${product.price}</span> <span style="text-decoration: line-through; color: #999; font-size: 1.1rem; font-weight: 400; margin-left: 8px;">${product.originalPrice}</span>`; } else { modalPrice.textContent = product.price; } modalDescription.textContent = product.description; modal.classList.add('active'); document.body.style.overflow = 'hidden'; } // Close modal function closeModal() { modal.classList.remove('active'); document.body.style.overflow = ''; } // Event listeners quickViewButtons.forEach(button => { button.addEventListener('click', (e) => { const productId = e.target.closest('.product').dataset.id; openModal(productId); e.stopPropagation(); }); }); closeModalBtn.addEventListener('click', closeModal); modal.addEventListener('click', (e) => { if (e.target === modal) { closeModal(); } }); // Close modal with escape key document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && modal.classList.contains('active')) { closeModal(); } }); // Add animation when hovering over the product for mobile document.querySelectorAll('.product').forEach(product => { product.addEventListener('touchstart', () => { const nameWrapper = product.querySelector('.product-name-wrapper'); const nameLine = product.querySelector('.product-name-line'); nameLine.style.width = '100%'; nameWrapper.querySelector('.product-name').style.color = 'var(--accent)'; nameLine.style.backgroundColor = 'var(--accent)'; setTimeout(() => { nameLine.style.width = '0'; nameWrapper.querySelector('.product-name').style.color = ''; nameLine.style.backgroundColor = ''; }, 1000); }); }); // Prevent default behavior of modal action document.querySelector('.modal-action').addEventListener('click', (e) => { e.preventDefault(); // Add animation feedback const button = e.target; button.textContent = "Added!"; button.style.backgroundColor = "var(--highlight)"; setTimeout(() => { button.textContent = "Add to Cart"; button.style.backgroundColor = ""; }, 1500); }); </script> </body> </html>
<html> <head> <style> @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; } body { background-color: #0a0a12; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; font-family: 'Orbitron', sans-serif; color: #fff; overflow: hidden; position: relative; } .container { width: 100%; max-width: 700px; height: 700px; padding: 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; } .portal-header { margin-bottom: 40px; text-align: center; position: relative; } .portal-title { font-size: 3.5rem; font-weight: 900; text-transform: uppercase; letter-spacing: 3px; color: #0df; text-shadow: 0 0 10px #0df, 0 0 20px #0df, 0 0 30px #0df; animation: flicker 3s infinite alternate; position: relative; } .portal-title::before { content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: -1; color: #f0f; text-shadow: 0 0 15px #f0f, 0 0 25px #f0f; opacity: 0.7; animation: glitch 5s infinite; } .portal-subtitle { font-size: 1rem; margin-top: 5px; color: #aaf; text-shadow: 0 0 5px #aaf; opacity: 0.8; font-family: 'Press Start 2P', cursive; } .game-grid { display: grid; grid-template-columns: repeat(2, 1fr); grid-gap: 20px; width: 100%; } .game-card { background: rgba(16, 22, 45, 0.6); border: 2px solid #304; border-radius: 10px; overflow: hidden; transition: all 0.3s ease; position: relative; cursor: pointer; height: 150px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 20px; } .game-card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(45deg, #ff00aa22, #00ffcc22); z-index: -1; opacity: 0; transition: opacity 0.5s ease; } .game-card:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 0 25px rgba(0, 255, 255, 0.4), 0 0 10px rgba(255, 0, 255, 0.4); border-color: #f0c; } .game-card:hover::before { opacity: 1; } .game-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; color: #0ff; text-shadow: 0 0 8px #0ff; transition: all 0.3s ease; } .game-card:hover .game-title { animation: pulsate 1.2s infinite alternate; transform: scale(1.05); } .game-description { font-size: 0.8rem; color: #aaf; transition: all 0.3s ease; opacity: 0.8; } .game-card:hover .game-description { color: #fff; opacity: 1; } .status-bar { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); width: 90%; display: flex; justify-content: space-between; align-items: center; font-family: 'Press Start 2P', cursive; font-size: 0.6rem; color: #0df; padding: 10px 20px; background: rgba(0, 0, 20, 0.7); border: 1px solid #304; border-radius: 5px; } .users-online { text-shadow: 0 0 5px #0df; } .time { animation: flicker 2s infinite alternate; } .grid-lines { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(rgba(0, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 0, 255, 0.05) 1px, transparent 1px); background-size: 20px 20px; z-index: -1; pointer-events: none; } .scan-effect { position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: linear-gradient(to right, transparent, #0ff, transparent); opacity: 0.5; animation: scan 3s linear infinite; z-index: 10; pointer-events: none; } .glitch-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: repeating-linear-gradient( transparent 0px, rgba(0, 255, 255, 0.05) 1px, transparent 2px ); pointer-events: none; opacity: 0.3; z-index: 2; } @keyframes flicker { 0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; } 20%, 22%, 24%, 55% { opacity: 0.5; } } @keyframes pulsate { 0% { text-shadow: 0 0 8px #0ff, 0 0 15px #0ff; } 100% { text-shadow: 0 0 10px #0ff, 0 0 20px #0ff, 0 0 30px #0ff; } } @keyframes scan { 0% { top: 0%; } 100% { top: 100%; } } @keyframes glitch { 0%, 100% { transform: translate(0); } 20% { transform: translate(-2px, 2px); } 40% { transform: translate(-2px, -2px); } 60% { transform: translate(2px, 2px); } 80% { transform: translate(2px, -2px); } } @media (max-width: 600px) { .portal-title { font-size: 2.5rem; } .game-grid { grid-template-columns: 1fr; } .status-bar { font-size: 0.5rem; flex-direction: column; gap: 5px; text-align: center; } .game-card { height: 120px; padding: 15px; } .game-title { font-size: 1.2rem; } } </style> </head> <body> <div class="container"> <div class="portal-header"> <h1 class="portal-title" data-text="NEXUS ARCADE">NEXUS ARCADE</h1> <p class="portal-subtitle">ENTER THE GRID • PLAY • CONQUER</p> </div> <div class="game-grid"> <div class="game-card" id="game1"> <h2 class="game-title">NEON DRIFT</h2> <p class="game-description">High-speed racing through cybercity streets with gravity-defying mechanics</p> </div> <div class="game-card" id="game2"> <h2 class="game-title">CYBERBREAK</h2> <p class="game-description">Hack through firewalls in this puzzle-based security breach simulator</p> </div> <div class="game-card" id="game3"> <h2 class="game-title">NEUROMANCER</h2> <p class="game-description">Mind-bending RPG with neural implants and corporate espionage</p> </div> <div class="game-card" id="game4"> <h2 class="game-title">SYNTHWAVE DEFENDER</h2> <p class="game-description">Protect your digital realm from rogue AI in this tower defense game</p> </div> </div> <div class="status-bar"> <div class="users-online">USERS ONLINE: <span id="user-count">4,872</span></div> <div class="time">SYSTEM TIME: <span id="system-time">00:00:00</span></div> </div> <div class="grid-lines"></div> <div class="scan-effect"></div> <div class="glitch-overlay"></div> </div> <script> // Flickering title effect enhancement const title = document.querySelector('.portal-title'); setInterval(() => { if (Math.random() > 0.95) { title.style.opacity = (Math.random() > 0.5) ? 0.7 : 1; setTimeout(() => { title.style.opacity = 1; }, 100); } }, 200); // Game card hover effects const gameCards = document.querySelectorAll('.game-card'); gameCards.forEach(card => { card.addEventListener('mouseenter', () => { const randomDelay = Math.random() * 200; setTimeout(() => { const glitchSound = new Audio(); // Preventing actual sound to avoid annoyance, but the function is here // glitchSound.src = 'data:audio/mp3;base64,...'; // glitchSound.volume = 0.2; // glitchSound.play(); }, randomDelay); // Create glitch effect on hover let glitches = 3; let glitchInterval = setInterval(() => { if (glitches <= 0) { clearInterval(glitchInterval); card.style.transform = 'translateY(-5px) scale(1.02)'; return; } card.style.transform = `translateY(-5px) scale(1.02) translate(${(Math.random() - 0.5) * 10}px, ${(Math.random() - 0.5) * 10}px)`; setTimeout(() => { card.style.transform = 'translateY(-5px) scale(1.02)'; }, 50); glitches--; }, 200); }); card.addEventListener('click', () => { // Create a "loading" effect const originalText = card.querySelector('.game-title').textContent; const loadingText = "LOADING..."; card.querySelector('.game-title').textContent = loadingText; card.style.boxShadow = '0 0 30px rgba(0, 255, 255, 0.7), 0 0 15px rgba(255, 0, 255, 0.7)'; // Simulate loading then reset setTimeout(() => { card.querySelector('.game-title').textContent = originalText; card.style.boxShadow = ''; }, 1500); }); }); // Digital clock function updateClock() { const now = new Date(); const hours = String(now.getHours()).padStart(2, '0'); const minutes = String(now.getMinutes()).padStart(2, '0'); const seconds = String(now.getSeconds()).padStart(2, '0'); document.getElementById('system-time').textContent = `${hours}:${minutes}:${seconds}`; } setInterval(updateClock, 1000); updateClock(); // Simulated user count fluctuation function updateUserCount() { let baseCount = 4872; let fluctuation = Math.floor(Math.random() * 21) - 10; // -10 to +10 let newCount = baseCount + fluctuation; document.getElementById('user-count').textContent = newCount.toLocaleString(); } setInterval(updateUserCount, 3000); // Easter egg - Konami code detector let konamiCode = ['ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowLeft', 'ArrowRight', 'b', 'a']; let konamiPosition = 0; document.addEventListener('keydown', (e) => { if (e.key === konamiCode[konamiPosition]) { konamiPosition++; if (konamiPosition === konamiCode.length) { // Easter egg activation document.body.style.backgroundColor = '#f00'; setTimeout(() => { document.body.style.backgroundColor = '#0a0a12'; document.querySelector('.portal-title').textContent = "GOD MODE"; document.querySelector('.portal-subtitle').textContent = "UNLIMITED POWER ACTIVATED"; // Reset after some time setTimeout(() => { document.querySelector('.portal-title').textContent = "NEXUS ARCADE"; document.querySelector('.portal-subtitle').textContent = "ENTER THE GRID • PLAY • CONQUER"; }, 3000); }, 100); konamiPosition = 0; } } else { konamiPosition = 0; } }); // Random glitch effect throughout the interface setInterval(() => { if (Math.random() > 0.95) { const glitchOverlay = document.querySelector('.glitch-overlay'); glitchOverlay.style.opacity = '0.8'; setTimeout(() => { glitchOverlay.style.opacity = '0.3'; }, 100); } }, 2000); </script> </body> </html>
<html> <head> <title>Academic Insights Journal</title> <style> :root { --primary: #34495e; --secondary: #f1c40f; --tertiary: #3498db; --background: #f9f7f2; --text: #2c3e50; --text-light: #7f8c8d; --serif: 'Playfair Display', Georgia, serif; --sans: 'Source Sans Pro', Helvetica, sans-serif; } * { margin: 0; padding: 0; box-sizing: border-box; } body { background-color: var(--background); color: var(--text); font-family: var(--sans); line-height: 1.6; overflow-x: hidden; padding: 20px; max-width: 700px; margin: 0 auto; height: 700px; overflow-y: auto; } header { margin-bottom: 30px; border-bottom: 2px solid var(--tertiary); padding-bottom: 15px; position: relative; } .site-title { font-family: var(--serif); font-size: 2.2rem; margin-bottom: 5px; color: var(--primary); opacity: 0; transform: translateY(20px); animation: fadeIn 1s forwards 0.2s; } .site-tagline { font-size: 1rem; color: var(--text-light); font-style: italic; opacity: 0; transform: translateY(20px); animation: fadeIn 1s forwards 0.4s; } nav { margin-top: 15px; opacity: 0; animation: fadeIn 0.8s forwards 0.6s; } nav ul { display: flex; list-style: none; gap: 20px; } nav a { color: var(--primary); text-decoration: none; font-size: 0.9rem; font-weight: 600; transition: all 0.3s ease; position: relative; } nav a:after { content: ''; position: absolute; width: 0; height: 2px; bottom: -2px; left: 0; background-color: var(--secondary); transition: width 0.3s ease; } nav a:hover:after { width: 100%; } .article { margin-bottom: 40px; position: relative; opacity: 0; transform: translateY(30px); animation: fadeIn 1s forwards 0.8s; } .date { font-size: 0.8rem; color: var(--text-light); margin-bottom: 5px; letter-spacing: 1px; } .article-title { font-family: var(--serif); font-size: 1.8rem; margin-bottom: 15px; color: var(--primary); line-height: 1.3; opacity: 0; transform: translateY(20px); transition: all 0.5s ease; } .article-title.visible { opacity: 1; transform: translateY(0); } .key-statement { font-family: var(--serif); font-size: 1.2rem; font-style: italic; margin: 20px 0; padding-left: 15px; border-left: 3px solid var(--tertiary); color: var(--primary); opacity: 0; transform: translateY(15px); transition: all 0.6s ease; } .key-statement.visible { opacity: 1; transform: translateY(0); } .article-excerpt { margin-bottom: 20px; color: var(--text); } .read-more { display: inline-block; color: var(--tertiary); text-decoration: none; font-weight: 600; transition: all 0.3s ease; position: relative; } .read-more:hover { color: var(--primary); } .read-more::after { content: '→'; margin-left: 5px; transition: transform 0.3s ease; display: inline-block; } .read-more:hover::after { transform: translateX(5px); } .topic-badge { display: inline-block; padding: 4px 10px; background-color: rgba(52, 152, 219, 0.1); border-radius: 20px; color: var(--tertiary); font-size: 0.75rem; margin-right: 10px; margin-bottom: 10px; border: 1px solid var(--tertiary); transition: all 0.3s ease; } .topic-badge:hover { background-color: var(--tertiary); color: white; cursor: pointer; transform: translateY(-2px); } .reading-progress { height: 4px; background-color: var(--text-light); width: 100%; position: relative; margin-top: 10px; margin-bottom: 15px; border-radius: 2px; } .reading-bar { height: 100%; width: 0; background-color: var(--secondary); position: absolute; left: 0; top: 0; transition: width 0.3s ease; border-radius: 2px; } .reading-time { font-size: 0.8rem; color: var(--text-light); display: flex; align-items: center; margin-bottom: 15px; } .reading-time::before { content: '⏱️'; margin-right: 5px; } .highlight-marker { position: relative; cursor: pointer; } .highlight-marker:hover::after { content: 'Click to highlight'; position: absolute; top: -30px; left: 0; background-color: var(--primary); color: white; padding: 5px 10px; border-radius: 3px; font-size: 0.8rem; white-space: nowrap; } .highlighted { background-color: rgba(241, 196, 15, 0.3); transition: background-color 0.3s ease; } .floating-notes-icon { position: fixed; bottom: 20px; right: 20px; width: 50px; height: 50px; border-radius: 50%; background-color: var(--tertiary); display: flex; align-items: center; justify-content: center; color: white; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: all 0.3s ease; opacity: 0; animation: fadeIn 1s forwards 1.5s; } .floating-notes-icon:hover { transform: translateY(-5px); background-color: var(--primary); box-shadow: 0 6px 15px rgba(0,0,0,0.15); } .notes-panel { position: fixed; top: 0; right: -300px; width: 300px; height: 100%; background-color: white; box-shadow: -2px 0 10px rgba(0,0,0,0.1); padding: 20px; transition: right 0.4s ease; z-index: 1000; } .notes-panel.open { right: 0; } .close-notes { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); } .notes-title { font-family: var(--serif); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid #eee; } .note-input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 10px; font-family: var(--sans); } .save-note { background-color: var(--tertiary); color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; transition: background-color 0.3s ease; } .save-note:hover { background-color: var(--primary); } .saved-notes { margin-top: 20px; } .note-item { padding: 10px; background-color: #f9f9f9; border-radius: 4px; margin-bottom: 10px; font-size: 0.9rem; } .tooltip { position: absolute; background-color: rgba(52, 73, 94, 0.9); color: white; padding: 5px 10px; border-radius: 4px; font-size: 0.8rem; pointer-events: none; opacity: 0; transition: opacity 0.3s ease; z-index: 100; } @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .readability-info { background-color: rgba(52, 152, 219, 0.05); padding: 15px; border-radius: 5px; margin-top: 30px; border-left: 3px solid var(--tertiary); opacity: 0; animation: fadeIn 1s forwards 1.2s; } .readability-info h3 { font-family: var(--serif); color: var(--primary); margin-bottom: 10px; } @media (max-width: 700px) { .site-title { font-size: 1.8rem; } nav ul { flex-wrap: wrap; gap: 15px; } .article-title { font-size: 1.5rem; } .key-statement { font-size: 1.1rem; } } </style> </head> <body> <header> <h1 class="site-title">Academic Insights Journal</h1> <p class="site-tagline">Where scholarly reading meets optimal comprehension</p> <nav> <ul> <li><a href="#" class="nav-link">Education Theory</a></li> <li><a href="#" class="nav-link">Cognitive Science</a></li> <li><a href="#" class="nav-link">Learning Design</a></li> <li><a href="#" class="nav-link">Research Methods</a></li> </ul> </nav> </header> <main> <article class="article"> <div class="date">OCTOBER 12, 2023</div> <h2 class="article-title">The Science of Readability: Typography in Educational Materials</h2> <div class="reading-time">6 min read</div> <div class="reading-progress"> <div class="reading-bar"></div> </div> <div class="topic-badges"> <span class="topic-badge">Typography</span> <span class="topic-badge">Educational Design</span> <span class="topic-badge">Reading Comprehension</span> </div> <p class="article-excerpt">Typography choices significantly impact reading comprehension, retention, and cognitive load. Our recent study of 127 university students revealed that <span class="highlight-marker">serif fonts increased reading speed by 12% while maintaining comprehension rates</span> compared to sans-serif alternatives in long-form educational content.</p> <blockquote class="key-statement">Proper typographic hierarchy establishes a visual roadmap that guides readers through complex educational content, significantly reducing cognitive fatigue.</blockquote> <p class="article-excerpt">The spacing between lines (leading) emerged as particularly critical for digital screens, with our findings showing that <span class="highlight-marker">150% leading yielded optimal results across all device sizes</span>. This challenges the conventional 120-130% leading typically recommended for print materials.</p> <a href="#" class="read-more">Continue reading</a> </article> <article class="article"> <div class="date">OCTOBER 5, 2023</div> <h2 class="article-title">Progressive Disclosure: Layering Information for Deeper Learning</h2> <div class="reading-time">8 min read</div> <div class="reading-progress"> <div class="reading-bar"></div> </div> <div class="topic-badges"> <span class="topic-badge">Information Architecture</span> <span class="topic-badge">Cognitive Load</span> <span class="topic-badge">Visual Learning</span> </div> <p class="article-excerpt">Progressive disclosure techniques in digital learning environments have demonstrated remarkable efficacy in complex subject areas. Our longitudinal study tracked 215 graduate students across three semesters, finding that <span class="highlight-marker">staged information presentation improved concept retention by 28%</span> compared to traditional comprehensive exposure.</p> <blockquote class="key-statement">The carefully timed revelation of information creates cognitive scaffolding that supports knowledge construction while preventing the overwhelming sensation of information overload.</blockquote> <p class="article-excerpt">Interestingly, the most significant gains occurred in theoretical physics and advanced statistical analysis courses, suggesting that progressive disclosure may be particularly valuable for abstract concepts with high intrinsic cognitive load demands.</p> <a href="#" class="read-more">Continue reading</a> </article> <section class="readability-info"> <h3>Understanding Readability Scores</h3> <p>This journal maintains content within a Flesch-Kincaid reading level of 11-13, appropriate for undergraduate to graduate-level audiences. Articles undergo review for optimal paragraph length (3-5 sentences), sentence complexity balance, and technical vocabulary distribution to enhance comprehension without sacrificing academic rigor.</p> </section> </main> <div class="floating-notes-icon">📝</div> <div class="notes-panel"> <button class="close-notes">×</button> <h3 class="notes-title">Reading Notes</h3> <textarea class="note-input" placeholder="Add your thoughts while reading..."></textarea> <button class="save-note">Save Note</button> <div class="saved-notes"></div> </div> <div class="tooltip"></div> <script> document.addEventListener('DOMContentLoaded', function() { // Fade-in effect for article titles and key statements const observerOptions = { root: null, rootMargin: '0px', threshold: 0.1 }; const observer = new IntersectionObserver((entries, observer) => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.classList.add('visible'); observer.unobserve(entry.target); } }); }, observerOptions); document.querySelectorAll('.article-title, .key-statement').forEach(el => { observer.observe(el); }); // Reading progress bar const articles = document.querySelectorAll('.article'); articles.forEach(article => { const progressBar = article.querySelector('.reading-bar'); const updateProgress = () => { const articleRect = article.getBoundingClientRect(); const articleHeight = article.offsetHeight; const viewportHeight = window.innerHeight; let progress = 0; if (articleRect.top <= 0) { // Article is scrolled up const visiblePortion = Math.min(viewportHeight, articleRect.bottom); progress = Math.min(100, (1 - (articleRect.bottom - visiblePortion) / articleHeight) * 100); } else if (articleRect.bottom <= viewportHeight) { // Article is fully visible progress = 100; } else { // Article is partially visible from the top progress = Math.min(100, ((viewportHeight - articleRect.top) / Math.min(articleHeight, viewportHeight)) * 100); } progressBar.style.width = `${progress}%`; }; window.addEventListener('scroll', updateProgress); updateProgress(); // Initial call }); // Highlight text functionality const highlightMarkers = document.querySelectorAll('.highlight-marker'); highlightMarkers.forEach(marker => { marker.addEventListener('click', () => { marker.classList.toggle('highlighted'); }); }); // Notes panel functionality const notesIcon = document.querySelector('.floating-notes-icon'); const notesPanel = document.querySelector('.notes-panel'); const closeNotesBtn = document.querySelector('.close-notes'); const saveNoteBtn = document.querySelector('.save-note'); const noteInput = document.querySelector('.note-input'); const savedNotesContainer = document.querySelector('.saved-notes'); notesIcon.addEventListener('click', () => { notesPanel.classList.add('open'); }); closeNotesBtn.addEventListener('click', () => { notesPanel.classList.remove('open'); }); saveNoteBtn.addEventListener('click', () => { const noteText = noteInput.value.trim(); if (noteText) { const noteElement = document.createElement('div'); noteElement.classList.add('note-item'); noteElement.textContent = noteText; savedNotesContainer.appendChild(noteElement); noteInput.value = ''; } }); // Tooltip on topic badges const topicBadges = document.querySelectorAll('.topic-badge'); const tooltip = document.querySelector('.tooltip'); topicBadges.forEach(badge => { badge.addEventListener('mouseenter', (e) => { const topic = e.target.textContent; tooltip.textContent = `Browse all ${topic} articles`; tooltip.style.opacity = '1'; tooltip.style.top = `${e.pageY - 40}px`; tooltip.style.left = `${e.pageX - 60}px`; }); badge.addEventListener('mouseleave', () => { tooltip.style.opacity = '0'; }); badge.addEventListener('mousemove', (e) => { tooltip.style.top = `${e.pageY - 40}px`; tooltip.style.left = `${e.pageX - 60}px`; }); }); // Initialize nav link hover effect const navLinks = document.querySelectorAll('.nav-link'); navLinks.forEach(link => { link.addEventListener('mouseenter', () => { link.style.color = 'var(--tertiary)'; }); link.addEventListener('mouseleave', () => { link.style.color = 'var(--primary)'; }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> :root { --primary: #0a2540; --secondary: #f2295b; --tertiary: #5533ff; --light: #f0f5ff; --gray: #4a5568; --dark: #1a202c; --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif; } body { background-color: var(--light); color: var(--dark); height: 100vh; overflow-x: hidden; } .container { max-width: 680px; margin: 0 auto; padding: 20px; } header { padding: 20px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.1); display: flex; justify-content: space-between; align-items: center; } .logo { font-weight: 900; font-size: 1.5rem; color: var(--primary); display: flex; align-items: center; position: relative; } .logo::after { content: ''; position: absolute; height: 8px; width: 8px; background: var(--secondary); border-radius: 50%; bottom: 2px; right: -12px; } .date { font-size: 0.9rem; color: var(--gray); font-weight: 500; } .headlines-container { margin: 30px 0; position: relative; overflow: hidden; height: 270px; } .headline { background: white; padding: 15px 20px; margin-bottom: 15px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); opacity: 0; transform: translateX(-20px); transition: all var(--transition); cursor: pointer; position: relative; overflow: hidden; } .headline::before { content: ''; position: absolute; left: -4px; top: 0; height: 100%; width: 4px; background: var(--secondary); transition: transform 0.3s ease; transform: scaleY(0); transform-origin: bottom; } .headline.active { opacity: 1; transform: translateX(0); } .headline:hover { transform: translateX(5px) translateY(-2px); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08); } .headline:hover::before { transform: scaleY(1); } .headline h2 { font-size: 1.2rem; margin-bottom: 8px; font-weight: 700; color: var(--primary); } .headline p { font-size: 0.9rem; color: var(--gray); line-height: 1.5; } .headline .meta { display: flex; justify-content: space-between; margin-top: 10px; font-size: 0.8rem; color: var(--gray); opacity: 0.7; } .categories { display: flex; flex-wrap: wrap; gap: 8px; margin: 25px 0; } .category { background: white; padding: 7px 14px; border-radius: 30px; font-size: 0.8rem; font-weight: 600; color: var(--gray); cursor: pointer; transition: all 0.3s ease; border: 1px solid transparent; } .category:hover, .category.active { background: var(--primary); color: white; } .category.active { border: 1px solid var(--tertiary); } .featured { background: var(--primary); color: white; padding: 25px; border-radius: 10px; margin-bottom: 25px; position: relative; overflow: hidden; transition: all 0.3s ease; cursor: pointer; } .featured:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(10, 37, 64, 0.3); } .featured h1 { font-size: 1.7rem; font-weight: 800; margin-bottom: 15px; position: relative; z-index: 2; line-height: 1.3; } .featured p { font-size: 1rem; margin-bottom: 15px; position: relative; z-index: 2; opacity: 0.9; line-height: 1.5; } .featured .meta { display: flex; gap: 15px; position: relative; z-index: 2; } .featured .meta span { font-size: 0.8rem; opacity: 0.7; } .featured::after { content: ''; position: absolute; right: -30px; bottom: -30px; width: 150px; height: 150px; background: var(--tertiary); opacity: 0.2; border-radius: 50%; transition: all 0.5s ease; } .featured:hover::after { transform: scale(1.5); } .dot-pulse { position: relative; width: 10px; height: 10px; border-radius: 5px; background-color: var(--secondary); color: var(--secondary); display: inline-block; margin-right: 5px; animation: dotPulse 1.5s infinite linear; } @keyframes dotPulse { 0% { box-shadow: 0 0 0 0 rgba(242, 41, 91, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(242, 41, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(242, 41, 91, 0); } } .trending { display: flex; gap: 10px; margin-bottom: 20px; align-items: center; } .trending span { font-weight: 600; font-size: 0.9rem; } @media (max-width: 768px) { .featured h1 { font-size: 1.5rem; } .headlines-container { height: 310px; } } @media (max-width: 480px) { .featured h1 { font-size: 1.3rem; } .headline h2 { font-size: 1.1rem; } .container { padding: 15px; } .headlines-container { height: 350px; } } </style> </head> <body> <div class="container"> <header> <div class="logo">GlobalPulse</div> <div class="date" id="current-date"></div> </header> <div class="trending"> <div class="dot-pulse"></div> <span>TRENDING NOW</span> </div> <div class="featured"> <h1>Climate Summit Reaches Historic Agreement on Carbon Reduction Targets</h1> <p>Delegates from 194 countries have established a new framework for climate action, setting ambitious emission reductions by 2030.</p> <div class="meta"> <span>GLOBAL</span> <span>12 MIN READ</span> </div> </div> <div class="categories"> <div class="category active">All</div> <div class="category">Politics</div> <div class="category">Technology</div> <div class="category">Science</div> <div class="category">Business</div> </div> <div class="headlines-container"> <div class="headline"> <h2>Quantum Computing Breakthrough Could Revolutionize Pharmaceutical Research</h2> <p>Scientists at MIT have demonstrated a stable 128-qubit processor capable of simulating complex molecular structures.</p> <div class="meta"> <span>TECHNOLOGY</span> <span>4 HOURS AGO</span> </div> </div> <div class="headline"> <h2>Global Markets Respond to Central Banks' Coordinated Rate Decision</h2> <p>Stock indices surge as monetary authorities announce synchronized approach to combat inflation without stifling growth.</p> <div class="meta"> <span>BUSINESS</span> <span>6 HOURS AGO</span> </div> </div> <div class="headline"> <h2>Renewable Energy Surpasses Fossil Fuels in Quarterly Power Generation</h2> <p>For the first time, wind, solar and hydroelectric sources have generated more electricity than coal and natural gas combined.</p> <div class="meta"> <span>ENVIRONMENT</span> <span>8 HOURS AGO</span> </div> </div> <div class="headline"> <h2>Artificial Intelligence System Accurately Predicts Supreme Court Decisions</h2> <p>New legal AI platform demonstrates 94% accuracy in anticipating judicial outcomes based on case precedents and argument analysis.</p> <div class="meta"> <span>TECHNOLOGY</span> <span>10 HOURS AGO</span> </div> </div> <div class="headline"> <h2>Space Telescope Discovers Potentially Habitable Exoplanet in Nearby Star System</h2> <p>Astronomers confirm Earth-sized world orbiting within the "Goldilocks zone" of Proxima Centauri, just 4.2 light-years away.</p> <div class="meta"> <span>SCIENCE</span> <span>12 HOURS AGO</span> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Set current date const now = new Date(); const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; document.getElementById('current-date').textContent = now.toLocaleDateString('en-US', options); // Animate headlines sequentially const headlines = document.querySelectorAll('.headline'); function animateHeadlines() { headlines.forEach((headline, index) => { setTimeout(() => { headline.classList.add('active'); }, 200 * index); }); } animateHeadlines(); // Category filtering const categories = document.querySelectorAll('.category'); categories.forEach(category => { category.addEventListener('click', function() { // Remove active class from all categories categories.forEach(c => c.classList.remove('active')); // Add active class to clicked category this.classList.add('active'); // Reset headlines and animate them again headlines.forEach(headline => { headline.classList.remove('active'); }); setTimeout(animateHeadlines, 100); }); }); // Headline hover effect headlines.forEach(headline => { headline.addEventListener('mouseenter', function() { // Add subtle push effect to other headlines headlines.forEach(h => { if (h !== this) { h.style.transform = 'translateX(0)'; h.style.opacity = '0.8'; } }); }); headline.addEventListener('mouseleave', function() { // Restore normal state headlines.forEach(h => { if (h !== this) { h.style.opacity = '1'; } }); }); }); // Auto-rotate headlines every 8 seconds let currentHeadlineIndex = 0; function highlightNextHeadline() { // Remove highlight from all headlines.forEach(h => { h.style.borderLeft = 'none'; h.style.paddingLeft = '20px'; }); // Highlight current currentHeadlineIndex = (currentHeadlineIndex + 1) % headlines.length; const currentHeadline = headlines[currentHeadlineIndex]; currentHeadline.style.borderLeft = '4px solid var(--tertiary)'; currentHeadline.style.paddingLeft = '18px'; // Scroll into view currentHeadline.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); } setInterval(highlightNextHeadline, 8000); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>NEXUS 2049 - Official Microsite</title> <style> @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Roboto+Mono:wght@300;400;600&display=swap'); :root { --primary: #00f0ff; --secondary: #ff006e; --dark: #0a0a14; --light: #edf2f7; --accent: #f0ff00; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Roboto Mono', monospace; background-color: var(--dark); color: var(--light); overflow-x: hidden; height: 100vh; width: 100%; display: flex; justify-content: center; align-items: center; } .container { width: 100%; max-width: 700px; height: 700px; padding: 2rem; display: flex; flex-direction: column; position: relative; overflow: hidden; } .background-grid { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: linear-gradient(rgba(10, 10, 20, 0.9) 1px, transparent 1px), linear-gradient(90deg, rgba(10, 10, 20, 0.9) 1px, transparent 1px); background-size: 20px 20px; z-index: -1; opacity: 0.4; } .glitch-container { margin: 2rem 0; } .movie-title { font-family: 'Orbitron', sans-serif; font-size: 4rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; position: relative; margin: 1rem 0; cursor: pointer; transition: all 0.2s ease; line-height: 1; color: var(--light); text-shadow: 0 0 5px var(--primary); transform-style: preserve-3d; perspective: 100px; } .movie-title:hover { letter-spacing: 0.15em; } .tagline { font-size: 1.2rem; margin-bottom: 2rem; color: var(--primary); text-shadow: 0 0 5px var(--primary); font-weight: 300; max-width: 80%; } .synopsis { max-width: 80%; line-height: 1.6; margin-bottom: 2rem; font-size: 0.9rem; } .cta-button { display: inline-block; padding: 0.8rem 2rem; background-color: transparent; border: 2px solid var(--primary); color: var(--primary); font-family: 'Orbitron', sans-serif; font-weight: 700; text-transform: uppercase; cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s ease; font-size: 1rem; letter-spacing: 0.1em; margin-right: 1rem; margin-bottom: 1rem; } .cta-button:hover { background-color: var(--primary); color: var(--dark); text-shadow: none; box-shadow: 0 0 15px var(--primary); } .cta-button:before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.3), transparent ); transition: 0.5s; } .cta-button:hover:before { left: 100%; } .cta-section { margin-top: auto; } .release-date { font-family: 'Orbitron', sans-serif; margin-top: 1rem; font-size: 1.2rem; letter-spacing: 0.1em; color: var(--accent); } .countdown { font-family: 'Roboto Mono', monospace; font-size: 1.5rem; font-weight: 600; margin-top: 0.5rem; color: var(--light); } .cybernetic-elem { position: absolute; pointer-events: none; opacity: 0.2; z-index: -1; } .circle { width: 300px; height: 300px; border: 1px solid var(--primary); border-radius: 50%; position: absolute; top: -150px; right: -150px; animation: pulse 4s infinite alternate; } .scanner-line { position: absolute; width: 100%; height: 2px; background: linear-gradient(90deg, transparent, var(--primary), transparent); top: 50%; animation: scan 3s ease-in-out infinite; } .dots-matrix { position: absolute; width: 200px; height: 200px; bottom: -50px; left: -50px; background-image: radial-gradient(var(--secondary) 1px, transparent 1px); background-size: 10px 10px; opacity: 0.3; } @keyframes pulse { 0% { transform: scale(1); opacity: 0.2; } 100% { transform: scale(1.1); opacity: 0.4; } } @keyframes scan { 0%, 100% { top: 0; } 50% { top: 100%; } } @media (max-width: 640px) { .movie-title { font-size: 3rem; } .tagline, .synopsis { max-width: 100%; } } @media (max-width: 480px) { .movie-title { font-size: 2.5rem; } .container { padding: 1.5rem; } } </style> </head> <body> <div class="container"> <div class="background-grid"></div> <div class="cybernetic-elem circle"></div> <div class="cybernetic-elem scanner-line"></div> <div class="cybernetic-elem dots-matrix"></div> <div class="glitch-container"> <h1 class="movie-title" id="mainTitle">NEXUS 2049</h1> </div> <p class="tagline">Memory is just code waiting to be rewritten.</p> <p class="synopsis">In a dystopian megalopolis where reality is manufactured and memories are currency, rogue coder Maya Reyes discovers a hidden neural algorithm that could liberate humanity—or delete it altogether. As shadowy corporations hunt her down, Maya must navigate a world where nothing is as it seems, not even her own mind.</p> <div class="cta-section"> <a class="cta-button" id="trailerBtn">Watch Trailer</a> <a class="cta-button" id="experienceBtn">Neural Experience</a> <div class="release-info"> <p class="release-date">GLOBAL RELEASE: DECEMBER 15</p> <p class="countdown" id="countdown">Loading temporal sequence...</p> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', () => { const mainTitle = document.getElementById('mainTitle'); const trailerBtn = document.getElementById('trailerBtn'); const experienceBtn = document.getElementById('experienceBtn'); const countdownEl = document.getElementById('countdown'); // Glitch effect for the title function applyGlitchEffect(element) { // Save original text const originalText = element.textContent; const originalColor = window.getComputedStyle(element).color; // Create glitch layers element.innerHTML = ` <span style="position: absolute; clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%); color: var(--primary);" class="glitch-top">${originalText}</span> <span style="position: absolute; clip-path: polygon(0 45%, 100% 45%, 100% 55%, 0 55%); color: var(--light);" class="glitch-middle">${originalText}</span> <span style="position: absolute; clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%); color: var(--secondary);" class="glitch-bottom">${originalText}</span> <span style="opacity: 0.8;" class="original">${originalText}</span> `; // Create random offsets for glitch layers const glitchInterval = setInterval(() => { const glitchChance = Math.random(); if (glitchChance < 0.1) { const topLayer = element.querySelector('.glitch-top'); const middleLayer = element.querySelector('.glitch-middle'); const bottomLayer = element.querySelector('.glitch-bottom'); // Apply random offsets topLayer.style.transform = `translate(${Math.random() * 10 - 5}px, ${Math.random() * 5 - 2.5}px)`; middleLayer.style.transform = `translate(${Math.random() * 10 - 5}px, ${Math.random() * 5 - 2.5}px)`; bottomLayer.style.transform = `translate(${Math.random() * 10 - 5}px, ${Math.random() * 5 - 2.5}px)`; // Add some text distortion if (Math.random() < 0.3) { const chars = originalText.split(''); const randomChar = Math.floor(Math.random() * chars.length); chars[randomChar] = '█'; const distortedText = chars.join(''); topLayer.textContent = distortedText; middleLayer.textContent = distortedText; bottomLayer.textContent = distortedText; // Reset after a short time setTimeout(() => { topLayer.textContent = originalText; middleLayer.textContent = originalText; bottomLayer.textContent = originalText; }, 100); } // Reset after short time setTimeout(() => { topLayer.style.transform = 'translate(0, 0)'; middleLayer.style.transform = 'translate(0, 0)'; bottomLayer.style.transform = 'translate(0, 0)'; }, 200); } }, 500); // Add event listener for hover effect element.addEventListener('mouseenter', () => { const layers = element.querySelectorAll('span'); layers.forEach(layer => { layer.style.transition = 'transform 0.1s ease-out, color 0.2s ease'; if (layer.classList.contains('glitch-top')) { layer.style.transform = 'translate(-5px, -3px)'; layer.style.color = 'var(--primary)'; } else if (layer.classList.contains('glitch-bottom')) { layer.style.transform = 'translate(5px, 3px)'; layer.style.color = 'var(--secondary)'; } else if (layer.classList.contains('original')) { layer.style.textShadow = '0 0 15px var(--primary)'; } }); // Intensify glitching on hover const hoverGlitch = setInterval(() => { const topLayer = element.querySelector('.glitch-top'); const bottomLayer = element.querySelector('.glitch-bottom'); topLayer.style.transform = `translate(${Math.random() * 15 - 7.5}px, ${Math.random() * 10 - 5}px)`; bottomLayer.style.transform = `translate(${Math.random() * 15 - 7.5}px, ${Math.random() * 10 - 5}px)`; }, 100); element.addEventListener('mouseleave', () => { clearInterval(hoverGlitch); layers.forEach(layer => { layer.style.transform = 'translate(0, 0)'; if (layer.classList.contains('original')) { layer.style.textShadow = '0 0 5px var(--primary)'; } }); }, { once: true }); }); return glitchInterval; } const titleGlitchInterval = applyGlitchEffect(mainTitle); // Countdown timer function updateCountdown() { const releaseDate = new Date('2023-12-15T00:00:00'); const now = new Date(); const diff = releaseDate - now; if (diff <= 0) { countdownEl.textContent = "NOW PLAYING"; return; } const days = Math.floor(diff / (1000 * 60 * 60 * 24)); const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60)); const seconds = Math.floor((diff % (1000 * 60)) / 1000); countdownEl.textContent = `${days}d ${hours}h ${minutes}m ${seconds}s`; } setInterval(updateCountdown, 1000); updateCountdown(); // Button interactions trailerBtn.addEventListener('click', (e) => { e.preventDefault(); trailerBtn.innerHTML = 'Loading<span class="loading-dots">...</span>'; // Simulate loading setTimeout(() => { trailerBtn.innerHTML = 'Watch Trailer'; // In a real implementation, this would launch a video modal alert('Trailer functionality would appear here!'); }, 1500); }); experienceBtn.addEventListener('click', (e) => { e.preventDefault(); experienceBtn.innerHTML = 'Syncing<span class="loading-dots">...</span>'; // Simulate loading setTimeout(() => { experienceBtn.innerHTML = 'Neural Experience'; // In a real implementation, this would launch an interactive experience alert('Neural Experience would launch here!'); }, 1500); }); // Random interference effect function addRandomInterference() { const container = document.querySelector('.container'); const interference = document.createElement('div'); interference.style.position = 'absolute'; interference.style.top = '0'; interference.style.left = '0'; interference.style.width = '100%'; interference.style.height = '100%'; interference.style.background = 'linear-gradient(transparent, rgba(0, 240, 255, 0.1), transparent)'; interference.style.pointerEvents = 'none'; interference.style.zIndex = '100'; interference.style.opacity = '0'; container.appendChild(interference); // Trigger random interference setInterval(() => { if (Math.random() < 0.1) { interference.style.opacity = '1'; interference.style.transform = `translateY(${Math.random() * 100}%)`; setTimeout(() => { interference.style.opacity = '0'; }, 200); } }, 3000); } addRandomInterference(); }); </script> </body> </html>
<html> <head> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background-color: #f8f5f2; color: #232323; overflow: hidden; height: 100vh; width: 100%; display: flex; justify-content: center; align-items: center; } .portfolio-container { width: 100%; max-width: 700px; height: 100%; max-height: 700px; overflow: hidden; position: relative; } .bg-texture { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f8f5f2"/><path d="M0 6 L100 6" stroke="%23e6ddd5" stroke-width="1" stroke-dasharray="1 3"/><path d="M0 26 L100 26" stroke="%23e6ddd5" stroke-width="1" stroke-dasharray="1 3"/><path d="M0 46 L100 46" stroke="%23e6ddd5" stroke-width="1" stroke-dasharray="1 3"/><path d="M0 66 L100 66" stroke="%23e6ddd5" stroke-width="1" stroke-dasharray="1 3"/><path d="M0 86 L100 86" stroke="%23e6ddd5" stroke-width="1" stroke-dasharray="1 3"/></svg>'); opacity: 0.4; z-index: -1; } .ink-splash { position: absolute; width: 200px; height: 200px; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><path d="M100,20c16.6,0,32.8,4.8,46.4,13.9c13.7,9.1,24.2,21.9,30.5,37.1c6.2,15.2,7.5,31.7,3.5,47.5c-4,15.8-12.9,29.9-25.7,40.5 c-25.4,21.1-62.3,24-91.2,7.2C34.8,149.4,20,118.9,25.3,88.5c2.7-15.7,10.1-30.1,21.3-41.2C58,35.9,78.4,20,100,20z" fill="%23d0a89b" /></svg>'); background-size: contain; z-index: -1; opacity: 0.15; animation: rotate 120s infinite linear; transform-origin: center; } @keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .content { padding: 40px; height: 100%; overflow-y: auto; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #d0a89b transparent; } .content::-webkit-scrollbar { width: 5px; } .content::-webkit-scrollbar-track { background: transparent; } .content::-webkit-scrollbar-thumb { background-color: #d0a89b; border-radius: 10px; } .header { margin-bottom: 30px; position: relative; } .brush-title { font-size: 0; margin-bottom: 15px; position: relative; height: 120px; display: flex; align-items: center; } .brush-letter { display: inline-block; font-size: 72px; font-weight: 700; position: relative; color: transparent; -webkit-text-stroke: 1px #232323; opacity: 0; transform: translateY(20px) rotate(var(--rotation)); transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); cursor: default; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin-right: -3px; } .brush-letter::after { content: attr(data-letter); position: absolute; top: 0; left: 0; color: #232323; clip-path: polygon(0 var(--clip, 100%), 100% var(--clip, 100%), 100% 100%, 0 100%); transition: clip-path 0.8s ease; } .brush-letter.active { opacity: 1; transform: translateY(0) rotate(0); } .brush-letter:hover::after { --clip: 0%; } .subtitle { font-size: 18px; color: #666; font-weight: 400; margin-top: 5px; opacity: 0; transform: translateY(10px); transition: all 0.8s ease; transition-delay: 1s; } .subtitle.active { opacity: 1; transform: translateY(0); } .portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 40px; } .project { background: white; border-radius: 12px; overflow: hidden; position: relative; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05); opacity: 0; transform: translateY(20px); transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); cursor: pointer; } .project.active { opacity: 1; transform: translateY(0); } .project:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); } .project-image { height: 160px; background-size: cover; background-position: center; position: relative; overflow: hidden; } .project-image::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.5) 100%); } .project-image .brush-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #232323; transform-origin: left; transform: scaleX(1); z-index: 2; transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1); } .project.active .brush-overlay { transform: scaleX(0); } .project-details { padding: 15px; } .project-title { font-size: 18px; font-weight: 600; margin-bottom: 5px; position: relative; display: inline-block; } .project-title::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: #d0a89b; transition: width 0.3s ease; } .project:hover .project-title::after { width: 100%; } .project-desc { font-size: 14px; color: #666; line-height: 1.4; } .nav-dots { display: flex; justify-content: center; margin-top: 30px; gap: 10px; } .dot { width: 8px; height: 8px; border-radius: 50%; background: #ddd; cursor: pointer; transition: all 0.3s ease; } .dot.active { background: #d0a89b; transform: scale(1.3); } .about-section { margin-top: 50px; position: relative; padding: 30px; border-radius: 12px; background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); opacity: 0; transform: translateY(20px); transition: all 0.5s ease; transition-delay: 1.5s; } .about-section.active { opacity: 1; transform: translateY(0); } .brush-heading { font-size: 28px; margin-bottom: 15px; position: relative; display: inline-block; } .brush-heading::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 3px; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10"><path d="M0,5 C20,0 40,10 60,5 C80,0 90,7 100,5" fill="none" stroke="%23d0a89b" stroke-width="3" stroke-linecap="round"/></svg>'); background-size: 100% 100%; } .about-text { font-size: 16px; line-height: 1.6; color: #444; } .contact-btn { display: inline-block; margin-top: 20px; padding: 10px 25px; background: transparent; border: 2px solid #d0a89b; color: #232323; border-radius: 30px; font-weight: 600; text-decoration: none; transition: all 0.3s ease; position: relative; overflow: hidden; z-index: 1; cursor: pointer; } .contact-btn::before { content: ''; position: absolute; top: 0; left: 0; width: 0; height: 100%; background: #d0a89b; transition: all 0.3s ease; z-index: -1; } .contact-btn:hover { color: white; } .contact-btn:hover::before { width: 100%; } .modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center; background: rgba(0, 0, 0, 0.8); z-index: 100; opacity: 0; pointer-events: none; transition: all 0.3s ease; } .modal.show { opacity: 1; pointer-events: auto; } .modal-content { width: 80%; max-width: 600px; max-height: 80vh; background: white; border-radius: 15px; padding: 30px; overflow-y: auto; transform: translateY(50px); transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1); position: relative; } .modal.show .modal-content { transform: translateY(0); } .close-modal { position: absolute; top: 20px; right: 20px; font-size: 24px; cursor: pointer; color: #999; transition: color 0.3s ease; } .close-modal:hover { color: #232323; } .project-full { margin-top: 20px; } .project-full-image { width: 100%; height: 250px; background-size: cover; background-position: center; border-radius: 10px; margin-bottom: 20px; } .project-full-title { font-size: 24px; font-weight: 600; margin-bottom: 10px; } .project-full-desc { font-size: 16px; line-height: 1.6; color: #444; margin-bottom: 20px; } .project-details-list { list-style: none; margin-bottom: 20px; } .project-details-list li { display: flex; margin-bottom: 10px; font-size: 16px; } .project-details-list li strong { width: 120px; display: inline-block; color: #232323; } @media (max-width: 600px) { .portfolio-grid { grid-template-columns: 1fr; } .brush-title { height: 80px; } .brush-letter { font-size: 48px; } .content { padding: 20px; } .about-section { padding: 20px; } } /* Cursor styles */ .cursor { position: fixed; width: 20px; height: 20px; border-radius: 50%; background-color: rgba(208, 168, 155, 0.5); pointer-events: none; mix-blend-mode: difference; z-index: 999; transition: transform 0.1s ease; transform: translate(-50%, -50%) scale(1); } .cursor-follower { position: fixed; width: 40px; height: 40px; border: 1px solid rgba(208, 168, 155, 0.3); border-radius: 50%; pointer-events: none; z-index: 998; transition: transform 0.3s ease, opacity 0.3s ease; transform: translate(-50%, -50%) scale(1); opacity: 0.5; } .grow { transform: translate(-50%, -50%) scale(2); background-color: rgba(208, 168, 155, 0.2); mix-blend-mode: normal; } .grow-follower { transform: translate(-50%, -50%) scale(0.5); opacity: 0; } /* SVG Brush Stroke Filter */ .filter-container { position: absolute; width: 0; height: 0; overflow: hidden; } </style> </head> <body> <div class="filter-container"> <svg> <filter id="brush-stroke" x="0%" y="0%" width="100%" height="100%"> <feTurbulence type="fractalNoise" baseFrequency="0.01" numOctaves="3" result="noise" /> <feDisplacementMap in="SourceGraphic" in2="noise" scale="5" xChannelSelector="R" yChannelSelector="G" /> </filter> </svg> </div> <div class="cursor"></div> <div class="cursor-follower"></div> <div class="portfolio-container"> <div class="bg-texture"></div> <div class="ink-splash" style="top: 20%; left: 10%;"></div> <div class="ink-splash" style="bottom: 10%; right: 15%; transform: scale(0.7);"></div> <div class="content"> <header class="header"> <div class="brush-title"> <span class="brush-letter" data-letter="C" style="--rotation: -5deg;">C</span> <span class="brush-letter" data-letter="R" style="--rotation: 3deg;">R</span> <span class="brush-letter" data-letter="E" style="--rotation: -2deg;">E</span> <span class="brush-letter" data-letter="A" style="--rotation: 4deg;">A</span> <span class="brush-letter" data-letter="T" style="--rotation: -3deg;">T</span> <span class="brush-letter" data-letter="I" style="--rotation: 2deg;">I</span> <span class="brush-letter" data-letter="V" style="--rotation: -4deg;">V</span> <span class="brush-letter" data-letter="E" style="--rotation: 3deg;">E</span> </div> <p class="subtitle">Fluid & organic visual expressions</p> </header> <div class="portfolio-grid"> <div class="project" data-index="0"> <div class="project-image" style="background-image: url('https://source.unsplash.com/random/600x400?art,brush')"> <div class="brush-overlay"></div> </div> <div class="project-details"> <h3 class="project-title">Brushstroke Series</h3> <p class="project-desc">Experimental typography using traditional ink techniques and digital manipulation.</p> </div> </div> <div class="project" data-index="1"> <div class="project-image" style="background-image: url('https://source.unsplash.com/random/600x400?typography')"> <div class="brush-overlay"></div> </div> <div class="project-details"> <h3 class="project-title">Fluid Typography</h3> <p class="project-desc">Organic lettering designs that blend handwritten elements with dynamic digital effects.</p> </div> </div> <div class="project" data-index="2"> <div class="project-image" style="background-image: url('https://source.unsplash.com/random/600x400?ink')"> <div class="brush-overlay"></div> </div> <div class="project-details"> <h3 class="project-title">Ink Flow Expressions</h3> <p class="project-desc">Visual storytelling through the natural movement of ink on textured surfaces.</p> </div> </div> <div class="project" data-index="3"> <div class="project-image" style="background-image: url('https://source.unsplash.com/random/600x400?calligraphy')"> <div class="brush-overlay"></div> </div> <div class="project-details"> <h3 class="project-title">Textural Calligraphy</h3> <p class="project-desc">Modern interpretations of traditional calligraphy with experimental surfaces.</p> </div> </div> </div> <div class="nav-dots"> <div class="dot active"></div> <div class="dot"></div> </div> <div class="about-section"> <h2 class="brush-heading">About My Process</h2> <p class="about-text">My work explores the boundary between digital precision and organic imperfection. Using custom brushes and hand-drawn elements, I create typography that feels alive and in motion. Each piece begins with physical media—ink, brush, paper—before being transformed digitally while preserving the fluid, spontaneous quality of the original marks.</p> <button class="contact-btn">Get in touch</button> </div> </div> </div> <div class="modal"> <div class="modal-content"> <span class="close-modal">×</span> <div class="project-full"> <div class="project-full-image"></div> <h2 class="project-full-title"></h2> <p class="project-full-desc"></p> <ul class="project-details-list"> <li><strong>Techniques:</strong> <span class="techniques"></span></li> <li><strong>Duration:</strong> <span class="duration"></span></li> <li><strong>Created:</strong> <span class="created"></span></li> </ul> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Custom cursor const cursor = document.querySelector('.cursor'); const cursorFollower = document.querySelector('.cursor-follower'); document.addEventListener('mousemove', function(e) { cursor.style.left = e.clientX + 'px'; cursor.style.top = e.clientY + 'px'; setTimeout(() => { cursorFollower.style.left = e.clientX + 'px'; cursorFollower.style.top = e.clientY + 'px'; }, 100); }); document.addEventListener('mousedown', function() { cursor.classList.add('grow'); cursorFollower.classList.add('grow-follower'); }); document.addEventListener('mouseup', function() { cursor.classList.remove('grow'); cursorFollower.classList.remove('grow-follower'); }); // Elements that should grow the cursor const growElements = document.querySelectorAll('.project, .contact-btn, .dot'); growElements.forEach(element => { element.addEventListener('mouseenter', function() { cursor.classList.add('grow'); cursorFollower.classList.add('grow-follower'); }); element.addEventListener('mouseleave', function() { cursor.classList.remove('grow'); cursorFollower.classList.remove('grow-follower'); }); }); // Animate brush letters const letters = document.querySelectorAll('.brush-letter'); const subtitle = document.querySelector('.subtitle'); setTimeout(() => { letters.forEach((letter, index) => { setTimeout(() => { letter.classList.add('active'); }, 100 * index); }); setTimeout(() => { subtitle.classList.add('active'); }, 100 * letters.length); }, 300); // Show projects with delay const projects = document.querySelectorAll('.project'); setTimeout(() => { projects.forEach((project, index) => { setTimeout(() => { project.classList.add('active'); }, 150 * index); }); }, 800); // Show about section const aboutSection = document.querySelector('.about-section'); setTimeout(() => { aboutSection.classList.add('active'); }, 1500); // Navigation dots const dots = document.querySelectorAll('.dot'); const portfolioGrid = document.querySelector('.portfolio-grid'); dots.forEach((dot, index) => { dot.addEventListener('click', function() { dots.forEach(d => d.classList.remove('active')); this.classList.add('active'); if (index === 0) { // Show first 4 projects portfolioGrid.innerHTML = ` <div class="project active" data-index="0"> <div class="project-image" style="background-image: url('https://source.unsplash.com/random/600x400?art,brush')"> <div class="brush-overlay"></div> </div> <div class="project-details"> <h3 class="project-title">Brushstroke Series</h3> <p class="project-desc">Experimental typography using traditional ink techniques and digital manipulation.</p> </div> </div> <div class="project active" data-index="1"> <div class="project-image" style="background-image: url('https://source.unsplash.com/random/600x400?typography')"> <div class="brush-overlay"></div> </div> <div class="project-details"> <h3 class="project-title">Fluid Typography</h3> <p class="project-desc">Organic lettering designs that blend handwritten elements with dynamic digital effects.</p> </div> </div> <div class="project active" data-index="2"> <div class="project-image" style="background-image: url('https://source.unsplash.com/random/600x400?ink')"> <div class="brush-overlay"></div> </div> <div class="project-details"> <h3 class="project-title">Ink Flow Expressions</h3> <p class="project-desc">Visual storytelling through the natural movement of ink on textured surfaces.</p> </div> </div> <div class="project active" data-index="3"> <div class="project-image" style="background-image: url('https://source.unsplash.com/random/600x400?calligraphy')"> <div class="brush-overlay"></div> </div> <div class="project-details"> <h3 class="project-title">Textural Calligraphy</h3> <p class="project-desc">Modern interpretations of traditional calligraphy with experimental surfaces.</p> </div> </div> `; } else { // Show next 4 projects portfolioGrid.innerHTML = ` <div class="project active" data-index="4"> <div class="project-image" style="background-image: url('https://source.unsplash.com/random/600x400?lettering')"> <div class="brush-overlay"></div> </div> <div class="project-details"> <h3 class="project-title">Organic Letterforms</h3> <p class="project-desc">Experimental character design merging digital precision with hand-drawn imperfections.</p> </div> </div> <div class="project active" data-index="5"> <div class="project-image" style="background-image: url('https://source.unsplash.com/random/600x400?texture')"> <div class="brush-overlay"></div> </div> <div class="project-details"> <h3 class="project-title">Textural Expressions</h3> <p class="project-desc">Exploring the interplay between typography and organic surface textures.</p> </div> </div> <div class="project active" data-index="6"> <div class="project-image" style="background-image: url('https://source.unsplash.com/random/600x400?handwriting')"> <div class="brush-overlay"></div> </div> <div class="project-details"> <h3 class="project-title">Gestural Script</h3> <p class="project-desc">Dynamic handwritten compositions that capture movement and emotional expression.</p> </div> </div> <div class="project active" data-index="7"> <div class="project-image" style="background-image: url('https://source.unsplash.com/random/600x400?painting')"> <div class="brush-overlay"></div> </div> <div class="project-details"> <h3 class="project-title">Painted Narratives</h3> <p class="project-desc">Visual storytelling through integrated typography and painted elements.</p> </div> </div> `; } // Reattach event listeners to new projects attachProjectListeners(); }); }); // Project modal const modal = document.querySelector('.modal'); const closeModal = document.querySelector('.close-modal'); const projectData = [ { title: "Brushstroke Series", desc: "This experimental typographic series explores the intersection of traditional calligraphy and digital manipulation. Each character is individually crafted with Japanese sumi ink on rice paper, then digitized and refined while preserving the authentic imperfections and fluid qualities of the original brushwork. The resulting letterforms balance organic expression with functional readability.", techniques: "Sumi ink, rice paper, digital manipulation", duration: "6 weeks", created: "Spring 2023" }, { title: "Fluid Typography", desc: "This project investigates how typography can embody movement and fluidity. Each composition begins with filming actual ink dispersing in water, then extracting motion patterns to inform the typographic design. The resulting characters appear to flow across the surface with the natural dynamics of liquid, creating an immersive reading experience that feels alive and continuously in motion.", techniques: "Ink dispersal, motion capture, digital composition", duration: "8 weeks", created: "Summer 2023" }, { title: "Ink Flow Expressions", desc: "A visual narrative series that uses the natural behavior of ink on different surfaces to create expressive typographic compositions. By controlling and directing the flow of ink across textured papers and non-absorbent materials, I developed a vocabulary of organic forms that serve as both letterforms and visual storytelling elements.", techniques: "Alcohol inks, yupo paper, controlled flow techniques", duration: "10 weeks", created: "Fall 2022" }, { title: "Textural Calligraphy", desc: "This project reimagines traditional calligraphic practices for contemporary contexts. By developing custom tools that combine brushes with unexpected materials (wire, fabric, sponge), I created a distinctive alphabet that carries strong textural qualities. The resulting type system maintains legibility while offering rich sensory impressions that evoke touch and movement.", techniques: "Custom brush tools, mixed media, digital refinement", duration: "12 weeks", created: "Winter 2023" }, { title: "Organic Letterforms", desc: "An exploration of the balance between structure and spontaneity in type design. Drawing inspiration from biological forms and growth patterns, this alphabet system evolves according to consistent rules while embracing natural variation. Each character follows the same foundational principles but expresses unique characteristics, much like organisms within a species.", techniques: "Generative algorithms, hand refinement, vector manipulation", duration: "8 weeks", created: "Spring 2022" }, { title: "Textural Expressions", desc: "This series examines how surface texture influences typographic communication. By embedding letterforms within diverse materials—ranging from rough concrete to smooth silk—the project demonstrates how the physical qualities of a surface transform our perception and interpretation of written language. The resulting works exist as both visual and tactile experiences.", techniques: "Embossing, material impression, photographic documentation", duration: "14 weeks", created: "Summer 2022" }, { title: "Gestural Script", desc: "A handwriting system designed to capture emotional states through the quality of gesture and movement. Developed through extensive studies of how emotional states affect physical motion, this script allows writers to express not just what words say but how they feel. The resulting alphabet contains subtle variations that can convey complex emotional nuances.", techniques: "Motion studies, brush pen, emotional mapping", duration: "16 weeks", created: "Fall 2021" }, { title: "Painted Narratives", desc: "This collection integrates typography and illustration into seamless storytelling compositions. By treating letters as visual elements that can transform into representational imagery, the boundaries between reading and seeing are deliberately blurred. Each piece tells a complete narrative through this visual language that flows between legible text and expressive painting.", techniques: "Watercolor, digital integration, narrative composition", duration: "20 weeks", created: "Winter 2022" } ]; function attachProjectListeners() { const projectElements = document.querySelectorAll('.project'); projectElements.forEach(project => { project.addEventListener('click', function() { const index = this.getAttribute('data-index'); const data = projectData[index]; // Set modal content document.querySelector('.project-full-image').style.backgroundImage = this.querySelector('.project-image').style.backgroundImage; document.querySelector('.project-full-title').textContent = data.title; document.querySelector('.project-full-desc').textContent = data.desc; document.querySelector('.techniques').textContent = data.techniques; document.querySelector('.duration').textContent = data.duration; document.querySelector('.created').textContent = data.created; // Show modal modal.classList.add('show'); }); }); } attachProjectListeners(); closeModal.addEventListener('click', function() { modal.classList.remove('show'); }); window.addEventListener('click', function(e) { if (e.target === modal) { modal.classList.remove('show'); } }); // Contact button const contactBtn = document.querySelector('.contact-btn'); contactBtn.addEventListener('click', function() { const projectFullTitle = document.querySelector('.project-full-title'); const projectFullDesc = document.querySelector('.project-full-desc'); const projectFullImage = document.querySelector('.project-full-image'); const techniques = document.querySelector('.techniques'); const duration = document.querySelector('.duration'); const created = document.querySelector('.created'); projectFullTitle.textContent = "Let's Work Together"; projectFullDesc.textContent = "I'm currently available for commissioned work and collaborations. Whether you need custom typography, brand expressions, or artistic direction, I'd love to discuss how my organic approach can bring your vision to life."; projectFullImage.style.backgroundImage = "url('https://source.unsplash.com/random/600x400?studio')"; techniques.textContent = "Email, phone, or schedule a meeting"; duration.textContent = "Usually respond within 48 hours"; created.textContent = "Portfolio last updated Summer 2023"; modal.classList.add('show'); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Resonance Music Festival</title> <style> @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700;900&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; } body { background: linear-gradient(135deg, #090418 0%, #1f0d45 100%); color: #fff; overflow: hidden; height: 100vh; width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; } .container { width: 100%; max-width: 700px; height: 700px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px; position: relative; z-index: 1; } .background-noise { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.4; background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iLjc1IiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxwYXRoIGZpbHRlcj0idXJsKCNhKSIgb3BhY2l0eT0iLjA1IiBkPSJNMCAwaDMwMHYzMDBIMHoiLz48L3N2Zz4='); pointer-events: none; z-index: -1; } .festival-title { font-size: 4.5rem; font-weight: 900; margin-bottom: 1rem; text-align: center; position: relative; cursor: pointer; user-select: none; letter-spacing: -0.03em; line-height: 1; text-shadow: 0 0 20px rgba(255, 0, 255, 0.4); } @media (max-width: 600px) { .festival-title { font-size: 3.5rem; } } .festival-subtitle { font-size: 1.2rem; font-weight: 300; margin-bottom: 2rem; text-align: center; opacity: 0.8; max-width: 500px; } .festival-date { font-size: 1.5rem; font-weight: 700; margin-bottom: 2rem; text-align: center; background: linear-gradient(to right, #ff00cc, #3399ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .btn { padding: 12px 30px; background: linear-gradient(90deg, #ff00cc, #3399ff); color: white; border: none; border-radius: 50px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: all 0.3s; text-transform: uppercase; letter-spacing: 1px; position: relative; overflow: hidden; margin: 0.5rem; } .btn:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(255, 0, 255, 0.3); } .btn:active { transform: translateY(-1px); } .btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transition: all 0.6s; } .btn:hover::before { left: 100%; } .buttons { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 1rem; } canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; } .featured-artists { margin-top: 3rem; text-align: center; width: 100%; } .artists-title { font-size: 1.2rem; opacity: 0.7; margin-bottom: 1rem; } .artists-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 600px; margin: 0 auto; } .artist-badge { padding: 8px 16px; background: rgba(255, 255, 255, 0.08); border-radius: 50px; font-size: 0.9rem; transition: all 0.3s; } .artist-badge:hover { background: rgba(255, 255, 255, 0.15); transform: translateY(-3px); } .click-instruction { position: absolute; bottom: 20px; font-size: 0.9rem; color: rgba(255, 255, 255, 0.6); text-align: center; width: 100%; pointer-events: none; animation: pulse 2s infinite; } @keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } } .particle { position: absolute; pointer-events: none; border-radius: 50%; } </style> </head> <body> <div class="background-noise"></div> <canvas id="particleCanvas"></canvas> <div class="container"> <h1 class="festival-title" id="festivalTitle">RESONANCE</h1> <p class="festival-date">AUGUST 17-19, 2024 • ECHO VALLEY</p> <p class="festival-subtitle">Three days of sonic exploration featuring over 60 groundbreaking artists across five immersive stages.</p> <div class="buttons"> <button class="btn" id="ticketsBtn">Get Tickets</button> <button class="btn" id="lineupBtn">Full Lineup</button> </div> <div class="featured-artists"> <p class="artists-title">FEATURING</p> <div class="artists-list"> <div class="artist-badge">Floating Points</div> <div class="artist-badge">Four Tet</div> <div class="artist-badge">Bonobo</div> <div class="artist-badge">Jamie xx</div> <div class="artist-badge">Arca</div> <div class="artist-badge">Kaytranada</div> <div class="artist-badge">Bicep</div> <div class="artist-badge">FKA Twigs</div> <div class="artist-badge">Jon Hopkins</div> </div> </div> </div> <div class="click-instruction">Click title to experience the particle effect</div> <script> document.addEventListener('DOMContentLoaded', function() { const canvas = document.getElementById('particleCanvas'); const ctx = canvas.getContext('2d'); const title = document.getElementById('festivalTitle'); // Set canvas dimensions to match window function resizeCanvas() { canvas.width = window.innerWidth; canvas.height = window.innerHeight; } resizeCanvas(); window.addEventListener('resize', resizeCanvas); // Particle class class Particle { constructor(x, y, color, targetX, targetY, size = 3) { this.x = x; this.y = y; this.originalX = x; this.originalY = y; this.targetX = targetX; this.targetY = targetY; this.color = color; this.size = Math.random() * size + 1; this.vx = (Math.random() - 0.5) * 20; this.vy = (Math.random() - 0.5) * 20; this.gravity = 0.05; this.friction = 0.95; this.inReverse = false; this.delay = Math.random() * 20; this.returning = Math.random() * 60 + 20; this.frame = 0; this.easing = 0.08; } update() { this.frame++; if (this.frame < this.delay) return; if (!this.inReverse) { this.vy += this.gravity; this.vx *= this.friction; this.vy *= this.friction; this.x += this.vx; this.y += this.vy; if (this.frame > this.returning) { this.inReverse = true; } } else { // Ease back to target position this.x += (this.targetX - this.x) * this.easing; this.y += (this.targetY - this.y) * this.easing; } } draw() { if (this.frame < this.delay) return; ctx.fillStyle = this.color; ctx.beginPath(); ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2); ctx.closePath(); ctx.fill(); } reset() { this.x = this.originalX; this.y = this.originalY; this.inReverse = false; this.frame = 0; this.vx = (Math.random() - 0.5) * 20; this.vy = (Math.random() - 0.5) * 20; } } // Create particles based on text function createParticlesFromText(text, x, y) { // Set up canvas for measuring text ctx.font = getComputedStyle(title).font; const textWidth = ctx.measureText(text).width; const fontSize = parseInt(getComputedStyle(title).fontSize); // Create a temporary canvas to draw text and extract pixel data const tempCanvas = document.createElement('canvas'); const tempCtx = tempCanvas.getContext('2d'); tempCanvas.width = textWidth; tempCanvas.height = fontSize * 1.5; tempCtx.font = ctx.font; tempCtx.fillStyle = 'white'; tempCtx.fillText(text, 0, fontSize); const imageData = tempCtx.getImageData(0, 0, tempCanvas.width, tempCanvas.height); const data = imageData.data; // Calculate starting positions const startX = x - textWidth / 2; const startY = y - fontSize / 2; const particles = []; const particleDensity = 1; // Adjust for more/fewer particles // Sample pixels from the text and create particles for (let i = 0; i < data.length; i += 4 * particleDensity) { if (data[i + 3] > 128) { // If pixel is not transparent const pixelX = (i / 4) % tempCanvas.width; const pixelY = Math.floor((i / 4) / tempCanvas.width); // Get a vibrant color const colorChoices = [ `rgb(${255}, ${0}, ${255})`, // Magenta `rgb(${0}, ${255}, ${255})`, // Cyan `rgb(${255}, ${255}, ${0})`, // Yellow `rgb(${255}, ${0}, ${127})`, // Pink `rgb(${0}, ${255}, ${127})`, // Mint `rgb(${127}, ${0}, ${255})`, // Purple `rgb(${255}, ${127}, ${0})`, // Orange ]; const color = colorChoices[Math.floor(Math.random() * colorChoices.length)]; // Position in screen coordinates const screenX = startX + pixelX; const screenY = startY + pixelY; particles.push(new Particle( screenX, screenY, color, screenX, screenY, 3.5 // Particle size )); } } return particles; } let particles = []; let animating = false; // Initialize particles based on title position function initParticles() { const titleRect = title.getBoundingClientRect(); const centerX = titleRect.left + titleRect.width / 2; const centerY = titleRect.top + titleRect.height / 2; particles = createParticlesFromText(title.textContent, centerX, centerY); } // Animation loop function animate() { if (!animating) return; ctx.clearRect(0, 0, canvas.width, canvas.height); let allSettled = true; particles.forEach(particle => { particle.update(); particle.draw(); // Check if particle is still moving if (particle.inReverse && Math.abs(particle.x - particle.targetX) > 0.5 || Math.abs(particle.y - particle.targetY) > 0.5) { allSettled = false; } }); // Stop animation if all particles have settled if (allSettled && animating) { setTimeout(() => { animating = false; title.style.opacity = 1; }, 500); } requestAnimationFrame(animate); } // Handle title click to trigger particle effect title.addEventListener('click', () => { if (animating) return; animating = true; title.style.opacity = 0; // Re-initialize particles if window was resized initParticles(); // Reset particle positions particles.forEach(particle => particle.reset()); // Start animation animate(); }); // Button hover effects const buttons = document.querySelectorAll('.btn'); buttons.forEach(btn => { btn.addEventListener('mouseenter', createButtonParticles); }); function createButtonParticles(e) { const btn = e.target; const rect = btn.getBoundingClientRect(); for (let i = 0; i < 10; i++) { const size = Math.random() * 6 + 2; // Determine a starting position along the button edge const edge = Math.floor(Math.random() * 4); // 0=top, 1=right, 2=bottom, 3=left let x, y; switch(edge) { case 0: // top x = rect.left + Math.random() * rect.width; y = rect.top; break; case 1: // right x = rect.right; y = rect.top + Math.random() * rect.height; break; case 2: // bottom x = rect.left + Math.random() * rect.width; y = rect.bottom; break; case 3: // left x = rect.left; y = rect.top + Math.random() * rect.height; break; } const particle = document.createElement('div'); particle.classList.add('particle'); // Random color based on button gradient const hue1 = 320; // Magenta const hue2 = 210; // Blue const hue = Math.floor(hue1 + Math.random() * (hue2 - hue1)); particle.style.width = `${size}px`; particle.style.height = `${size}px`; particle.style.left = `${x}px`; particle.style.top = `${y}px`; particle.style.background = `hsl(${hue}, 100%, 60%)`; document.body.appendChild(particle); // Animate the particle const angle = Math.random() * Math.PI * 2; const speed = Math.random() * 60 + 30; const vx = Math.cos(angle) * speed; const vy = Math.sin(angle) * speed; gsAnimate(particle, x, y, vx, vy, size); } } function gsAnimate(particle, x, y, vx, vy, size) { let posX = x; let posY = y; let velocityX = vx; let velocityY = vy; let opacity = 1; let scale = 1; requestAnimationFrame(animate); function animate() { // Update position posX += velocityX * 0.02; posY += velocityY * 0.02; // Apply some resistance velocityX *= 0.98; velocityY *= 0.98; // Fade out and shrink opacity -= 0.02; scale -= 0.01; // Update styles particle.style.left = `${posX}px`; particle.style.top = `${posY}px`; particle.style.opacity = opacity; particle.style.transform = `scale(${scale})`; // Continue animation or remove if (opacity > 0) { requestAnimationFrame(animate); } else { particle.remove(); } } } // Initialize the scene initParticles(); // Handle button clicks document.getElementById('ticketsBtn').addEventListener('click', function() { console.log('Tickets button clicked - would normally redirect'); }); document.getElementById('lineupBtn').addEventListener('click', function() { console.log('Lineup button clicked - would normally redirect'); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Retro Typewriter Blog</title> <style> @import url('https://fonts.googleapis.com/css2?family=Special+Elite&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Courier+Prime&display=swap'); :root { --primary-color: #f8f3e9; --text-color: #2d2d2d; --accent-color: #c44536; --paper-texture: #f5efe0; --key-shadow: rgba(0, 0, 0, 0.2); } * { box-sizing: border-box; margin: 0; padding: 0; } body { background-color: var(--primary-color); color: var(--text-color); font-family: 'Courier Prime', monospace; line-height: 1.6; position: relative; height: 100vh; overflow-x: hidden; background-image: radial-gradient(var(--key-shadow) 1px, transparent 1px), radial-gradient(var(--key-shadow) 1px, transparent 1px); background-size: 20px 20px; background-position: 0 0, 10px 10px; display: flex; flex-direction: column; align-items: center; padding: 20px; } .container { max-width: 650px; width: 100%; margin: 0 auto; padding: 2rem; background-color: var(--paper-texture); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); border-radius: 2px; position: relative; overflow: hidden; } .container::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--accent-color), transparent 15%, transparent 85%, var(--accent-color)); } header { text-align: center; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px dashed rgba(0, 0, 0, 0.2); } h1 { font-family: 'Special Elite', cursive; font-size: 2.5rem; margin-bottom: 0.5rem; position: relative; display: inline-block; } h1::after { content: ""; position: absolute; width: 100%; height: 5px; background-color: var(--accent-color); bottom: 0; left: 0; transform: scaleX(0); transform-origin: left; transition: transform 0.5s ease; } .container:hover h1::after { transform: scaleX(1); } .date { font-size: 0.9rem; color: rgba(45, 45, 45, 0.7); font-style: italic; } .content { position: relative; } .typewriter-text { min-height: 300px; position: relative; } p { margin-bottom: 1.5rem; font-size: 1.05rem; position: relative; opacity: 0; } .cursor { display: inline-block; width: 12px; height: 24px; background-color: var(--text-color); margin-left: 2px; animation: blink 1s infinite; position: absolute; transform: translateY(4px); } @keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } } .controls { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px dashed rgba(0, 0, 0, 0.2); } button { background-color: var(--paper-texture); color: var(--text-color); border: 2px solid var(--text-color); border-radius: 4px; padding: 0.5rem 1rem; font-family: 'Special Elite', cursive; font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; } button::before { content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background-color: rgba(196, 69, 54, 0.2); transition: all 0.3s ease; } button:hover::before { left: 0; } button:active { transform: translateY(2px); } .key-sound { display: none; } .speed-control { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; } .speed-label { font-size: 0.9rem; font-family: 'Special Elite', cursive; } .speed-slider { width: 100px; cursor: pointer; accent-color: var(--accent-color); } .paper-edge { height: 12px; background-image: linear-gradient( -45deg, var(--paper-texture) 25%, transparent 25%, transparent 50%, var(--paper-texture) 50%, var(--paper-texture) 75%, transparent 75%, transparent ); background-size: 12px 12px; position: absolute; bottom: -12px; left: 0; right: 0; } .signature { font-family: 'Special Elite', cursive; font-style: italic; text-align: right; margin-top: 1.5rem; } /* Ribbon decoration */ .ribbon { position: absolute; top: -10px; right: -10px; width: 100px; height: 100px; overflow: hidden; } .ribbon-content { position: absolute; top: 25px; right: -25px; background-color: var(--accent-color); color: white; padding: 5px 0; width: 150px; text-align: center; transform: rotate(45deg); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1); font-family: 'Special Elite', cursive; font-size: 0.8rem; } /* Media Queries */ @media (max-width: 700px) { .container { padding: 1.5rem; } h1 { font-size: 2rem; } .controls { flex-direction: column; align-items: center; gap: 0.75rem; } .ribbon { display: none; } } /* Animation for paper insertion */ @keyframes paperInsert { 0% { transform: translateY(-100%); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } } .paper-insert { animation: paperInsert 1.5s ease-out; } /* Key press effect */ .key-press { display: inline-block; position: fixed; background-color: rgba(45, 45, 45, 0.9); color: var(--paper-texture); font-family: 'Special Elite', cursive; padding: 5px 10px; border-radius: 4px; font-size: 0.9rem; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); opacity: 0; transition: all 0.3s ease; z-index: 100; } @keyframes keyPress { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(-20px); opacity: 0; } } </style> </head> <body> <div class="container paper-insert"> <div class="ribbon"> <div class="ribbon-content">Nostalgic</div> </div> <header> <h1>Words That Echo</h1> <div class="date">May 15, 2023 • The Retro Chronicle</div> </header> <div class="content"> <div class="typewriter-text"> <p>Dear reader,</p> <p>There's something magical about the rhythmic clack of typewriter keys — each letter striking the page with purpose and permanence. In today's digital whirlwind, where thoughts are edited, deleted, and rewritten without a trace, I find myself longing for that mechanical authenticity.</p> <p>I still remember my grandfather's Underwood, perched on his oak desk by the window. The weight of each keystroke required intention; there was no room for casual thoughts. Words had to matter because correcting them was a small ordeal in itself.</p> <p>Sometimes I wonder if our thoughts were more deliberate then — when writing was physical, tactile, and irreversible. When a letter meant sitting down, threading paper through metal rollers, and committing ink to page with finality.</p> <p>So I've created this space as a small rebellion against instant perfection. Here, words will appear as they might have on that old Underwood — one character at a time, with rhythm and imperfection baked into every sentence.</p> <p>Welcome to my corner of digital nostalgia. Let's slow down together.</p> <div class="signature">— Eleanor Winters</div> </div> <span class="cursor"></span> </div> <div class="controls"> <button id="restart-btn">Reset Typewriter</button> <button id="speed-toggle">Change Speed</button> <div class="speed-control" style="display: none;"> <span class="speed-label">Slow</span> <input type="range" class="speed-slider" min="20" max="200" value="80"> <span class="speed-label">Fast</span> </div> </div> <div class="paper-edge"></div> </div> <!-- Audio elements for typewriter sounds --> <audio class="key-sound" src="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAASAAAeMwAUFBQUFBQUFBQkJCQkJCQkJCQ0NDQ0NDQ0NDRERERERERERERUVFRUVFRUVFRkZGRkZGRkZGR0dHR0dHR0dHSEhISEhISEhISUlJSUlJSUlJSkpKSkpKSkpKS0tLS0tLS0tLS0xMTExMTExMTU1NTU1NTU1NTk5OTk5OTk5OT09PT09PT09PT///8AAAAATGF2YzU4LjEzAAAAAAAAAAAAAAAAJAUHQ//7UMQAAAshkVxGJGkhrLjoS6QhIvJIxxwiiIiIiIiICEe++++JqqqsREREQ//6kZe/kREQEfUTEf/yEREREiIiPqqqqqqqv4iIiIiI/ERH/9RERPqIiI/5ERE//qq////////6qqqiIiPERERHiIiI8REREREQH1XWtWIiIiIiIiIj6iIiIiREREeIiIj6iIiIiPqIiIiIiIiIiIiIiIiInlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSgAAA//tgxAAADYClS1mMAEIjIjvu4MBkqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlf/+n/+VKgAASJUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlQAAA8gAAAAAVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSoAABUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSuAAAoAAAACpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlf/7UMQ5gA5BrTtnpGspRzRnzPSNaVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqV9SpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSgAAA//tQxDoADYGlN2esayFRNKTM9I1pSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSvvqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUoAAAP/7UMRAAAyBpUVnpGspMzSprPSNaSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSvvqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUoAAAP/7UMREAAxxpUdnpGspIDRp7PSNaSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSvvq5iIURESMlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSgAAA//tQxEYADKGlS2ekaykRNKos9I1pKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVK++rlZAEBAQEBKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSpUqVKlSgAAA" preload="auto"></audio> <audio class="key-sound" src="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAASAAAeMwAUFBQUFBQUFBQkJCQkJCQkJCQ0NDQ0NDQ0NDRERERERERERERUVFRUVFRUVFRkZGRkZGRkZGR0dHR0dHR0dHSEhISEhISEhISUlJSUlJSUlJSkpKSkpKSkpKS0tLS0tLS0tLS0xMTExMTExMTU1NTU1NTU1NTk5OTk5OTk5OT09PT09PT09PT///8AAAAATGF2YzU4LjEzAAAAAAAAAAAAAAAAJAUHAwAAApOfeQevJIVsvJVCsK4j9r0PmxMRERHxERERERERERERERHxERERERERJqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqoiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIv/7UMQAAAr5dx3mJGtBJDCszPYNaIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiI//EREREREREf/xEREREREREREREREREQH/UREREREf/kHQdB0HQdB0HQQAAB0HQdB0HQdB0H/ERH/EREREREf/xEREREREeIiIiIiIj/iIiIiIiPURERERER/xERERERERERH/ERERERERERvVVaqqqqrnlVVaqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqg//tgxAAADZClb12ggAFgLWXsMg5eqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqRERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERESqqqqxEREeIiI8RERAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//tQxDiAC42nQWekbSEksSzs9A2pAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA===" preload="auto"></audio> <audio class="key-sound" src="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAASAAAeMwAUFBQUFBQUFBQkJCQkJCQkJCQ0NDQ0NDQ0NDRERERERERERERUVFRUVFRUVFRkZGRkZGRkZGR0dHR0dHR0dHSEhISEhISEhISUlJSUlJSUlJSkpKSkpKSkpKS0tLS0tLS0tLS0xMTExMTExMTU1NTU1NTU1NTk5OTk5OTk5OT09PT09PT09PT///8AAAAATGF2YzU4LjEzAAAAAAAAAAAAAAAAJATgAADl4s8jFArWIqDx4hGQkREREeIiI/5ERERI/xEREREREf8RIiPiIiIiIiIiIzMzMzMzMzMzyq//qqqqqqqqqqqqqqqqqqqqIiIiIiJ3Hf//iIiIif/2okNEVI+L///qqqqqppppogAAAAAAAKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+1DEBAALMaVTZ6RrQUOv5+zwjWiqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqv/qqqqqqqqqqqqqqqv/qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+2DECwAMLXs/YYRrgVcv5+wwjXCqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq//sQxL4D0qWJPWMwbcAAAAP8AAAARKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq" preload="auto"></audio> <!-- Key press animation element --> <div class="key-press" style="display: none;"></div> <script> document.addEventListener('DOMContentLoaded', function() { const typewriterText = document.querySelector('.typewriter-text'); const paragraphs = typewriterText.querySelectorAll('p, .signature'); const cursor = document.querySelector('.cursor'); const restartBtn = document.getElementById('restart-btn'); const speedToggle = document.getElementById('speed-toggle'); const speedControl = document.querySelector('.speed-control'); const speedSlider = document.querySelector('.speed-slider'); const keySounds = document.querySelectorAll('.key-sound'); const keyPress = document.querySelector('.key-press'); let typingSpeed = 80; // milliseconds between characters let paragraphPause = 800; // pause between paragraphs let currentParagraph = 0; let currentChar = 0; let isTyping = false; let typingInterval; // Initialize cursor position to first paragraph updateCursorPosition(); // Start typing on page load setTimeout(startTyping, 1000); function startTyping() { if (isTyping) return; isTyping = true; typeNextChar(); } function typeNextChar() { // If we've finished all paragraphs if (currentParagraph >= paragraphs.length) { cursor.style.display = 'none'; isTyping = false; return; } const paragraph = paragraphs[currentParagraph]; const text = paragraph.textContent; // Make paragraph visible if it's the first character if (currentChar === 0) { paragraph.style.opacity = '1'; } // If we're done with the current paragraph if (currentChar >= text.length) { currentParagraph++; currentChar = 0; updateCursorPosition(); // Pause before starting next paragraph setTimeout(typeNextChar, paragraphPause); return; } // Play a random key sound playRandomKeySound(); // Show key press animation showKeyPressAnimation(text[currentChar]); // Add character to paragraph updateCursorPosition(); currentChar++; // Vary timing slightly for realism const randomDelay = typingSpeed * (0.8 + Math.random() * 0.4); setTimeout(typeNextChar, randomDelay); } function updateCursorPosition() { if (currentParagraph >= paragraphs.length) return; const paragraph = paragraphs[currentParagraph]; const rect = paragraph.getBoundingClientRect(); // Calculate cursor position if (currentChar === 0) { // Position at the start of paragraph cursor.style.left = `${rect.left}px`; cursor.style.top = `${rect.top + 4}px`; } else { // Create a span to measure text width const tempSpan = document.createElement('span'); tempSpan.style.visibility = 'hidden'; tempSpan.style.position = 'absolute'; tempSpan.style.whiteSpace = 'pre'; tempSpan.style.font = window.getComputedStyle(paragraph).font; tempSpan.textContent = paragraph.textContent.substring(0, currentChar); document.body.appendChild(tempSpan); // Get text width const textWidth = tempSpan.getBoundingClientRect().width; document.body.removeChild(tempSpan); // Position cursor after typed text cursor.style.left = `${rect.left + textWidth}px`; cursor.style.top = `${rect.top + 4}px`; } } function playRandomKeySound() { const soundIndex = Math.floor(Math.random() * keySounds.length); const sound = keySounds[soundIndex]; sound.currentTime = 0; sound.play(); } function showKeyPressAnimation(character) { keyPress.textContent = character; keyPress.style.display = 'inline-block'; // Position the key press animation if (currentParagraph < paragraphs.length) { const paragraph = paragraphs[currentParagraph]; const rect = paragraph.getBoundingClientRect(); keyPress.style.left = `${rect.left + Math.random() * 50}px`; keyPress.style.top = `${rect.top - 30 + Math.random() * 20}px`; keyPress.style.opacity = '1'; keyPress.style.animation = 'none'; keyPress.offsetHeight; // Force reflow keyPress.style.animation = 'keyPress 0.5s forwards'; } } // Event Listeners restartBtn.addEventListener('click', function() { // Reset typing state currentParagraph = 0; currentChar = 0; isTyping = false; // Hide all paragraphs paragraphs.forEach(p => { p.style.opacity = '0'; }); // Reset cursor cursor.style.display = 'inline-block'; updateCursorPosition(); // Start typing again setTimeout(startTyping, 500); }); speedToggle.addEventListener('click', function() { speedControl.style.display = speedControl.style.display === 'none' ? 'flex' : 'none'; }); speedSlider.addEventListener('input', function() { typingSpeed = 220 - parseInt(this.value); // Reverse the scale so higher = faster }); // Handle window resize for responsive cursor positioning window.addEventListener('resize', updateCursorPosition); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Aqua Serenity Wellness & Spa</title> <style> :root { --primary-blue: #55a9d6; --deep-blue: #2a7da2; --light-blue: #c0e3f6; --accent-teal: #4abeb6; --sand: #e8d8c1; --white: #ffffff; --font-main: 'Montserrat', sans-serif; --font-accent: 'Playfair Display', serif; } * { margin: 0; padding: 0; box-sizing: border-box; } @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&family=Playfair+Display:wght@400;500;600&display=swap'); body { font-family: var(--font-main); background: linear-gradient(135deg, var(--light-blue) 0%, var(--white) 60%, var(--sand) 100%); color: #333; display: flex; flex-direction: column; min-height: 700px; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--accent-teal) var(--light-blue); } body::-webkit-scrollbar { width: 8px; } body::-webkit-scrollbar-track { background: var(--light-blue); } body::-webkit-scrollbar-thumb { background-color: var(--accent-teal); border-radius: 10px; } header { padding: 1.5rem; position: relative; overflow: hidden; } .ripple-container { position: relative; text-align: center; padding: 2rem 0; overflow: hidden; } canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; } h1 { font-family: var(--font-accent); font-size: 2.5rem; font-weight: 500; color: var(--deep-blue); z-index: 1; position: relative; margin-bottom: 0.2rem; } .tagline { font-weight: 300; color: var(--deep-blue); margin-bottom: 2rem; font-size: 1rem; opacity: 0; transform: translateY(20px); animation: fadeUp 1s ease-out forwards 0.5s; } main { padding: 0 1.5rem 1.5rem; flex-grow: 1; display: flex; flex-direction: column; } .services { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; margin-bottom: 2rem; } .service-card { background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(10px); border-radius: 12px; padding: 1.5rem; box-shadow: 0 4px 20px rgba(42, 125, 162, 0.1); transition: transform 0.3s ease, box-shadow 0.3s ease; position: relative; overflow: hidden; border: 1px solid rgba(192, 227, 246, 0.5); } .service-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--primary-blue), var(--accent-teal)); transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease; } .service-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(42, 125, 162, 0.2); } .service-card:hover::before { transform: scaleX(1); } .service-card h3 { color: var(--deep-blue); margin-bottom: 0.8rem; font-family: var(--font-accent); font-weight: 500; font-size: 1.2rem; } .service-card p { color: #555; font-size: 0.9rem; line-height: 1.5; } .cta-section { margin-top: auto; padding: 1.5rem; background: linear-gradient(to right, rgba(74, 190, 182, 0.15), rgba(85, 169, 214, 0.15)); border-radius: 12px; text-align: center; } .cta-text { color: var(--deep-blue); margin-bottom: 1.2rem; font-weight: 500; } button { background: linear-gradient(135deg, var(--primary-blue), var(--accent-teal)); border: none; color: white; padding: 0.8rem 2rem; border-radius: 30px; font-family: var(--font-main); font-weight: 500; cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; box-shadow: 0 4px 15px rgba(42, 125, 162, 0.2); position: relative; overflow: hidden; } button::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(rgba(255, 255, 255, 0.2), transparent); transform: translateY(-100%); transition: transform 0.3s ease; } button:hover { transform: translateY(-3px); box-shadow: 0 7px 20px rgba(42, 125, 162, 0.3); } button:hover::after { transform: translateY(0); } .water-bubble { position: absolute; background: radial-gradient(circle at center, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%); border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); z-index: -1; } .loading-animation { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, var(--light-blue) 0%, var(--white) 100%); z-index: 9999; display: flex; justify-content: center; align-items: center; transition: opacity 0.5s ease, visibility 0.5s ease; } .loading-ripple { position: relative; width: 80px; height: 80px; } .loading-ripple div { position: absolute; border: 4px solid var(--primary-blue); opacity: 1; border-radius: 50%; animation: loading-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite; } .loading-ripple div:nth-child(2) { animation-delay: -0.5s; } @keyframes loading-ripple { 0% { top: 36px; left: 36px; width: 0; height: 0; opacity: 1; } 100% { top: 0px; left: 0px; width: 72px; height: 72px; opacity: 0; } } .hidden { opacity: 0; visibility: hidden; } @keyframes fadeUp { to { opacity: 1; transform: translateY(0); } } @keyframes pulsate { 0% { box-shadow: 0 0 0 0 rgba(74, 190, 182, 0.4); } 70% { box-shadow: 0 0 0 15px rgba(74, 190, 182, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 190, 182, 0); } } .special-offer { position: absolute; top: 20px; right: 20px; background: var(--accent-teal); color: white; font-size: 0.8rem; padding: 0.5rem 1rem; border-radius: 20px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); animation: pulsate 2s infinite; cursor: pointer; z-index: 10; } @media (max-width: 700px) { h1 { font-size: 2rem; } .services { grid-template-columns: 1fr; } .special-offer { top: 10px; right: 10px; font-size: 0.7rem; } } @media (max-width: 400px) { h1 { font-size: 1.7rem; } .tagline { font-size: 0.9rem; } .service-card { padding: 1.2rem; } } </style> </head> <body> <div class="loading-animation"> <div class="loading-ripple"> <div></div> <div></div> </div> </div> <div class="special-offer"> Summer Special: 25% Off </div> <header> <div class="ripple-container"> <canvas id="rippleCanvas"></canvas> <h1>Aqua Serenity</h1> <p class="tagline">Where tranquility flows and restoration begins</p> </div> </header> <main> <div class="services"> <div class="service-card"> <h3>Hydration Therapy</h3> <p>Our signature therapy uses mineral-infused water pressure to stimulate circulation and rejuvenate tired skin. The 60-minute treatment includes a warm bamboo compress finale.</p> </div> <div class="service-card"> <h3>Ocean Essence Facial</h3> <p>Marine extracts and seaweed enzymes gently exfoliate while blue spirulina mask delivers deep hydration. Includes our exclusive water crystal massage technique.</p> </div> <div class="service-card"> <h3>Floating Meditation</h3> <p>Experience weightlessness in our mineral-rich flotation pods. This 45-minute session reduces cortisol levels and promotes theta wave brain activity for deep relaxation.</p> </div> </div> <div class="cta-section"> <p class="cta-text">Ready to immerse yourself in tranquility?</p> <button id="bookButton">Book Your Experience</button> </div> </main> <script> // Loading Animation window.addEventListener('load', () => { setTimeout(() => { document.querySelector('.loading-animation').classList.add('hidden'); }, 1500); }); // Ripple Effect Canvas const canvas = document.getElementById('rippleCanvas'); const ctx = canvas.getContext('2d'); let ripples = []; let mousePos = { x: 0, y: 0 }; let lastRippleTime = 0; const rippleInterval = 300; // ms between auto ripples // Resize the canvas to fit container function resizeCanvas() { const container = canvas.parentElement; canvas.width = container.offsetWidth; canvas.height = container.offsetHeight; } window.addEventListener('resize', resizeCanvas); resizeCanvas(); // Initial sizing // Text positions for ripple effect const h1 = document.querySelector('h1'); const h1Rect = h1.getBoundingClientRect(); const containerRect = canvas.parentElement.getBoundingClientRect(); const textPositions = [ { x: containerRect.width / 2, y: h1Rect.top - containerRect.top + h1Rect.height / 2 } ]; // Create a ripple function createRipple(x, y) { const size = Math.random() * 2 + 2; ripples.push({ x, y, size, alpha: 1, maxRadius: Math.random() * 50 + 50, radius: 0, speed: Math.random() * 2 + 1 }); } // Automatic ripples at text positions function autoRipples() { const now = Date.now(); if (now - lastRippleTime > rippleInterval) { const pos = textPositions[Math.floor(Math.random() * textPositions.length)]; const offsetX = (Math.random() - 0.5) * 80; const offsetY = (Math.random() - 0.5) * 20; createRipple(pos.x + offsetX, pos.y + offsetY); lastRippleTime = now; } } // Animation loop function animate() { ctx.clearRect(0, 0, canvas.width, canvas.height); for (let i = 0; i < ripples.length; i++) { const r = ripples[i]; r.radius += r.speed; r.alpha = 1 - r.radius / r.maxRadius; if (r.alpha <= 0) { ripples.splice(i, 1); i--; continue; } ctx.beginPath(); ctx.arc(r.x, r.y, r.radius, 0, Math.PI * 2); ctx.strokeStyle = `rgba(85, 169, 214, ${r.alpha * 0.5})`; ctx.lineWidth = r.size; ctx.stroke(); } autoRipples(); requestAnimationFrame(animate); } // Mouse movement creates ripples canvas.addEventListener('mousemove', (e) => { const rect = canvas.getBoundingClientRect(); mousePos.x = e.clientX - rect.left; mousePos.y = e.clientY - rect.top; const now = Date.now(); if (now - lastRippleTime > 100) { // Less frequent ripples on mouse move createRipple(mousePos.x, mousePos.y); lastRippleTime = now; } }); // Water bubble effect on hover document.querySelectorAll('.service-card').forEach(card => { card.addEventListener('mousemove', (e) => { const x = e.clientX; const y = e.clientY; const card = e.currentTarget; // Remove previous bubbles const oldBubble = card.querySelector('.water-bubble'); if (oldBubble) oldBubble.remove(); // Create new bubble const bubble = document.createElement('div'); bubble.classList.add('water-bubble'); bubble.style.width = '100px'; bubble.style.height = '100px'; bubble.style.left = `${x}px`; bubble.style.top = `${y}px`; bubble.style.opacity = '0.6'; card.appendChild(bubble); // Fade out bubble setTimeout(() => { bubble.style.transition = 'opacity 0.8s ease'; bubble.style.opacity = '0'; setTimeout(() => bubble.remove(), 800); }, 100); }); }); // Book button effect const bookButton = document.getElementById('bookButton'); bookButton.addEventListener('click', (e) => { e.preventDefault(); // Create ripple effect from the button const buttonRect = bookButton.getBoundingClientRect(); const canvasRect = canvas.getBoundingClientRect(); // Calculate button center in canvas coordinates const buttonCenterX = buttonRect.left + buttonRect.width/2 - canvasRect.left; const buttonCenterY = buttonRect.top + buttonRect.height/2 - canvasRect.top; // Create multiple ripples from button for (let i = 0; i < 5; i++) { setTimeout(() => { createRipple( buttonCenterX + (Math.random() - 0.5) * 20, buttonCenterY + (Math.random() - 0.5) * 20 ); }, i * 100); } // Visual feedback bookButton.textContent = "Request Sent!"; setTimeout(() => { bookButton.textContent = "Book Your Experience"; }, 2000); }); // Special offer pulsing effect const specialOffer = document.querySelector('.special-offer'); specialOffer.addEventListener('click', () => { specialOffer.textContent = "Code: SUMMER25"; setTimeout(() => { specialOffer.textContent = "Summer Special: 25% Off"; }, 3000); }); // Start animation animate(); </script> </body> </html>