Skip to content

Commit a2f163f

Browse files
feat: update CSS and JavaScript for improved matrix background effects and visual consistency across pages
1 parent 261b366 commit a2f163f

2 files changed

Lines changed: 14 additions & 10 deletions

File tree

assets/css/style.css

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ body {
5050
font-size: 1rem;
5151
line-height: 1.6;
5252
color: var(--text);
53-
background: #030712;
53+
/* Light base so matrix (multiply + dark glyphs) reads as black rain in open areas */
54+
background: #f1f5f9;
5455
background-attachment: fixed;
5556
min-height: 100vh;
5657
min-height: 100dvh;
@@ -68,7 +69,7 @@ a:hover {
6869
text-decoration: underline;
6970
}
7071

71-
/* Full-viewport matrix rain behind all pages (see [data-matrix] in main.js). */
72+
/* Full-viewport matrix: dark glyphs + multiply = black-ish rain on light page gaps */
7273
.matrix-canvas--page-bg {
7374
position: fixed;
7475
inset: 0;
@@ -77,8 +78,8 @@ a:hover {
7778
min-height: 100vh;
7879
min-height: 100dvh;
7980
z-index: 0;
80-
opacity: 0.78;
81-
mix-blend-mode: screen;
81+
opacity: 0.58;
82+
mix-blend-mode: multiply;
8283
pointer-events: none;
8384
}
8485

@@ -285,9 +286,9 @@ main > .section:not(.section-alt):not(.section-tint):not(.home-intro):not(.home-
285286
z-index: 1;
286287
background: linear-gradient(
287288
145deg,
288-
rgba(12, 18, 34, 0.55) 0%,
289-
rgba(30, 27, 75, 0.5) 42%,
290-
rgba(14, 116, 144, 0.45) 100%
289+
rgba(12, 18, 34, 0.78) 0%,
290+
rgba(30, 27, 75, 0.74) 42%,
291+
rgba(14, 116, 144, 0.68) 100%
291292
);
292293
background-size: 200% 200%;
293294
animation: hero-gradient 14s ease infinite;

assets/js/main.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,16 +291,19 @@
291291
var v = viewportSize();
292292
var w = pageBg ? v.w : canvas.clientWidth || v.w;
293293
var h = pageBg ? v.h : canvas.clientHeight || 420;
294-
ctx.fillStyle = "rgba(3, 7, 18, 0.07)";
294+
/* Fade trails toward “paper” so multiply blend keeps gutters feeling light */
295+
ctx.fillStyle = pageBg ? "rgba(255, 255, 255, 0.14)" : "rgba(3, 7, 18, 0.07)";
295296
ctx.fillRect(0, 0, w, h);
296297

297298
ctx.font =
298299
"bold 15px ui-monospace, SFMono-Regular, Menlo, Consolas, 'Cascadia Code', monospace";
299300
for (var i = 0; i < drops.length; i++) {
300301
var x = i * cell + Math.floor(cell * 0.35);
301302
var y = drops[i];
302-
var hue = (118 + (i % 7) * 14) % 160;
303-
ctx.fillStyle = "hsla(" + hue + ", 96%, 58%, 0.92)";
303+
/* Near-black with a hint of matrix green; reads black on white after multiply */
304+
var l = 0.08 + (i % 5) * 0.018;
305+
var a = pageBg ? 0.82 : 0.92;
306+
ctx.fillStyle = "hsla(135, 35%, " + Math.round(l * 100) + "%, " + a + ")";
304307
var code = 0x30a0 + Math.floor(Math.random() * 96);
305308
ctx.fillText(String.fromCharCode(code), x, y);
306309
drops[i] = y + cell * 0.85 + Math.random() * 12;

0 commit comments

Comments
 (0)