Code Snippet
<!DOCTYPE html><html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>3D Portfolio Website</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body {
background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
color: #fff;
overflow-x: hidden;
}
header {
background: rgba(255, 255, 255, 0.05);
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 40px;
backdrop-filter: blur(10px);
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
position: relative;
}
header .logo {
font-size: 1.8em;
font-weight: 700;
}
nav {
display: flex;
gap: 20px;
}
nav a {
color: #fff;
text-decoration: none;
transition: 0.3s;
}
nav a:hover {
color: #00fff0;
}
.menu-toggle {
display: none;
flex-direction: column;
cursor: pointer;
}
.menu-toggle span {
background: #fff;
height: 3px;
width: 25px;
margin: 3px 0;
}
@media(max-width: 768px) {
nav {
position: absolute;
top: 80px;
left: 0;
width: 100%;
background: #1f1f1f;
flex-direction: column;
display: none;
}
nav.active {
display: flex;
}
.menu-toggle {
display: flex;
}
}
section {
padding: 80px 40px;
text-align: center;
}
.section-title {
font-size: 2.5em;
margin-bottom: 20px;
}
.card {
background: rgba(255, 255, 255, 0.05);
border-radius: 20px;
padding: 20px;
margin: 20px auto;
max-width: 800px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
transition: transform 0.3s;
}
.card:hover {
transform: translateY(-10px) scale(1.02);
}
.card img {
width: 100%;
border-radius: 15px;
margin-bottom: 15px;
}
footer {
background: #111;
color: #aaa;
text-align: center;
padding: 20px;
font-size: 0.9em;
}
</style>
</head>
<body>
<header>
<div class="logo">MyPortfolio</div>
<div class="menu-toggle" onclick="toggleMenu()">
<span></span>
<span></span>
<span></span>
</div>
<nav id="navbar">
<a href="#about">About</a>
<a href="#projects">Projects</a>
<a href="#contact">Contact</a>
</nav>
</header> <section id="about">
<h2 class="section-title">About Me</h2>
<div class="card">
<img src="https://source.unsplash.com/800x400/?person,profile" alt="About Me" />
<p>I am a passionate web developer with expertise in creating beautiful and functional web applications using modern technologies.</p>
</div>
</section> <section id="projects">
<h2 class="section-title">My Projects</h2>
<div class="card">
<img src="https://source.unsplash.com/800x400/?code,website" alt="Project" />
<p>Check out some of the awesome projects I have built using HTML, CSS, JavaScript, and other tools.</p>
</div>
</section> <section id="contact">
<h2 class="section-title">Get In Touch</h2>
<div class="card">
<img src="https://source.unsplash.com/800x400/?contact,email" alt="Contact" />
<p>Let's connect! Reach out via email or through any of my social media handles below.</p>
</div>
</section> <footer>
© 2025 MyPortfolio. All rights reserved.
</footer> <script>
function toggleMenu() {
const nav = document.getElementById('navbar');
nav.classList.toggle('active');
}
</script></body>
</html>