Create distinctive, production-grade HTML/CSS frontends with exceptional design quality
Create distinctive, production-grade HTML/CSS + vanilla JavaScript interfaces with high design quality. This skill combines the 5-dimension aesthetic framework with semantic HTML5, modern CSS, and CSS-only animations to build interfaces that are both beautiful and accessible.
This is the core 5-dimension framework for creating intentional, non-generic design that avoids the homogenized aesthetic of default AI outputs. Each dimension works together to create designs with personality and deliberation.
Purpose: Typography is the primary carrier of voice and personality in digital design.
Core Principles:
Implementation:
Example Pattern:
Purpose: Color sets mood and creates visual coherence while avoiding cliché palettes.
Core Principles:
Anti-Patterns to Avoid:
Implementation:
Example Approach:
Purpose: Motion reveals personality and guides user attention with intentionality.
Core Principles:
Implementation for HTML/CSS:
Anti-Patterns:
Purpose: Space and layout create rhythm and guide the eye through intentional composition.
Core Principles:
Implementation:
Anti-Patterns:
Purpose: The foundation layer that can transform a generic design into something memorable.
Core Principles:
Implementation:
Anti-Patterns:
Use these checks to ensure your design doesn't default to generic AI output:
Typography Check:
Color Check:
Motion Check:
Spatial Check:
Background Check:
These fonts are ubiquitous in default AI outputs and should be rejected as your primary choice:
If you use any of these, pair them with something unexpected and deliberately break the generic pattern.
These faces bring personality and intention to design:
Pattern 1: Display + Mono
Headline: Playfair Display (elegant serif)
Body: JetBrains Mono (technical monospace)
Result: Sophisticated + Modern
Pattern 2: Serif + Geometric Sans
Headline: Crimson Pro (high-contrast serif)
Body: Space Grotesk (geometric sans)
Result: Elegant + Contemporary
Pattern 3: Decorative + Humanist
Headline: Bricolage Grotesque (handcrafted sans)
Body: IBM Plex Sans (warm humanist sans)
Result: Crafted + Approachable
Don't use two similar typefaces:
Use weight extremes to create contrast, not mid-range weights:
Good:
Avoid:
Use 3x+ jumps between hierarchy levels, not incremental 1.5x steps:
Generic (Linear Scaling):
H1: 48px
H2: 36px (75% of H1)
H3: 28px (78% of H2)
Body: 16px
Small: 14px
Result: Feels predictable, every size feels similar distance apart.
Intentional (3x+ Jumps):
Display: 96px (3x body)
Headline: 48px (3x body)
Sub-headline: 28px (1.75x body)
Body: 16px
Caption: 12px (0.75x body)
Result: Creates clear visual hierarchy, extreme sizes make smaller sizes feel intentional.
Example: 16px Base
/* Display */
.display {
font-family: 'Playfair Display', serif;
font-size: 88px;
font-weight: 700;
line-height: 1.1;
letter-spacing: -0.5px;
}
/* Headline */
.h1 {
font-family: 'Playfair Display', serif;
font-size: 48px;
font-weight: 700;
line-height: 1.2;
letter-spacing: -0.25px;
}
/* Body */
.body {
font-family: 'IBM Plex Sans', sans-serif;
font-size: 16px;
font-weight: 400;
line-height: 1.6;
letter-spacing: 0;
}
/* Monospace (Code/Quotes) */
.mono {
font-family: 'JetBrains Mono', monospace;
font-size: 14px;
font-weight: 400;
line-height: 1.5;
letter-spacing: 0.5px;
}
/* Small Text */
.caption {
font-family: 'IBM Plex Sans', sans-serif;
font-size: 12px;
font-weight: 400;
line-height: 1.7;
letter-spacing: 0px;
}
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=IBM+Plex+Sans:wght@400;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
Motion reveals personality and guides user attention with intentionality. Deliberate animation transforms passive interfaces into experiences that feel alive and considered.
Use CSS for simple, performant animations that run on page load or interaction:
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.element {
animation: fadeIn 0.6s ease-out;
}
@keyframes slideInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.element {
animation: slideInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes scaleIn {
from {
opacity: 0;
transform: scale(0.95);
}
to {
opacity: 1;
transform: scale(1);
}
}
.element {
animation: scaleIn 0.5s ease-out;
}
Don't animate everything at once. Create a sequence that guides the user's eye:
Timing Sequence
0ms - Background/Hero fades in
200ms - Headline slides in from top
400ms - Sub-headline fades in
600ms - Primary CTA appears
800ms - Supporting content staggered reveal
CSS Implementation
.hero {
animation: fadeIn 0.8s ease-out 0ms;
}
.headline {
animation: slideInDown 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 200ms backwards;
}
.subheadline {
animation: fadeIn 0.6s ease-out 400ms backwards;
}
.cta {
animation: scaleIn 0.5s ease-out 600ms backwards;
}
.content-item {
animation: slideInUp 0.8s ease-out backwards;
}
.content-item:nth-child(1) { animation-delay: 800ms; }
.content-item:nth-child(2) { animation-delay: 900ms; }
.content-item:nth-child(3) { animation-delay: 1000ms; }
Stagger elements to create a cascade effect:
.list-item {
opacity: 0;
animation: slideInUp 0.8s ease-out forwards;
}
.list-item:nth-child(1) { animation-delay: 0ms; }
.list-item:nth-child(2) { animation-delay: 100ms; }
.list-item:nth-child(3) { animation-delay: 200ms; }
.list-item:nth-child(4) { animation-delay: 300ms; }
.list-item:nth-child(5) { animation-delay: 400ms; }
const observer = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
entry.target.classList.add('animate-in');
observer.unobserve(entry.target);
}
});
});
document.querySelectorAll('[data-animate]').forEach((el) => {
observer.observe(el);
});
[data-animate] {
opacity: 0;
transform: translateY(20px);
transition: all 0.8s ease-out;
}
[data-animate].animate-in {
opacity: 1;
transform: translateY(0);
}
Hover interactions should be delightful, not just functional:
.card {
transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card:hover {
transform: translateY(-8px);
box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}
/* Icon rotation on hover */
.icon {
transition: transform 0.3s ease-out;
}
.card:hover .icon {
transform: rotate(45deg) scale(1.1);
}
/* Text color shift */
.link {
color: #333;
transition: color 0.3s ease-out;
border-bottom: 2px solid transparent;
transition: border-color 0.3s ease-out;
}
.link:hover {
color: #0099ff;
border-bottom-color: #0099ff;
}
Before writing code or generating design, establish the intentional foundation. This workflow prevents default thinking and ensures your design serves a purpose beyond aesthetic choice.
Don't design until you answer these four questions:
Before choosing any visual element, define what you're solving:
Questions to Answer:
Primary User:
- Age & background: ___________
- Technical skill level: ___________
- Primary use context: (work, leisure, research, etc.)
- How much time will they spend here? ___________
- What's their emotional state on arrival? ___________
Problem They're Solving:
- Specific challenge: ___________
- Current workaround (how do they solve it now?): ___________
- Desired outcome: ___________
- What's the cost of not solving it? ___________
Success Metrics:
- How will we know if this design works? ___________
- What behavior change indicates success? ___________
Based on your purpose, what emotional response should the design evoke?
Emotional Directions:
Emotional Intent:
- Primary emotion we want users to feel: ___________
- Tone adjectives (3-5): ___________
- What should users think when they see this? ___________
- What should they feel when they interact? ___________
Design Personality:
- Is this design "serious" or "playful"?
- Is it "minimal" or "expressive"?
- Is it "traditional" or "unconventional"?
- Is it "warm" or "cool"?
Visual Direction:
- Color personality: (warm, cool, saturated, muted)
- Typography style: (traditional, modern, handcrafted, geometric)
- Motion style: (snappy, smooth, playful, none)
- Overall style: (minimalist, maximalist, balanced)
Before designing, know your boundaries:
Categories:
Technical Constraints:
- Required browser support: ___________
- Performance budget: (load time, interaction delay)
- Required frameworks/libraries: ___________
- API availability/limitations: ___________
- Device support (mobile first?): ___________
Temporal Constraints:
- Design timeline: ___________
- Development timeline: ___________
- Launch date: ___________
- Available resources: ___________
Business Constraints:
- Brand guidelines to follow: (yes/no, which parts?)
- Compliance requirements: (WCAG, GDPR, etc.)
- Target market expectations: ___________
- Pricing/positioning tier: (premium, budget, etc.)
Creative Freedom:
- How much can we deviate from industry norms?
- Are we required to use specific design patterns?
- Any visual or interaction taboos?
Every intentional design has one element that makes it memorable and distinctly yours. This isn't about complexity—it's about one deliberate choice that stands out.
Types of Differentiation:
Typography Signature
Color Signature
Motion Signature
Layout/Composition Signature
Micro-interaction Signature
Visual Detail Signature
Current State (What do competitors do?):
- Typography: ___________
- Color: ___________
- Motion: ___________
- Layout: ___________
- Interactions: ___________
Our Differentiation (What will we do differently?):
- Chosen category: (Typography, Color, Motion, etc.)
- The specific distinctive choice: ___________
- Why this choice? (How does it serve the purpose & tone?)
- Where will it appear? (Headline, accent, hover state, etc.)
- Is it instantly recognizable as "ours"? (Yes/No)
The Unforgettable Element:
- In one sentence, describe what makes this design distinctly ours:
___________
Before you design, complete this:
1. PROBLEM & USERS ✓
Problem: ___________
Primary user: ___________
Their emotion on arrival: ___________
Success metric: ___________
2. TONE & AESTHETICS ✓
Emotional intent: ___________
Tone adjectives: ___________
Personality: (Serious/Playful, Minimal/Expressive, etc.)
Visual direction: ___________
3. CONSTRAINTS ✓
Technical: ___________
Temporal: ___________
Business: ___________
Creative freedom level: ___________
4. DIFFERENTIATION ✓
Unforgettable element: ___________
Why this specific choice: ___________
Where it appears: ___________
5. READY TO DESIGN ✓
All four questions answered: (Yes/No)
Team alignment on direction: (Yes/No)
Prepared to brief designer/engineer: (Yes/No)
Avoid:
Result: Immediately reads as "default AI design," no personality.
Avoid:
Identifies as: "I used the default design system"
Avoid:
Reads as: "Default SaaS dashboard"
Avoid:
Avoid:
Always use semantic elements for structure and accessibility:
<header>
<!-- Site header, logo, primary navigation -->
</header>
<nav>
<!-- Navigation links -->
</nav>
<main>
<!-- Primary page content -->
<article>
<!-- Self-contained content -->
<section>
<!-- Thematic grouping -->
</section>
</article>
<aside>
<!-- Tangential content, sidebars -->
</aside>
</main>
<footer>
<!-- Site footer, secondary links, metadata -->
</footer>
Use CSS Grid for complex layouts and Flexbox for component-level organization:
/* Grid for page layout */
body {
display: grid;
grid-template-columns: 1fr minmax(0, 64rem) 1fr;
grid-template-rows: auto 1fr auto;
min-height: 100vh;
}
header {
grid-column: 1 / -1;
}
main {
grid-column: 2;
}
/* Flexbox for component alignment */
.card {
display: flex;
flex-direction: column;
gap: 1rem;
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
}
Define color, spacing, and typography in custom properties for easy theming:
:root {
/* Colors */
--color-primary: #2d3748;
--color-accent: #d4a574; /* Warm brown accent */
--color-background: #f7f5f2; /* Warm cream */
--color-text: #3d3d3d;
/* Typography */
--font-display: 'Playfair Display', serif;
--font-body: 'IBM Plex Sans', sans-serif;
--font-mono: 'JetBrains Mono', monospace;
/* Spacing */
--space-xs: 0.5rem;
--space-sm: 0.75rem;
--space-md: 1rem;
--space-lg: 1.5rem;
--space-xl: 2rem;
--space-2xl: 3rem;
--space-3xl: 4rem;
/* Shadows */
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
/* Transitions */
--transition-fast: 0.2s ease-out;
--transition-base: 0.3s ease-out;
--transition-slow: 0.6s ease-out;
}
Start with mobile layout, then enhance for larger screens:
/* Mobile-first (default) */
.container {
width: 100%;
padding: var(--space-md);
}
/* Tablet and up */
@media (min-width: 768px) {
.container {
max-width: 768px;
margin: 0 auto;
}
}
/* Desktop and up */
@media (min-width: 1024px) {
.container {
max-width: 1024px;
}
}
Build accessibility into your design:
<!-- Use proper heading hierarchy -->
<h1>Page Title</h1>
<h2>Section Heading</h2>
<h3>Subsection</h3>
<!-- Always include alt text -->
<img src="hero.jpg" alt="Descriptive text about the image">
<!-- Use ARIA attributes when needed -->
<button aria-label="Close dialog" aria-pressed="false">
✕
</button>
<!-- Ensure color contrast ratios are sufficient -->
<!-- Aim for 4.5:1 for normal text, 3:1 for large text -->
/* Ensure focus indicators are visible */
:focus {
outline: 2px solid var(--color-accent);
outline-offset: 2px;
}
/* Use sufficient line height for readability -->
body {
line-height: 1.6;
}
/* Ensure touch targets are at least 44x44px -->
button {
min-height: 44px;
min-width: 44px;
}
Before coding, complete the design thinking worksheet:
Before delivering, verify: