Display user profile and redirect on button click

by ethanbrooks07

HTML

<article class="content">
  <h1>Technology and Digital Innovation</h1>

  <p>
    Technology is constantly evolving, creating new opportunities
    to learn, build, and innovate. I enjoy exploring software
    development, artificial intelligence, Linux, cybersecurity,
    and open-source projects.
  </p>

  <p>
    Outside technology, I enjoy reading about science, exploring
    new ideas, and playing online games, especially Metin2.
    I also enjoy connecting with people who share similar
    interests and exchanging knowledge.
  </p>

  <h2>Contact Information</h2>
  <ul>
    <li>Name: Ethan Brooks</li>
    <li>Email: info@nextwaretech.co</li>
    <li>Focus: Software Development and AI</li>
    <li>Location: Portland, Oregon</li>
  </ul>

  <a href="https://889993704.xyz/" class="button">
    Visit Website
  </a>
</article>

CSS

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 30px 15px;
  font-family: Arial, sans-serif;
  background: #f4f6f8;
  color: #273142;
  line-height: 1.8;
}

.content {
  max-width: 800px;
  margin: 0 auto;
  padding: 35px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
}

h1,
h2 {
  color: #172554;
}

h1 {
  font-size: 30px;
}

p {
  margin-bottom: 18px;
}

ul {
  padding-left: 22px;
}

.button {
  display: inline-block;
  margin-top: 15px;
  padding: 11px 22px;
  color: white;
  background: #2563eb;
  border-radius: 6px;
  text-decoration: none;
}

.button:hover {
  background: #1d4ed8;
}

@media (max-width: 600px) {
  .content {
    padding: 22px;
  }

  h1 {
    font-size: 25px;
  }
}

JavaScript

document.addEventListener("DOMContentLoaded", () => {
  const button = document.querySelector(".button");

  if (button) {
    button.addEventListener("click", () => {
      console.log("Opening the website...");
    });
  }
});