523 lines
23 KiB
HTML
523 lines
23 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Maksym Buz - Making Technology Work</title>
|
|
<link rel="icon" type="image/png" href="favicon.png">
|
|
<style>
|
|
/* --- Google Font Import --- */
|
|
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Inter:wght@400;500;600&display=swap');
|
|
|
|
/* --- CSS Variables (Root) --- */
|
|
:root {
|
|
--bg-dark-blue: #121826;
|
|
--bg-light-blue: #1A2035;
|
|
--text-color: #E0E0E0;
|
|
--accent-color: #00BFFF;
|
|
--card-bg-color: #1A2035;
|
|
--header-font: 'Montserrat', sans-serif;
|
|
--body-font: 'Inter', sans-serif;
|
|
}
|
|
|
|
/* --- Base & Reset --- */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html {
|
|
scroll-behavior: smooth;
|
|
}
|
|
|
|
/* FIX: Body now has a gradient for a smooth transition from hero to content */
|
|
body {
|
|
background: linear-gradient(180deg, var(--bg-light-blue) 0%, var(--bg-dark-blue) 30%);
|
|
color: var(--text-color);
|
|
font-family: var(--body-font);
|
|
line-height: 1.7;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
/* The modal-open class will be toggled on the body */
|
|
body.modal-open {
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* --- Dynamic Background --- */
|
|
/* FIX: Background is now absolute, so it scrolls with the page */
|
|
#dynamic-bg {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: -1;
|
|
}
|
|
|
|
/* --- The Engine Room (Hero Section) --- */
|
|
.engine-room {
|
|
height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
text-align: center;
|
|
position: relative;
|
|
padding: 0 1rem;
|
|
}
|
|
|
|
/* FIX: Re-added a soft overlay for text readability */
|
|
.engine-room::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: radial-gradient(ellipse at center, rgba(26, 32, 53, 0.4) 0%, rgba(18, 24, 38, 0.9) 80%);
|
|
z-index: 0;
|
|
}
|
|
|
|
.hero-content {
|
|
position: relative;
|
|
z-index: 1;
|
|
animation: fadeIn 1.5s ease-out;
|
|
}
|
|
|
|
.engine-room h1 {
|
|
font-family: var(--header-font);
|
|
font-size: clamp(3rem, 7vw, 6rem);
|
|
font-weight: 900;
|
|
letter-spacing: -2px;
|
|
margin-bottom: 1rem;
|
|
text-shadow: 0 0 20px rgba(0, 191, 255, 0.3);
|
|
}
|
|
|
|
.scroll-cue {
|
|
position: absolute;
|
|
bottom: 2rem;
|
|
z-index: 1;
|
|
color: var(--text-color);
|
|
text-decoration: none;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
animation: pulse 2s infinite;
|
|
}
|
|
|
|
/* --- The Toolkit (Main Content) --- */
|
|
.toolkit {
|
|
max-width: 960px;
|
|
margin: 0 auto;
|
|
padding: 6rem 1.5rem;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.section {
|
|
margin-bottom: 5rem;
|
|
opacity: 0;
|
|
transform: translateY(30px);
|
|
transition: opacity 0.6s ease-out, transform 0.6s ease-out;
|
|
}
|
|
|
|
.section.is-visible {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.profile-header {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
text-align: center;
|
|
margin-bottom: 4rem;
|
|
}
|
|
|
|
.profile-pic {
|
|
width: 150px;
|
|
height: 150px;
|
|
border-radius: 50%;
|
|
border: 4px solid var(--accent-color);
|
|
margin-bottom: 1.5rem;
|
|
box-shadow: 0 0 25px rgba(0, 191, 255, 0.3);
|
|
object-fit: cover; /* Ensures the image covers the area without distortion */
|
|
}
|
|
|
|
.contact-links {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 2rem;
|
|
margin-top: 2rem;
|
|
}
|
|
|
|
.contact-links a:hover {
|
|
transform: translateY(-3px);
|
|
}
|
|
|
|
.section-title {
|
|
font-family: var(--header-font);
|
|
font-size: 2.5rem;
|
|
margin-bottom: 2.5rem;
|
|
text-align: center;
|
|
position: relative;
|
|
}
|
|
|
|
.section-title::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: -10px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 80px;
|
|
height: 4px;
|
|
background-color: var(--accent-color);
|
|
}
|
|
|
|
/* --- FIX: Restyled Technologies section for a balanced 2x2 grid --- */
|
|
.technologies-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
grid-auto-rows: 1fr; /* Ensures all cards in the grid have the same height */
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
.card {
|
|
background-color: var(--card-bg-color);
|
|
padding: 2rem;
|
|
border-radius: 12px;
|
|
border: 1px solid #2a3149;
|
|
transition: transform 0.3s ease, border-color 0.3s ease;
|
|
display: flex;
|
|
flex-direction: column; /* Align content inside card */
|
|
}
|
|
|
|
.card:hover {
|
|
transform: translateY(-5px);
|
|
border-color: var(--accent-color);
|
|
}
|
|
|
|
.card h3 {
|
|
font-family: var(--header-font);
|
|
font-size: 1.5rem;
|
|
color: var(--accent-color);
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.skill-tags {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.75rem;
|
|
margin-top: auto; /* Pushes tags to the bottom of the card */
|
|
}
|
|
|
|
/* FIX: New styles for Homelab list items */
|
|
.homelab-list {
|
|
list-style: none;
|
|
margin-top: 1.5rem;
|
|
margin-bottom: 1.5rem;
|
|
text-align: left;
|
|
}
|
|
|
|
.homelab-list li {
|
|
position: relative;
|
|
padding-left: 2rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.homelab-list li::before {
|
|
content: '⚙️'; /* Gear emoji as bullet point */
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.homelab-goal {
|
|
font-style: italic;
|
|
opacity: 0.8;
|
|
margin-top: 1.5rem;
|
|
}
|
|
|
|
/* --- NEW: Modal Styles --- */
|
|
.modal-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.7);
|
|
backdrop-filter: blur(5px);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
z-index: 1000;
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
transition: opacity 0.3s ease, visibility 0.3s ease;
|
|
}
|
|
|
|
body.modal-open .modal-overlay {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
}
|
|
|
|
.modal-content {
|
|
background-color: var(--card-bg-color);
|
|
padding: 3rem;
|
|
border-radius: 12px;
|
|
border: 1px solid var(--accent-color);
|
|
position: relative;
|
|
text-align: center;
|
|
transform: scale(0.9);
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
body.modal-open .modal-content {
|
|
transform: scale(1);
|
|
}
|
|
|
|
.modal-close {
|
|
position: absolute;
|
|
top: 1rem;
|
|
right: 1rem;
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-color);
|
|
font-size: 2rem;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.modal-content h2 {
|
|
font-family: var(--header-font);
|
|
color: var(--accent-color);
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
/* --- Responsive Design --- */
|
|
@media (max-width: 768px) {
|
|
.technologies-grid {
|
|
grid-template-columns: 1fr; /* Stack cards on mobile */
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<canvas id="dynamic-bg"></canvas>
|
|
|
|
<header class="engine-room" id="home">
|
|
<div class="hero-content">
|
|
<h1>Making Technology Work</h1>
|
|
</div>
|
|
<a href="#toolkit" class="scroll-cue">
|
|
<span>Explore the Toolkit</span>
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="24" height="24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3" />
|
|
</svg>
|
|
</a>
|
|
</header>
|
|
|
|
<main class="toolkit" id="toolkit">
|
|
|
|
<section class="profile-header section">
|
|
<img src="profile.jpg" alt="Maksym Buz Profile Picture" class="profile-pic">
|
|
<h1>Maksym Buz</h1>
|
|
<div class="contact-links">
|
|
<a href="mailto:buz.maxim@gmail.com" title="Email"><svg viewBox="0 0 24 24" fill="currentColor" width="32" height="32"><path d="M1.5 4.5h21A1.5 1.5 0 0 1 24 6v12a1.5 1.5 0 0 1-1.5 1.5H1.5A1.5 1.5 0 0 1 0 18V6a1.5 1.5 0 0 1 1.5-1.5ZM21 5.5H3a.5.5 0 0 0-.492.576l9 7.5a.5.5 0 0 0 .492.001l9-7.5A.5.5 0 0 0 21 5.5Z"/></svg></a>
|
|
<a href="https://www.linkedin.com/in/maksym-buz/" target="_blank" rel="noopener noreferrer" title="LinkedIn"><svg viewBox="0 0 24 24" fill="currentColor" width="32" height="32"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.225 0z"/></svg></a>
|
|
<a href="https://git.mbuz.uk/Homelab" target="_blank" rel="noopener noreferrer" title="Git"><svg viewBox="0 0 24 24" fill="currentColor" width="32" height="32"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg></a>
|
|
<a href="https://t.me/mx_bz" target="_blank" rel="noopener noreferrer" title="Telegram"><svg viewBox="0 0 24 24" fill="currentColor" width="32" height="32"><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.17.91-.494 1.202-.82 1.23-.698.054-1.22-.43-1.864-.848-.994-.65-1.55-1.05-2.52-1.682a.295.295 0 0 1-.088-.187l.002-.002c.02-.193.18-1.63.18-1.63l4.125-3.824a.43.43 0 0 0-.14-.333.433.433 0 0 0-.376-.027l-5.12 3.22a2.31 2.31 0 0 1-1.012.318.89.89 0 0 1-.72-.315c-.2-.224-.27-.453-.25-.662.015-.17.06-.39.13-.666l2.12-6.72a2.034 2.034 0 0 1 .64-1.1c.32-.27.703-.418 1.14-.418.12-.002.39.01.69.055z"/></svg></a>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="section">
|
|
<h2 class="section-title">Technologies & Tools</h2>
|
|
<div class="technologies-grid">
|
|
<div class="card">
|
|
<h3>Core Languages</h3>
|
|
<div class="skill-tags"><span class="tag">Python</span><span class="tag">Bash</span><span class="tag">SQL</span></div>
|
|
</div>
|
|
<div class="card">
|
|
<h3>Infrastructure & Automation</h3>
|
|
<div class="skill-tags"><span class="tag">Linux</span><span class="tag">Ansible</span><span class="tag">Docker</span><span class="tag">Proxmox</span><span class="tag">Git</span><span class="tag">IaC Principles</span></div>
|
|
</div>
|
|
<div class="card">
|
|
<h3>Monitoring & Observability</h3>
|
|
<div class="skill-tags"><span class="tag">Zabbix</span><span class="tag">SNMP</span></div>
|
|
</div>
|
|
<div class="card">
|
|
<h3>Databases & APIs</h3>
|
|
<div class="skill-tags"><span class="tag">PostgreSQL</span><span class="tag">MySQL</span><span class="tag">REST API</span><span class="tag">JSON</span></div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="section">
|
|
<h2 class="section-title">Professional Experience</h2>
|
|
<div class="card experience-card">
|
|
<p style="font-size: 1.1rem; opacity: 0.9;">A results-oriented engineer with a proven track record in both corporate IT and specialized product environments. My career is focused on enhancing system reliability, automating complex processes, and delivering high-value, turnkey projects.</p>
|
|
<br>
|
|
<ul class="experience-list">
|
|
<li>Led the end-to-end delivery of enterprise-grade monitoring solutions, ensuring stability for high-stakes client infrastructures.</li>
|
|
<li>Developed robust automation scripts (Python, Bash, Ansible) that significantly reduced manual deployment times and operational errors.</li>
|
|
<li>Managed and synchronized critical business systems (CRM, HR), performing complex database upgrades, migrations, and root cause analysis (RCA).</li>
|
|
<li>Acted as a key technical resource, mentoring team members, assisting sales with expert insights, and delivering public webinars as a certified trainer.</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="section">
|
|
<h2 class="section-title">Personal R&D: The Homelab</h2>
|
|
<div class="card homelab-section">
|
|
<p>Beyond professional duties, my passion for engineering thrives in my Homelab. It's my dedicated space for hands-on experimentation and mastering complex system deployments. Key features include:</p>
|
|
<ul class="homelab-list">
|
|
<li>A multi-node virtualization environment using Proxmox and Docker.</li>
|
|
<li>A self-contained Git service for personal project version control.</li>
|
|
<li>Dozens of self-hosted multimedia and productivity services.</li>
|
|
</ul>
|
|
<p class="homelab-goal">My primary objective is the complete automation of this entire infrastructure.</p>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="cta-section section">
|
|
<button id="cta-button" class="cta-button">Let's Build a Solution</button>
|
|
</section>
|
|
</main>
|
|
|
|
<div id="contact-modal" class="modal-overlay">
|
|
<div class="modal-content">
|
|
<button id="close-modal" class="modal-close">×</button>
|
|
<h2>Contact Me</h2>
|
|
<div class="contact-links">
|
|
<a href="mailto:buz.maxim@gmail.com" title="Email"><svg viewBox="0 0 24 24" fill="currentColor" width="32" height="32"><path d="M1.5 4.5h21A1.5 1.5 0 0 1 24 6v12a1.5 1.5 0 0 1-1.5 1.5H1.5A1.5 1.5 0 0 1 0 18V6a1.5 1.5 0 0 1 1.5-1.5ZM21 5.5H3a.5.5 0 0 0-.492.576l9 7.5a.5.5 0 0 0 .492.001l9-7.5A.5.5 0 0 0 21 5.5Z"/></svg></a>
|
|
<a href="https://www.linkedin.com/in/maksym-buz/" target="_blank" rel="noopener noreferrer" title="LinkedIn"><svg viewBox="0 0 24 24" fill="currentColor" width="32" height="32"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.225 0z"/></svg></a>
|
|
<a href="https://git.mbuz.uk/Homelab" target="_blank" rel="noopener noreferrer" title="Git"><svg viewBox="0 0 24 24" fill="currentColor" width="32" height="32"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg></a>
|
|
<a href="https://t.me/mx_bz" target="_blank" rel="noopener noreferrer" title="Telegram"><svg viewBox="0 0 24 24" fill="currentColor" width="32" height="32"><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.17.91-.494 1.202-.82 1.23-.698.054-1.22-.43-1.864-.848-.994-.65-1.55-1.05-2.52-1.682a.295.295 0 0 1-.088-.187l.002-.002c.02-.193.18-1.63.18-1.63l4.125-3.824a.43.43 0 0 0-.14-.333.433.433 0 0 0-.376-.027l-5.12 3.22a2.31 2.31 0 0 1-1.012.318.89.89 0 0 1-.72-.315c-.2-.224-.27-.453-.25-.662.015-.17.06-.39.13-.666l2.12-6.72a2.034 2.034 0 0 1 .64-1.1c.32-.27.703-.418 1.14-.418.12-.002.39.01.69.055z"/></svg></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// --- Dynamic Background Script ---
|
|
const canvas = document.getElementById('dynamic-bg');
|
|
const ctx = canvas.getContext('2d');
|
|
let animationFrameId;
|
|
|
|
function setupCanvas() {
|
|
canvas.width = window.innerWidth;
|
|
canvas.height = document.documentElement.scrollHeight; // Make canvas as tall as the whole page
|
|
particlesArray = [];
|
|
let numberOfParticles = (canvas.height * canvas.width) / 12000; // Adjusted density
|
|
for (let i = 0; i < numberOfParticles; i++) {
|
|
let size = (Math.random() * 2) + 1;
|
|
let x = (Math.random() * ((innerWidth - size * 2) - (size * 2)) + size * 2);
|
|
let y = (Math.random() * ((innerHeight - size * 2) - (size * 2)) + size * 2);
|
|
let directionX = (Math.random() * 0.4) - 0.2;
|
|
let directionY = (Math.random() * 0.4) - 0.2;
|
|
particlesArray.push(new Particle(x, y, directionX, directionY, size));
|
|
}
|
|
}
|
|
|
|
class Particle {
|
|
constructor(x, y, directionX, directionY, size) {
|
|
this.x = x;
|
|
this.y = y;
|
|
this.directionX = directionX;
|
|
this.directionY = directionY;
|
|
this.size = size;
|
|
}
|
|
draw() {
|
|
ctx.beginPath();
|
|
ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2, false);
|
|
ctx.fillStyle = 'rgba(0, 191, 255, 0.5)';
|
|
ctx.fill();
|
|
}
|
|
update() {
|
|
if (this.x > canvas.width || this.x < 0) { this.directionX = -this.directionX; }
|
|
if (this.y > canvas.height || this.y < 0) { this.directionY = -this.directionY; }
|
|
this.x += this.directionX;
|
|
this.y += this.directionY;
|
|
this.draw();
|
|
}
|
|
}
|
|
|
|
function connect() {
|
|
let opacityValue = 1;
|
|
for (let a = 0; a < particlesArray.length; a++) {
|
|
for (let b = a; b < particlesArray.length; b++) {
|
|
let distance = ((particlesArray[a].x - particlesArray[b].x) ** 2) + ((particlesArray[a].y - particlesArray[b].y) ** 2);
|
|
if (distance < (canvas.width / 7) * (canvas.height / 7)) {
|
|
opacityValue = 1 - (distance / 20000);
|
|
ctx.strokeStyle = `rgba(0, 191, 255, ${opacityValue})`;
|
|
ctx.lineWidth = 1;
|
|
ctx.beginPath();
|
|
ctx.moveTo(particlesArray[a].x, particlesArray[a].y);
|
|
ctx.lineTo(particlesArray[b].x, particlesArray[b].y);
|
|
ctx.stroke();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function animate() {
|
|
animationFrameId = requestAnimationFrame(animate);
|
|
ctx.clearRect(0, 0, innerWidth, innerHeight);
|
|
for (let i = 0; i < particlesArray.length; i++) {
|
|
particlesArray[i].update();
|
|
}
|
|
connect();
|
|
}
|
|
|
|
// Debounce function to limit how often a function can run
|
|
function debounce(func, delay) {
|
|
let timeout;
|
|
return function(...args) {
|
|
clearTimeout(timeout);
|
|
timeout = setTimeout(() => func.apply(this, args), delay);
|
|
};
|
|
}
|
|
|
|
const handleResize = debounce(() => {
|
|
cancelAnimationFrame(animationFrameId);
|
|
setupCanvas();
|
|
animate();
|
|
}, 250);
|
|
|
|
window.addEventListener('resize', handleResize);
|
|
|
|
setupCanvas();
|
|
animate();
|
|
|
|
// --- Scroll Animation Observer ---
|
|
const sections = document.querySelectorAll('.section');
|
|
const observer = new IntersectionObserver(entries => {
|
|
entries.forEach(entry => {
|
|
if (entry.isIntersecting) {
|
|
entry.target.classList.add('is-visible');
|
|
}
|
|
});
|
|
}, { threshold: 0.1 });
|
|
sections.forEach(section => observer.observe(section));
|
|
|
|
// --- NEW: Modal Logic ---
|
|
const ctaButton = document.getElementById('cta-button');
|
|
const modal = document.getElementById('contact-modal');
|
|
const closeModalButton = document.getElementById('close-modal');
|
|
|
|
const openModal = () => document.body.classList.add('modal-open');
|
|
const closeModal = () => document.body.classList.remove('modal-open');
|
|
|
|
ctaButton.addEventListener('click', openModal);
|
|
closeModalButton.addEventListener('click', closeModal);
|
|
modal.addEventListener('click', (event) => {
|
|
if (event.target === modal) { // Close if clicked on the overlay itself
|
|
closeModal();
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |