html Copy code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Glowing Portfolio</title>
<style>
/* Reset and Basic Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #0d0d0d;
color: #fff;
overflow-x: hidden;
}
a {
color: inherit;
text-decoration: none;
}
/* Glowing Animation Keyframes */
@keyframes glow {
0% {
text-shadow: 0 0 5px #ff00ff, 0 0 10px #ff00ff, 0 0 20px #ff00ff, 0 0 40px #ff00ff, 0 0 80px #ff00ff;
}
50% {
text-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff, 0 0 30px #ff00ff, 0 0 50px #ff00ff, 0 0 100px #ff00ff;
}
100% {
text-shadow: 0 0 5px #ff00ff, 0 0 10px #ff00ff, 0 0 20px #ff00ff, 0 0 40px #ff00ff, 0 0 80px #ff00ff;
}
}
/* Header Styles */
header {
height: 100vh;
background: linear-gradient(135deg, #1f1c2c, #928dab);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
animation: glow 2s infinite;
}
header h1 {
font-size: 4rem;
margin-bottom: 20px;
animation: glow 1.5s infinite;
}
header p {
font-size: 1.5rem;
max-width: 600px;
animation: glow 2s infinite;
}
/* Navigation Styles */
nav {
position: fixed;
top: 20px;
width: 100%;
display: flex;
justify-content: center;
z-index: 1000;
}
nav ul {
list-style: none;
display: flex;
gap: 30px;
}
nav ul li a {
font-size: 1rem;
padding: 10px 15px;
border: 2px solid #ff00ff;
border-radius: 25px;
transition: background 0.3s, color 0.3s;
}
nav ul li a:hover {
background: #ff00ff;
color: #0d0d0d;
}
/* Portfolio Section */
.portfolio {
padding: 60px 20px;
background-color: #111;
display: flex;
flex-direction: column;
align-items: center;
}
.portfolio h2 {
font-size: 3rem;
margin-bottom: 40px;
animation: glow 2s infinite;
}
.portfolio-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 30px;
width: 100%;
max-width: 1200px;
}
.portfolio-item {
background-color: #1f1c2c;
padding: 20px;
border: 2px solid #ff00ff;
border-radius: 15px;
position: relative;
overflow: hidden;
transition: transform 0.3s, box-shadow 0.3s;
cursor: pointer;
}
.portfolio-item::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: radial-gradient(circle, rgba(255,0,255,0.2) 0%, rgba(0,0,0,0) 70%);
opacity: 0;
transition: opacity 0.3s;
}
.portfolio-item:hover::before {
opacity: 1;
}
.portfolio-item:hover {
transform: scale(1.05);
box-shadow: 0 0 20px #ff00ff;
}
.portfolio-item img {
width: 100%;
border-radius: 10px;
margin-bottom: 15px;
}
.portfolio-item h3 {
font-size: 1.5rem;
margin-bottom: 10px;
animation: glow 2s infinite;
}
.portfolio-item p {
font-size: 1rem;
color: #ccc;
}
/* Contact Section */
.contact {
padding: 60px 20px;
background-color: #0d0d0d;
display: flex;
flex-direction: column;
align-items: center;
}
.contact h2 {
font-size: 3rem;
margin-bottom: 40px;
animation: glow 2s infinite;
}
.contact form {
display: flex;
flex-direction: column;
gap: 20px;
width: 100%;
max-width: 600px;
}
.contact input,
.contact textarea {
padding: 15px;
border: 2px solid #ff00ff;
border-radius: 10px;
background-color: #1f1c2c;
color: #fff;
font-size: 1rem;
transition: box-shadow 0.3s;
}
.contact input:focus,
.contact textarea:focus {
outline: none;
box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
}
.contact button {
padding: 15px;
border: none;
border-radius: 10px;
background-color: #ff00ff;
color: #0d0d0d;
font-size: 1rem;
cursor: pointer;
transition: box-shadow 0.3s, transform 0.3s;
}
.contact button:hover {
box-shadow: 0 0 20px #ff00ff;
transform: translateY(-5px);
}
/* Footer Styles */
footer {
padding: 20px;
background-color: #111;
text-align: center;
animation: glow 2s infinite;
}
footer p {
font-size: 1rem;
color: #ccc;
}
/* Modal Styles */
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(13,13,13,0.9);
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s;
z-index: 1001;
}
.modal.active {
opacity: 1;
pointer-events: all;
}
.modal-content {
background-color: #1f1c2c;
padding: 30px;
border: 2px solid #ff00ff;
border-radius: 15px;
position: relative;
max-width: 800px;
width: 90%;
animation: glow 2s infinite;
}
.modal-content img {
width: 100%;
border-radius: 10px;
margin-bottom: 20px;
}
.modal-content h3 {
font-size: 2rem;
margin-bottom: 10px;
}
.modal-content p {
font-size: 1rem;
color: #ccc;
}
.close-btn {
position: absolute;
top: 15px;
right: 20px;
font-size: 2rem;
color: #ff00ff;
cursor: pointer;
transition: transform 0.3s;
}
.close-btn:hover {
transform: rotate(90deg);
}
/* Responsive Styles */
@media (max-width: 768px) {
header h1 {
font-size: 3rem;
}
.portfolio h2,
.contact h2 {
font-size: 2.5rem;
}
nav ul {
gap: 15px;
}
.portfolio-item h3 {
font-size: 1.2rem;
}
.contact form {
gap: 15px;
}
}
</style>
</head>
<body>
<!-- Navigation -->
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#portfolio">Portfolio</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<!-- Header Section -->
<header id="home">
<h1 class="glow">My Glowing Portfolio</h1>
<p>Showcasing my latest and greatest projects with stunning glow effects and smooth animations.</p>
</header>
<!-- Portfolio Section -->
<section class="portfolio" id="portfolio">
<h2 class="glow">My Work</h2>
<div class="portfolio-grid">
<!-- Portfolio Item 1 -->
<div class="portfolio-item" data-project="1">
<img src="https://via.placeholder.com/400x300.png?text=Project+1" alt="Project 1">
<h3>Project One</h3>
<p>A brief description of Project One.</p>
</div>
<!-- Portfolio Item 2 -->
<div class="portfolio-item" data-project="2">
<img src="https://via.placeholder.com/400x300.png?text=Project+2" alt="Project 2">
<h3>Project Two</h3>
<p>A brief description of Project Two.</p>
</div>
<!-- Portfolio Item 3 -->
<div class="portfolio-item" data-project="3">
<img src="https://via.placeholder.com/400x300.png?text=Project+3" alt="Project 3">
<h3>Project Three</h3>
<p>A brief description of Project Three.</p>
</div>
<!-- Portfolio Item 4 -->
<div class="portfolio-item" data-project="4">
<img src="https://via.placeholder.com/400x300.png?text=Project+4" alt="Project 4">
<h3>Project Four</h3>
<p>A brief description of Project Four.</p>
</div>
</div>
</section>
<!-- Contact Section -->
<section class="contact" id="contact">
<h2 class="glow">Get in Touch</h2>
<form id="contact-form">
<input type="text" id="name" name="name" placeholder="Your Name" required>
<input type="email" id="email" name="email" placeholder="Your Email" required>
<textarea id="message" name="message" rows="5" placeholder="Your Message" required></textarea>
<button type="submit">Send Message</button>
</form>
</section>
<!-- Footer -->
<footer>
<p>© 2023 My Glowing Portfolio. All rights reserved.</p>
</footer>
<!-- Modal for Portfolio Details -->
<div class="modal" id="modal">
<div class="modal-content">
<span class="close-btn">×</span>
<img src="" alt="Project Image" id="modal-image">
<h3 id="modal-title">Project Title</h3>
<p id="modal-description">Detailed description of the project goes here.</p>
</div>
</div>
<!-- JavaScript for Interactivity -->
<script>
// Smooth Scroll for Navigation Links
const navLinks = document.querySelectorAll('nav ul li a');
navLinks.forEach(link => {
link.addEventListener('click', function(e) {
e.preventDefault();
const targetId = this.getAttribute('href').substring(1);
const targetSection = document.getElementById(targetId);
window.scrollTo({
top: targetSection.offsetTop - 60,
behavior: 'smooth'
});
});
});
// Portfolio Modal Functionality
const portfolioItems = document.querySelectorAll('.portfolio-item');
const modal = document.getElementById('modal');
const modalImage = document.getElementById('modal-image');
const modalTitle = document.getElementById('modal-title');
const modalDescription = document.getElementById('modal-description');
const closeBtn = document.querySelector('.close-btn');
const projectDetails = {
1: {
title: 'Project One',
description: 'Detailed description of Project One. Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
image: 'https://via.placeholder.com/800x600.png?text=Project+1+Details'
},
2: {
title: 'Project Two',
description: 'Detailed description of Project Two. Vestibulum vehicula ex eu gravida cursus.',
image: 'https://via.placeholder.com/800x600.png?text=Project+2+Details'
},
3: {
title: 'Project Three',
description: 'Detailed description of Project Three. Curabitur non nulla sit amet nisl tempus convallis.',
image: 'https://via.placeholder.com/800x600.png?text=Project+3+Details'
},
4: {
title: 'Project Four',
description: 'Detailed description of Project Four. Nulla porttitor accumsan tincidunt.',
image: 'https://via.placeholder.com/800x600.png?text=Project+4+Details'
}
};
portfolioItems.forEach(item => {
item.addEventListener('click', () => {
const projectId = item.getAttribute('data-project');
const project = projectDetails[projectId];
if(project){
modalImage.src = project.image;
modalTitle.textContent = project.title;
modalDescription.textContent = project.description;
modal.classList.add('active');
}
});
});
closeBtn.addEventListener('click', () => {
modal.classList.remove('active');
});
// Close modal when clicking outside the content
window.addEventListener('click', (e) => {
if(e.target === modal){
modal.classList.remove('active');
}
});
// Contact Form Submission
const contactForm = document.getElementById('contact-form');
contactForm.addEventListener('submit', function(e){
e.preventDefault();
const name = document.getElementById('name').value.trim();
const email = document.getElementById('email').value.trim();
const message = document.getElementById('message').value.trim();
if(name && email && message){
alert(`Thank you, ${name}! Your message has been received.`);
contactForm.reset();
} else {
alert('Please fill in all fields before submitting.');
}
});
</script>
</body>
</html>