5 Commits

Author SHA1 Message Date
Jonathan f01d6fbf8d Fix hero SVG overflow clipping in animation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 21:17:51 +02:00
Jonathan 1d92b375ea Remove overflow-hidden from hero background wrapper
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 23:00:01 +01:00
Jonathan 8cbf3d42e0 Move overflow-hidden off section onto SVG wrapper
overflow-hidden on the section was clipping the section's own content.
Wrapping just the SVG in an absolute overflow-hidden div contains the
background text without affecting the hero content.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 22:58:46 +01:00
Jonathan a2183b13ce Fix hero name animation: z-index and font size
- Add `isolate` to section + `-z-10` to SVG so background text renders
  behind in-flow content (abs-positioned elements paint over in-flow
  by default without an explicit stacking context)
- Reduce fontSize 22vw → 15vw so "Jonathan" fits within max-w-5xl
  without clipping

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 22:56:50 +01:00
Jonathan 607e378eb9 Add hero name fill animation
SVG text background of "Jonathan" in outline that slowly fills in on
page load. Uses CSS fill-opacity animation (0 → 1 over 2s, 0.3s delay)
so the stroke appears immediately and the fill bleeds in gradually.

Light mode: zinc-200/300. Dark mode: zinc-800. Both stay recessive so
the effect is atmospheric, not distracting.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 22:53:00 +01:00
3 changed files with 515 additions and 47 deletions
+17
View File
@@ -9,3 +9,20 @@
body {
font-family: var(--font-sans);
}
@keyframes name-fill-in {
from { fill-opacity: 0; }
to { fill-opacity: 1; }
}
.name-outline-fill {
fill: #e4e4e7; /* zinc-200 */
stroke: #d4d4d8; /* zinc-300 */
fill-opacity: 0;
animation: name-fill-in 2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}
.dark .name-outline-fill {
fill: #27272a; /* zinc-800 */
stroke: #27272a; /* zinc-800 */
}
+24 -1
View File
@@ -2,7 +2,30 @@ import Link from 'next/link'
export default function Hero() {
return (
<section className="mx-auto flex min-h-[72vh] max-w-5xl flex-col items-center justify-center px-6 py-32 text-center">
<section className="relative isolate mx-auto flex min-h-[72vh] max-w-5xl flex-col items-center justify-center px-6 py-32 text-center">
{/* Background name — outline fills in on load */}
<div className="pointer-events-none absolute inset-0 -z-10">
<svg
aria-hidden="true"
className="h-full w-full overflow-visible"
preserveAspectRatio="xMidYMid meet"
>
<text
x="50%"
y="55%"
textAnchor="middle"
dominantBaseline="middle"
fontFamily="var(--font-geist-sans), sans-serif"
fontSize="15vw"
fontWeight="700"
strokeWidth="1"
className="name-outline-fill"
>
Jonathan
</text>
</svg>
</div>
{/* Eyebrow label */}
<div className="mb-10 flex items-center gap-4">
+474 -46
View File
File diff suppressed because it is too large Load Diff