The user wants me to create a modern semantic layout that demonstrates the shift from traditional float/flexbox layouts to CSS Grid. This should showcase:
- Equal height patterns - a common pain point with floats that grid solves naturally
- Logical structure - semantic HTML5 elements
- Modern layout techniques using CSS Grid
I'll create a portfolio/agency style website that demonstrates:
- Grid-based card layouts with equal heights
- Semantic HTML5 structure (header, nav, main, section, article, aside, footer)
- Responsive grid that adapts gracefully
- The design spec aesthetic (glass morphism, warm tones, clean typography)
Let me build this out with:
- A hero section
- A features/services grid section (showing equal height cards)
- A portfolio/work grid with varying sizes (spanning columns)
- A testimonials section
- A footer with grid layout
I'll use the design specifications provided:
- Colors: stone palette with amber accents
- Typography: Inter font
- Glass morphism effects
- Smooth transitions
- Grayscale to color image hover effects
Semantic Grid Layout Modernization
This layout demonstrates the transition from float/flex patterns to modern CSS Grid, featuring equal-height cards, logical semantic structure, and responsive design.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Grid Layout Modernization</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://code.iconify.design/3/3.1.0/iconify.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
fontFamily: { sans: ['Inter', 'sans-serif'] },
colors: {
stone: { 50:'#fafaf9', 100:'#f5f5f4', 200:'#e7e5e4', 300:'#d6d3d1', 400:'#a8a29e', 500:'#78716c', 600:'#57534e', 700:'#44403c', 800:'#292524', 900:'#1c1917' },
accent: { 50:'#fffbeb', 100:'#fef3c7', 200:'#fde68a', 400:'#fbbf24', 500:'#f59e0b', 600:'#d97706', 700:'#b45309' }
}
}
}
}
</script>
<style>
/* Scroll reveal animations */
.reveal {
opacity: 0;
transform: translateY(30px);
transition: opacity 0.8s cubic-bezier(0.5,0,0,1), transform 0.8s cubic-bezier(0.5,0,0,1);
}
.reveal.active {
opacity: 1;
transform: translateY(0);
}
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #fafaf9; }
::-webkit-scrollbar-thumb { background: #d6d3d1; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #a8a29e; }
/* Grid pattern background */
.grid-pattern {
background-size: 40px 40px;
background-image: linear-gradient(to right, rgba(0,0,0,0.03) 1px, transparent 1px),
linear-gradient(to bottom, rgba(0,0,0,0.03) 1px, transparent 1px);
}
/* Equal height grid items */
.grid-equal > * {
display: flex;
flex-direction: column;
}
.grid-equal > * > :last-child {
margin-top: auto;
}
</style>
</head>
<body class="bg-stone-50 text-stone-800 font-sans antialiased">
<!-- ==================== HEADER ==================== -->
<header class="fixed top-0 left-0 right-0 z-50 h-20 bg-white/80 backdrop-blur-md border-b border-stone-200/50">
<nav class="max-w-7xl mx-auto h-full px-6 flex items-center justify-between" role="navigation" aria-label="Main navigation">
<!-- Logo -->
<a href="#" class="flex items-center gap-3 group">
<div class="w-10 h-10 bg-accent-500 rounded-xl flex items-center justify-center shadow-lg shadow-accent-500/20 transition-transform duration-300 group-hover:scale-105">
<span class="iconify text-white text-xl" data-icon="mdi:view-grid"></span>
</div>
<span class="text-xl font-semibold tracking-tight">GridFlow</span>
</a>
<!-- Navigation Links -->
<ul class="hidden md:flex items-center gap-8">
<li><a href="#features" class="text-stone-600 hover:text-accent-600 transition-colors">Features</a></li>
<li><a href="#services" class="text-stone-600 hover:text-accent-600 transition-colors">Services</a></li>
<li><a href="#portfolio" class="text-stone-600 hover:text-accent-600 transition-colors">Portfolio</a></li>
<li><a href="#testimonials" class="text-stone-600 hover:text-accent-600 transition-colors">Testimonials</a></li>
</ul>
<!-- CTA Button -->
<a href="#contact" class="bg-stone-900 text-stone-50 px-5 py-2.5 rounded-full text-sm font-medium hover:bg-stone-800 transition-colors shadow-lg shadow-stone-900/10">
Get Started
</a>
</nav>
</header>
<main>
<!-- ==================== HERO SECTION ==================== -->
<section class="pt-32 pb-20 md:pt-40 md:pb-28 relative overflow-hidden" aria-labelledby="hero-heading">
<!-- Decorative Elements -->
<div class="absolute top-20 left-0 w-[600px] h-[600px] bg-accent-500/10 rounded-full blur-[80px] -translate-x-1/2 pointer-events-none"></div>
<div class="absolute bottom-0 right-0 w-[500px] h-[500px] bg-stone-400/10 rounded-full blur-[80px] translate-x-1/2 pointer-events-none"></div>
<div class="max-w-7xl mx-auto px-6">
<!-- Hero Grid: 2-column layout -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-16 items-center">
<!-- Content -->
<div class="reveal">
<span class="inline-flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-accent-600 mb-4">
<span class="iconify" data-icon="mdi:lightning-bolt"></span>
Modern Layout Patterns
</span>
<h1 id="hero-heading" class="text-4xl md:text-5xl lg:text-6xl font-medium tracking-tight leading-[1.1] mb-6">
From Floats to <span class="text-accent-500">Grid</span>
</h1>
<p class="text-lg text-stone-600 leading-relaxed mb-8 max-w-lg">
Experience the power of CSS Grid with equal-height cards, logical structure, and responsive patterns that adapt seamlessly.
</p>
<div class="flex flex-wrap gap-4">
<a href="#features" class="inline-flex items-center gap-2 bg-stone-900 text-stone-50 px-8 py-3.5 rounded-full font-medium hover:bg-stone-800 transition-all shadow-lg shadow-stone-900/10">
Explore Patterns
<span class="iconify text-lg" data-icon="mdi:arrow-right"></span>
</a>
<a href="#services" class="inline-flex items-center gap-2 border border-stone-300 text-stone-700 px-8 py-3.5 rounded-full font-medium hover:border-stone-400 transition-colors">
View Services
</a>
</div>
</div>
<!-- Hero Image Grid -->
<div class="reveal delay-200 relative">
<div class="grid grid-cols-2 gap-4">
<div class="space-y-4">
<div class="aspect-[4/5] rounded-2xl overflow-hidden shadow-2xl">
<img src="https://picsum.photos/seed/grid-hero-1/400/500" alt="Modern grid layout example" class="w-full h-full object-cover hover:scale-105 transition-transform duration-700">
</div>
<div class="aspect-square rounded-2xl overflow-hidden shadow-xl bg-accent-100 flex items-center justify-center">
<span class="iconify text-5xl text-accent-500" data-icon="mdi:view-dashboard"></span>
</div>
</div>
<div class="space-y-4 pt-8">
<div class="aspect-square rounded-2xl overflow-hidden shadow-xl bg-stone-200 flex items-center justify-center">
<span class="iconify text-5xl text-stone-400" data-icon="mdi:responsive"></span>
</div>
<div class="aspect-[4/5] rounded-2xl overflow-hidden shadow-2xl">
<img src="https://picsum.photos/seed/grid-hero-2/400/500" alt="Responsive design showcase" class="w-full h-full object-cover hover:scale-105 transition-transform duration-700">
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- ==================== FEATURES SECTION (Equal Height Grid) ==================== -->
<section id="features" class="py-24 bg-white relative" aria-labelledby="features-heading">
<div class="absolute inset-0 grid-pattern opacity-50"></div>
<div class="max-w-7xl mx-auto px-6 relative">
<!-- Section Header -->
<header class="text-center mb-16 reveal">
<span class="inline-block text-xs font-semibold uppercase tracking-wider text-accent-600 mb-3">Why Grid</span>
<h2 id="features-heading" class="text-3xl md:text-4xl font-medium tracking-tight mb-4">Grid vs Traditional Layouts</h2>
<p class="text-stone-600 max-w-2xl mx-auto">CSS Grid solves common layout challenges that required hacks with floats and complex flexbox nesting.</p>
</header>
<!-- Equal Height Feature Cards - Grid Pattern -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 grid-equal reveal delay-100">
<!-- Feature 1 -->
<article class="group bg-stone-50 rounded-2xl p-8 border border-stone-200/50 hover:border-accent-200 hover:shadow-xl transition-all duration-300">
<div class="w-12 h-12 bg-accent-100 rounded-xl flex items-center justify-center mb-6 group-hover:bg-accent-500 transition-colors">
<span class="iconify text-2xl text-accent-600 group-hover:text-white transition-colors" data-icon="mdi:arrow-expand-vertical"></span>
</div>
<h3 class="text-xl font-semibold mb-3">Equal Height Rows</h3>
<p class="text-stone-600 leading-relaxed mb-4">Grid automatically creates equal-height items without JavaScript or flexbox stretching hacks.</p>
<div class="text-sm text-accent-600 font-medium flex items-center gap-1">
<span>align-items: stretch</span>
</div>
</article>
<!-- Feature 2 -->
<article class="group bg-stone-50 rounded-2xl p-8 border border-stone-200/50 hover:border-accent-200 hover:shadow-xl transition-all duration-300">
<div class="w-12 h-12 bg-accent-100 rounded-xl flex items-center justify-center mb-6 group-hover:bg-accent-500 transition-colors">
<span class="iconify text-2xl text-accent-600 group-hover:text-white transition-colors" data-icon="mdi:view-column"></span>
</div>
<h3 class="text-xl font-semibold mb-3">2D Layout Control</h3>
<p class="text-stone-600 leading-relaxed mb-4">Simultaneous control over rows and columns—something floats could never achieve natively.</p>
<div class="text-sm text-accent-600 font-medium flex items-center gap-1">
<span>grid-template-columns/rows</span>
</div>
</article>
<!-- Feature 3 -->
<article class="group bg-stone-50 rounded-2xl p-8 border border-stone-200/50 hover:border-accent-200 hover:shadow-xl transition-all duration-300">
<div class="w-12 h-12 bg-accent-100 rounded-xl flex items-center justify-center mb-6 group-hover:bg-accent-500 transition-colors">
<span class="iconify text-2xl text-accent-600 group-hover:text-white transition-colors" data-icon="mdi:gesture-tap-hold"></span>
</div>
<h3 class="text-xl font-semibold mb-3">Gap Property</h3>
<p class="text-stone-600 leading-relaxed mb-4">Consistent spacing with gap eliminates margin nightmares and negative margin hacks.</p>
<div class="text-sm text-accent-600 font-medium flex items-center gap-1">
<span>gap: 1.5rem</span>
</div>
</article>
<!-- Feature 4 -->
<article class="group bg-stone-50 rounded-2xl p-8 border border-stone-200/50 hover:border-accent-200 hover:shadow-xl transition-all duration-300">
<div class="w-12 h-12 bg-accent-100 rounded-xl flex items-center justify-center mb-6 group-hover:bg-accent-500 transition-colors">
<span class="iconify text-2xl text-accent-600 group-hover:text-white transition-colors" data-icon="mdi:arrow-split-vertical"></span>
</div>
<h3 class="text-xl font-semibold mb-3">Item Placement</h3>
<p class="text-stone-600 leading-relaxed mb-4">Place items anywhere in the grid without changing DOM order—perfect for responsive rearrangement.</p>
<div class="text-sm text-accent-600 font-medium flex items-center gap-1">
<span>grid-column/row</span>
</div>
</article>
<!-- Feature 5 -->
<article class="group bg-stone-50 rounded-2xl p-8 border border-stone-200/50 hover:border-accent-200 hover:shadow-xl transition-all duration-300">
<div class="w-12 h-12 bg-accent-100 rounded-xl flex items-center justify-center mb-6 group-hover:bg-accent-500 transition-colors">
<span class="iconify text-2xl text-accent-600 group-hover:text-white transition-colors" data-icon="mdi:resize"></span>
</div>
<h3 class="text-xl font-semibold mb-3">fr Unit</h3>
<p class="text-stone-600 leading-relaxed mb-4">Flexible fractions distribute available space proportionally—no more percentage calculations.</p>
<div class="text-sm text-accent-600 font-medium flex items-center gap-1">
<span>1fr, 2fr, auto</span>
</div>
</article>
<!-- Feature 6 -->
<article class="group bg-stone-50 rounded-2xl p-8 border border-stone-200/50 hover:border-accent-200 hover:shadow-xl transition-all duration-300">
<div class="w-12 h-12 bg-accent-100 rounded-xl flex items-center justify-center mb-6 group-hover:bg-accent-500 transition-colors">
<span class="iconify text-2xl text-accent-600 group-hover:text-white transition-colors" data-icon="mdi:cellphone-link"></span>
</div>
<h3 class="text-xl font-semibold mb-3">Intrinsic Responsiveness</h3>
<p class="text-stone-600 leading-relaxed mb-4">auto-fit, auto-fill, and minmax() create responsive grids without media queries.</p>
<div class="text-sm text-accent-600 font-medium flex items-center gap-1">
<span>minmax(300px, 1fr)</span>
</div>
</article>
</div>
</div>
</section>
<!-- ==================== SERVICES SECTION (Spanning Grid) ==================== -->
<section id="services" class="py-24 bg-stone-50 relative overflow-hidden" aria-labelledby="services-heading">
<div class="absolute top-1/2 right-0 w-[400px] h-[400px] bg-accent-500/10 rounded-full blur-[100px] translate-x-1/2 pointer-events-none"></div>
<div class="max-w-7xl mx-auto px-6 relative">
<!-- Section Header -->
<header class="text-center mb-16 reveal">
<span class="inline-block text-xs font-semibold uppercase tracking-wider text-accent-600 mb-3">Services</span>
<h2 id="services-heading" class="text-3xl md:text-4xl font-medium tracking-tight mb-4">Grid-Powered Solutions</h2>
<p class="text-stone-600 max-w-2xl mx-auto">Complex layouts made simple with CSS Grid's spanning capabilities.</p>
</header>
<!-- Grid with spanning items -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 reveal delay-100">
<!-- Service 1 - Spans 2 columns -->
<article class="group lg:col-span-2 bg-white rounded-2xl overflow-hidden shadow-lg hover:shadow-xl transition-all duration-300 border border-stone-200/50">
<div class="grid grid-cols-1 md:grid-cols-2 h-full">
<div class="p-8 md:p-10 flex flex-col justify-center">
<div class="w-12 h-12 bg-stone-900 rounded-xl flex items-center justify-center mb-6">
<span class="iconify text-2xl text-white" data-icon="mdi:palette-outline"></span>
</div>
<h3 class="text-xl font-semibold mb-3">UI/UX Design</h3>
<p class="text-stone-600 leading-relaxed">Creating intuitive interfaces with modern grid-based layouts that adapt to any screen size.</p>
</div>
<div class="h-64 md:h-auto overflow-hidden">
<img src="https://picsum.photos/seed/service-design/600/400" alt="UI/UX Design service" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-700">
</div>
</div>
</article>
<!-- Service 2 - Single column -->
<article class="group bg-white rounded-2xl p-8 shadow-lg hover:shadow-xl transition-all duration-300 border border-stone-200/50 flex flex-col">
<div class="w-12 h-12 bg-accent-100 rounded-xl flex items-center justify-center mb-6 group-hover:bg-accent-500 transition-colors">
<span class="iconify text-2xl text-accent-600 group-hover:text-white transition-colors" data-icon="mdi:code-tags"></span>
</div>
<h3 class="text-xl font-semibold mb-3">Development</h3>
<p class="text-stone-600 leading-relaxed flex-grow">Clean, semantic HTML5 with CSS Grid for maintainable codebases.</p>
<ul class="mt-4 space-y-2 text-sm text-stone-500">
<li class="flex items-center gap-2">
<span class="iconify text-accent-500" data-icon="mdi:check"></span>
Responsive by default
</li>
<li class="flex items-center gap-2">
<span class="iconify text-accent-500" data-icon="mdi:check"></span>
Accessibility first
</li>
</ul>
</article>
<!-- Service 3 - Single column -->
<article class="group bg-white rounded-2xl p-8 shadow-lg hover:shadow-xl transition-all duration-300 border border-stone-200/50 flex flex-col">
<div class="w-12 h-12 bg-accent-100 rounded-xl flex items-center justify-center mb-6 group-hover:bg-accent-500 transition-colors">
<span class="iconify text-2xl text-accent-600 group-hover:text-white transition-colors" data-icon="mdi:cog-outline"></span>
</div>
<h3 class="text-xl font-semibold mb-3">Optimization</h3>
<p class="text-stone-600 leading-relaxed flex-grow">Performance audits and layout refactoring from legacy float-based systems.</p>
<div class="mt-4 flex items-center gap-3">
<span class="px-3 py-1 bg-stone-100 rounded-full text-xs font-medium text-stone-600">CSS Grid</span>
<span class="px-3 py-1 bg-stone-100 rounded-full text-xs font-medium text-stone-600">Flexbox</span>
</div>
</article>
<!-- Service 4 - Spans 2 columns -->
<article class="group lg:col-span-2 bg-stone-900 rounded-2xl p-8 md:p-10 shadow-lg hover:shadow-xl transition-all duration-300">
<div class="flex flex-col md:flex-row md:items-center gap-6 md:gap-10">
<div class="flex-1">
<div class="w-12 h-12 bg-accent-500 rounded-xl flex items-center justify-center mb-6">
<span class="iconify text-2xl text-white" data-icon="mdi:school-outline"></span>
</div>
<h3 class="text-xl font-semibold text-white mb-3">Training & Workshops</h3>
<p class="text-stone-400 leading-relaxed">Team training on modern CSS layout techniques, from basics to advanced grid patterns.</p>
</div>
<div class="flex flex-wrap gap-3">
<span class="px-4 py-2 bg-stone-800 rounded-lg text-sm text-stone-300">CSS Fundamentals</span>
<span class="px-4 py-2 bg-stone-800 rounded-lg text-sm text-stone-300">Grid Layouts</span>
<span class="px-4 py-2 bg-stone-800 rounded-lg text-sm text-stone-300">Responsive Design</span>
<span class="px-4 py-2 bg-stone-800 rounded-lg text-sm text-stone-300">Best Practices</span>
</div>
</div>
</article>
</div>
</div>
</section>
<!-- ==================== PORTFOLIO SECTION (Masonry-like Grid) ==================== -->
<section id="portfolio" class="py-24 bg-white relative" aria-labelledby="portfolio-heading">
<div class="absolute inset-0 grid-pattern opacity-30"></div>
<div class="max-w-7xl mx-auto px-6 relative">
<!-- Section Header -->
<header class="text-center mb-16 reveal">
<span class="inline-block text-xs font-semibold uppercase tracking-wider text-accent-600 mb-3">Portfolio</span>
<h2 id="portfolio-heading" class="text-3xl md:text-4xl font-medium tracking-tight mb-4">Recent Projects</h2>
<p class="text-stone-600 max-w-2xl mx-auto">Real-world implementations of modern grid layouts.</p>
</header>
<!-- Portfolio Grid -->
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 reveal delay-100">
<!-- Project 1 - Large -->
<article class="group relative aspect-square md:col-span-2 md:row-span-2 rounded-2xl overflow-hidden shadow-lg cursor-pointer">
<img src="https://picsum.photos/seed/project-1/800/800" alt="E-commerce Platform project" class="w-full h-full object-cover transition-transform duration-700 group-hover:scale-105">
<div class="absolute inset-0 bg-gradient-to-t from-stone-900/80 via-stone-900/20 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300">
<div class="absolute bottom-0 left-0 right-0 p-6">
<span class="text-xs font-semibold uppercase tracking-wider text-accent-400">E-commerce</span>
<h3 class="text-xl font-semibold text-white mt-1">Platform Redesign</h3>
</div>
</div>
</article>
<!-- Project 2 -->
<article class="group relative aspect-square rounded-2xl overflow-hidden shadow-lg cursor-pointer">
<img src="https://picsum.photos/seed/project-2/400/400" alt="Dashboard project" class="w-full h-full object-cover transition-transform duration-700 group-hover:scale-105 grayscale hover:grayscale-0">
<div class="absolute inset-0 bg-gradient-to-t from-stone-900/80 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300">
<div class="absolute bottom-0 left-0 right-0 p-4">
<span class="text-xs font-semibold uppercase tracking-wider text-accent-400">Dashboard</span>
<h3 class="text-lg font-semibold text-white mt-1">Analytics UI</h3>
</div>
</div>
</article>
<!-- Project 3 -->
<article class="group relative aspect-square rounded-2xl overflow-hidden shadow-lg cursor-pointer">
<img src="https://picsum.photos/seed/project-3/400/400" alt="Blog template project" class="w-full h-full object-cover transition-transform duration-700 group-hover:scale-105 grayscale hover:grayscale-0">
<div class="absolute inset-0 bg-gradient-to-t from-stone-900/80 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300">
<div class="absolute bottom-0 left-0 right-0 p-4">
<span class="text-xs font-semibold uppercase tracking-wider text-accent-400">Blog</span>
<h3 class="text-lg font-semibold text-white mt-1">Magazine Layout</h3>
</div>
</div>
</article>
<!-- Project 4 -->
<article class="group relative aspect-square rounded-2xl overflow-hidden shadow-lg cursor-pointer">
<img src="https://picsum.photos/seed/project-4/400/400" alt="Portfolio site project" class="w-full h-full object-cover transition-transform duration-700 group-hover:scale-105 grayscale hover:grayscale-0">
<div class="absolute inset-0 bg-gradient-to-t from-stone-900/80 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300">
<div class="absolute bottom-0 left-0 right-0 p-4">
<span class="text-xs font-semibold uppercase tracking-wider text-accent-400">Portfolio</span>
<h3 class="text-lg font-semibold text-white mt-1">Creative Site</h3>
</div>
</div>
</article>
<!-- Project 5 -->
<article class="group relative aspect-square rounded-2xl overflow-hidden shadow-lg cursor-pointer">
<img src="https://picsum.photos/seed/project-5/400/400" alt="SaaS landing page project" class="w-full h-full object-cover transition-transform duration-700 group-hover:scale-105 grayscale hover:grayscale-0">
<div class="absolute inset-0 bg-gradient-to-t from-stone-900/80 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300">
<div class="absolute bottom-0 left-0 right-0 p-4">
<span class="text-xs font-semibold uppercase tracking-wider text-accent-400">SaaS</span>
<h3 class="text-lg font-semibold text-white mt-1">Landing Page</h3>
</div>
</div>
</article>
<!-- Project 6 - Wide -->
<article class="group relative aspect-video md:aspect-auto md:col-span-2 rounded-2xl overflow-hidden shadow-lg cursor-pointer">
<img src="https://picsum.photos/seed/project-6/800/400" alt="Corporate website project" class="w-full h-full object-cover transition-transform duration-700 group-hover:scale-105">
<div class="absolute inset-0 bg-gradient-to-t from-stone-900/80 via-stone-900/20 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300">
<div class="absolute bottom-0 left-0 right-0 p-6">
<span class="text-xs font-semibold uppercase tracking-wider text-accent-400">Corporate</span>
<h3 class="text-xl font-semibold text-white mt-1">Enterprise Website</h3>
</div>
</div>
</article>
<!-- Project 7 -->
<article class="group relative aspect-square rounded-2xl overflow-hidden shadow-lg cursor-pointer">
<img src="https://picsum.photos/seed/project-7/400/400" alt="Mobile app project" class="w-full h-full object-cover transition-transform duration-700 group-hover:scale-105 grayscale hover:grayscale-0">
<div class="absolute inset-0 bg-gradient-to-t from-stone-900/80 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300">
<div class="absolute bottom-0 left-0 right-0 p-4">
<span class="text-xs font-semibold uppercase tracking-wider text-accent-400">Mobile</span>
<h3 class="text-lg font-semibold text-white mt-1">App Interface</h3>
</div>
</div>
</article>
<!-- Project 8 -->
<article class="group relative aspect-square rounded-2xl overflow-hidden shadow-lg cursor-pointer">
<img src="https://picsum.photos/seed/project-8/400/400" alt="Documentation site project" class="w-full h-full object-cover transition-transform duration-700 group-hover:scale-105 grayscale hover:grayscale-0">
<div class="absolute inset-0 bg-gradient-to-t from-stone-900/80 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300">
<div class="absolute bottom-0 left-0 right-0 p-4">
<span class="text-xs font-semibold uppercase tracking-wider text-accent-400">Docs</span>
<h3 class="text-lg font-semibold text-white mt-1">Documentation</h3>
</div>
</div>
</article>
</div>
</div>
</section>
<!-- ==================== TESTIMONIALS SECTION (Equal Height Cards) ==================== -->
<section id="testimonials" class="py-24 bg-stone-50 relative" aria-labelledby="testimonials-heading">
<div class="max-w-7xl mx-auto px-6">
<!-- Section Header -->
<header class="text-center mb-16 reveal">
<span class="inline-block text-xs font-semibold uppercase tracking-wider text-accent-600 mb-3">Testimonials</span>
<h2 id="testimonials-heading" class="text-3xl md:text-4xl font-medium tracking-tight mb-4">Client Feedback</h2>
<p class="text-stone-600 max-w-2xl mx-auto">What our clients say about our grid-based solutions.</p>
</header>
<!-- Testimonials Grid - Equal Heights -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 reveal delay-100">
<!-- Testimonial 1 -->
<article class="bg-white rounded-2xl p-8 shadow-lg border border-stone-200/50 flex flex-col h-full">
<div class="flex items-center gap-1 mb-4">
<span class="iconify text-accent-500" data-icon="mdi:star"></span>
<span class="iconify text-accent-500" data-icon="mdi:star"></span>
<span class="iconify text-accent-500" data-icon="mdi:star"></span>
<span class="iconify text-accent-500" data-icon="mdi:star"></span>
<span class="iconify text-accent-500" data-icon="mdi:star"></span>
</div>
<blockquote class="text-stone-700 leading-relaxed flex-grow">
"The transition from our old float-based layout to CSS Grid was seamless. Our codebase is now significantly cleaner and easier to maintain."
</blockquote>
<footer class="mt-6 pt-6 border-t border-stone-100 flex items-center gap-4">
<img src="https://picsum.photos/seed/avatar-1/80/80" alt="Sarah Chen" class="w-12 h-12 rounded-full object-cover">
<div>
<cite class="not-italic font-semibold text-stone-800">Sarah Chen</cite>
<p class="text-sm text-stone-500">CTO, TechStart</p>
</div>
</footer>
</article>
<!-- Testimonial 2 - Longer content to demonstrate equal heights -->
<article class="bg-white rounded-2xl p-8 shadow-lg border border-stone-200/50 flex flex-col h-full">
<div class="flex items-center gap-1 mb-4">
<span class="iconify text-accent-500" data-icon="mdi:star"></span>
<span class="iconify text-accent-500" data-icon="mdi:star"></span>
<span class="iconify text-accent-500" data-icon="mdi:star"></span>
<span class="iconify text-accent-500" data-icon="mdi:star"></span>
<span class="iconify text-accent-500" data-icon="mdi:star"></span>
</div>
<blockquote class="text-stone-700 leading-relaxed flex-grow">
"Our responsive issues disappeared overnight. The equal-height cards alone saved us dozens of lines of JavaScript. Grid is a game-changer for complex layouts. I can't imagine going back to our old approach."
</blockquote>
<footer class="mt-6 pt-6 border-t border-stone-100 flex items-center gap-4">
<img src="https://picsum.photos/seed/avatar-2/80/80" alt="Michael Torres" class="w-12 h-12 rounded-full object-cover">
<div>
<cite class="not-italic font-semibold text-stone-800">Michael Torres</cite>
<p class="text-sm text-stone-500">Lead Developer, InnoVate</p>
</div>
</footer>
</article>
<!-- Testimonial 3 -->
<article class="bg-white rounded-2xl p-8 shadow-lg border border-stone-200/50 flex flex-col h-full">
<div class="flex items-center gap-1 mb-4">
<span class="iconify text-accent-500" data-icon="mdi:star"></span>
<span class="iconify text-accent-500" data-icon="mdi:star"></span>
<span class="iconify text-accent-500" data-icon="mdi:star"></span>
<span class="iconify text-accent-500" data-icon="mdi:star"></span>
<span class="iconify text-accent-500" data-icon="mdi:star-half-full"></span>
</div>
<blockquote class="text-stone-700 leading-relaxed flex-grow">
"The team training was exceptional. Our developers now write better CSS in half the time. The workshop on grid patterns was particularly valuable."
</blockquote>
<footer class="mt-6 pt-6 border-t border-stone-100 flex items-center gap-4">
<img src="https://picsum.photos/seed/avatar-3/80/80" alt="Emily Watson" class="w-12 h-12 rounded-full object-cover">
<div>
<cite class="not-italic font-semibold text-stone-800">Emily Watson</cite>
<p class="text-sm text-stone-500">Design Lead, CreativCo</p>
</div>
</footer>
</article>
</div>
</div>
</section>
<!-- ==================== CONTACT/CTA SECTION ==================== -->
<section id="contact" class="py-24 bg-stone-900 relative overflow-hidden" aria-labelledby="contact-heading">
<div class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-accent-500/5 rounded-full blur-[100px] pointer-events-none"></div>
<div class="max-w-7xl mx-auto px-6 relative">
<!-- Two-column CTA Grid -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-20 items-center">
<!-- Content -->
<div class="reveal">
<h2 id="contact-heading" class="text-3xl md:text-4xl font-medium tracking-tight text-white mb-6">
Ready to Modernize Your Layouts?
</h2>
<p class="text-stone-400 text-lg leading-relaxed mb-8">
Let's transform your legacy float-based designs into clean, maintainable CSS Grid layouts.
</p>
<ul class="space-y-4 mb-8">
<li class="flex items-center gap-3 text-stone-300">
<span class="w-6 h-6 bg-accent-500/20 rounded-full flex items-center justify-center">
<span class="iconify text-accent-500 text-sm" data-icon="mdi:check"></span>
</span>
Free layout audit
</li>
<li class="flex items-center gap-3 text-stone-300">
<span class="w-6 h-6 bg-accent-500/20 rounded-full flex items-center justify-center">
<span class="iconify text-accent-500 text-sm" data-icon="mdi:check"></span>
</span>
Custom grid implementations
</li>
<li class="flex items-center gap-3 text-stone-300">
<span class="w-6 h-6 bg-accent-500/20 rounded-full flex items-center justify-center">
<span class="iconify text-accent-500 text-sm" data-icon="mdi:check"></span>
</span>
Team training available
</li>
</ul>
</div>
<!-- Contact Form Card -->
<div class="reveal delay-200">
<div class="bg-white rounded-2xl p-8 shadow-2xl">
<h3 class="text-xl font-semibold mb-6">Send a Message</h3>
<form class="space-y-5">
<div>
<label for="name" class="block text-sm font-medium text-stone-700 mb-2">Name</label>
<input type="text" id="name" name="name" class="w-full px-4 py-3 rounded-xl border border-stone-200 focus:border-accent-500 focus:ring-2 focus:ring-accent-500/20 outline-none transition-all" placeholder="Your name">
</div>
<div>
<label for="email" class="block text-sm font-medium text-stone-700 mb-2">Email</label>
<input type="email" id="email" name="email" class="w-full px-4 py-3 rounded-xl border border-stone-200 focus:border-accent-500 focus:ring-2 focus:ring-accent-500/20 outline-none transition-all" placeholder="you@example.com">
</div>
<div>
<label for="message" class="block text-sm font-medium text-stone-700 mb-2">Message</label>
<textarea id="message" name="message" rows="4" class="w-full px-4 py-3 rounded-xl border border-stone-200 focus:border-accent-500 focus:ring-2 focus:ring-accent-500/20 outline-none transition-all resize-none" placeholder="Tell us about your project"></textarea>
</div>
<button type="submit" class="w-full bg-stone-900 text-white py-3.5 rounded-xl font-medium hover:bg-stone-800 transition-colors shadow-lg shadow-stone-900/10 flex items-center justify-center gap-2">
<span>Send Message</span>
<span class="iconify" data-icon="mdi:send"></span>
</button>
</form>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- ==================== FOOTER ==================== -->
<footer class="bg-stone-900 border-t border-stone-800 py-12" role="contentinfo">
<div class="max-w-7xl mx-auto px-6">
<!-- Footer Grid -->
<div class="grid grid-cols-2 md:grid-cols-4 gap-8 mb-12">
<!-- Brand -->
<div class="col-span-2 md:col-span-1">
<a href="#" class="flex items-center gap-3 mb-4">
<div class="w-10 h-10 bg-accent-500 rounded-xl flex items-center justify-center">
<span class="iconify text-white text-xl" data-icon="mdi:view-grid"></span>
</div>
<span class="text-xl font-semibold text-white">GridFlow</span>
</a>
<p class="text-stone-500 text-sm leading-relaxed">Modern CSS Grid layouts for the contemporary web.</p>
</div>
<!-- Links -->
<nav aria-label="Company links">
<h4 class="text-white font-semibold mb-4">Company</h4>
<ul class="space-y-2">
<li><a href="#" class="text-stone-500 hover:text-accent-500 transition-colors text-sm">About</a></li>
<li><a href="#" class="text-stone-500 hover:text-accent-500 transition-colors text-sm">Services</a></li>
<li><a href="#" class="text-stone-500 hover:text-accent-500 transition-colors text-sm">Portfolio</a></li>
<li><a href="#" class="text-stone-500 hover:text-accent-500 transition-colors text-sm">Contact</a></li>
</ul>
</nav>
<nav aria-label="Resources links">
<h4 class="text-white font-semibold mb-4">Resources</h4>
<ul class="space-y-2">
<li><a href="#" class="text-stone-500 hover:text-accent-500 transition-colors text-sm">Blog</a></li>
<li><a href="#" class="text-stone-500 hover:text-accent-500 transition-colors text-sm">Documentation</a></li>
<li><a href="#" class="text-stone-500 hover:text-accent-500 transition-colors text-sm">Tutorials</a></li>
<li><a href="#" class="text-stone-500 hover:text-accent-500 transition-colors text-sm">FAQ</a></li>
</ul>
</nav>
<nav aria-label="Legal links">
<h4 class="text-white font-semibold mb-4">Legal</h4>
<ul class="space-y-2">
<li><a href="#" class="text-stone-500 hover:text-accent-500 transition-colors text-sm">Privacy</a></li>
<li><a href="#" class="text-stone-500 hover:text-accent-500 transition-colors text-sm">Terms</a></li>
<li><a href="#" class="text-stone-500 hover:text-accent-500 transition-colors text-sm">Cookies</a></li>
</ul>
</nav>
</div>
<!-- Bottom -->
<div class="pt-8 border-t border-stone-800 flex flex-col md:flex-row justify-between items-center gap-4">
<p class="text-stone-500 text-sm">© 2024 GridFlow. All rights reserved.</p>
<div class="flex items-center gap-4">
<a href="#" class="text-stone-500 hover:text-accent-500 transition-colors" aria-label="Twitter">
<span class="iconify text-xl" data-icon="mdi:twitter"></span>
</a>
<a href="#" class="text-stone-500 hover:text-accent-500 transition-colors" aria-label="GitHub">
<span class="iconify text-xl" data-icon="mdi:github"></span>
</a>
<a href="#" class="text-stone-500 hover:text-accent-500 transition-colors" aria-label="LinkedIn">
<span class="iconify text-xl" data-icon="mdi:linkedin"></span>
</a>
</div>
</div>
</div>
</footer>
<!-- Scroll Reveal Script -->
<script>
function revealOnScroll() {
const reveals = document.querySelectorAll('.reveal');
const windowHeight = window.innerHeight;
reveals.forEach(element => {
const elementTop = element.getBoundingClientRect().top;
const revealPoint = 100;
if (elementTop < windowHeight - revealPoint) {
element.classList.add('active');
}
});
}
window.addEventListener('scroll', revealOnScroll);
window.addEventListener('load', revealOnScroll);
// Smooth scroll for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function(e) {
e.preventDefault();
const target = document.querySelector(this.getAttribute('href'));
if (target) {
target.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
});
});
</script>
</body>
</html>
Key Grid Patterns Demonstrated
1. Equal Height Cards (Features & Testimonials)
.grid-equal > * {
display: flex;
flex-direction: column;
}
.grid-equal > * > :last-child {
margin-top: auto;
}
Grid naturally creates equal-height rows without JavaScript.
2. Spanning Items (Services & Portfolio)
<article class="lg:col-span-2">...</article>
<article class="md:row-span-2">...</article>
Items can span multiple columns/rows without nested containers.
3. Responsive Grid Templates
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
Automatic responsive adaptation without media query complexity.
4. Semantic HTML5 Structure
<header>, <nav>, <main>, <section>, <article>, <aside>, <footer>
- Proper heading hierarchy (h1 → h2 → h3)
- ARIA labels for accessibility