Files
cv/src/index.css
T

351 lines
7.5 KiB
CSS
Raw Normal View History

/* Theme variables — Dark mode (default) */
2026-10-04 09:34:55 +07:00
:root {
2026-10-16 21:14:59 +07:00
--bg-primary: #151914;
--bg-surface: #202423;
--bg-elevated: #272a28;
--text-primary: #f6f5f2;
--text-secondary: #b7aea0;
--text-muted: #8f9a8e;
--accent: #f87171;
--accent-hover: #fca5a5;
--accent-active: #f06060;
--text-on-accent: #151914;
--accent-soft: rgba(248, 113, 113, 0.12);
2026-10-16 21:14:59 +07:00
--accent-tint: #2f1e1a;
--accent-glow: rgba(248, 113, 113, 0.3);
2026-10-16 21:14:59 +07:00
--border: #2a3028;
--border-strong: #3a403a;
--shadow: rgba(0, 0, 0, 0.45);
--inset-highlight: rgba(255, 255, 255, 0.05);
--code-bg: #1a1e1b;
--success: #4ade80;
--success-glow: rgba(74, 222, 128, 0.35);
--error: #fca5a5;
--warning: #fbbf24;
--grid-color: rgba(246, 245, 242, 0.06);
color-scheme: dark;
2026-10-04 09:34:55 +07:00
2026-10-16 21:14:59 +07:00
--sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
--mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
2026-10-04 09:34:55 +07:00
--max-wide: 1200px;
--max-content: 800px;
2026-10-16 21:14:59 +07:00
--text-body: 18px;
--text-lede: 20px;
--text-meta: 15px;
--leading-body: 1.65;
--measure-prose: 600px;
--measure-page: 680px;
--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);
2026-10-04 09:34:55 +07:00
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Light mode */
:root[data-theme='light'] {
2026-10-16 21:14:59 +07:00
--bg-primary: #f6f5f2;
--bg-surface: #fbfaf8;
--bg-elevated: #ffffff;
2026-10-16 21:14:59 +07:00
--text-primary: #151914;
--text-secondary: #6b6d68;
--text-muted: #756b62;
--accent: #b04138;
--accent-hover: #a8382f;
--accent-active: #9b3229;
--text-on-accent: #ffffff;
--accent-soft: rgba(176, 65, 56, 0.1);
2026-10-16 21:14:59 +07:00
--accent-tint: #f5e3e1;
--accent-glow: rgba(176, 65, 56, 0.22);
2026-10-16 21:14:59 +07:00
--border: #e3e1dc;
--border-strong: #d9d6d0;
--shadow: rgba(21, 25, 20, 0.1);
--inset-highlight: rgba(255, 255, 255, 0.9);
--code-bg: #efece6;
--success: #15803d;
--success-glow: rgba(21, 128, 61, 0.35);
--error: #991b1b;
--warning: #b45309;
--grid-color: rgba(21, 25, 20, 0.07);
color-scheme: light;
2026-10-04 09:34:55 +07:00
}
/* Blue palette. Both selectors carry two attributes (0,3,0), so they beat
:root (0,1,0) and :root[data-theme='light'] (0,2,0) regardless of block order. */
:root[data-theme='dark'][data-palette='blue'] {
--bg-primary: #0f1117;
--bg-surface: #161922;
--bg-elevated: #1c2030;
--text-primary: #e8eaed;
--text-secondary: #9aa0a6;
--text-muted: #828d9e;
--accent: #60a5fa;
--accent-hover: #93c5fd;
--accent-active: #3b82f6;
--text-on-accent: #0f1117;
--accent-soft: rgba(96, 165, 250, 0.12);
--accent-tint: #182338;
--accent-glow: rgba(96, 165, 250, 0.3);
--border: #2a3040;
--border-strong: #39415a;
--shadow: rgba(0, 0, 0, 0.45);
--inset-highlight: rgba(255, 255, 255, 0.05);
--code-bg: #1a1e2e;
--success: #34d399;
--success-glow: rgba(52, 211, 153, 0.35);
--error: #f87171;
--warning: #fbbf24;
--grid-color: rgba(232, 234, 237, 0.06);
color-scheme: dark;
}
:root[data-theme='light'][data-palette='blue'] {
--bg-primary: #f4f6f9;
--bg-surface: #fbfcfe;
--bg-elevated: #ffffff;
--text-primary: #111827;
--text-secondary: #4b5563;
--text-muted: #5c6b82;
--accent: #2563eb;
--accent-hover: #1d4ed8;
--accent-active: #1e40af;
--text-on-accent: #ffffff;
--accent-soft: rgba(37, 99, 235, 0.1);
--accent-tint: #eef3fc;
--accent-glow: rgba(37, 99, 235, 0.22);
--border: #dfe3ea;
--border-strong: #d3d8e1;
--shadow: rgba(17, 24, 39, 0.1);
--inset-highlight: rgba(255, 255, 255, 0.9);
--code-bg: #eceff5;
--success: #15803d;
--success-glow: rgba(21, 128, 61, 0.35);
--error: #991b1b;
--warning: #b45309;
--grid-color: rgba(17, 24, 39, 0.07);
color-scheme: light;
}
/* Fixed identity colours: a picker row previews its own palette rather than the active one,
and the bar's palette icon keeps a constant "empty" half in both themes. Referenced only by
`.nav-palette-preview` (previews) and `.nav-palette-swatch` (the empty half). */
:root {
--preview-red-accent: #b04138;
--preview-red-bg: #f6f5f2;
--preview-blue-accent: #2563eb;
--preview-blue-bg: #f4f6f9;
--swatch-empty: #ffffff;
}
2026-10-16 21:14:59 +07:00
/* Pre-hydration / no-JS: honour an OS light preference */
@media (prefers-color-scheme: light) {
:root:not([data-theme='dark']) {
2026-10-16 21:14:59 +07:00
--bg-primary: #f6f5f2;
--bg-surface: #fbfaf8;
--bg-elevated: #ffffff;
2026-10-16 21:14:59 +07:00
--text-primary: #151914;
--text-secondary: #6b6d68;
--text-muted: #756b62;
--accent: #b04138;
--accent-hover: #a8382f;
--accent-active: #9b3229;
--text-on-accent: #ffffff;
--accent-soft: rgba(176, 65, 56, 0.1);
2026-10-16 21:14:59 +07:00
--accent-tint: #f5e3e1;
--accent-glow: rgba(176, 65, 56, 0.22);
2026-10-16 21:14:59 +07:00
--border: #e3e1dc;
--border-strong: #d9d6d0;
--shadow: rgba(21, 25, 20, 0.1);
--inset-highlight: rgba(255, 255, 255, 0.9);
--code-bg: #efece6;
--success: #15803d;
--success-glow: rgba(21, 128, 61, 0.35);
--error: #991b1b;
--warning: #b45309;
--grid-color: rgba(21, 25, 20, 0.07);
color-scheme: light;
}
}
/* Reset */
*,
*::before,
*::after {
2026-10-04 09:34:55 +07:00
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
scroll-behavior: smooth;
2026-10-04 09:34:55 +07:00
}
body {
font-family: var(--sans);
min-height: 100vh;
overflow-x: hidden;
2026-10-04 09:34:55 +07:00
}
#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;
2026-10-04 09:34:55 +07:00
}
h1 {
font-size: clamp(32px, 5vw, 64px);
letter-spacing: -0.02em;
2026-10-04 09:34:55 +07:00
}
h2 {
font-size: clamp(24px, 4vw, 40px);
letter-spacing: -0.01em;
}
h3 {
2026-10-16 21:14:59 +07:00
font-size: 21px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 15px;
}
p {
2026-10-16 21:14:59 +07:00
font-size: var(--text-body);
line-height: var(--leading-body);
color: var(--text-secondary);
}
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;
2026-10-04 09:34:55 +07:00
}
code {
font-family: var(--mono);
font-size: 0.9em;
2026-10-04 09:34:55 +07:00
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;
}
.section {
padding: 80px 0;
}
@media (max-width: 768px) {
.section {
padding: 48px 0;
}
.container-wide,
.container-content {
padding-left: 32px;
padding-right: 32px;
}
}
@media (min-width: 769px) and (max-width: 1200px) {
.container-wide,
.container-content {
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;
}
}