Here's a modern, responsive portfolio website code with smooth animations and interactive elements. This single HTML file contains all necessary CSS and JavaScript:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Modern Portfolio</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<style>
:root {
--primary-color: #2ecc71;
--secondary-color: #34495e;
--light-bg: #ecf0f1;
--text-dark: #2c3e50;
--text-light: #ecf0f1;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', sans-serif;
}
body {
background: var(--light-bg);
color: var(--text-dark);
line-height: 1.6;
}
.navbar {
position: fixed;
width: 100%;
padding: 25px;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
z-index: 999;
transition: 0.3s;
}
.nav-links {
display: flex;
justify-content: space-around;
align-items: center;
max-width: 1200px;
margin: 0 auto;
}
.nav-links a {
color: var(--text-dark);
text-decoration: none;
font-size: 1.1em;
transition: 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
.hero {
height: 100vh;
display: flex;
align-items: center;
padding: 0 10%;
background: linear-gradient(45deg, #2c3e50, #3498db);
color: white;
}
.hero-content {
max-width: 600px;
}
.hero h1 {
font-size: 3.5em;
margin-bottom: 20px;
}
.hero p {
font-size: 1.2em;
margin-bottom: 30px;
}
.cta-button {
padding: 15px 40px;
background: var(--primary-color);
color: white;
border: none;
border-radius: 30px;
font-size: 1.1em;
cursor: pointer;
transition: 0.3s;
}
.cta-button:hover {
transform: translateY(-3px);
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.section {
padding: 100px 10%;
max-width: 1200px;
margin: 0 auto;
}
.section h2 {
text-align: center;
font-size: 2.5em;
margin-bottom: 50px;
position: relative;
}
.section h2::after {
content: '';
position: absolute;
bottom: -15px;
left: 50%;
transform: translateX(-50%);
width: 80px;
height: 4px;
background: var(--primary-color);
}
.about-grid {
display: grid;
grid-template-columns: 1fr 2fr;
gap: 50px;
align-items: center;
}
.profile-img {
width: 100%;
border-radius: 20px;
box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.skills-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 30px;
margin-top: 50px;
}
.skill-card {
background: white;
padding: 30px;
border-radius: 15px;
text-align: center;
box-shadow: 0 10px 20px rgba(0,0,0,0.05);
transition: 0.3s;
}
.skill-card:hover {
transform: translateY(-10px);
}
.projects-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
margin-top: 50px;
}
.project-card {
background: white;
border-radius: 15px;
overflow: hidden;
box-shadow: 0 10px 20px rgba(0,0,0,0.05);
transition: 0.3s;
}
.project-card:hover {
transform: translateY(-10px);
}
.project-img {
width: 100%;
height: 200px;
object-fit: cover;
}
.project-info {
padding: 20px;
}
.contact-form {
max-width: 600px;
margin: 0 auto;
}
.form-group {
margin-bottom: 20px;
}
.form-group input,
.form-group textarea {
width: 100%;
padding: 15px;
border: 1px solid #ddd;
border-radius: 10px;
font-size: 1em;
}
footer {
background: var(--secondary-color);
color: white;
padding: 50px 10%;
text-align: center;
}
@media (max-width: 768px) {
.about-grid {
grid-template-columns: 1fr;
}
.nav-links {
flex-direction: column;
text-align: center;
gap: 20px;
}
}
</style>
</head>
<body>
<nav class="navbar">
<div class="nav-links">
<a href="#home">Home</a>
<a href="#about">About</a>
<a href="#projects">Projects</a>
<a href="#skills">Skills</a>
<a href="#contact">Contact</a>
</div>
</nav>
<section class="hero" id="home">
<div class="hero-content">
<h1>John Doe</h1>
<p>Full Stack Developer & UI/UX Designer</p>
<button class="cta-button">Get in Touch</button>
</div>
</section>
<section class="section" id="about">
<h2>About Me</h2>
<div class="about-grid">
<img src="https://via.placeholder.com/400x400" alt="Profile" class="profile-img">
<div>
<p>Hello! I'm a passionate developer with 5+ years of experience in creating beautiful, functional websites and applications. I specialize in creating clean, modern designs with a focus on user experience.</p>
<p>My expertise includes HTML, CSS, JavaScript, React, Node.js, and more. When I'm not coding, you can find me hiking or taking photos.</p>
</div>
</div>
</section>
<section class="section" id="projects">
<h2>Projects</h2>
<div class="projects-grid">
<div class="project-card">
<img src="https://via.placeholder.com/300x200" alt="Project 1" class="project-img">
<div class="project-info">
<h3>E-commerce Website</h3>
<p>Full stack e-commerce platform with payment integration</p>
<a href="#" class="cta-button">View</a>
</div>
</div>
<div class="project-card">
<img src="https://via.placeholder.com/300x200" alt="Project 2" class="project-img">
<div class="project-info">
<h3>Mobile App Design</h3>
<p>UI/UX design for fitness tracking application</p>
<a href="#" class="cta-button">View</a>
</div>
</div>
</div>
</section>
<section class="section" id="skills">
<h2>Skills</h2>
<div class="skills-container">
<div class="skill-card">
<i class="fas fa-code fa-3x" style="color: var(--primary-color)"></i>
<h3>Web Development</h3>
<p>HTML, CSS, JavaScript, React</p>
</div>
<div class="skill-card">
<i class="fas fa-mobile-alt fa-3x" style="color: var(--primary-color)"></i>
<h3>Responsive Design</h3>
<p>Mobile-first approach</p>
</div>
<div class="skill-card">
<i class="fas fa-paint-brush fa-3x" style="color: var(--primary-color)"></i>
<h3>UI/UX Design</h3>
<p>Adobe XD, Figma</p>
</div>
</div>
</section>
<section class="section" id="contact">
<h2>Contact</h2>
<form class="contact-form">
<div class="form-group">
<input type="text" placeholder="Name" required>
</div>
<div class="form-group">
<input type="email" placeholder="Email" required>
</div>
<div class="form-group">
<textarea rows="5" placeholder="Message" required></textarea>
</div>
<button type="submit" class="cta-button">Send Message</button>
</form>
</section>
<footer>
<p>© 2025 John Doe. All rights reserved.</p>
<div style="margin-top: 20px;">
<a href="#" style="color: white; margin: 0 10px;"><i class="fab fa-github fa-lg"></i></a>
<a href="#" style="color: white; margin: 0 10px;"><i class="fab fa-linkedin fa-lg"></i></a>
<a href="#" style="color: white; margin: 0 10px;"><i class="fab fa-twitter fa-lg"></i></a>
</div>
</footer>
<script>
// Smooth scrolling for navigation links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// Navbar scroll effect
window.addEventListener('scroll', function() {
const navbar = document.querySelector('.navbar');
if (window.scrollY > 100) {
navbar.style.padding = '15px';
navbar.style.background = 'rgba(255, 255, 255, 0.98)';
} else {
navbar.style.padding = '25px';
navbar.style.background = 'rgba(255, 255, 255, 0.95)';
}
});
// Typing effect
const text = "Full Stack Developer & UI/UX Designer";
let index = 0;
function type() {
if(index < text.length) {
document.querySelector('.hero p').innerHTML += text.charAt(index);
index++;
setTimeout(type, 100);
}
}
type();
</script>
</body>
</html>
This portfolio includes:
- Modern, responsive design that works on mobile and desktop
- Smooth animations and transitions
- Interactive elements (hover effects, typing animation)
- Fixed navigation bar with scroll effect
- Sections for:
- Hero/Introduction
- About Me
- Projects
- Skills
- Contact Form
- Social media links in footer
- Clean, modern color scheme
- Placeholder images (replace with your own)
- Form validation
- Smooth scroll navigation
To use this template:
- Replace placeholder images with your own
- Update text content in all sections
- Add your actual project details
- Customize colors by modifying the CSS variables
- Add your social media links
- Add your own skills and technologies
The code is self-contained in a single HTML file and uses Font Awesome for icons. You can customize colors, fonts, and layout by modifying the CSS variables and styles.