diff --git a/src/app/globals.css b/src/app/globals.css index abfda0a..81748d8 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -128,7 +128,7 @@ z-index: 3; } -/* Inverted Optical Liquid Glass Refraction Chamber */ +/* Inverted Optical Liquid Glass Refraction Chamber with Pure Vertical Distortion */ .liquid-refraction-chamber { position: absolute; inset: 0; @@ -136,12 +136,12 @@ overflow: hidden; pointer-events: none; z-index: 1; - /* Physical Optical Inversion & 3D Cylindrical Lens Curvature */ - transform: perspective(400px) rotateX(6deg) scaleY(-1.06) scaleX(1.02); + /* Physical Optical Inversion & 3D Cylindrical Vertical Curvature */ + transform: perspective(380px) rotateX(7deg) scaleY(-1.08) scaleX(1.015); transform-origin: center center; - opacity: 0.58; + opacity: 0.6; mix-blend-mode: luminosity; - filter: blur(0.35px) contrast(124%) saturate(220%) brightness(1.06); + filter: url("#liquid-glass-vertical-refraction") blur(0.25px) contrast(122%) saturate(215%) brightness(1.05); contain: strict; will-change: transform; } @@ -155,7 +155,7 @@ will-change: transform; } -/* Prismatic Liquid Caustic Refraction Overlay */ +/* Prismatic Liquid Caustic Refraction Overlay - Vertical Cylindrical Lens Bands */ .liquid-caustic-refraction { position: absolute; inset: 0; @@ -163,13 +163,14 @@ background: linear-gradient( 180deg, - rgba(255, 255, 255, 0.22) 0%, - transparent 25%, - transparent 75%, - rgba(255, 255, 255, 0.14) 100% + rgba(255, 255, 255, 0.24) 0%, + transparent 22%, + rgba(255, 255, 255, 0.03) 50%, + transparent 78%, + rgba(255, 255, 255, 0.15) 100% ), - radial-gradient(ellipse 65% 50% at 25% 35%, rgba(56, 189, 248, 0.16) 0%, transparent 60%), - radial-gradient(ellipse 70% 50% at 75% 65%, rgba(168, 85, 247, 0.14) 0%, transparent 60%); + radial-gradient(ellipse 70% 45% at 30% 35%, rgba(56, 189, 248, 0.15) 0%, transparent 60%), + radial-gradient(ellipse 70% 45% at 70% 65%, rgba(168, 85, 247, 0.13) 0%, transparent 60%); mix-blend-mode: overlay; z-index: 2; } diff --git a/src/components/ui/Navbar.tsx b/src/components/ui/Navbar.tsx index 0273733..0006289 100644 --- a/src/components/ui/Navbar.tsx +++ b/src/components/ui/Navbar.tsx @@ -100,6 +100,18 @@ export function Navbar({ config, currentLocale }: NavbarProps) { return (
+ {/* 1D Pure Vertical Optical Liquid Glass Refraction Filter (Single Dimension Y-axis for 120 FPS Speed) */} + +
(false); + const [isTouchOrMobile, setIsTouchOrMobile] = useState(true); // Default to true (safe for mobile/SSR) + + useEffect(() => { + // Only enable 3D card tilt & glare on desktop screens with a precision mouse (>= 1024px) + const checkDevice = () => { + const isFinePointer = window.matchMedia('(hover: hover) and (pointer: fine)').matches; + const isSmallScreen = window.innerWidth < 1024; + const hasTouch = 'ontouchstart' in window || navigator.maxTouchPoints > 0; + setIsTouchOrMobile(!isFinePointer || isSmallScreen || hasTouch); + }; + + checkDevice(); + window.addEventListener('resize', checkDevice, { passive: true }); + return () => window.removeEventListener('resize', checkDevice); + }, []); const handleMouseMove = useCallback( (e: MouseEvent) => { + if (isTouchOrMobile) return; const card = cardRef.current; if (!card) return; @@ -59,18 +75,25 @@ export function TiltCard({ }); } }, - [maxTilt, scale, showGlare] + [maxTilt, scale, showGlare, isTouchOrMobile] ); const handleMouseEnter = useCallback(() => { + if (isTouchOrMobile) return; setIsHovered(true); - }, []); + }, [isTouchOrMobile]); const handleMouseLeave = useCallback(() => { + if (isTouchOrMobile) return; setIsHovered(false); setTransformStyle('perspective(1000px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)'); setGlareStyle((prev) => ({ ...prev, opacity: 0 })); - }, []); + }, [isTouchOrMobile]); + + // On phone and tablet: zero tilt, zero glare, zero compositing overhead for ultra-smooth 120 FPS + if (isTouchOrMobile) { + return
{children}
; + } return (