feat(ui): v3 enhancements - hero photo, particles, mobile responsive

- Hero photo: circular shape, object-position center top, transparent background
- Hero particles: bigger (6-16px), more visible (opacity 0.8)
- Mobile: hide hero photo, transparent hero content, fix text/social link colors
- Mobile social links: darker border in light mode
- Update spec docs and all section components for v3 UI
This commit is contained in:
dong.nguyen committed 2026-10-13 00:24:12 +07:00
1 parent a303d98e41
commit dd22f3be3a
26 files changed
+810 -504

No files matched your search

+238 -24
View File
@@ -30,6 +30,18 @@
color: var(--accent);
}
.logo-bracket {
color: var(--accent);
font-family: var(--mono);
font-size: 1.2rem;
font-weight: 700;
}
.logo-text {
color: var(--text-primary);
font-weight: 700;
font-size: 1.1rem;
}
.nav-menu {
display: flex;
gap: 32px;
@@ -194,29 +206,45 @@
}
.btn-primary {
background: var(--accent);
background: linear-gradient(135deg, #1d4ed8, #2563eb, #60a5fa);
color: #ffffff;
box-shadow: 0 4px 20px rgba(96, 165, 250, 0.3);
border-radius: 9999px;
}
.btn-primary:hover {
background: var(--accent-hover);
color: #ffffff;
transform: translateY(-2px);
box-shadow: 0 8px 30px rgba(96, 165, 250, 0.4);
}
.btn-primary:active {
background: var(--accent-active);
transform: translateY(0);
box-shadow: 0 2px 10px rgba(96, 165, 250, 0.3);
}
.btn-secondary {
background: transparent;
color: var(--accent);
border: 1px solid var(--border);
border: 1.5px solid var(--border);
border-radius: 9999px;
}
.btn-secondary:hover {
border-color: var(--accent);
background: var(--accent);
color: #ffffff;
background: rgba(96, 165, 250, 0.1);
transform: translateY(-2px);
}
.btn-secondary:active {
transform: translateY(0);
}
.btn-icon {
display: inline-flex;
margin-left: 6px;
transition: transform var(--transition-fast);
}
.btn-primary:hover .btn-icon,
.btn-secondary:hover .btn-icon {
transform: translateX(4px);
}
.btn-ghost {
@@ -326,6 +354,16 @@
font-size: 18px;
}
.section-tag {
display: block;
font-family: var(--mono);
font-size: 0.85rem;
color: var(--accent);
text-transform: uppercase;
letter-spacing: 2px;
margin-bottom: 8px;
}
/* ===== Social Links ===== */
.social-links {
display: flex;
@@ -335,27 +373,32 @@
.social-link {
display: flex;
align-items: center;
gap: 6px;
font-size: 14px;
color: var(--text-muted);
text-decoration: none;
transition: color var(--transition-fast);
justify-content: center;
width: 48px;
height: 48px;
border: 1.5px solid rgba(255, 255, 255, 0.15);
border-radius: 6px;
color: var(--text-primary);
transition: color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.social-link:hover {
border-color: var(--accent);
color: var(--accent);
transform: translateY(-3px);
}
.social-link:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
border-radius: 2px;
}
.social-link svg {
width: 20px;
height: 20px;
}
.social-link span {
display: none;
}
/* ===== Section Background Gradient ===== */
.section {
position: relative;
@@ -413,6 +456,35 @@
line-height: 1.6;
}
.hero-greeting {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 16px;
font-size: 1.1rem;
color: var(--text-secondary);
}
.greeting-dot {
width: 10px;
height: 10px;
background: var(--success);
border-radius: 50%;
animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); }
50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
}
.name-highlight {
background: linear-gradient(135deg, #1d4ed8, #2563eb, #60a5fa);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.hero-cta {
display: flex;
gap: 16px;
@@ -424,21 +496,111 @@
display: flex;
align-items: center;
justify-content: center;
aspect-ratio: 1 / 1;
}
.hero-bg-grid {
position: absolute;
inset: 0;
background-image:
linear-gradient(var(--grid-color) 1px, transparent 1px),
linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
background-size: 60px 60px;
mask-image: radial-gradient(ellipse at center, black 50%, transparent 70%);
-webkit-mask-image: radial-gradient(ellipse at center, black 50%, transparent 70%);
pointer-events: none;
}
.typewriter-cursor {
display: inline-block;
width: 2px;
height: 1.1em;
background: var(--accent);
margin-left: 2px;
vertical-align: text-bottom;
animation: blink 1s step-end infinite;
}
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
.hero-particles {
position: absolute;
inset: 0;
overflow: hidden;
pointer-events: none;
}
.hero-particle {
position: absolute;
width: 4px;
height: 4px;
background: var(--accent);
border-radius: 50%;
opacity: 0.8;
animation: float-particle linear infinite;
}
@keyframes float-particle {
0% { transform: translateY(100vh) scale(0); opacity: 0; }
10% { opacity: 0.8; }
90% { opacity: 0.8; }
100% { transform: translateY(-100px) scale(1); opacity: 0; }
}
.scroll-indicator {
position: absolute;
bottom: 40px;
left: 50%;
transform: translateX(-50%);
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
color: var(--text-muted);
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 2px;
animation: float 3s ease-in-out infinite;
text-decoration: none;
pointer-events: none;
}
.scroll-mouse {
width: 24px;
height: 38px;
border: 2px solid var(--border);
border-radius: 12px;
display: flex;
justify-content: center;
padding-top: 8px;
}
.scroll-wheel {
width: 3px;
height: 8px;
background: var(--accent);
border-radius: 2px;
animation: scroll-wheel 2s ease-in-out infinite;
}
@keyframes scroll-wheel {
0%, 100% { transform: translateY(0); opacity: 1; }
50% { transform: translateY(8px); opacity: 0.3; }
}
@keyframes float {
0%, 100% { transform: translateX(-50%) translateY(0); }
50% { transform: translateX(-50%) translateY(-10px); }
}
.hero-photo {
width: 80%;
width: 100%;
height: 100%;
object-fit: cover;
object-position: center top;
border-radius: 16px;
display: block;
}
@media (max-width: 768px) {
.hero {
position: relative;
min-height: 100vh;
min-height: 100dvh;
overflow: hidden;
padding: 0;
}
@@ -461,9 +623,7 @@
position: absolute;
inset: 0;
z-index: 1;
background: rgba(0, 0, 0, 0.75);
padding: 64px 24px 56px;
backdrop-filter: blur(4px);
width: 100%;
}
.hero-name {
@@ -473,8 +633,50 @@
.hero-tagline {
color: #e0e0e0;
}
.hero-greeting {
color: #e0e0e0;
}
.hero-photo {
display: none;
}
.scroll-indicator {
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
z-index: 10;
color: #ffffff;
}
.scroll-mouse {
border-color: rgba(255, 255, 255, 0.5);
}
.hero .scroll-indicator span {
display: block !important;
color: #ffffff !important;
opacity: 1 !important;
}
.social-links {
justify-content: center;
}
.social-link {
color: #ffffff;
}
}
@media (max-width: 768px) {
:root[data-theme='light'] .hero-name {
color: var(--text-primary) !important;
}
:root[data-theme='light'] .hero-title,
:root[data-theme='light'] .hero-tagline,
:root[data-theme='light'] .hero-greeting {
color: var(--text-secondary) !important;
}
:root[data-theme='light'] .social-link {
color: var(--text-secondary) !important;
border-color: rgba(0, 0, 0, 0.3) !important;
}
}
@media (min-width: 769px) and (max-width: 1200px) {
.hero-content {
@@ -482,6 +684,9 @@
padding-right: 16px;
}
}
:root[data-theme='light'] .social-link {
border-color: rgba(0, 0, 0, 0.2) !important;
}
/* ===== Download Resume Dropdown ===== */
.download-resume-dropdown {
@@ -523,7 +728,16 @@
transition: transform 0.2s;
}
.download-resume-dropdown[open] .download-resume-summary .chevron {
.download-resume-dropdown .download-resume-options {
display: none;
}
.download-resume-dropdown .download-resume-options.open {
display: block;
}
.download-resume-dropdown .download-resume-summary.open .chevron {
transform: rotate(180deg);
}
-3
View File
@@ -39,7 +39,6 @@ export function Footer() {
<svg viewBox="0 0 24 24" fill="currentColor">
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z" />
</svg>
<span>GitHub</span>
</a>
<a
href={profile.linkedinUrl}
@@ -51,7 +50,6 @@ export function Footer() {
<svg viewBox="0 0 24 24" fill="currentColor">
<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" />
</svg>
<span>LinkedIn</span>
</a>
<a
href={`mailto:${profile.email}`}
@@ -62,7 +60,6 @@ export function Footer() {
<rect x="2" y="4" width="20" height="16" rx="2" />
<path d="M22 4l-10 8L2 4" />
</svg>
<span>Email</span>
</a>
</div>
</div>
+3 -1
View File
@@ -37,7 +37,9 @@ export function Navigation() {
<nav className="nav" role="navigation" aria-label="Main navigation">
<div className="nav-container">
<Link to="/" className="nav-logo">
Portfolio
<span className="logo-bracket">&#123;</span>
<span className="logo-text">CV</span>
<span className="logo-bracket">&#125;</span>
</Link>
<ul className="nav-menu">
+1 -1
View File
@@ -7,7 +7,7 @@ export function About() {
return (
<InView>
<section className="section container-wide" aria-labelledby="about-heading">
<SectionHeading title="About Me" />
<SectionHeading title="About Me" tag="01 - About" />
<div style={{ maxWidth: '700px' }}>
<p style={{ fontSize: '18px', marginBottom: '32px' }}>
{profile.bio}
+1 -1
View File
@@ -18,7 +18,7 @@ export function Contact() {
visible: { opacity: 1, transition: { duration: 0.5 } },
}}
>
<SectionHeading title="Contact" />
<SectionHeading title="Contact" tag="06 - Contact" />
<div style={{ maxWidth: '700px' }}>
<div className="contact-links">
<motion.a
+34 -14
View File
@@ -1,5 +1,6 @@
import { resumeAvailable, resumeUrlFor, resumeLanguages } from '@/data/resume'
import type { Language } from '@/types'
import { useState, useRef, useEffect } from 'react'
const langLabels: Record<Language, string> = {
en: 'English',
@@ -23,10 +24,8 @@ function DownloadButton({ lang }: { lang: Language }) {
border: '1px solid var(--border)',
}}
>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" width="24" height="24">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2 2v-4" />
<polyline points="7 10 12 15 17 10" />
<line x1="12" y1="15" x2="12" y2="3" />
<svg viewBox="0 0 24 24" fill="currentColor" width="24" height="24">
<path d="M12 2a1 1 0 0 1 1 1v9.586l2.707-2.707a1 1 0 1 1 1.414 1.414l-4.5 4.5a1 1 0 0 1-1.414 0l-4.5-4.5a1 1 0 1 1 1.414-1.414L11 12.586V3a1 1 0 0 1 1-1zm-7 16a1 1 0 1 1 0 2h14a1 1 0 1 1 0-2H5z" />
</svg>
<div>
<div style={{ fontWeight: 500, color: 'var(--text-primary)' }}>Download Resume</div>
@@ -37,20 +36,41 @@ function DownloadButton({ lang }: { lang: Language }) {
}
function DownloadDropdown() {
const [open, setOpen] = useState(false)
const ref = useRef<HTMLDivElement>(null)
useEffect(() => {
if (!open) return
const listener = (e: MouseEvent | TouchEvent) => {
if (ref.current && !ref.current.contains(e.target as Node)) {
setOpen(false)
}
}
document.addEventListener('mousedown', listener)
document.addEventListener('touchstart', listener)
return () => {
document.removeEventListener('mousedown', listener)
document.removeEventListener('touchstart', listener)
}
}, [open])
return (
<details className="download-resume-dropdown">
<summary className="download-resume-summary">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" width="20" height="20">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2 2v-4" />
<polyline points="7 10 12 15 17 10" />
<line x1="12" y1="15" x2="12" y2="3" />
<div ref={ref} className="download-resume-dropdown">
<button
className={`download-resume-summary ${open ? 'open' : ''}`}
onClick={() => setOpen(!open)}
type="button"
>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" width="20" height="20">
<path d="M12 3v10m0 0l-3-3m3 3l3-3" />
<path d="M3 17h18" />
</svg>
<span>Download Resume</span>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" width="16" height="16" className="chevron">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" width="16" height="16" className="chevron">
<polyline points="6 9 12 15 18 9" />
</svg>
</summary>
<div className="download-resume-options">
</button>
<div className={`download-resume-options ${open ? 'open' : ''}`}>
{resumeLanguages.map(lang => (
<a
key={lang}
@@ -62,7 +82,7 @@ function DownloadDropdown() {
</a>
))}
</div>
</details>
</div>
)
}
+2 -10
View File
@@ -1,3 +1,4 @@
import { SectionHeading } from '@/components/ui/SectionHeading'
import { motion } from "motion/react"
import { experiences } from "@/data/experience"
import { InView } from "@/components/ui/InView"
@@ -19,16 +20,7 @@ export function Experience() {
},
}}
>
<motion.h2
id="experience-heading"
style={{ marginBottom: "48px" }}
variants={{
hidden: { opacity: 0, y: 30 },
visible: { opacity: 1, y: 0, transition: { duration: 0.5 } },
}}
>
Experience
</motion.h2>
<SectionHeading title="Experience" tag="03 - Experience" />
<div style={{ maxWidth: '700px' }}>
<div className="timeline">
{experiences.map((exp, i) => (
+1 -1
View File
@@ -20,7 +20,7 @@ export function Expertise() {
},
}}
>
<SectionHeading title="Core Expertise" />
<SectionHeading title="Core Expertise" tag="02 - Expertise" />
<div className="expertise-grid">
{skillGroups.map((group, i) => (
<motion.div
+58 -17
View File
@@ -1,3 +1,4 @@
import { useState, useRef, useEffect } from 'react'
import { motion, useScroll, useTransform } from "motion/react"
import { InView } from "@/components/ui/InView"
import { resumeAvailable, resumeLanguages, resumeUrlFor } from "@/data/resume"
@@ -7,22 +8,42 @@ const langLabels: Record<Language, string> = {
en: 'EN',
vi: 'VI',
}
function HeroDownloadDropdown() {
const [open, setOpen] = useState(false)
const ref = useRef<HTMLDivElement>(null)
useEffect(() => {
if (!open) return
const listener = (e: MouseEvent | TouchEvent) => {
if (ref.current && !ref.current.contains(e.target as Node)) {
setOpen(false)
}
}
document.addEventListener('mousedown', listener)
document.addEventListener('touchstart', listener)
return () => {
document.removeEventListener('mousedown', listener)
document.removeEventListener('touchstart', listener)
}
}, [open])
return (
<details className="download-resume-dropdown hero-download-dropdown">
<summary className="download-resume-summary hero-download-summary">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" width="18" height="18">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2 2v-4" />
<polyline points="7 10 12 15 17 10" />
<line x1="12" y1="15" x2="12" y2="3" />
<div ref={ref} className="download-resume-dropdown hero-download-dropdown">
<button
className={`download-resume-summary hero-download-summary ${open ? 'open' : ''}`}
onClick={() => setOpen(!open)}
type="button"
>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" width="18" height="18">
<path d="M12 3v10m0 0l-3-3m3 3l3-3" />
<path d="M3 17h18" />
</svg>
<span>Download Resume</span>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" width="14" height="14" className="chevron">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" width="14" height="14" className="chevron">
<polyline points="6 9 12 15 18 9" />
</svg>
</summary>
<div className="download-resume-options">
</button>
<div className={`download-resume-options ${open ? 'open' : ''}`}>
{resumeLanguages.map(lang => (
<a
key={lang}
@@ -35,7 +56,7 @@ function HeroDownloadDropdown() {
</a>
))}
</div>
</details>
</div>
)
}
@@ -52,6 +73,8 @@ function HeroDownloadButton({ lang }: { lang: Language }) {
)
}
import { Button } from "@/components/ui/Button"
import { Typewriter } from '@/components/ui/Typewriter'
import { HeroParticles } from '@/components/sections/HeroParticles'
import { SocialLinks } from "@/components/ui/SocialLinks"
import { profile } from "@/data/profile"
@@ -102,6 +125,8 @@ export function Hero() {
transition={{ duration: 0.3 }}
aria-labelledby="hero-heading"
>
<div className="hero-bg-grid" />
<HeroParticles />
<motion.div
className="hero-content"
style={{ opacity }}
@@ -109,6 +134,16 @@ export function Hero() {
animate={{ opacity: 1, x: 0 }}
transition={{ duration: 0.6, delay: 0.2 }}
>
<motion.div
initial={{ opacity: 0, y: 10 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.4, delay: 0.15 }}
>
<span className="hero-greeting">
<span className="greeting-dot" />
Hi, I'm
</span>
</motion.div>
<motion.h1
id="hero-heading"
className="hero-name"
@@ -116,7 +151,7 @@ export function Hero() {
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5, delay: 0.3 }}
>
{profile.name}
<span className="name-highlight">{profile.firstName}{" "}{profile.lastName}</span>
</motion.h1>
<motion.p
className="hero-title"
@@ -124,7 +159,7 @@ export function Hero() {
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5, delay: 0.4 }}
>
{profile.title}
<Typewriter texts={profile.roles} />
</motion.p>
<motion.p
className="hero-tagline"
@@ -143,6 +178,9 @@ export function Hero() {
<Button href="/projects" variant="primary">
View Projects
</Button>
<Button href="/contact" variant="primary">
Contact Me
</Button>
{resumeAvailable && (
<>
<div className="hero-download-desktop">
@@ -155,12 +193,15 @@ export function Hero() {
</div>
</>
)}
<Button href="/contact" variant="primary">
Contact Me
</Button>
</motion.div>
<SocialLinks links={socialLinks} />
</motion.div>
</motion.div>
<div className="scroll-indicator" aria-hidden="true">
<div className="scroll-mouse">
<div className="scroll-wheel" />
</div>
<span>Scroll</span>
</div>
<motion.div
className="hero-visual"
style={{ y }}
+34
View File
@@ -0,0 +1,34 @@
import { useMemo } from "react"
export function HeroParticles() {
const count = typeof window !== "undefined" && window.innerWidth < 768 ? 15 : 30
const particles = useMemo(
() =>
Array.from({ length: count }, (_, i) => ({
id: i,
left: `${Math.random() * 100}%`,
duration: `${Math.random() * 10 + 8}s`,
delay: `${Math.random() * 10}s`,
size: `${Math.random() * 10 + 6}px`,
})),
[count],
)
return (
<div className="hero-particles" aria-hidden="true">
{particles.map((p) => (
<div
key={p.id}
className="hero-particle"
style={{
left: p.left,
width: p.size,
height: p.size,
animationDuration: p.duration,
animationDelay: p.delay,
}}
/>
))}
</div>
)
}
+30 -42
View File
@@ -1,3 +1,4 @@
import { SectionHeading } from '@/components/ui/SectionHeading'
import { Link } from "react-router"
import { motion } from "motion/react"
import { Badge } from "@/components/ui/Badge"
@@ -33,28 +34,13 @@ export function Projects() {
},
}}
>
<motion.div
style={{
display: "flex",
justifyContent: "space-between",
alignItems: "baseline",
marginBottom: "48px",
}}
variants={{
hidden: { opacity: 0, y: 30 },
visible: { opacity: 1, y: 0, transition: { duration: 0.5 } },
}}
<SectionHeading title="Featured Projects" tag="04 - Projects" />
<Link
to="/projects"
style={{ fontSize: "14px", fontWeight: 500, color: "var(--accent)", display: "block", marginBottom: "24px" }}
>
<h2 id="projects-heading">Featured Projects</h2>
<MotionLink
to="/projects"
style={{ fontSize: "14px", fontWeight: 500, color: "var(--accent)" }}
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
>
View All →
</MotionLink>
</motion.div>
View All →
</Link>
<div className="projects-grid">
{featured.map((project, i) => (
<MotionLink
@@ -72,30 +58,32 @@ export function Projects() {
whileHover={{ scale: 1.02, y: -4 }}
whileTap={{ scale: 0.98 }}
>
<div className="project-card-header">
<h3>{project.title}</h3>
<Badge variant="outline">
{categoryLabels[project.category] || project.category}
</Badge>
</div>
<p className="project-card-summary">{project.summary}</p>
<div className="project-card-techs">
{project.technologies.slice(0, 4).map((tech) => (
<span key={tech} className="tag">
{tech}
</span>
))}
</div>
{project.metrics && project.metrics.length > 0 && (
<div className="project-card-metrics">
{project.metrics.map((m) => (
<span key={m} className="achievement-metric">
{m}
<div className="project-card-content">
<div className="project-card-header">
<h3>{project.title}</h3>
<Badge variant="outline">
{categoryLabels[project.category] || project.category}
</Badge>
</div>
<p className="project-card-summary">{project.summary}</p>
<div className="project-card-techs">
{project.technologies.slice(0, 4).map((tech) => (
<span key={tech} className="tag">
{tech}
</span>
))}
</div>
)}
<span className="project-card-cta">View Details →</span>
{project.metrics && project.metrics.length > 0 && (
<div className="project-card-metrics">
{project.metrics.map((m) => (
<span key={m} className="achievement-metric">
{m}
</span>
))}
</div>
)}
<span className="project-card-cta">View Details →</span>
</div>
</MotionLink>
))}
</div>
+37
View File
@@ -0,0 +1,37 @@
import { motion } from "motion/react"
import { InView } from "@/components/ui/InView"
import type { ReactNode } from "react"
interface AnimatedSectionProps {
direction?: "up" | "right" | "left"
delay?: number
children: ReactNode
}
function getDirection(direction: 'up' | 'right' | 'left') {
switch (direction) {
case 'up': return { y: [40, 0], opacity: [0, 1] }
case 'right': return { x: [-40, 0], opacity: [0, 1] }
case 'left': return { x: [40, 0], opacity: [0, 1] }
}
}
export function AnimatedSection({
direction = "up",
delay = 0,
children,
}: AnimatedSectionProps) {
const { y, opacity } = getDirection(direction)
return (
<InView>
<motion.div
initial={{ y, opacity }}
whileInView={{ y: 0, opacity: 1 }}
viewport={{ once: true, margin: "0px 0px -50px 0px" }}
transition={{ duration: 0.6, delay, ease: [0.25, 0.1, 0.25, 1] }}
>
{children}
</motion.div>
</InView>
)
}
+14 -3
View File
@@ -10,6 +10,7 @@ type ButtonSize = "sm" | "md" | "lg"
interface ButtonProps extends ComponentPropsWithoutRef<"button"> {
variant?: ButtonVariant
size?: ButtonSize
icon?: React.ReactNode
href?: string
download?: boolean
target?: string
@@ -36,6 +37,7 @@ export const Button = forwardRef<
variant = "primary",
size = "md",
href,
icon,
className = "",
children,
...props
@@ -63,7 +65,10 @@ export const Button = forwardRef<
keyof ButtonProps | "to"
>)}
>
{children}
{icon ? (<>
{children}
<span className="btn-icon">{icon}</span>
</>) : children}
</MotionLink>
)
}
@@ -76,7 +81,10 @@ export const Button = forwardRef<
whileTap={{ scale: 0.95 }}
{...(props as Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, keyof ButtonProps>)}
>
{children}
{icon ? (<>
{children}
<span className="btn-icon">{icon}</span>
</>) : children}
</motion.a>
)
}
@@ -88,7 +96,10 @@ export const Button = forwardRef<
whileTap={{ scale: 0.95 }}
{...(props as Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, keyof ButtonProps>)}
>
{children}
{icon ? (<>
{children}
<span className="btn-icon">{icon}</span>
</>) : children}
</motion.button>
)
}
+3 -1
View File
@@ -1,12 +1,14 @@
interface SectionHeadingProps {
title: string
subtitle?: string
tag?: string
id?: string
}
export function SectionHeading({ title, subtitle, id }: SectionHeadingProps) {
export function SectionHeading({ title, subtitle, tag, id }: SectionHeadingProps) {
return (
<div className="section-heading" id={id}>
{tag && <span className="section-tag">{tag}</span>}
<h2>{title}</h2>
{subtitle && <p>{subtitle}</p>}
</div>
-1
View File
@@ -27,7 +27,6 @@ export function SocialLinks({ links, className = "" }: SocialLinksProps) {
whileTap={{ scale: 0.9 }}
>
{link.icon}
<span>{link.label}</span>
</motion.a>
))}
</div>
+51
View File
@@ -0,0 +1,51 @@
import { useEffect, useState } from "react"
interface TypewriterProps {
texts: string[]
typeSpeed?: number
deleteSpeed?: number
pauseDuration?: number
}
export function Typewriter({
texts,
typeSpeed = 80,
deleteSpeed = 40,
pauseDuration = 2000,
}: TypewriterProps) {
const [currentTextIndex, setCurrentTextIndex] = useState(0)
const [currentText, setCurrentText] = useState("")
const [isDeleting, setIsDeleting] = useState(false)
useEffect(() => {
const text = texts[currentTextIndex]
let timeout: number
if (!isDeleting && currentText === text) {
timeout = setTimeout(() => setIsDeleting(true), pauseDuration)
} else if (isDeleting && currentText === "") {
setIsDeleting(false)
setCurrentTextIndex((prev) => (prev + 1) % texts.length)
} else {
timeout = setTimeout(
() => {
if (isDeleting) {
setCurrentText(text.substring(0, currentText.length - 1))
} else {
setCurrentText(text.substring(0, currentText.length + 1))
}
},
isDeleting ? deleteSpeed : typeSpeed,
)
}
return () => clearTimeout(timeout)
}, [currentText, currentTextIndex, isDeleting, texts, typeSpeed, deleteSpeed, pauseDuration])
return (
<span>
{currentText}
<span className="typewriter-cursor" />
</span>
)
}
+8
View File
@@ -1,6 +1,8 @@
import type { Profile } from "@/types";
export const profile: Profile = {
firstName: "Dong",
lastName: "Nguyen",
name: "Dong Nguyen",
title: "Senior Software Engineer",
titleEn: "Senior Software Engineer",
@@ -21,6 +23,12 @@ export const profile: Profile = {
"Computer Vision",
"High-performance systems",
],
roles: [
"Full-Stack Developer",
"System Architect",
"AI/ML Engineer",
"Open Source Contributor",
],
philosophy: [
{
title: "Build for the real problem",
+17
View File
@@ -0,0 +1,17 @@
import { useEffect } from 'react'
export function useClickOutside(ref: React.RefObject<HTMLElement | null>, handler: () => void) {
useEffect(() => {
const listener = (event: MouseEvent | TouchEvent) => {
const el = ref.current
if (!el || el.contains(event.target as Node)) return
handler()
}
document.addEventListener('mousedown', listener)
document.addEventListener('touchstart', listener)
return () => {
document.removeEventListener('mousedown', listener)
document.removeEventListener('touchstart', listener)
}
}, [ref, handler])
}
+4 -1
View File
@@ -13,7 +13,7 @@
--shadow: rgba(0, 0, 0, 0.3);
--code-bg: #1a1a2e;
--success: #34d399;
--error: #f87171;
--grid-color: rgba(96, 165, 250, 0.04);
--sans: 'Inter', system-ui, -apple-system, sans-serif;
--mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
@@ -56,6 +56,7 @@
--code-bg: #f0f0ff;
--success: #059669;
--error: #dc2626;
--grid-color: rgba(37, 99, 235, 0.08);
}
/* System theme */
@@ -75,6 +76,7 @@
--code-bg: #1a1a2e;
--success: #34d399;
--error: #f87171;
--grid-color: rgba(96, 165, 250, 0.04);
}
}
@@ -94,6 +96,7 @@
--code-bg: #f0f0ff;
--success: #059669;
--error: #dc2626;
--grid-color: rgba(37, 99, 235, 0.08);
}
}
+6
View File
@@ -1,3 +1,4 @@
import { AnimatedSection } from '@/components/ui/AnimatedSection'
import { SectionHeading } from '@/components/ui/SectionHeading'
import { Tag } from '@/components/ui/Tag'
import { profile } from '@/data/profile'
@@ -6,10 +7,12 @@ import { skillGroups } from '@/data/skills'
export function AboutPage() {
return (
<>
<AnimatedSection>
<section className="section container-content" aria-labelledby="about-heading">
<SectionHeading
title="About Me"
subtitle="Senior Software Engineer with deep expertise in distributed systems, logistics technology, and practical AI applications."
tag="01 - About"
/>
<div style={{ maxWidth: '700px' }}>
<p style={{ fontSize: '18px', marginBottom: '32px' }}>
@@ -45,7 +48,9 @@ export function AboutPage() {
</div>
</div>
</section>
</AnimatedSection>
<AnimatedSection>
<section className="section container-wide" aria-labelledby="expertise-heading">
<SectionHeading title="Core Expertise" />
<div className="expertise-grid">
@@ -63,6 +68,7 @@ export function AboutPage() {
))}
</div>
</section>
</AnimatedSection>
</>
)
}
+2 -3
View File
@@ -1,12 +1,11 @@
import { SectionHeading } from '@/components/ui/SectionHeading'
import { DownloadResume } from '@/components/sections/DownloadResume'
import { profile } from '@/data/profile'
export function ContactPage() {
return (
<section className="section container-content" aria-labelledby="contact-heading">
<h2 id="contact-heading" style={{ marginBottom: '32px' }}>
Contact
</h2>
<SectionHeading title="Contact" tag="06 - Contact" />
<div className="contact-links">
<a href={`mailto:${profile.email}`} className="contact-link">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" width="24" height="24">
+2 -3
View File
@@ -1,12 +1,11 @@
import { SectionHeading } from '@/components/ui/SectionHeading'
import { Tag } from '@/components/ui/Tag'
import { profile } from '@/data/profile'
export function EngineeringPage() {
return (
<section className="section container-content" aria-labelledby="engineering-heading">
<h2 id="engineering-heading" style={{ marginBottom: '24px' }}>
Engineering
</h2>
<SectionHeading title="Engineering" tag="05 - Engineering" />
{['Architecture', 'AI / ML', 'Experiments'].map((category) => (
<div key={category} style={{ marginBottom: '48px' }}>
+2 -3
View File
@@ -1,11 +1,10 @@
import { SectionHeading } from '@/components/ui/SectionHeading'
import { experiences } from '@/data/experience'
export function ExperiencePage() {
return (
<section className="section container-content" aria-labelledby="experience-heading">
<h2 id="experience-heading" style={{ marginBottom: '48px' }}>
Experience
</h2>
<SectionHeading title="Experience" tag="03 - Experience" />
<div className="timeline">
{experiences.map((exp) => (
<div key={exp.id} className="timeline-entry">
+2
View File
@@ -1,3 +1,4 @@
import { SectionHeading } from '@/components/ui/SectionHeading'
import { Badge } from '@/components/ui/Badge'
import { projects } from '@/data/projects'
@@ -13,6 +14,7 @@ const categoryLabels: Record<string, string> = {
export function ProjectsListPage() {
return (
<section className="section container-wide" aria-labelledby="projects-heading">
<SectionHeading title="Projects" tag="04 - Projects" />
<div className="projects-grid">
{projects.map((project) => (
<a
+3
View File
@@ -79,6 +79,8 @@ export interface PhilosophyPoint {
export interface Profile {
name: string;
firstName: string;
lastName: string;
title: string;
titleEn?: string;
tagline: string;
@@ -90,5 +92,6 @@ export interface Profile {
linkedinUrl: string;
resumeUrl?: string;
currentInterests: string[];
roles: string[];
philosophy: PhilosophyPoint[];
}