"use client"; /** * TeamProfileCard — a team member card drawn in ordered dither. * * The front is the portrait redrawn as a two-tone Bayer dither that shimmers slowly; hover, focus * or a tap dissolves the whole card, pixel by pixel, into its back: a phrase, contact details and * social links. React + Tailwind (v3 or v4) only, no other dependency. * * Free to use, by Martin Jude — https://martinjude.fr/freebies/team-profile-card */ import { useCallback, useEffect, useRef, useState, useSyncExternalStore, type CSSProperties, type FocusEvent, type KeyboardEvent, type MouseEvent, type PointerEvent, type ReactNode, } from "react"; export type SocialNetwork = | "linkedin" | "github" | "x" | "instagram" | "dribbble" | "behance" | "youtube" | "website"; export interface TeamProfileSocial { /** Accessible name of the link, e.g. "LinkedIn". */ label: string; href: string; /** Which glyph to draw. Guessed from `href` when left out. */ network?: SocialNetwork; /** Your own icon, drawn instead of the built-in glyph. */ icon?: ReactNode; } export type DitherPattern = "bayer2" | "bayer4" | "bayer8"; /** How a dither layer laid over the photo mixes with it. */ export type OverlayBlend = "normal" | "multiply" | "overlay"; export interface TeamProfileCardProps { name: string; role: string; /** Portrait URL. A cross-origin image needs CORS headers, or the abstract field is drawn instead. */ image?: string; /** Spoken name of the portrait. Defaults to `name`. */ imageAlt?: string; /** Where the crop is anchored, as fractions `[x, y]` (like `object-position`). Defaults to `[0.5, 0.35]`. */ imageFocus?: [number, number]; /** A sentence of their own, shown on the back. */ phrase?: string; email?: string; phone?: string; location?: string; socials?: TeamProfileSocial[]; /** Text and icons. Any CSS colour. */ ink?: string; /** The dither's dots: the portrait, the back's grain and the transition's ink. Defaults to `ink`. */ dotColor?: string; /** Light tone: the paper. Any CSS colour. */ paper?: string; /** The dissolve's leading edge, the focus ring and link hovers. */ accent?: string; /** Size of one dither cell, in CSS pixels (1–8). */ pixelSize?: number; pattern?: DitherPattern; /** Portrait contrast, 1 = as is. */ contrast?: number; /** Portrait brightness, from -0.5 to 0.5. */ brightness?: number; /** Strength of the idle animation, from 0 (still) to 1. */ shimmer?: number; /** Speed of the idle animation, 1 = default. */ speed?: number; /** * `overlay` (the default) keeps the photo in colour and lays the dots over its shadows; `dither` * redraws the portrait in two tones. Without an image, both draw the abstract field. */ effect?: "dither" | "overlay"; /** Overlay only: opacity of the dots, from 0 to 1. */ overlayOpacity?: number; /** Overlay only: how the dots mix with the photo. */ overlayBlend?: OverlayBlend; /** `hover` flips on hover and keyboard focus; `click` on click, Enter or Space. A tap always toggles. */ trigger?: "hover" | "click"; /** Duration of the full dissolve, in milliseconds. */ transitionMs?: number; /** * `2`: an ink wave spreads over the card, then lifts behind a ring that reveals the back. * `1`: a single dithered ring sweeps out from the pointer, the back already behind it. */ transitionSteps?: 1 | 2; /** How much ink the wave carries, from 0 to 1: the cover's density in 2 steps, the ring's width in 1. */ transitionAmount?: number; /** The card fills its parent's width at a 3:4 ratio; size it here (`w-72`) or with its parent. */ className?: string; } /** Every optional prop's default value. */ export const TEAM_PROFILE_CARD_DEFAULTS = { ink: "#111014", paper: "#efede6", accent: "#ff5a36", pixelSize: 2, pattern: "bayer4" as DitherPattern, contrast: 1.15, brightness: 0, shimmer: 0.4, speed: 1, effect: "overlay" as "dither" | "overlay", overlayOpacity: 0.6, overlayBlend: "overlay" as OverlayBlend, trigger: "hover" as "hover" | "click", transitionMs: 900, transitionSteps: 2 as 1 | 2, transitionAmount: 1, } as const; /* ------------------------------------------------------------------ dither maths */ const BAYER_SIZE: Record = { bayer2: 2, bayer4: 4, bayer8: 8 }; const bayerCache = new Map(); /** The n×n Bayer threshold matrix, normalised to (0, 1). */ function bayerMatrix(n: number): Float32Array { const cached = bayerCache.get(n); if (cached) return cached; let m = [[0]]; while (m.length < n) { const s = m.length; const next = Array.from({ length: s * 2 }, () => new Array(s * 2).fill(0)); for (let y = 0; y < s; y++) { for (let x = 0; x < s; x++) { const v = m[y][x] * 4; next[y][x] = v; next[y][x + s] = v + 2; next[y + s][x] = v + 3; next[y + s][x + s] = v + 1; } } m = next; } const flat = new Float32Array(n * n); for (let y = 0; y < n; y++) for (let x = 0; x < n; x++) flat[y * n + x] = (m[y][x] + 0.5) / (n * n); bayerCache.set(n, flat); return flat; } type Rgb = [number, number, number]; /** Any CSS colour to RGB, by letting a canvas parse it. */ function toRgb(color: string): Rgb { const canvas = document.createElement("canvas"); canvas.width = canvas.height = 1; const ctx = canvas.getContext("2d", { willReadFrequently: true }); if (!ctx) return [0, 0, 0]; ctx.fillStyle = "#000"; ctx.fillStyle = color; ctx.fillRect(0, 0, 1, 1); const [r, g, b] = ctx.getImageData(0, 0, 1, 1).data; return [r, g, b]; } function mix(a: Rgb, b: Rgb, t: number): Rgb { return [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t, a[2] + (b[2] - a[2]) * t]; } /** One RGBA pixel as a little-endian 32-bit word, for an `ImageData` viewed as `Uint32Array`. */ function pack([r, g, b]: Rgb, a = 255): number { return ((a << 24) | (Math.round(b) << 16) | (Math.round(g) << 8) | Math.round(r)) >>> 0; } /** Luminance (0 = black, 1 = white) of the image covering a cols × rows grid, or null if unreadable. */ function sampleImage( img: HTMLImageElement, cols: number, rows: number, contrast: number, brightness: number, [fx, fy]: [number, number], ): Float32Array | null { const canvas = document.createElement("canvas"); canvas.width = cols; canvas.height = rows; const ctx = canvas.getContext("2d", { willReadFrequently: true }); if (!ctx || !img.naturalWidth) return null; // object-fit: cover, at the same anchor as the photo's `object-position`. const scale = Math.max(cols / img.naturalWidth, rows / img.naturalHeight); const w = img.naturalWidth * scale; const h = img.naturalHeight * scale; ctx.imageSmoothingQuality = "high"; ctx.drawImage(img, (cols - w) * fx, (rows - h) * fy, w, h); let data: Uint8ClampedArray; try { data = ctx.getImageData(0, 0, cols, rows).data; } catch { return null; // A cross-origin image without CORS taints the canvas. } const lum = new Float32Array(cols * rows); for (let i = 0; i < lum.length; i++) { const l = (0.2126 * data[i * 4] + 0.7152 * data[i * 4 + 1] + 0.0722 * data[i * 4 + 2]) / 255; lum[i] = (l - 0.5) * contrast + 0.5 + brightness; } return lum; } function smoothstep(t: number) { return t * t * (3 - 2 * t); } /* ------------------------------------------------------------------ hooks */ function subscribeReducedMotion(onChange: () => void) { const query = window.matchMedia("(prefers-reduced-motion: reduce)"); query.addEventListener("change", onChange); return () => query.removeEventListener("change", onChange); } function useReducedMotion() { return useSyncExternalStore( subscribeReducedMotion, () => window.matchMedia("(prefers-reduced-motion: reduce)").matches, () => false, ); } /** The portrait, once decoded; null while loading, without an image or when it fails. */ function useImage(src: string | undefined) { const [loaded, setLoaded] = useState<{ src: string; img: HTMLImageElement } | null>(null); useEffect(() => { if (!src) return; let cancelled = false; const img = new Image(); img.crossOrigin = "anonymous"; img.decoding = "async"; img.onload = () => !cancelled && setLoaded({ src, img }); img.onerror = () => !cancelled && setLoaded(null); img.src = src; return () => { cancelled = true; }; }, [src]); return loaded && loaded.src === src ? loaded.img : null; } /* ------------------------------------------------------------------ icons */ const SOCIAL_HOSTS: [RegExp, SocialNetwork][] = [ [/linkedin\./, "linkedin"], [/github\./, "github"], [/(^|\.)(x|twitter)\.com$/, "x"], [/instagram\./, "instagram"], [/dribbble\./, "dribbble"], [/behance\./, "behance"], [/(youtube\.|youtu\.be)/, "youtube"], ]; /** Which built-in glyph a link gets, from its host. */ export function guessNetwork(href: string): SocialNetwork { try { const host = new URL(href).hostname.replace(/^www\./, ""); return SOCIAL_HOSTS.find(([pattern]) => pattern.test(host))?.[1] ?? "website"; } catch { return "website"; } } const GLYPHS: Record = { linkedin: ( ), github: ( ), x: , instagram: ( <> ), dribbble: ( <> ), behance: ( ), youtube: ( <> ), website: ( <> ), }; function Glyph({ children, size = 18 }: { children: ReactNode; size?: number }) { return ( ); } const MAIL_GLYPH = ; const PHONE_GLYPH = ( ); const PIN_GLYPH = ( <> ); function initialsOf(name: string) { return name .split(/\s+/) .filter(Boolean) .slice(0, 2) .map((word) => word[0]!.toUpperCase()) .join(""); } /* ------------------------------------------------------------------ the card */ interface Engine { /** Dissolve progress: 0 = front, 1 = back. */ p: number; target: boolean; /** Where the dissolve starts, as fractions of the card. */ origin: { x: number; y: number }; last: number; } export function TeamProfileCard({ name, role, image, imageAlt, imageFocus, phrase, email, phone, location, socials = [], ink = TEAM_PROFILE_CARD_DEFAULTS.ink, paper = TEAM_PROFILE_CARD_DEFAULTS.paper, accent = TEAM_PROFILE_CARD_DEFAULTS.accent, dotColor, pixelSize = TEAM_PROFILE_CARD_DEFAULTS.pixelSize, pattern = TEAM_PROFILE_CARD_DEFAULTS.pattern, contrast = TEAM_PROFILE_CARD_DEFAULTS.contrast, brightness = TEAM_PROFILE_CARD_DEFAULTS.brightness, shimmer = TEAM_PROFILE_CARD_DEFAULTS.shimmer, speed = TEAM_PROFILE_CARD_DEFAULTS.speed, effect = TEAM_PROFILE_CARD_DEFAULTS.effect, overlayOpacity = TEAM_PROFILE_CARD_DEFAULTS.overlayOpacity, overlayBlend = TEAM_PROFILE_CARD_DEFAULTS.overlayBlend, trigger = TEAM_PROFILE_CARD_DEFAULTS.trigger, transitionMs = TEAM_PROFILE_CARD_DEFAULTS.transitionMs, transitionSteps = TEAM_PROFILE_CARD_DEFAULTS.transitionSteps, transitionAmount = TEAM_PROFILE_CARD_DEFAULTS.transitionAmount, className, }: TeamProfileCardProps) { const rootRef = useRef(null); const fieldRef = useRef(null); const veilRef = useRef(null); const backRef = useRef(null); const grainRef = useRef(null); const engine = useRef({ p: 0, target: false, origin: { x: 0.5, y: 0.5 }, last: 0 }); const kick = useRef<() => void>(() => {}); const reduced = useReducedMotion(); const img = useImage(image); const [size, setSize] = useState({ w: 0, h: 0 }); const [showBack, setShowBack] = useState(false); const [hovered, setHovered] = useState(false); const [toggled, setToggled] = useState(false); // "root" = the card itself has keyboard focus; "inside" = a link on the back has it. const [focus, setFocus] = useState<"root" | "inside" | null>(null); const lastPointer = useRef("mouse"); const flipped = toggled || focus === "inside" || (trigger === "hover" && (hovered || focus === "root")); // Layout size, untransformed: the card may sit in a scaled or rotated parent. useEffect(() => { const root = rootRef.current; if (!root) return; const measure = () => setSize({ w: root.offsetWidth, h: root.offsetHeight }); measure(); const observer = new ResizeObserver(measure); observer.observe(root); return () => observer.disconnect(); }, []); // The photo stays visible under the dots; decided by the prop, not the decoded image, so a photo // that can't be sampled (cross-origin without CORS) still shows, under an even screen of dots. const overlay = effect === "overlay" && !!image; // Anchored a little above centre by default, where faces usually sit. const focusX = imageFocus?.[0] ?? 0.5; const focusY = imageFocus?.[1] ?? 0.35; const cell = Math.max(1, pixelSize); const cols = Math.max(1, Math.round(size.w / cell)); const rows = Math.max(1, Math.round(size.h / cell)); useEffect(() => { const root = rootRef.current; const field = fieldRef.current; const grain = grainRef.current; const veil = veilRef.current; const back = backRef.current; const fieldCtx = field?.getContext("2d"); const grainCtx = grain?.getContext("2d"); const veilCtx = veil?.getContext("2d"); if (!root || !field || !grain || !veil || !back || !fieldCtx || !grainCtx || !veilCtx || size.w === 0) return; field.width = grain.width = veil.width = cols; field.height = grain.height = veil.height = rows; const fieldData = fieldCtx.createImageData(cols, rows); const grainData = grainCtx.createImageData(cols, rows); const veilData = veilCtx.createImageData(cols, rows); const fieldPx = new Uint32Array(fieldData.data.buffer); const grainPx = new Uint32Array(grainData.data.buffer); const veilPx = new Uint32Array(veilData.data.buffer); const n = BAYER_SIZE[pattern]; const matrix = bayerMatrix(n); const dotRgb = toRgb(dotColor ?? ink); const paperRgb = toRgb(paper); const accentRgb = toRgb(accent); const DOT = pack(dotRgb); const PAPER = pack(paperRgb); const ACCENT = pack(accentRgb); const GRAIN = pack(mix(paperRgb, dotRgb, 0.16)); const lum = img ? sampleImage(img, cols, rows, contrast, brightness, [focusX, focusY]) : null; // Separable waves, refilled once per frame rather than once per cell, shared by both faces. const waveX = new Float32Array(cols); const waveY = new Float32Array(rows); const waveD = new Float32Array(cols + rows); const strength = Math.min(1, Math.max(0, shimmer)); const amp = (lum ? 0.2 : 0.32) * strength; const grainAmp = 0.1 * strength; const animated = !reduced && strength > 0; const amount = Math.min(1, Math.max(0, transitionAmount)); const oneStep = transitionSteps === 1; const fillWaves = (time: number) => { for (let x = 0; x < cols; x++) waveX[x] = Math.sin(x * 0.13 + time * 1.7); for (let y = 0; y < rows; y++) waveY[y] = Math.sin(y * 0.11 - time * 1.3); for (let d = 0; d < cols + rows; d++) waveD[d] = Math.sin((d - rows) * 0.07 + time * 2.3); }; const drawFront = () => { for (let y = 0; y < rows; y++) { const by = (y % n) * n; const fy = y / rows; for (let x = 0; x < cols; x++) { const i = y * cols + x; const wave = waveX[x] * waveY[y] * 0.6 + waveD[x - y + rows] * 0.4; let base: number; if (lum) base = lum[i]; else if (overlay) base = 0.62; else { // No portrait: a soft light falling from the top, darker toward the name. const fx = x / cols - 0.5; base = 0.95 - 0.9 * Math.sqrt(fx * fx * 1.4 + (fy - 0.3) * (fy - 0.3)) - fy * 0.25; } // Over the photo, the paper cells are left transparent. fieldPx[i] = base + amp * wave < matrix[by + (x % n)] ? DOT : overlay ? 0 : PAPER; } } fieldCtx.putImageData(fieldData, 0, 0); }; // The back's grain: sparse, so its text stays readable, and drifting with the same waves. const drawGrain = () => { for (let y = 0; y < rows; y++) { const by = (y % n) * n; for (let x = 0; x < cols; x++) { const wave = waveX[x] * waveY[y] * 0.6 + waveD[x - y + rows] * 0.4; grainPx[y * cols + x] = matrix[by + (x % n)] + grainAmp * wave > 0.95 ? GRAIN : 0; } } grainCtx.putImageData(grainData, 0, 0); }; // Distance of every cell from the transition's origin (0 there, 1 at the farthest corner), // computed once per origin rather than once per cell per frame. const dist = new Float32Array(cols * rows); let distKey = ""; let maxCells = 1; let maxPx = 1; const ensureDist = () => { const { x: ox, y: oy } = engine.current.origin; const key = `${ox}:${oy}`; if (key === distKey) return; distKey = key; maxCells = Math.hypot(Math.max(ox, 1 - ox) * cols, Math.max(oy, 1 - oy) * rows) || 1; maxPx = Math.hypot(Math.max(ox, 1 - ox) * size.w, Math.max(oy, 1 - oy) * size.h) || 1; for (let y = 0; y < rows; y++) { const dy = y + 0.5 - oy * rows; for (let x = 0; x < cols; x++) dist[y * cols + x] = Math.hypot(x + 0.5 - ox * cols, dy) / maxCells; } }; /** The revealing ring at progress p: its radius (0–1, the back's clip) and half-width, or null. */ const ring = (p: number) => { // Never under three cells each side, so the clip's hard edge is always under ink. const floor = 3 / maxCells; if (oneStep) { const half = Math.max(0.04 + 0.2 * amount, floor); return { r: smoothstep(p) * (1 + 2 * half) - half, half }; } if (p < 0.5) return null; const half = Math.max(0.035, floor); return { r: smoothstep((p - 0.5) * 2) * (1 + 2 * half) - half, half }; }; let clip = ""; const applyClip = (p: number) => { let next: string; if (p <= 0) next = "inset(0 0 100% 0)"; else if (p >= 1) next = "none"; else { ensureDist(); const current = ring(p); const { x: ox, y: oy } = engine.current.origin; next = current && current.r > 0 ? `circle(${(current.r * maxPx).toFixed(1)}px at ${(ox * 100).toFixed(2)}% ${(oy * 100).toFixed(2)}%)` : "inset(0 0 100% 0)"; } if (next !== clip) { clip = next; back.style.clipPath = next; } }; let veilClear = true; const drawVeil = (p: number) => { if (p <= 0 || p >= 1) { if (!veilClear) veilCtx.clearRect(0, 0, cols, rows); veilClear = true; return; } veilClear = false; ensureDist(); const current = ring(p); // Two steps, first half: the ink spreads from the origin, `amount` of the cells at most. const cover = smoothstep(Math.min(1, p * 2)) * 1.02; for (let y = 0; y < rows; y++) { const by = (y % n) * n; for (let x = 0; x < cols; x++) { const i = y * cols + x; const th = matrix[by + (x % n)]; const d = dist[i]; if (!current) { const t = 0.5 * th + 0.5 * d; veilPx[i] = th >= amount ? 0 : t < cover - 0.045 ? DOT : t < cover ? ACCENT : 0; continue; } const off = d - current.r; if (off < -current.half) { veilPx[i] = 0; // Behind the ring: the back. } else if (off <= current.half) { // The ring: solid at its core (over the clip edge), dithered toward its sides, the // accent on its leading side. const k = 1 - Math.abs(off) / current.half; const inked = Math.abs(off) < current.half * 0.35 || th < k; veilPx[i] = !inked ? 0 : off > 0 && k < 0.5 ? ACCENT : DOT; } else { // Ahead of it: the front, still under the cover in two steps. veilPx[i] = !oneStep && th < amount ? DOT : 0; } } } veilCtx.putImageData(veilData, 0, 0); }; const state = engine.current; let raf = 0; let visible = true; let lastDraw = -Infinity; let shown = state.p >= 0.5; const draw = (time: number) => { fillWaves(time); // Each face is drawn only while some of it can be seen. if (state.p < 1) drawFront(); if (state.p > 0) drawGrain(); drawVeil(state.p); applyClip(state.p); }; const frame = (now: number) => { raf = 0; const dt = state.last ? now - state.last : 0; state.last = now; const goal = state.target ? 1 : 0; state.p = reduced || transitionMs <= 0 ? goal : Math.min(1, Math.max(0, state.p + ((state.target ? 1 : -1) * dt) / transitionMs)); const moving = state.p !== goal; const nextShown = state.p >= 0.5; const swapped = nextShown !== shown; if (swapped) { shown = nextShown; setShowBack(nextShown); } // The idle shimmer is held to ~30 fps; the transition runs at the display's rate. if (moving || swapped || now - lastDraw >= 33) { draw(animated ? (now / 1000) * speed * 0.35 : 0); lastDraw = now; } if (visible && (moving || animated)) raf = requestAnimationFrame(frame); else state.last = 0; }; const start = () => { if (!raf && visible) raf = requestAnimationFrame(frame); }; kick.current = start; // Nothing runs while the card is off screen or the tab is hidden. const observer = new IntersectionObserver(([entry]) => { visible = entry.isIntersecting && !document.hidden; if (visible) start(); }); observer.observe(root); const onVisibility = () => { visible = !document.hidden; if (visible) start(); }; document.addEventListener("visibilitychange", onVisibility); // First paint straight away, so the card is never blank. draw(0); start(); return () => { cancelAnimationFrame(raf); state.last = 0; kick.current = () => {}; observer.disconnect(); document.removeEventListener("visibilitychange", onVisibility); }; }, [cols, rows, size.w, size.h, pattern, ink, dotColor, paper, accent, img, focusX, focusY, overlay, contrast, brightness, shimmer, speed, transitionMs, transitionSteps, transitionAmount, reduced]); useEffect(() => { engine.current.target = flipped; kick.current(); }, [flipped]); const setOrigin = useCallback((event: { clientX: number; clientY: number }) => { const rect = rootRef.current?.getBoundingClientRect(); if (!rect || !rect.width) return; engine.current.origin = { x: Math.min(1, Math.max(0, (event.clientX - rect.left) / rect.width)), y: Math.min(1, Math.max(0, (event.clientY - rect.top) / rect.height)), }; }, []); const onPointerEnter = (event: PointerEvent) => { if (event.pointerType === "touch") return; setOrigin(event); setHovered(true); }; const onPointerLeave = (event: PointerEvent) => { if (event.pointerType === "touch") return; setOrigin(event); setHovered(false); }; const onClick = (event: MouseEvent) => { if ((event.target as Element).closest("a")) return; if (trigger === "click" || lastPointer.current === "touch") { setOrigin(event); setToggled((value) => !value); } }; const onKeyDown = (event: KeyboardEvent) => { if (event.target !== event.currentTarget) return; if (event.key === "Enter" || event.key === " ") { event.preventDefault(); engine.current.origin = { x: 0, y: 0 }; setToggled((value) => !value); } else if (event.key === "Escape") { setToggled(false); } }; const onFocus = (event: FocusEvent) => { if (event.target === event.currentTarget) { // A mouse click focuses the card too; only keyboard focus should hold it open. setFocus(event.currentTarget.matches(":focus-visible") ? "root" : null); } else { engine.current.origin = { x: 0, y: 1 }; setFocus("inside"); } }; const onBlur = (event: FocusEvent) => { if (!event.currentTarget.contains(event.relatedTarget as Node | null)) setFocus(null); }; const vars = { "--tpc-ink": ink, "--tpc-paper": paper, "--tpc-accent": accent, // 72 % keeps the secondary text over 4.5:1 wherever the text itself is well over 7:1. "--tpc-muted": `color-mix(in srgb, ${ink} 72%, ${paper})`, "--tpc-rule": `color-mix(in srgb, ${ink} 18%, ${paper})`, } as CSSProperties; const contactClass = "flex min-w-0 items-center gap-2.5 text-sm transition-colors hover:text-[color:var(--tpc-accent)] focus-visible:text-[color:var(--tpc-accent)] focus-visible:outline-none"; return (
{ lastPointer.current = event.pointerType; }} onPointerEnter={onPointerEnter} onPointerLeave={onPointerLeave} onClick={onClick} onKeyDown={onKeyDown} onFocus={onFocus} onBlur={onBlur} style={vars} className={[ "relative block aspect-[3/4] cursor-pointer select-none overflow-hidden rounded-[22px] bg-[color:var(--tpc-paper)] text-[color:var(--tpc-ink)] outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[color:var(--tpc-accent)]", className, ] .filter(Boolean) .join(" ")} > {overlay && ( // A plain , not next/image: the file has to work in any React project. {imageAlt )} {/* Front. The back layer covers it, so it never needs hiding. */}
{!img && !overlay && ( )}

{name}

{role}

{/* Back: opaque paper, revealed by a clip-path the animation loop writes (from a growing circle to `none`). Clipped, not hidden, so its links stay focusable: tabbing onto one turns the card. */}
); } export default TeamProfileCard;