Files
cv/src/index.css
T
dong.nguyen aa30aed903 feat: homepage enhancements - mobile padding, scroll animations, parallax, background gradient
- Fix mobile padding: add media queries for container and hero-content padding
- Add InView wrapper to Hero and About for scroll-triggered animations
- Add Hero parallax effect: photo moves on scroll, content fades out
- Add section background gradient for smooth visual flow between sections
- Unify section containers to container-wide for title alignment
- Add maxWidth wrappers for text-heavy sections (About, Experience, Contact)
- Replace OpenToWorkBadge with RollingTextLink component
- Update nav router links and profile data
- Add spec docs for v2 homepage enhancements and nav rolling text
2026-10-06 23:42:49 +07:00

280 lines
5.0 KiB
CSS

/* Theme variables — Dark mode (default) */
:root {
--bg-primary: #0a0a0a;
--bg-surface: #141414;
--bg-elevated: #1a1a1a;
--text-primary: #f0f0f0;
--text-secondary: #a0a0a0;
--text-muted: #666666;
--accent: #60a5fa;
--accent-hover: #93c5fd;
--accent-active: #3b82f6;
--border: #2a2a2a;
--shadow: rgba(0, 0, 0, 0.3);
--code-bg: #1a1a2e;
--success: #34d399;
--error: #f87171;
--sans: 'Inter', system-ui, -apple-system, sans-serif;
--mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
--max-wide: 1200px;
--max-content: 800px;
--max-narrow: 600px;
--radius-sm: 4px;
--radius-md: 6px;
--radius-lg: 8px;
--transition-fast: 150ms ease;
--transition-normal: 200ms ease;
--transition-slow: 300ms ease;
font-size: 16px;
line-height: 1.6;
color: var(--text-primary);
background: var(--bg-primary);
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Light mode */
:root[data-theme='light'] {
--bg-primary: #ffffff;
--bg-surface: #f5f5f5;
--bg-elevated: #ffffff;
--text-primary: #0a0a0a;
--text-secondary: #404040;
--text-muted: #808080;
--accent: #2563eb;
--accent-hover: #3b82f6;
--accent-active: #1d4ed8;
--border: #e0e0e0;
--shadow: rgba(0, 0, 0, 0.1);
--code-bg: #f0f0ff;
--success: #059669;
--error: #dc2626;
}
/* System theme */
@media (prefers-color-scheme: dark) {
:root:not([data-theme='light']) {
--bg-primary: #0a0a0a;
--bg-surface: #141414;
--bg-elevated: #1a1a1a;
--text-primary: #f0f0f0;
--text-secondary: #a0a0a0;
--text-muted: #666666;
--accent: #60a5fa;
--accent-hover: #93c5fd;
--accent-active: #3b82f6;
--border: #2a2a2a;
--shadow: rgba(0, 0, 0, 0.3);
--code-bg: #1a1a2e;
--success: #34d399;
--error: #f87171;
}
}
@media (prefers-color-scheme: light) {
:root:not([data-theme='dark']) {
--bg-primary: #ffffff;
--bg-surface: #f5f5f5;
--bg-elevated: #ffffff;
--text-primary: #0a0a0a;
--text-secondary: #404040;
--text-muted: #808080;
--accent: #2563eb;
--accent-hover: #3b82f6;
--accent-active: #1d4ed8;
--border: #e0e0e0;
--shadow: rgba(0, 0, 0, 0.1);
--code-bg: #f0f0ff;
--success: #059669;
--error: #dc2626;
}
}
/* Reset */
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
scroll-behavior: smooth;
}
body {
font-family: var(--sans);
min-height: 100vh;
overflow-x: hidden;
}
#root {
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* Typography */
h1, h2, h3, h4, h5, h6 {
color: var(--text-primary);
font-weight: 600;
line-height: 1.2;
}
h1 {
font-size: clamp(32px, 5vw, 64px);
letter-spacing: -0.02em;
}
h2 {
font-size: clamp(24px, 4vw, 40px);
letter-spacing: -0.01em;
}
h3 {
font-size: 24px;
}
p {
color: var(--text-secondary);
line-height: 1.7;
}
a {
color: var(--accent);
text-decoration: none;
transition: color var(--transition-fast);
}
a:hover {
color: var(--accent-hover);
}
a:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
border-radius: 2px;
}
code {
font-family: var(--mono);
font-size: 0.9em;
background: var(--code-bg);
padding: 2px 6px;
border-radius: var(--radius-sm);
}
pre {
font-family: var(--mono);
font-size: 14px;
background: var(--code-bg);
padding: 16px;
border-radius: var(--radius-md);
border: 1px solid var(--border);
overflow-x: auto;
line-height: 1.5;
}
pre code {
background: none;
padding: 0;
}
/* Utilities */
.container-wide {
max-width: var(--max-wide);
margin: 0 auto;
padding: 0 24px;
}
.container-content {
max-width: var(--max-content);
margin: 0 auto;
padding: 0 24px;
}
.container-narrow {
max-width: var(--max-narrow);
margin: 0 auto;
padding: 0 24px;
}
.section {
padding: 80px 0;
}
@media (max-width: 768px) {
.section {
padding: 48px 0;
}
.container-wide,
.container-content,
.container-narrow {
padding-left: 32px;
padding-right: 32px;
}
}
@media (min-width: 769px) and (max-width: 1200px) {
.container-wide,
.container-content,
.container-narrow {
padding-left: 40px;
padding-right: 40px;
}
}
/* Scroll reveal animation */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.animate-in {
animation: fadeInUp var(--transition-slow) ease forwards;
}
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
/* Skip link */
.skip-link {
position: absolute;
top: -100%;
left: 16px;
padding: 8px 16px;
background: var(--accent);
color: white;
border-radius: var(--radius-md);
z-index: 10000;
font-weight: 500;
}
.skip-link:focus {
top: 16px;
}