refactor: drive theme colors through CSS custom properties

Phase 2 (behavior-preserving):
- Add :root color tokens to app.css mirroring theme.ts cssVars
- Replace solid theme hex literals in SkillTree.svelte <style> with var(--..):
  #ffd700 -> --color-gold (x17), #a8a8b8 -> --text-muted (x8),
  #1a1a2e -> --panel-from, #0f0f1a -> --panel-to, #f9a825 -> --color-skills
- body background now var(--bg-space)

Values are identical to the literals; every referenced var has a :root
definition. rgba() shadows and one-off grays/badge colors left as-is.
check/lint/build all clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
TehRiehlDealandClaude Opus 4.8 committed 2026-06-03 09:54:29 -07:00
1 parent 6c652e7138
commit 6091c62654
2 files changed
+48 -32

No files matched your search

+17 -1
View File
@@ -1,3 +1,19 @@
/*
* Theme tokens — single source of truth for colours is src/lib/theme.ts.
* These custom properties mirror its `cssVars` map; keep the two in sync.
*/
:root {
--color-gold: #ffd700;
--color-experience: #4ecdc4;
--color-projects: #ff6b6b;
--color-skills: #f9a825;
--color-education: #dda0dd;
--bg-space: #05050a;
--panel-from: #1a1a2e;
--panel-to: #0f0f1a;
--text-muted: #a8a8b8;
}
*,
*::before,
*::after {
@@ -13,5 +29,5 @@ body {
margin: 0;
padding: 0;
overflow: hidden;
background: #05050a;
background: var(--bg-space);
}
+31 -31
View File
@@ -1480,7 +1480,7 @@
<style>
/* Global focus indicators for accessibility */
*:focus-visible {
outline: 2px solid #ffd700;
outline: 2px solid var(--color-gold);
outline-offset: 2px;
}
@@ -1491,14 +1491,14 @@
}
.canvas-container:focus-visible {
outline: 3px solid #ffd700;
outline: 3px solid var(--color-gold);
outline-offset: -3px;
}
/* Tooltip Styles */
.tooltip {
position: fixed;
background: linear-gradient(145deg, #1a1a2e 0%, #12121a 100%);
background: linear-gradient(145deg, var(--panel-from) 0%, #12121a 100%);
border: 1px solid var(--node-color);
border-radius: 8px;
padding: 0.75rem 1rem;
@@ -1530,7 +1530,7 @@
}
.tooltip p {
color: #a8a8b8;
color: var(--text-muted);
margin: 0 0 0.5rem 0;
font-size: 0.8rem;
line-height: 1.5;
@@ -1574,7 +1574,7 @@
}
.modal {
background: linear-gradient(145deg, #1a1a2e 0%, #0f0f1a 100%);
background: linear-gradient(145deg, var(--panel-from) 0%, var(--panel-to) 100%);
border: 1px solid var(--node-color);
border-radius: 12px;
padding: 1.5rem;
@@ -1631,7 +1631,7 @@
}
.modal p {
color: #a8a8b8;
color: var(--text-muted);
line-height: 1.7;
margin: 0;
font-size: 0.9rem;
@@ -1673,7 +1673,7 @@
}
.about-me {
color: #a8a8b8;
color: var(--text-muted);
line-height: 1.7;
margin: 0 0 1rem 0;
font-size: 0.9rem;
@@ -1757,7 +1757,7 @@
.highlights {
margin: 0.75rem 0 0 0;
padding-left: 1.2rem;
color: #a8a8b8;
color: var(--text-muted);
font-size: 0.8rem;
}
@@ -1907,14 +1907,14 @@
transform: translate(-50%, -50%);
text-align: center;
z-index: 1000;
color: #ffd700;
color: var(--color-gold);
}
.loading-indicator p {
font-family: 'Cinzel Decorative', 'Trajan Pro', serif;
font-size: 1.2rem;
margin-top: 1rem;
color: #ffd700;
color: var(--color-gold);
text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
@@ -1922,7 +1922,7 @@
width: 50px;
height: 50px;
border: 4px solid rgba(255, 215, 0, 0.2);
border-top: 4px solid #ffd700;
border-top: 4px solid var(--color-gold);
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto;
@@ -1983,7 +1983,7 @@
.welcome-title h1 {
font-size: 2.5rem;
color: #ffd700;
color: var(--color-gold);
margin: 0;
text-shadow:
0 0 20px rgba(255, 215, 0, 0.8),
@@ -1994,7 +1994,7 @@
.welcome-title p {
font-size: 1rem;
color: #a8a8b8;
color: var(--text-muted);
margin: 0.5rem 0 0 0;
text-transform: uppercase;
letter-spacing: 0.3em;
@@ -2038,8 +2038,8 @@
left: 20px;
width: 48px;
height: 48px;
background: linear-gradient(145deg, #1a1a2e 0%, #0f0f1a 100%);
border: 2px solid #ffd700;
background: linear-gradient(145deg, var(--panel-from) 0%, var(--panel-to) 100%);
border: 2px solid var(--color-gold);
border-radius: 12px;
cursor: pointer;
z-index: 950;
@@ -2047,7 +2047,7 @@
align-items: center;
justify-content: center;
font-size: 24px;
color: #ffd700;
color: var(--color-gold);
box-shadow:
0 0 20px rgba(255, 215, 0, 0.3),
0 4px 12px rgba(0, 0, 0, 0.5);
@@ -2079,8 +2079,8 @@
left: 0;
width: 380px;
height: 100vh;
background: linear-gradient(145deg, #1a1a2e 0%, #0f0f1a 100%);
border-right: 2px solid #ffd700;
background: linear-gradient(145deg, var(--panel-from) 0%, var(--panel-to) 100%);
border-right: 2px solid var(--color-gold);
box-shadow:
4px 0 40px rgba(255, 215, 0, 0.3),
8px 0 80px rgba(255, 215, 0, 0.15);
@@ -2103,7 +2103,7 @@
}
.stats-panel::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, #ffd700 0%, #b7941f 100%);
background: linear-gradient(180deg, var(--color-gold) 0%, #b7941f 100%);
border-radius: 5px;
border: 2px solid rgba(0, 0, 0, 0.3);
}
@@ -2138,7 +2138,7 @@
width: 120px;
height: 120px;
border-radius: 50%;
border: 3px solid #ffd700;
border: 3px solid var(--color-gold);
box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
margin: 0 auto 1rem;
object-fit: cover;
@@ -2150,7 +2150,7 @@
gap: 2rem;
margin-bottom: 1rem;
font-size: 0.9rem;
color: #a8a8b8;
color: var(--text-muted);
}
.stat-item {
@@ -2161,14 +2161,14 @@
.stat-label {
font-weight: bold;
color: #ffd700;
color: var(--color-gold);
text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
.character-name {
font-size: 1.4rem;
font-weight: bold;
color: #ffd700;
color: var(--color-gold);
text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
margin-bottom: 0.25rem;
text-transform: uppercase;
@@ -2177,7 +2177,7 @@
.character-title {
font-size: 0.85rem;
color: #a8a8b8;
color: var(--text-muted);
font-style: italic;
}
@@ -2195,7 +2195,7 @@
}
.proficiency-summary h3 {
color: #ffd700;
color: var(--color-gold);
font-size: 0.9rem;
margin-bottom: 0.75rem;
text-transform: uppercase;
@@ -2215,7 +2215,7 @@
}
.proficiency-count {
color: #ffd700;
color: var(--color-gold);
font-weight: bold;
}
@@ -2250,7 +2250,7 @@
flex: 1;
font-size: 1rem;
font-weight: bold;
color: #f9a825;
color: var(--color-skills);
text-shadow: 0 0 10px rgba(249, 168, 37, 0.3);
}
@@ -2289,7 +2289,7 @@
.skill-item:hover {
background: rgba(255, 255, 255, 0.05);
border-left-color: #f9a825;
border-left-color: var(--color-skills);
}
.skill-item-icon {
@@ -2306,14 +2306,14 @@
.skill-proficiency {
font-size: 0.7rem;
color: #a8a8b8;
color: var(--text-muted);
display: flex;
align-items: center;
gap: 0.25rem;
}
.proficiency-stars {
color: #ffd700;
color: var(--color-gold);
font-size: 0.75rem;
}
@@ -2343,7 +2343,7 @@
height: 85dvh;
border-left: none;
border-right: none;
border-top: 2px solid #ffd700;
border-top: 2px solid var(--color-gold);
border-radius: 16px 16px 0 0;
top: auto;
bottom: 0;