Why I Wanted to Build a Personal Portfolio
I wanted a personal corner on the internet that actually felt like mine. Most templates look clean at first glance, but they rarely show how you think about details, spacing, or interaction design. Instead of rushing to fill a page with fake case studies or flashy gradients, I decided to build my portfolio step by step from a blank Next.js App Router project.
My goal was simple: keep the layout quiet and readable, and put the personality into small, thoughtful interactions that reward curiosity.
Finding Design Inspiration
Before writing any components, I spent time looking at editorial layouts, printed notebooks, and developer sites that rely on strong typography instead of heavy decoration. What stood out to me was how much structure a single visible grid can give a page.
When every section shares the exact same horizontal boundaries and dashed dividers, you do not need drop shadows, glassmorphism, or bright accent cards to separate content. So I picked a monochromatic palette (#F9F9F9 and #000000 in light mode, #0A0A0A and #FAFAFA in dark mode) and paired two Google Fonts loaded through next/font/google:
- Instrument Serif (
400) for headings, my name, and section titles. - Inter (
400,500,600) for body text, navigation, and UI controls.
Creating a Reusable Editorial Grid Design System
To avoid repeating layout classes across sections, I started by defining every spacing and color token once in globals.css. The entire site aligns to a centered 768px (--container-width: 48rem) column.
Around that column, I built four small layout primitives:
Containercaps the width at768pxand applies consistent horizontal padding.GridBorderdraws1pxdashed vertical borders along both edges of the container.HatchedPatternrenders diagonal135deglines spaced6pxapart using a CSSrepeating-linear-gradient.SectionHeadingplaces aContainerwith a solidbg-backgroundinsideHatchedPattern, so the diagonal hatching only appears outside the768pxcolumn on wider screens.
export function SectionHeading({
title,
id,
rightContent,
className,
...props
}: SectionHeadingProps) {
return (
<div
className={cn(
"-mt-[var(--border-width)] w-full border-y-[length:var(--border-width)] border-dashed border-border",
className
)}
{...props}
>
<HatchedPattern className="w-full">
<Container className="p-0 md:p-0">
<GridBorder className="flex h-[56px] items-center justify-between gap-4 bg-background px-[var(--padding-desktop)]">
<h2
id={id}
className="font-serif text-[26px] font-normal leading-[32px] text-foreground"
>
{title}
</h2>
{rightContent}
</GridBorder>
</Container>
</HatchedPattern>
</div>
);
}I also added a SectionSpacer component with 16px and 24px heights so the vertical dashed borders continue cleanly through the breathing room between sections. One small detail that mattered a lot: using overflow-x: clip instead of overflow-x: hidden on html and body prevents horizontal scrollbars on mobile without breaking position: sticky on the navbar.
Building Interactive Features
Once the grid felt solid, I added a few quiet interactions that make the page fun to explore without getting in the way of reading.
Circular Reveal Theme Transition
A regular instant dark-mode toggle works, but expanding the new theme from the exact center of the toggle button makes switching modes feel physical. I implemented this with the browser View Transition API and flushSync from react-dom:
const rect = button.getBoundingClientRect();
const x = rect.left + rect.width / 2;
const y = rect.top + rect.height / 2;
const maxRadius = Math.hypot(
Math.max(x, window.innerWidth - x),
Math.max(y, window.innerHeight - y)
);
const transition = document.startViewTransition(() => {
flushSync(() => {
toggleTheme();
});
});
await transition.ready;
document.documentElement.animate(
{
clipPath: [
`circle(0px at ${x}px ${y}px)`,
`circle(${maxRadius}px at ${x}px ${y}px)`,
],
},
{
duration: 750,
easing: "ease-in-out",
pseudoElement: "::view-transition-new(root)",
}
);If a visitor has prefers-reduced-motion: reduce enabled or uses a browser without View Transition support, it falls back to a direct class toggle. I also put a tiny inline script in <head> to apply the saved theme from localStorage before first paint so there is no white flash on reload.
Interactive Mascot
In the profile section, I used the page-mascot package with two .webp sprite sheets (cap-directions.webp and cap-reactions.webp). On desktop, the mascot follows your cursor around the page and reacts when clicked. Next to it, an avatar-switch button crossfades (300ms ease-in-out) to a lime-green #DAFA55 CSS badge reading "build. break. repeat.".
Clicking the avatar switch or theme toggle also plays short UI sounds (/sounds/ui-click.mp3 and /sounds/theme-switch.mp3) through a shared SoundProvider built on use-sound at 0.2 volume, with localStorage mute persistence.
Vinyl Music Player
Below my social links, I built a 112 × 112px vinyl music player backed by a native HTMLAudioElement at 0.5 default volume. It plays three local MP3 tracks (Ethereal Dream - Abstract Chill, Lofi Sea, and Night Coffee Shop), auto-advances when a track ends, and loops through the playlist without touching the UI click sound system.
Instead of toggling the CSS spin animation class on and off—which would snap the record back to 0deg every time you pause—I keep the keyframe animation mounted and toggle animationPlayState between "running" and "paused". An SVG tonearm rotates smoothly between its resting angle and the vinyl grooves when playback starts.
Custom Cursor
For desktop mouse users, I built a TargetCursor component using four 7px corner brackets and a 4px center dot driven by requestAnimationFrame. When idle, it stays still instead of spinning. When you hover over a link, button, or interactive control, the four corners smoothly interpolate to lock onto that element's getBoundingClientRect().
When you hover over selectable text, the center dot turns into an 18px I-beam, and dragging to highlight text triggers a subtle scale animation paired with a #DAFA55 lime-green selection highlight. On touch devices, prefers-reduced-motion, right-click context menus, and form inputs, the custom cursor steps out of the way so native behavior stays untouched.
GitHub Contribution Calendar
Rather than embedding a third-party image widget, I wrote a server-side GraphQL query in src/lib/github.ts using Next.js 16 "use cache" with cacheLife("hours") to cache my last 12 months of GitHub activity for one hour.
Each day renders as an 11px circular cell across five blue intensity levels, showing the daily contribution count at 7px inside active circles. Days where I created a new repository render a clickable 💥 marker that opens the repository directly, and hovering any circle shows a tooltip with the date, commits, and other contributions.
Making the Website Responsive and Accessible
Because the layout is centered around a 768px column, mobile responsiveness mostly comes down to letting dense components breathe without breaking page alignment. The GitHub calendar and category filter tabs wrap in overflow-x-auto containers on narrow screens, while on 768px desktop screens the 53-week calendar fits cleanly inside the 718px inner width without clipping.
For accessibility, every interactive control uses semantic <button> or <a> elements with aria-labels, aria-current="page" on active navigation links, keyboard Escape handling for the mobile menu, and motion-reduce utilities across animations.
Optimizing Performance and SEO
A few practical optimizations made a measurable difference:
- Hero video size: I re-encoded the local
ocean.mp4banner withavconvert, bringing it down from6.8 MBto825 KB, and added a139 KBocean-poster.jpgframe so the banner paints immediately. - Metadata & structured data: I configured
metadataBaseforhttps://dipeshdev.site, canonical URLs, dynamicopengraph-image.tsx,sitemap.xml,robots.txt,llms.txt, andPerson+WebSiteJSON-LD. - Blog SEO: Published MDX articles automatically generate
BlogPostingJSON-LD, dynamic Open Graph tags, RSS entries in/rss.xml, and sitemap URLs, while drafts stay excluded.
Challenges and Lessons Learned
Not everything worked on the first try. Here are a few real issues I ran into while building and deploying this site:
- The
wwwredirect loop: I added awwwto apex308redirect invercel.jsonwhile Vercel's domain dashboard was still set to redirect apex towww. That immediately causedERR_TOO_MANY_REDIRECTSuntil I removed the duplicate rule invercel.json. - React 19 and Next.js 16 strictness: React 19's ESLint rules flagged synchronous
setStateinsideuseEffect, and Next.js 16cacheComponentsflaggednew Date()in client prerendering andnode:fsleaking into client bundles. Splittingsrc/lib/blog-shared.tsfromsrc/lib/blog.tsand usinguseSyncExternalStorefor client-only values solved both cleanly. - Resend sandbox spam filtering: My contact form worked end-to-end with Resend and Zod, but emails sent from
onboarding@resend.devlanded in Spam—a reminder that verifying a custom sending domain matters for real production delivery.
What's Next
Now that the foundation, blog system, and design system are in place, the Projects section is intentionally waiting with an honest empty state. Next, I want to focus less on tweaking the portfolio itself and more on building and shipping real, useful tools for people—and documenting what I learn along the way right here.