"use client"; import SafeImage from "./SafeImage"; interface Task { name: string; description: string; status: string; technologies: string[]; } interface ProjectLink { name: string; url: string; } interface Project { name: string; description: string; logo?: string; links?: ProjectLink[]; tasks: Task[]; } interface Experience { company: string; position: string; startDate: string; endDate: string; logo?: string; } interface Education { degree: string; school: string; startDate: string; endDate: string; } interface HeroProps { name: string; lastName: string; title: string; description: string; skills: string[]; projects: Project[]; experiences: Experience[]; education: Education[]; languages: { name: string; level: string }[]; interests: string[]; location: string; } // ─── BentoCard ─────────────────────────────────────────────────────────────── function BentoCard({ num, label, href, children, accent = false, delay = 0, }: { num: string; label: string; href: string; children: React.ReactNode; accent?: boolean; delay?: number; }) { return ( { const el = e.currentTarget as HTMLElement; el.style.borderColor = "#6b5730"; el.style.background = accent ? "rgba(200,169,110,0.07)" : "rgba(200,169,110,0.03)"; el.style.transform = "translateY(-2px)"; const arrow = el.querySelector(".card-arrow") as HTMLElement | null; if (arrow) arrow.style.opacity = "1"; const shine = el.querySelector(".card-shine") as HTMLElement | null; if (shine) shine.style.opacity = "1"; }} onMouseLeave={(e) => { const el = e.currentTarget as HTMLElement; el.style.borderColor = "#1c1f26"; el.style.background = accent ? "rgba(200,169,110,0.03)" : "#0e1014"; el.style.transform = "translateY(0)"; const arrow = el.querySelector(".card-arrow") as HTMLElement | null; if (arrow) arrow.style.opacity = "0"; const shine = el.querySelector(".card-shine") as HTMLElement | null; if (shine) shine.style.opacity = "0"; }} > {num} · {label} ↗ {children} ); } // ─── Hero ───────────────────────────────────────────────────────────────────── export default function Hero({ name, lastName, title, description, skills, projects, experiences, education, languages, interests, location, }: HeroProps) { const feat1 = projects[2]; // FOON const feat2 = projects[0]; // Gazelle const topSkills = skills.slice(0, 10); const levelColor = (level: string) => { if (level === "Native") return "#c8a96e"; if (level === "C2") return "#3a7a5a"; return "#4a6050"; }; return ( {/* ── Headline ─────────────────────────────────────────────────── */} Let's bend spacetime {/* ── Name + description strip ──────────────────────────────── */} {title} {name}{" "} {lastName} {description} {location} {/* ── Divider ───────────────────────────────────────────────── */} {/* ── 3 × 2 Bento grid ──────────────────────────────────────── */} {/* 01 — FOON */} {feat1.logo && ( )} {feat1.name} {feat1.description} {feat1.tasks.flatMap((t) => t.technologies).filter((v, i, a) => a.indexOf(v) === i).slice(0, 4).map((tech) => ( {tech} ))} {feat1.links && ( {feat1.links.slice(0, 2).map((l) => ( ↗ {l.name} ))} )} {/* 02 — Gazelle */} {feat2.logo && ( )} {feat2.name} {feat2.description} {feat2.tasks.map((task) => ( {task.name} {task.status} ))} {/* 03 — Experience */} Experience {experiences.map((exp, i) => ( {exp.position} {exp.company} · {exp.endDate === "current" ? "Present" : exp.endDate.split("-")[2]} ))} {/* 04 — Education */} Education {education.map((edu, i) => ( {edu.degree} {edu.school.split(" ").slice(-2).join(" ")} · {edu.endDate} ))} {/* 05 — Skills */} {skills.length} Skills {topSkills.map((skill, i) => ( {skill} ))} {skills.length > 10 && ( +{skills.length - 10} )} {/* 06 — About */} About Languages {languages.map((lang) => ( {lang.name} {lang.level} ))} Interests {interests.map((interest, i) => ( {interest}{i < interests.length - 1 && ·} ))} {/* ── Scroll hint ───────────────────────────────────────────── */} Scroll to explore ); }
{description}
{feat1.description}
{feat2.description}