What is Responsive Design?
Responsive design creates layouts that adapt fluidly to different screen sizes and orientations. Instead of fixed pixel widths, responsive designs use flexible grids, relative units, and media queries to provide optimal viewing experiences.Responsive design isn’t just about making things “fit” on smaller screens—it’s about crafting appropriate experiences for each context.
Core Responsive Techniques
This project demonstrates three fundamental responsive layout approaches:Flexbox
One-dimensional layouts that flex and flow naturally
CSS Grid
Two-dimensional layouts with precise control
Container Queries
Component-based responsive behavior
Flexbox for Flexible Layouts
Flexbox excels at distributing space and aligning items in one dimension (row or column).Hero Section Example
The hero section uses Flexbox to stack content vertically on mobile, then switch to horizontal on tablet:global.css:126-204
- Mobile (< 768px)
- Desktop (≥ 768px)
Social Links Pattern
global.css:166-198
CSS Grid for Complex Layouts
Grid provides two-dimensional control, perfect for card grids and complex page layouts.Skills Grid with Auto-Fit
The skills section uses Grid’sauto-fit to create a responsive grid without media queries:
global.css:276-280
global.css:282-307
Experience Cards with Grid Areas
The experience section uses grid template areas for flexible, semantic layouts:global.css:316-362
- Mobile Layout
- Desktop Layout
Container Queries
Container queries allow components to respond to their container’s size, not the viewport. This enables true component-based responsive design.Projects Section Example
global.css:433-501
The project cards respond to the
.project-list container width, not the viewport. This makes the component reusable in different layouts.- Components adapt to their context, not global viewport
- Reusable in sidebars, modals, or full-width layouts
- True component encapsulation
Responsive Spacing
This project uses CSS custom properties and responsive spacing strategies:Fixed Spacing Scale
variables.css:18-28
global.css:276-289
Responsive Typography
The project usesclamp() for fluid typography that scales smoothly:
global.css:22-24
- Never goes below 1.75rem (28px)
- Scales with viewport width (5vw)
- Never exceeds 2.5rem (40px)
Hero Title
global.css:142-147
Responsive Images
All images adapt to their containers:global.css:160-164
width: 100%- fills containerheight: auto- maintains aspect ratiomax-height: 30vh- prevents oversized images on mobile
Common Responsive Patterns
Stack to Row
Single to Multi-Column
Show/Hide Content
Testing Responsive Designs
Use Browser DevTools
Chrome/Firefox DevTools have responsive design modes with common device presets.
Test Between Breakpoints
Slowly resize the browser. The design should adapt smoothly, not break at odd sizes.
Best Practices
Use Relative Units
Use
rem, em, %, vw, vh instead of fixed pixels for flexibilityTest Edge Cases
Test at 320px (small phones) and 2560px (large monitors)
Avoid Fixed Heights
Let content determine height. Use
min-height if neededTouch-Friendly Targets
Buttons and links should be at least 44×44px on mobile
Next Steps
CSS Architecture
Learn how CSS is organized in this project
Responsive Breakpoints
Deep dive into the project’s breakpoint strategy