RakeshPortfolio / styles.css
Bot
UI Redesign: Modern minimalist interface
8c3fafb
Raw History Blame Contribute Delete
11.1 kB
/* CSS Reset and Base Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
/* Light theme: Crisp, minimal, highly professional */
--bg-primary: #ffffff;
--bg-secondary: #f8fafc; /* subtle off-white for contrast zones */
--text-primary: #0f172a; /* deep slate */
--text-secondary: #475569;
--text-muted: #94a3b8;
--accent-primary: #2563eb; /* sleek royal blue */
--accent-secondary: #1d4ed8;
--border-color: #e2e8f0;
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
--shadow-lg: 0 10px 25px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
--radius-md: 12px;
--radius-button: 6px;
}
[data-theme="dark"] {
/* Dark theme: Deep midnight, soft contrast */
--bg-primary: #020617;
--bg-secondary: #0f172a;
--text-primary: #f8fafc;
--text-secondary: #cbd5e1;
--text-muted: #64748b;
--accent-primary: #3b82f6;
--accent-secondary: #60a5fa;
--border-color: #1e293b;
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
--shadow-lg: 0 10px 25px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}
body {
font-family: 'Inter', system-ui, -apple-system, sans-serif;
line-height: 1.7;
color: var(--text-primary);
background-color: var(--bg-primary);
transition: background-color 0.3s ease, color 0.3s ease;
font-size: 16px;
-webkit-font-smoothing: antialiased;
}
/* Typography */
h1, h2, h3, h4, h5, h6 {
font-weight: 600;
line-height: 1.2;
margin-bottom: 0.75rem;
letter-spacing: -0.02em;
}
h1 {
font-size: 3.5rem;
font-weight: 700;
text-align: center;
margin-bottom: 1.25rem;
color: var(--text-primary);
}
h2 {
font-size: 2rem;
margin-bottom: 2.5rem;
text-align: center;
position: relative;
padding-bottom: 1rem;
}
h2::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 40px;
height: 2px;
background-color: var(--accent-primary);
border-radius: 2px;
}
h3 {
font-size: 1.25rem;
font-weight: 600;
color: var(--text-primary);
}
p {
margin-bottom: 1.25rem;
color: var(--text-secondary);
font-weight: 400;
}
a {
color: var(--accent-primary);
text-decoration: none;
transition: color 0.2s ease;
}
a:hover {
text-decoration: underline;
text-underline-offset: 4px;
}
ul {
padding-left: 1.2rem;
margin-bottom: 1.25rem;
color: var(--text-secondary);
}
li {
margin-bottom: 0.5rem;
}
/* Layout */
.container {
max-width: 900px; /* narrowed for better reading length */
margin: 0 auto;
padding: 0 1.5rem;
}
.section {
padding: 6rem 0;
border-bottom: 1px solid var(--border-color);
}
.section:last-child {
border-bottom: none;
}
/* Header */
.site-header {
position: fixed;
top: 0;
left: 0;
right: 0;
background: var(--bg-primary);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border-bottom: 1px solid var(--border-color);
z-index: 1000;
background-color: color-mix(in srgb, var(--bg-primary) 85%, transparent);
}
.nav {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 1.5rem;
max-width: 1200px;
margin: 0 auto;
}
.brand {
display: flex;
align-items: center;
gap: 0.75rem;
font-weight: 600;
font-size: 1.1rem;
color: var(--text-primary);
}
.brand:hover {
text-decoration: none;
}
.logo {
width: 32px;
height: 32px;
}
.nav-links {
display: flex;
align-items: center;
gap: 2rem;
list-style: none;
margin-bottom: 0;
}
.nav-links a {
font-weight: 500;
font-size: 0.9rem;
color: var(--text-secondary);
}
.nav-links a:hover {
color: var(--text-primary);
text-decoration: none;
}
.nav-toggle {
display: none;
background: none;
border: none;
font-size: 1.5rem;
color: var(--text-primary);
cursor: pointer;
}
/* Hero Section */
.hero {
padding: 10rem 0 6rem;
text-align: center;
}
.profile-container {
margin-bottom: 2.5rem;
}
.profile-avatar {
width: 140px;
height: 140px;
margin: 0 auto;
display: block;
border-radius: 50%;
object-fit: cover;
border: 1px solid var(--border-color);
box-shadow: var(--shadow-md);
}
.hero-subtitle {
font-size: 1.25rem;
max-width: 650px;
margin: 0 auto 2.5rem;
color: var(--text-secondary);
line-height: 1.8;
}
.cta {
display: flex;
gap: 1rem;
justify-content: center;
flex-wrap: wrap;
margin-bottom: 3rem;
}
.quick-facts {
display: flex;
gap: 2rem;
justify-content: center;
flex-wrap: wrap;
list-style: none;
font-size: 0.9rem;
color: var(--text-secondary);
padding: 0;
}
/* Buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.75rem 1.5rem;
border-radius: var(--radius-button);
font-weight: 500;
text-decoration: none;
cursor: pointer;
transition: all 0.2s ease;
font-size: 0.95rem;
border: 1px solid transparent;
}
.btn:hover {
text-decoration: none;
}
.btn.primary {
background-color: var(--text-primary);
color: var(--bg-primary);
}
.btn.primary:hover {
background-color: var(--text-secondary);
}
.btn:not(.primary):not(.ghost) {
background: transparent;
color: var(--text-primary);
border-color: var(--border-color);
}
.btn:not(.primary):not(.ghost):hover {
background: var(--bg-secondary);
border-color: var(--text-muted);
}
.btn.ghost {
background: transparent;
color: var(--text-secondary);
}
.btn.ghost:hover {
background: var(--bg-secondary);
color: var(--text-primary);
}
/* Cards / Grid Layouts */
.cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1.5rem;
}
.card {
background: transparent;
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 2rem;
transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover {
transform: translateY(-4px);
box-shadow: var(--shadow-lg);
border-color: var(--text-muted);
}
.card.kpi {
text-align: center;
padding: 2rem 1.5rem;
}
.card.kpi h3 {
font-size: 2.25rem;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 0.5rem;
}
.card.kpi p {
font-size: 0.9rem;
margin-bottom: 0;
}
.card.project h3 {
margin-bottom: 1rem;
}
/* Timeline / Experience */
.timeline {
list-style: none;
position: relative;
padding-left: 0;
margin-left: 1rem;
border-left: 1px solid var(--border-color);
}
.timeline > li {
position: relative;
margin-bottom: 3rem;
padding-left: 2.5rem;
}
.timeline > li::before {
content: '';
position: absolute;
left: -5px;
top: 6px;
width: 9px;
height: 9px;
border-radius: 50%;
background: var(--text-muted);
}
.time {
font-size: 0.85rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--text-muted);
margin-bottom: 0.5rem;
display: block;
}
.content {
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 1.5rem 2rem;
margin-top: 0.5rem;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.content:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
.content h3 {
font-size: 1.15rem;
margin-bottom: 1rem;
}
.content ul {
padding-left: 1.2rem;
}
/* Case Studies */
.cases {
display: grid;
gap: 1rem;
}
.case {
background: transparent;
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
overflow: hidden;
transition: border-color 0.2s ease;
}
.case[open] {
border-color: var(--text-muted);
}
.case summary {
padding: 1.5rem;
cursor: pointer;
list-style: none;
display: flex;
flex-direction: column;
}
.case summary::-webkit-details-marker {
display: none;
}
.case summary h3 {
margin-bottom: 0.5rem;
}
.case summary .tags {
margin-top: 0.5rem;
}
.case-details {
padding: 0 1.5rem 1.5rem;
}
.case-details h4 {
font-size: 1rem;
color: var(--text-primary);
margin: 1.5rem 0 0.5rem;
font-weight: 600;
}
/* Tags and Chips (Minimalist) */
.tags {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
padding: 0;
}
.tags span {
background: transparent;
color: var(--text-secondary);
border: 1px solid var(--border-color);
padding: 0.2rem 0.6rem;
border-radius: 4px;
font-size: 0.75rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.02em;
}
.chips {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
list-style: none;
margin-bottom: 2rem;
padding: 0;
}
.chips li {
background: transparent;
border: 1px solid var(--border-color);
color: var(--text-primary);
padding: 0.4rem 1rem;
border-radius: 4px;
font-size: 0.85rem;
font-weight: 500;
}
.sub {
font-size: 1.1rem;
margin: 2.5rem 0 1rem;
color: var(--text-primary);
font-weight: 600;
}
.edu {
list-style: none;
margin-bottom: 2rem;
padding: 0;
}
.edu li {
margin-bottom: 0.5rem;
color: var(--text-secondary);
}
/* Contact */
.contact {
display: flex;
gap: 1rem;
justify-content: center;
flex-wrap: wrap;
margin-top: 2rem;
}
/* Footer */
.site-footer {
background: var(--bg-secondary);
border-top: 1px solid var(--border-color);
padding: 3rem 0;
text-align: center;
}
.site-footer small {
color: var(--text-muted);
}
/* Theme Toggle */
#themeToggle {
background: none;
border: none;
font-size: 1.2rem;
cursor: pointer;
padding: 0.5rem;
border-radius: 50%;
color: var(--text-secondary);
transition: color 0.2s ease, background-color 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
}
#themeToggle:hover {
background: var(--bg-secondary);
color: var(--text-primary);
}
/* Responsive */
@media (max-width: 768px) {
.nav-toggle {
display: block;
}
.nav-links {
position: absolute;
top: 100%;
left: 0;
right: 0;
background: var(--bg-primary);
border-top: 1px solid var(--border-color);
flex-direction: column;
padding: 1rem;
gap: 1rem;
transform: translateY(-10px);
opacity: 0;
visibility: hidden;
transition: all 0.2s ease;
box-shadow: var(--shadow-sm);
}
.nav-links.active {
transform: translateY(0);
opacity: 1;
visibility: visible;
}
h1 {
font-size: 2.5rem;
}
/* Narrower container for mobile */
.hero {
padding: 7rem 0 4rem;
}
}
/* Animation */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(15px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.card, .timeline li, .case {
animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
/* Staggered animation */
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }
.card:nth-child(5) { animation-delay: 0.4s; }
.card:nth-child(6) { animation-delay: 0.5s; }
.card:nth-child(7) { animation-delay: 0.6s; }
.card:nth-child(8) { animation-delay: 0.7s; }
html {
scroll-behavior: smooth;
}