A modern, interactive portfolio website showcasing my work as a Full Stack Developer & Machine Learning Enthusiast. Built with React, TypeScript, and featuring a beautiful glassmorphism design with dynamic day/night themes.
- Glassmorphism Design: Modern glass-like components with backdrop blur effects
- Dynamic Themes: Automatic time-based theme switching (Day/Afternoon/Evening/Night)
- Responsive Layout: Optimized for all devices from mobile to desktop
- Smooth Animations: Framer Motion-like transitions and interactive elements
- Glass Dock Navigation: Apple-inspired floating navigation dock
- Time Control: Manual time override to preview different themes
- Cosmic Backgrounds: Animated starfields and atmospheric effects
- Hover Effects: Smooth scale and glow animations
- Touch-Friendly: Optimized for mobile touch interactions
- Stable Positioning: Rock-solid dock positioning across all devices
- Touch Interactions: Gesture-friendly navigation
- Viewport Stability: No layout jumps or content shifts
- Progressive Enhancement: Works great on all screen sizes
- React 18.3.1 - Modern React with hooks and context
- TypeScript - Type-safe development
- Vite - Lightning-fast build tool and development server
- Tailwind CSS 3.x - Utility-first CSS framework
- shadcn/ui - High-quality, accessible UI components
- Radix UI - Unstyled, accessible component primitives
- CSS Backdrop Filter - Native glassmorphism effects
- Lucide React - Beautiful, customizable SVG icons
- Custom SVG Graphics - Hand-crafted illustrations and patterns
- clsx - Conditional className utility
- class-variance-authority - Component variant management
- tailwind-merge - Intelligent Tailwind class merging
- date-fns - Modern JavaScript date utility library
- ESLint - Code linting and formatting
- PostCSS - CSS processing and optimization
- TypeScript Compiler - Type checking and compilation
Portfolio/
βββ src/
β βββ components/
β β βββ ui/ # shadcn/ui components
β β βββ GlassDock.tsx # Main navigation dock
β β βββ HeroSection.tsx # Landing section
β β βββ AboutSection.tsx # About me section
β β βββ ProjectsSection.tsx # Projects showcase
β β βββ SkillsSection.tsx # Technical skills
β β βββ ... # Theme variants for each section
β βββ contexts/
β β βββ TimeThemeContext.tsx # Theme management
β βββ hooks/
β β βββ useTimeTheme.ts # Custom theme hook
β β βββ use-mobile.tsx # Mobile detection
β βββ data/
β β βββ portfolio.json # Portfolio content data
β βββ lib/
β βββ utils.ts # Utility functions
βββ public/ # Static assets
βββ ... # Config files
- Transparency: Semi-transparent backgrounds with blur effects
- Depth: Layered elements with subtle shadows and borders
- Interactivity: Responsive hover states and smooth transitions
- Accessibility: High contrast ratios and keyboard navigation
- Morning (6-12 AM): Light blue, fresh and energetic
- Afternoon (12-6 PM): Warm golden tones, vibrant and bright
- Evening (6-9 PM): Sunset oranges and purples, cozy atmosphere
- Night (9 PM-6 AM): Deep cosmic blues with starfields, calm and focused
- Node.js 16+ and npm (recommend using nvm)
# Clone the repository
git clone https://github.com/subhamagarrwal/portfolio.git
# Navigate to project directory
cd portfolio/Portfolio
# Install dependencies
npm install
# Start development server
npm run dev# Development server with hot reload
npm run dev
# Build for production
npm run build
# Build for development (with source maps)
npm run build:dev
# Lint code
npm run lint
# Preview production build
npm run previewThe Time Dialer allows users to override the real-time environment and manually scroll the website through different times of the day.
- Geometry-based interaction: The circular dial tracks mouse or touch coordinates relative to the dial's exact center. Using
Math.atan2(), the application calculates the angle of the pointer, offsets the angle so 12:00 PM is at the very top, and maps the 360-degree rotation precisely to a 24-hour time format. - Real-time Sync: Moving the dial immediately updates local state and dispatches a custom
manualTimeChangeevent, which rapidly updates the background's time context at up to 60fps.
The immersive landscape shifts seamlessly based on either the real-world time or the Time Dialer's selected hour.
- Geolocation & SunCalc: We use the browser's Geolocation API alongside the
suncalclibrary to define realistic phase timelines. Sunrise and sunset times aren't hardcoded; they are physically calculated based on your specific latitude and longitude. - Time Phase Interpolation: The background gracefully moves through 8 keyframes spanning from Deep Night to High Noon. As the time changes, CSS Custom Properties directly update to fluidly interpolate the RGB colors of the sky, layered mountains, and ground in real-time.
- Celestial Physics:
- The Sun rises and sets on a sine wave trajectory, increasing its glow (intensity) dynamically as it approaches the peak altitude.
- The Moon mirrors the sun, traversing the sky precisely during the "night" phase calculated by SunCalc.
- Atmosphere: Elements like glowing fireflies, star fields, and global illumination dynamically fade in and out depending on the active phase.
- Stable Positioning: Always centered, never jumps
- Touch Optimized: Perfect sizing for mobile interaction
- Visual Feedback: Hover effects and active states
- Theme Integration: Adapts to current time-based theme
- Manual Override: Switch between different times of day
- Smooth Transitions: Seamless theme switching
- Overlay Design: Non-intrusive time slider interface
- Auto Mode: Returns to automatic time-based theming
- Mobile-First: Optimized for mobile devices primarily
- Breakpoint System: Tailored layouts for different screen sizes
- Touch-Friendly: Large, accessible touch targets
- Performance: Optimized animations and loading
This project can be deployed on any static hosting platform:
- Vercel - Automatic deployments from Git
- Netlify - Simple drag-and-drop deployment
- GitHub Pages - Free hosting for public repositories
- CloudFlare Pages - Fast global CDN
npm run build
# Creates a 'dist' folder ready for deployment- Email: subhamag2003@gmail.com
- LinkedIn: Subham Agarwal
- GitHub: subhamagarrwal
This project is open source and available under the MIT License.
Built with β€οΈ by Subham Agarwal