Omarrran's picture
Update style.css
2db85ac verified
/* Main Stylesheet for Portfolio Website */
:root {
/* Color Scheme */
--primary-color: #4CAF50;
--secondary-color: #2196F3;
--accent-color: #FF9800;
--text-color: #333333;
--text-light: #666666;
--bg-color: #ffffff;
--bg-light: #f5f5f5;
--sidebar-bg: #f0f8f0;
--card-bg: #ffffff;
--border-color: #e0e0e0;
/* Typography */
--font-main: 'Poppins', sans-serif;
/* Spacing */
--spacing-xs: 0.25rem;
--spacing-sm: 0.5rem;
--spacing-md: 1rem;
--spacing-lg: 1.5rem;
--spacing-xl: 2rem;
--spacing-xxl: 3rem;
/* Transitions */
--transition-fast: 0.2s ease;
--transition-normal: 0.3s ease;
--transition-slow: 0.5s ease;
/* Shadows */
--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
--shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
/* Border Radius */
--radius-sm: 4px;
--radius-md: 8px;
--radius-lg: 12px;
--radius-xl: 20px;
--radius-circle: 50%;
}
/* Dark Theme Variables */
.dark-theme {
--primary-color: #66BB6A;
--secondary-color: #42A5F5;
--accent-color: #FFA726;
--text-color: #E0E0E0;
--text-light: #BDBDBD;
--bg-color: #121212;
--bg-light: #1E1E1E;
--sidebar-bg: #1A1A1A;
--card-bg: #2D2D2D;
--border-color: #333333;
--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
--shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
--shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.4);
}
/* Reset & Base Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
font-size: 16px;
scroll-behavior: smooth;
}
body {
font-family: var(--font-main);
color: var(--text-color);
background-color: var(--bg-color);
line-height: 1.6;
overflow-x: hidden;
transition: background-color var(--transition-normal);
}
a {
text-decoration: none;
color: var(--primary-color);
transition: color var(--transition-fast);
}
a:hover {
color: var(--secondary-color);
}
ul {
list-style: none;
}
img {
max-width: 100%;
height: auto;
}
/* Layout */
.container {
display: flex;
min-height: 100vh;
}
.sidebar {
width: 280px;
background-color: var(--sidebar-bg);
padding: var(--spacing-lg);
position: fixed;
height: 100vh;
overflow-y: auto;
box-shadow: var(--shadow-md);
transition: all var(--transition-normal);
z-index: 100;
}
.content {
flex: 1;
margin-left: 280px;
padding: var(--spacing-lg);
transition: margin-left var(--transition-normal);
}
/* Logo */
.logo {
margin-bottom: var(--spacing-xl);
}
.logo a {
display: flex;
align-items: center;
color: var(--text-color);
}
.logo img {
width: 50px;
height: 50px;
margin-right: var(--spacing-md);
}
.logo-text h2 {
font-size: 1.8rem;
font-weight: 600;
margin-bottom: var(--spacing-xs);
}
.logo-text p {
font-size: 0.9rem;
color: var(--text-light);
}
/* Search Box */
.search-box {
position: relative;
margin-bottom: var(--spacing-xl);
}
.search-box input {
width: 100%;
padding: var(--spacing-sm) var(--spacing-md);
padding-right: 2.5rem;
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
background-color: var(--bg-color);
color: var(--text-color);
font-family: var(--font-main);
transition: all var(--transition-fast);
}
.search-box input:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}
.search-box i {
position: absolute;
right: var(--spacing-md);
top: 50%;
transform: translateY(-50%);
color: var(--text-light);
}
/* Navigation */
.nav-section {
margin-bottom: var(--spacing-xl);
}
.nav-section h3 {
font-size: 1rem;
font-weight: 600;
margin-bottom: var(--spacing-md);
color: var(--text-light);
text-transform: uppercase;
letter-spacing: 1px;
}
.nav-section ul li {
margin-bottom: var(--spacing-sm);
}
.nav-section ul li a {
display: flex;
align-items: center;
padding: var(--spacing-sm) var(--spacing-md);
border-radius: var(--radius-md);
color: var(--text-color);
transition: all var(--transition-fast);
}
.nav-section ul li a:hover {
background-color: rgba(76, 175, 80, 0.1);
color: var(--primary-color);
}
.nav-section ul li a i {
margin-right: var(--spacing-md);
width: 20px;
text-align: center;
}
/* Social Links */
.social-links {
display: flex;
gap: var(--spacing-md);
margin-top: var(--spacing-xl);
}
.social-links a {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: var(--radius-circle);
background-color: var(--bg-light);
color: var(--text-color);
transition: all var(--transition-fast);
}
.social-links a:hover {
background-color: var(--primary-color);
color: white;
transform: translateY(-3px);
}
/* Header */
header {
margin-bottom: var(--spacing-xl);
padding-bottom: var(--spacing-md);
border-bottom: 1px solid var(--border-color);
}
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
}
header h1 {
font-size: 2.5rem;
font-weight: 700;
color: var(--text-color);
}
.theme-toggle {
cursor: pointer;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--radius-circle);
background-color: var(--bg-light);
transition: all var(--transition-fast);
}
.theme-toggle:hover {
background-color: var(--border-color);
}
/* Hero Section */
.hero {
margin-bottom: var(--spacing-xxl);
}
.hero-content {
display: flex;
align-items: center;
gap: var(--spacing-xl);
}
.hero-text {
flex: 1;
}
.hero-text p {
font-size: 1.2rem;
margin-bottom: var(--spacing-lg);
color: var(--text-light);
}
.hero-image {
flex: 1;
display: flex;
justify-content: center;
}
.profile-image {
width: 300px;
height: 300px;
object-fit: cover;
border-radius: var(--radius-circle);
box-shadow: var(--shadow-lg);
border: 5px solid var(--bg-color);
transition: all var(--transition-normal);
}
.profile-image:hover {
transform: scale(1.05);
box-shadow: var(--shadow-lg), 0 0 0 10px rgba(76, 175, 80, 0.1);
}
/* Buttons */
.cta-buttons {
display: flex;
gap: var(--spacing-md);
}
.btn {
display: inline-block;
padding: var(--spacing-sm) var(--spacing-lg);
border-radius: var(--radius-md);
font-weight: 500;
text-align: center;
cursor: pointer;
transition: all var(--transition-fast);
}
.btn.primary {
background-color: var(--primary-color);
color: white;
}
.btn.secondary {
background-color: transparent;
color: var(--primary-color);
border: 1px solid var(--primary-color);
}
.btn.small {
padding: var(--spacing-xs) var(--spacing-md);
font-size: 0.9rem;
}
.btn.primary:hover {
background-color: var(--secondary-color);
transform: translateY(-2px);
}
.btn.secondary:hover {
background-color: rgba(76, 175, 80, 0.1);
transform: translateY(-2px);
}
/* Featured Sections */
.featured-section {
margin-bottom: var(--spacing-xxl);
}
.featured-section h2 {
font-size: 1.8rem;
margin-bottom: var(--spacing-lg);
position: relative;
padding-bottom: var(--spacing-sm);
}
.featured-section h2::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 60px;
height: 3px;
background-color: var(--primary-color);
border-radius: var(--radius-sm);
}
/* Skills Grid */
.skills-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: var(--spacing-lg);
}
.skill-card {
background-color: var(--card-bg);
padding: var(--spacing-lg);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-md);
transition: all var(--transition-normal);
}
.skill-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-lg);
}
.skill-icon {
width: 60px;
height: 60px;
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(76, 175, 80, 0.1);
color: var(--primary-color);
border-radius: var(--radius-circle);
margin-bottom: var(--spacing-md);
font-size: 1.5rem;
}
.skill-card h3 {
margin-bottom: var(--spacing-sm);
}
.skill-card p {
color: var(--text-light);
}
/* Projects Grid */
.projects-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: var(--spacing-lg);
}
.project-card {
background-color: var(--card-bg);
border-radius: var(--radius-lg);
overflow: hidden;
box-shadow: var(--shadow-md);
transition: all var(--transition-normal);
}
.project-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-lg);
}
.project-image {
height: 200px;
overflow: hidden;
}
.project-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform var(--transition-normal);
}
.project-card:hover .project-image img {
transform: scale(1.05);
}
.project-content {
padding: var(--spacing-lg);
}
.project-content h3 {
margin-bottom: var(--spacing-sm);
}
.project-content p {
color: var(--text-light);
margin-bottom: var(--spacing-md);
}
/* Footer */
footer {
margin-top: var(--spacing-xxl);
padding-top: var(--spacing-lg);
border-top: 1px solid var(--border-color);
display: flex;
justify-content: space-between;
align-items: center;
}
footer p {
color: var(--text-light);
}
/* Responsive Design */
@media (max-width: 1024px) {
.sidebar {
width: 240px;
}
.content {
margin-left: 240px;
}
.hero-content {
flex-direction: column-reverse;
}
.hero-text, .hero-image {
flex: none;
width: 100%;
}
}
@media (max-width: 768px) {
.sidebar {
transform: translateX(-100%);
width: 280px;
}
.sidebar.active {
transform: translateX(0);
}
.content {
margin-left: 0;
}
.mobile-menu-toggle {
display: block;
}
.skills-grid, .projects-grid {
grid-template-columns: 1fr;
}
header h1 {
font-size: 2rem;
}
.hero-text p {
font-size: 1rem;
}
.profile-image {
width: 250px;
height: 250px;
}
footer {
flex-direction: column;
gap: var(--spacing-md);
text-align: center;
}
}
@media (max-width: 480px) {
.content {
padding: var(--spacing-md);
}
.cta-buttons {
flex-direction: column;
gap: var(--spacing-sm);
}
.btn {
width: 100%;
}
.profile-image {
width: 200px;
height: 200px;
}
}
/* Custom styles for the About page */
.about-container {
display: flex;
flex-direction: column;
gap: var(--spacing-xl);
}
.about-header {
display: flex;
align-items: center;
gap: var(--spacing-xl);
margin-bottom: var(--spacing-xl);
}
.about-header-content {
flex: 1;
}
.about-header-content h2 {
font-size: 2rem;
margin-bottom: var(--spacing-md);
}
.about-header-content p {
color: var(--text-light);
font-size: 1.1rem;
line-height: 1.6;
}
.about-image {
flex: 1;
max-width: 400px;
border-radius: var(--radius-lg);
overflow: hidden;
box-shadow: var(--shadow-md);
}
.about-image img {
width: 100%;
height: auto;
transition: transform var(--transition-normal);
}
.about-image:hover img {
transform: scale(1.05);
}
.about-section {
margin-bottom: var(--spacing-xl);
}
.about-section h3 {
font-size: 1.5rem;
margin-bottom: var(--spacing-md);
position: relative;
padding-bottom: var(--spacing-sm);
}
.about-section h3::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 50px;
height: 3px;
background-color: var(--primary-color);
border-radius: var(--radius-sm);
}
.about-section p {
margin-bottom: var(--spacing-md);
line-height: 1.6;
}
.about-section ul {
list-style: disc;
padding-left: var(--spacing-xl);
margin-bottom: var(--spacing-md);
}
.about-section ul li {
margin-bottom: var(--spacing-sm);
}
.about-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: var(--spacing-lg);
}
.about-card {
background-color: var(--card-bg);
padding: var(--spacing-lg);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-md);
transition: all var(--transition-normal);
}
.about-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-lg);
}
.about-card-icon {
width: 50px;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(76, 175, 80, 0.1);
color: var(--primary-color);
border-radius: var(--radius-circle);
margin-bottom: var(--spacing-md);
font-size: 1.5rem;
}
.about-card h4 {
margin-bottom: var(--spacing-sm);
font-size: 1.2rem;
}
.about-card p {
color: var(--text-light);
}
.timeline {
position: relative;
max-width: 1200px;
margin: 0 auto;
}
.timeline::after {
content: '';
position: absolute;
width: 3px;
background-color: var(--border-color);
top: 0;
bottom: 0;
left: 50%;
margin-left: -1.5px;
}
.timeline-item {
padding: var(--spacing-md) 0;
position: relative;
width: 50%;
box-sizing: border-box;
}
.timeline-item:nth-child(odd) {
left: 0;
padding-right: var(--spacing-xl);
}
.timeline-item:nth-child(even) {
left: 50%;
padding-left: var(--spacing-xl);
}
.timeline-content {
padding: var(--spacing-md);
background-color: var(--card-bg);
border-radius: var(--radius-md);
box-shadow: var(--shadow-md);
position: relative;
}
.timeline-content::after {
content: '';
position: absolute;
width: 20px;
height: 20px;
background-color: var(--primary-color);
border-radius: 50%;
top: 50%;
transform: translateY(-50%);
}
.timeline-item:nth-child(odd) .timeline-content::after {
right: -10px;
}
.timeline-item:nth-child(even) .timeline-content::after {
left: -10px;
}
.timeline-date {
color: var(--primary-color);
font-weight: 600;
margin-bottom: var(--spacing-xs);
}
.timeline-title {
margin-bottom: var(--spacing-xs);
}
.timeline-description {
color: var(--text-light);
}
@media (max-width: 768px) {
.about-header {
flex-direction: column;
}
.about-image {
max-width: 100%;
}
.timeline::after {
left: 31px;
}
.timeline-item {
width: 100%;
padding-left: 70px;
padding-right: 0;
}
.timeline-item:nth-child(odd) {
left: 0;
padding-right: 0;
}
.timeline-item:nth-child(even) {
left: 0;
padding-left: 70px;
}
.timeline-content::after {
left: -10px;
}
}