fix(perf): make website ultra-lightweight, 0% idle CPU, and resolve text disappearance bug
This commit is contained in:
+35
-77
@@ -316,90 +316,48 @@
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
/* Universal 3D Cinematic Extruded Typography */
|
||||
h1, h2, h3, h4, h5, h6, .font-display, .text-3d-chiseled {
|
||||
transform-style: preserve-3d;
|
||||
will-change: transform;
|
||||
text-shadow:
|
||||
0 1px 0 #FFFFFF,
|
||||
0 2px 0 #E5DCCE,
|
||||
0 3px 1px #D6C7B2,
|
||||
0 4px 2px #C5B298,
|
||||
0 6px 6px rgba(15, 23, 42, 0.12),
|
||||
0 12px 24px rgba(15, 23, 42, 0.08);
|
||||
/* Guaranteed Text Visibility - Fix all text disappearance issues */
|
||||
.text-transparent,
|
||||
[class*="text-transparent"],
|
||||
[class*="bg-clip-text"],
|
||||
.text-gradient-brand,
|
||||
.text-gradient-cyan,
|
||||
.text-gradient-champagne {
|
||||
text-shadow: none !important;
|
||||
filter: none !important;
|
||||
transform-style: flat !important;
|
||||
-webkit-text-fill-color: transparent !important;
|
||||
-webkit-background-clip: text !important;
|
||||
background-clip: text !important;
|
||||
display: inline-block;
|
||||
opacity: 1 !important;
|
||||
visibility: visible !important;
|
||||
}
|
||||
|
||||
/* 3D Extruded Stat Numbers & Metric Badges */
|
||||
/* Crisp, Ultra-Lightweight Editorial Headings (Zero CPU load, Zero Disappearance) */
|
||||
h1, h2, h3, h4, h5, h6, .text-3d-chiseled {
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-shadow: 0 1px 1px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
|
||||
/* Crisp Stat Numbers */
|
||||
.stat-value, .stat-number, [data-stat] {
|
||||
display: inline-block;
|
||||
transform-style: preserve-3d;
|
||||
will-change: transform;
|
||||
filter:
|
||||
drop-shadow(0 1px 0 #FFFFFF)
|
||||
drop-shadow(0 2px 0 #E2D6C3)
|
||||
drop-shadow(0 4px 2px rgba(197, 168, 128, 0.5))
|
||||
drop-shadow(0 8px 18px rgba(37, 99, 235, 0.35));
|
||||
text-shadow: none !important;
|
||||
filter: none !important;
|
||||
}
|
||||
|
||||
/* 3D Kinetic Light Sweep Animation across Gradient Headings */
|
||||
@keyframes text-3d-shimmer {
|
||||
0% {
|
||||
background-position: 0% center;
|
||||
}
|
||||
50% {
|
||||
background-position: 100% center;
|
||||
}
|
||||
100% {
|
||||
background-position: 0% center;
|
||||
}
|
||||
}
|
||||
|
||||
/* Continuous Organic 3D Floating Wave */
|
||||
@keyframes text-3d-float-organic {
|
||||
0%, 100% {
|
||||
transform: perspective(900px) rotateX(0deg) rotateY(0deg) translateZ(14px);
|
||||
}
|
||||
25% {
|
||||
transform: perspective(900px) rotateX(2.5deg) rotateY(-3deg) translateZ(24px);
|
||||
}
|
||||
50% {
|
||||
transform: perspective(900px) rotateX(-2deg) rotateY(2.5deg) translateZ(16px);
|
||||
}
|
||||
75% {
|
||||
transform: perspective(900px) rotateX(2deg) rotateY(1.8deg) translateZ(26px);
|
||||
}
|
||||
}
|
||||
|
||||
/* 3D Gradient Text Styling with Multi-Plane Depth */
|
||||
.text-3d-gradient,
|
||||
.text-transparent.bg-clip-text {
|
||||
background-size: 200% auto;
|
||||
animation: text-3d-shimmer 6s ease-in-out infinite;
|
||||
display: inline-block;
|
||||
transform-style: preserve-3d;
|
||||
filter:
|
||||
drop-shadow(0 1px 0 rgba(255, 255, 255, 0.95))
|
||||
drop-shadow(0 2px 1px rgba(197, 168, 128, 0.55))
|
||||
drop-shadow(0 5px 12px rgba(37, 99, 235, 0.32))
|
||||
drop-shadow(0 14px 28px rgba(15, 23, 42, 0.1));
|
||||
}
|
||||
|
||||
/* Continuous 3D Spatial Pulse for Badges & Telemetry */
|
||||
@keyframes badge-3d-pulse {
|
||||
0%, 100% {
|
||||
transform: perspective(600px) translateZ(8px) rotateX(0deg) rotateY(0deg);
|
||||
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
50% {
|
||||
transform: perspective(600px) translateZ(18px) rotateX(3.5deg) rotateY(-2deg);
|
||||
box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18), inset 0 1px 0 rgba(255, 255, 255, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.badge-3d, [class*="badge"]:not([data-no3d]) {
|
||||
animation: badge-3d-pulse 4s ease-in-out infinite;
|
||||
transform-style: preserve-3d;
|
||||
/* Lightweight Badge Styling (Zero Continuous CPU/GPU Spikes) */
|
||||
.badge-3d, [class*="badge"] {
|
||||
display: inline-flex;
|
||||
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.85);
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.badge-3d:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 8px -2px rgba(37, 99, 235, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import { Navbar } from '@/components/ui/Navbar';
|
||||
import { Footer } from '@/components/ui/Footer';
|
||||
import { CursorAura } from '@/components/ui/CursorAura';
|
||||
import { SmoothScroll } from '@/components/ui/SmoothScroll';
|
||||
import { Cinematic3DTextEngine } from '@/components/ui/Cinematic3DTextEngine';
|
||||
|
||||
const sansFont = Plus_Jakarta_Sans({
|
||||
subsets: ['latin'],
|
||||
@@ -93,7 +92,6 @@ export default function RootLayout({
|
||||
<body className="min-h-screen flex flex-col antialiased selection:bg-blue-600 selection:text-white bg-[#FAF8F5] text-slate-900 relative">
|
||||
<SmoothScroll />
|
||||
<CursorAura />
|
||||
<Cinematic3DTextEngine />
|
||||
<Navbar config={config} currentLocale="en" />
|
||||
<main className="flex-1">{children}</main>
|
||||
<Footer config={config} currentLocale="en" />
|
||||
|
||||
Reference in New Issue
Block a user