0% found this document useful (0 votes)
10 views8 pages

CSS Styles for Responsive Web Design

The document provides a comprehensive CSS stylesheet for a responsive web design, including reset styles, layout structures, and specific styles for various sections such as header, hero, about, skills, projects, contact, and footer. It utilizes CSS variables for color management and includes hover effects for buttons and cards. Media queries are implemented for responsive adjustments on smaller screens.

Uploaded by

Tishan Dhar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views8 pages

CSS Styles for Responsive Web Design

The document provides a comprehensive CSS stylesheet for a responsive web design, including reset styles, layout structures, and specific styles for various sections such as header, hero, about, skills, projects, contact, and footer. It utilizes CSS variables for color management and includes hover effects for buttons and cards. Media queries are implemented for responsive adjustments on smaller screens.

Uploaded by

Tishan Dhar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

/* Reset and Base Styles */

* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
--primary: #2c3e50;
--secondary: #7d4ba3;
--accent: #6e3a8a;
--light: #ecf0f1;
--dark: #2c3e50;
--gray: #95a5a6;
}

html {
scroll-behavior: smooth;
}

body {
line-height: 1.6;
color: #333;
background-color: #f9f9f9;
}

.container {
width: 90%;
max-width: 1200px;
margin: 0 auto;
padding: 0 15px;
}

section {
padding: 80px 0;
}

h1, h2, h3, h4 {


margin-bottom: 20px;
color: var(--dark);
}

h2 {
font-size: 2.5rem;
text-align: center;
position: relative;
margin-bottom: 50px;
}

h2::after {
content: '';
position: absolute;
bottom: -10px;
left: 50%;
transform: translateX(-50%);
width: 80px;
height: 4px;
background-color: var(--secondary);
}

p {
margin-bottom: 15px;
font-size: 1.1rem;
}

.btn {
display: inline-block;
padding: 12px 30px;
background-color: var(--secondary);
color: white;
text-decoration: none;
border-radius: 5px;
font-weight: 600;
transition: all 0.3s ease;
border: none;
cursor: pointer;
}

.btn:hover {
background-color: #9561ba;
transform: translateY(-3px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Header Styles */
header {
background-color: white;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
}

nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 0;
}

.logo {
font-size: 1.8rem;
font-weight: 700;
color: var(--primary);
}

.logo span {
color: var(--secondary);
}

.nav-links {
display: flex;
list-style: none;
}

.nav-links li {
margin-left: 30px;
}

.nav-links a {
text-decoration: none;
color: var(--dark);
font-weight: 500;
transition: color 0.3s ease;
}

.nav-links a:hover {
color: var(--secondary);
}

/* Hero Section */
.hero {
background: linear-gradient(135deg, var(--primary), #1a2530);
color: white;
padding: 150px 0 100px;
text-align: center;
}

.hero h1 {
font-size: 3.5rem;
margin-bottom: 20px;
color: white;
}

.hero p {
font-size: 1.3rem;
max-width: 700px;
margin: 0 auto 30px;
color: var(--light);
}

.hero-buttons {
margin-top: 30px;
}

.hero .btn {
background-color: var(--secondary);
margin-right: 15px;
}

.btn-outline {
background-color: transparent;
border: 2px solid white;
}

.btn-outline:hover {
background-color: white;
color: var(--primary);
}

/* About Section */
.about {
background-color: white;
}
.about-content {
display: flex;
align-items: center;
gap: 50px;
}

.about-img {
flex: 1;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-img img {
width: 100%;
height: auto;
display: block;
}

.about-text {
flex: 1;
}

.about-text h3 {
font-size: 1.8rem;
margin-bottom: 20px;
}

/* Skills Section */
.skills {
background-color: #f5f7fa;
}

.skills-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 30px;
}

.skill-card {
background-color: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
text-align: center;
transition: transform 0.3s ease;
}

.skill-card:hover {
transform: translateY(-10px);
}

.skill-card i {
font-size: 3rem;
color: var(--secondary);
margin-bottom: 20px;
}

.skill-card h3 {
font-size: 1.5rem;
}

/* Projects Section */
.projects {
background-color: white;
}

.projects-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
}

.project-card {
background-color: white;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease;
}

.project-card:hover {
transform: translateY(-10px);
}

.project-img {
height: 200px;
overflow: hidden;
}

.project-img img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.5s ease;
}

.project-card:hover .project-img img {


transform: scale(1.1);
}

.project-info {
padding: 20px;
}

.project-info h3 {
font-size: 1.3rem;
margin-bottom: 10px;
}

.project-info p {
font-size: 1rem;
color: var(--gray);
margin-bottom: 15px;
}

.project-tags {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 15px;
}

.project-tags span {
background-color: #e1f0fa;
color: var(--secondary);
padding: 5px 10px;
border-radius: 20px;
font-size: 0.8rem;
}

/* Contact Section */
.contact {
background-color: #f5f7fa;
}

.contact-container {
display: flex;
gap: 50px;
}

.contact-info {
flex: 1;
}

.contact-info h3 {
font-size: 1.8rem;
margin-bottom: 20px;
}

.contact-item {
display: flex;
align-items: center;
margin-bottom: 25px;
}

.contact-item i {
font-size: 1.5rem;
color: var(--secondary);
margin-right: 15px;
width: 40px;
}

.contact-item h4 {
margin-bottom: 5px;
}

.social-links {
margin-top: 30px;
}

.social-links a {
display: inline-block;
margin-right: 15px;
font-size: 1.5rem;
color: var(--dark);
transition: color 0.3s ease;
}

.social-links a:hover {
color: var(--secondary);
}

.contact-form {
flex: 1;
}

.contact-form h3 {
font-size: 1.8rem;
margin-bottom: 20px;
}

.form-group {
margin-bottom: 20px;
}

.form-group label {
display: block;
margin-bottom: 8px;
font-weight: 500;
}

.form-group input,
.form-group textarea {
width: 100%;
padding: 12px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 1rem;
transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
outline: none;
border-color: var(--secondary);
}

/* Footer */
footer {
background-color: var(--dark);
color: white;
text-align: center;
padding: 30px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
.nav-links {
display: none;
}

.hero h1 {
font-size: 2.5rem;
}
.about-content {
flex-direction: column;
}

.contact-container {
flex-direction: column;
}

.hero-buttons .btn {
display: block;
margin-bottom: 15px;
margin-right: 0;
}
}

You might also like