feat(ui): electric Bat-Computer redesign — cyan→magenta theme
build-and-deploy / build (push) Failing after 11m29s
build-and-deploy / build (push) Failing after 11m29s
Cinematic full-page backdrop: per-theme Bat-Computer board image, scroll-panned (S→E→SE→NE) via CSS scroll-driven animation behind a legibility scrim — replaces the grid/aura motif. - Accent retuned royal-blue → the board's cyan→magenta; headline runs a cyan→magenta electric sweep; gradient primary CTA + scroll-progress line. - Display face: self-hosted Chakra Petch (OFL) on hero + section titles. - Skill chips reworked as circuit-node chips (glowing via + gradient hover outline); frosted-glass cards with a cyan→magenta hover hairline; section eyebrows get a gradient tick. - Remove unused BackgroundGrid component + grid assets. All CSS-only / zero external requests / no inline JS — strict CSP and A+ security headers preserved.
This commit is contained in:
+181
-4
@@ -1,6 +1,24 @@
|
||||
@import "tailwindcss";
|
||||
@import "./tokens.css";
|
||||
|
||||
/* ---- Display face: Chakra Petch (self-hosted woff2, OFL — see public/fonts) -
|
||||
Latin subset, ~10KB/weight. font-display:swap so text paints instantly in the
|
||||
sans fallback and swaps when the face loads (zero layout-shift on the headline). */
|
||||
@font-face {
|
||||
font-family: "Chakra Petch";
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url("/fonts/chakra-petch-600.woff2") format("woff2");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Chakra Petch";
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url("/fonts/chakra-petch-700.woff2") format("woff2");
|
||||
}
|
||||
|
||||
/* ---- Base ---------------------------------------------------------------- */
|
||||
|
||||
* {
|
||||
@@ -120,25 +138,65 @@ svg {
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
.btn--primary {
|
||||
background: var(--accent);
|
||||
background: linear-gradient(100deg, var(--accent), var(--accent-2));
|
||||
color: var(--accent-ink);
|
||||
border-color: transparent;
|
||||
font-weight: 600;
|
||||
}
|
||||
.btn--primary:hover {
|
||||
background: var(--accent-strong);
|
||||
filter: brightness(1.08);
|
||||
box-shadow: 0 8px 22px var(--accent-glow);
|
||||
}
|
||||
|
||||
/* ---- Cards / tags -------------------------------------------------------- */
|
||||
|
||||
.card {
|
||||
background: var(--surface);
|
||||
position: relative;
|
||||
/* Frosted glass over the Bat-Computer board — semi-opaque surface + blur so a
|
||||
hint of the circuitry diffuses through without hurting legibility. */
|
||||
background: color-mix(in srgb, var(--surface) 86%, transparent);
|
||||
backdrop-filter: blur(14px) saturate(1.1);
|
||||
-webkit-backdrop-filter: blur(14px) saturate(1.1);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
|
||||
transition: border-color 0.25s var(--ease), transform 0.25s var(--ease),
|
||||
box-shadow 0.25s var(--ease);
|
||||
}
|
||||
/* A cyan→magenta hairline that ignites along the top edge on hover. Inset from
|
||||
the corners so it stays inside the border radius (no clip needed). */
|
||||
.card::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 16px;
|
||||
right: 16px;
|
||||
height: 1px;
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
transparent,
|
||||
var(--accent),
|
||||
var(--accent-2),
|
||||
transparent
|
||||
);
|
||||
opacity: 0;
|
||||
transition: opacity 0.25s var(--ease);
|
||||
pointer-events: none;
|
||||
}
|
||||
.card:hover {
|
||||
border-color: var(--accent-line);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: var(--shadow), 0 0 22px var(--accent-glow);
|
||||
}
|
||||
.card:hover::before {
|
||||
opacity: 0.9;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.card {
|
||||
transition: border-color 0.25s var(--ease);
|
||||
}
|
||||
.card:hover {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
.tag {
|
||||
@@ -269,3 +327,122 @@ svg {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---- PRO scroll UI — flowing aurora + scroll progress (CSS-only, CSP-safe) -
|
||||
Native scroll-driven animations (animation-timeline). Degrades to a gentle
|
||||
continuous drift where unsupported; fully disabled under reduced-motion. */
|
||||
|
||||
/* A thin royal line at the very top that fills as the page scrolls. */
|
||||
.scroll-progress {
|
||||
position: fixed;
|
||||
inset: 0 0 auto 0;
|
||||
height: 2px;
|
||||
z-index: 200;
|
||||
background: linear-gradient(90deg, var(--accent), var(--accent-2));
|
||||
box-shadow: 0 0 14px var(--accent-glow);
|
||||
transform: scaleX(0);
|
||||
transform-origin: 0 50%;
|
||||
pointer-events: none;
|
||||
}
|
||||
@supports (animation-timeline: scroll()) {
|
||||
.scroll-progress {
|
||||
animation: progressGrow linear both;
|
||||
animation-timeline: scroll(root block);
|
||||
}
|
||||
}
|
||||
@keyframes progressGrow {
|
||||
to {
|
||||
transform: scaleX(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* ---- Cinematic backing: the Bat-Computer board, panned by scroll -----------
|
||||
A fixed full-screen image (dark/light per theme) that pans S → E → SE → NE as
|
||||
the page scrolls. A scrim keeps text legible (darker on the left for the hero
|
||||
headline). GPU transform only; static + legible under reduced-motion. */
|
||||
.site-bg {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -2;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
}
|
||||
.site-bg__img {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 168%;
|
||||
height: 168%;
|
||||
object-fit: cover;
|
||||
transform: translate(-50%, -50%);
|
||||
will-change: transform;
|
||||
}
|
||||
.site-bg__img--light {
|
||||
display: none;
|
||||
}
|
||||
[data-theme="light"] .site-bg__img--dark {
|
||||
display: none;
|
||||
}
|
||||
[data-theme="light"] .site-bg__img--light {
|
||||
display: block;
|
||||
}
|
||||
.site-bg__scrim {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background:
|
||||
linear-gradient(
|
||||
90deg,
|
||||
rgba(9, 12, 20, 0.85) 0%,
|
||||
rgba(9, 12, 20, 0.52) 44%,
|
||||
rgba(9, 12, 20, 0.34) 100%
|
||||
),
|
||||
linear-gradient(
|
||||
180deg,
|
||||
rgba(9, 12, 20, 0.18) 0%,
|
||||
rgba(9, 12, 20, 0.5) 58%,
|
||||
rgba(9, 12, 20, 0.82) 100%
|
||||
);
|
||||
}
|
||||
[data-theme="light"] .site-bg__scrim {
|
||||
background:
|
||||
linear-gradient(
|
||||
90deg,
|
||||
rgba(246, 248, 251, 0.86) 0%,
|
||||
rgba(246, 248, 251, 0.56) 44%,
|
||||
rgba(246, 248, 251, 0.4) 100%
|
||||
),
|
||||
linear-gradient(
|
||||
180deg,
|
||||
rgba(246, 248, 251, 0.22) 0%,
|
||||
rgba(246, 248, 251, 0.54) 58%,
|
||||
rgba(246, 248, 251, 0.82) 100%
|
||||
);
|
||||
}
|
||||
@supports (animation-timeline: scroll()) {
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
.site-bg__img {
|
||||
animation: bgPan linear both;
|
||||
animation-timeline: scroll(root block);
|
||||
}
|
||||
}
|
||||
}
|
||||
@keyframes bgPan {
|
||||
0% {
|
||||
transform: translate(-50%, -38%);
|
||||
}
|
||||
35% {
|
||||
transform: translate(-50%, -62%);
|
||||
}
|
||||
68% {
|
||||
transform: translate(-62%, -62%);
|
||||
}
|
||||
100% {
|
||||
transform: translate(-62%, -38%);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.scroll-progress {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
+21
-14
@@ -17,22 +17,26 @@
|
||||
--text-dim: #9aa7b8;
|
||||
--text-faint: #61708a;
|
||||
|
||||
/* Accent — single restrained teal */
|
||||
--accent: #5eead4;
|
||||
--accent-strong: #2dd4bf;
|
||||
--accent-ink: #042f2a; /* text on an accent fill */
|
||||
--accent-dim: rgba(94, 234, 212, 0.12);
|
||||
--accent-line: rgba(94, 234, 212, 0.28);
|
||||
--accent-glow: rgba(45, 212, 191, 0.22);
|
||||
/* Accent — electric cyan→magenta, merged with the Bat-Computer board */
|
||||
--accent: #3fbaf5; /* cyan-blue (the board's left side) */
|
||||
--accent-2: #e879f9; /* magenta (the board's right side) */
|
||||
--accent-strong: #1f9fe0;
|
||||
--accent-ink: #04161f; /* text on an accent fill */
|
||||
--accent-dim: rgba(63, 186, 245, 0.12);
|
||||
--accent-line: rgba(63, 186, 245, 0.3);
|
||||
--accent-glow: rgba(63, 186, 245, 0.32);
|
||||
|
||||
/* Grid / topology motif */
|
||||
--grid-line: rgba(148, 163, 184, 0.06);
|
||||
|
||||
/* Fonts — system stacks only (zero external requests). */
|
||||
/* Fonts — system stacks (zero external requests) + one self-hosted display face. */
|
||||
--font-sans: "Inter var", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
|
||||
Roboto, Helvetica, Arial, sans-serif;
|
||||
--font-mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "SF Mono",
|
||||
Menlo, Consolas, "Liberation Mono", monospace;
|
||||
/* Display face — Chakra Petch (self-hosted woff2, OFL). Used ONLY on the hero
|
||||
name + section titles; body stays in --font-sans for readability. */
|
||||
--font-display: "Chakra Petch", var(--font-sans);
|
||||
|
||||
/* Fluid type scale */
|
||||
--step--1: clamp(0.8rem, 0.76rem + 0.2vw, 0.9rem);
|
||||
@@ -77,12 +81,15 @@
|
||||
--text-dim: #475467;
|
||||
--text-faint: #6b7689;
|
||||
|
||||
--accent: #0d9488;
|
||||
--accent-strong: #0f766e;
|
||||
--accent-ink: #ecfdf5;
|
||||
--accent-dim: rgba(13, 148, 136, 0.1);
|
||||
--accent-line: rgba(13, 148, 136, 0.3);
|
||||
--accent-glow: rgba(13, 148, 136, 0.16);
|
||||
/* Accent — same electric cyan→magenta as dark, dropped in value for contrast
|
||||
on the light sandstone board. */
|
||||
--accent: #0c8fce; /* deeper cyan reads on white */
|
||||
--accent-2: #c026d3; /* magenta partner */
|
||||
--accent-strong: #0a72a6;
|
||||
--accent-ink: #f2fbff;
|
||||
--accent-dim: rgba(12, 143, 206, 0.1);
|
||||
--accent-line: rgba(12, 143, 206, 0.32);
|
||||
--accent-glow: rgba(192, 38, 211, 0.16);
|
||||
|
||||
--grid-line: rgba(15, 23, 42, 0.05);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user