162 lines
4.5 KiB
CSS
162 lines
4.5 KiB
CSS
/* Define CSS Variables for a Dark Mode theme */
|
|
:root {
|
|
--bg-color: #0f172a; /* Dark blue background */
|
|
--card-bg: #1e293b; /* Slightly lighter dark blue for cards */
|
|
--text-primary: #f8fafc; /* Bright white for main text */
|
|
--text-secondary: #94a3b8; /* Grayish-blue for secondary text */
|
|
--accent: #3b82f6; /* A pleasant blue for accents */
|
|
--hover-accent: #60a5fa; /* Lighter blue for hover effects */
|
|
}
|
|
|
|
/* Base styles for the document body */
|
|
body {
|
|
background-color: var(--bg-color);
|
|
color: var(--text-primary);
|
|
font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
|
margin: 0;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
/* Layout Container: Centers the content and limits its width */
|
|
.container {
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
padding: 2rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4rem; /* Spacing between sections */
|
|
}
|
|
|
|
/* Hero / Title Area: Designed to take up most of the initial screen */
|
|
.hero-section {
|
|
height: 80vh; /* Takes 80% of the viewport height */
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center; /* Center content vertically */
|
|
align-items: center; /* Center content horizontally */
|
|
text-align: center;
|
|
}
|
|
|
|
/* Styling for the main headline */
|
|
.hero-section h1 {
|
|
font-size: 4rem;
|
|
margin: 0;
|
|
/* Creates a gradient text effect */
|
|
background: linear-gradient(to right, #fff, var(--accent));
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
}
|
|
|
|
/* Styling for the subtitle */
|
|
.subtitle {
|
|
font-size: 1.5rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* 'About Me' Card styling */
|
|
.bio-card {
|
|
background-color: var(--card-bg);
|
|
padding: 2rem;
|
|
border-radius: 12px;
|
|
border-left: 4px solid var(--accent); /* Accent color on the left border */
|
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
/* Styling for section headers */
|
|
h2 {
|
|
font-size: 2rem;
|
|
margin-bottom: 1.5rem;
|
|
border-bottom: 2px solid var(--card-bg);
|
|
padding-bottom: 0.5rem;
|
|
display: inline-block; /* Makes the underline only cover the text */
|
|
}
|
|
|
|
/* Grid for the Social Links */
|
|
.grid-links {
|
|
display: grid;
|
|
/* Responsive grid: auto-fits cards with a minimum width of 250px */
|
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
/* Styling for the individual Social Link cards */
|
|
.social-card {
|
|
background-color: var(--card-bg);
|
|
padding: 1.5rem;
|
|
border-radius: 12px;
|
|
text-decoration: none;
|
|
color: var(--text-primary);
|
|
/* Transition for smooth hover effect */
|
|
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
border: 1px solid transparent;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Styling for the emoji/icon inside the card */
|
|
.social-card .icon {
|
|
font-size: 2rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
/* Styling for the card title */
|
|
.social-card h3 {
|
|
margin: 0;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
/* Styling for the card subtitle/description */
|
|
.social-card p {
|
|
margin: 0.5rem 0 0 0;
|
|
color: var(--text-secondary);
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
/* --- ANIMATIONS --- */
|
|
|
|
/* Hover Effect: Scale up and slight lift/shadow */
|
|
.social-card:hover {
|
|
transform: scale(1.05) translateY(-5px); /* Makes it 5% bigger and lifts it 5px */
|
|
background-color: #263345;
|
|
border-color: var(--accent);
|
|
box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.2);
|
|
}
|
|
|
|
/* Keyframe definition for 'fade in up' animation */
|
|
@keyframes fadeInUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(40px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
/* Initial animation for the title/hero section (loads immediately) */
|
|
.fade-in {
|
|
animation: fadeInUp 1s ease-out forwards;
|
|
}
|
|
|
|
/* Scroll Animation: Elements fade in as they enter the viewport */
|
|
.scroll-reveal {
|
|
animation: fadeInUp 1s ease-out forwards;
|
|
/* Uses CSS View Timeline for true scroll-based animation (modern browser feature) */
|
|
animation-timeline: view();
|
|
animation-range: entry 10% cover 30%; /* Triggers when 10% of element enters and ends when 30% of viewport is covered */
|
|
|
|
/* Fallback: Start invisible */
|
|
opacity: 0;
|
|
}
|
|
|
|
/* Fallback for browsers that do not support 'animation-timeline: view()' */
|
|
@supports not (animation-timeline: view()) {
|
|
.scroll-reveal {
|
|
/* If scroll-reveal is not supported, just make the element visible */
|
|
opacity: 1;
|
|
transform: none;
|
|
}
|
|
} |