Terminal UI Design System
A comprehensive design system for creating terminal-inspired user interfaces with macOS-style window decorations, monospace typography, and a warm, developer-friendly color palette. This design system is optimized for developer tools, code marketplaces, technical documentation, and any interface that benefits from a command-line aesthetic.
Design Philosophy
Core Principles:
- Terminal Aesthetic: Mimics macOS terminal windows with colored dots, monospace fonts, and command-line syntax
- Developer-First: Uses syntax highlighting colors, code-like structures, and terminal metaphors
- Warm & Approachable: Warm terracotta primary color (#cc7a60) creates a friendly, non-intimidating feel
- High Contrast: Clear visual hierarchy with distinct text colors and backgrounds
- Functional Beauty: Every design element serves a purpose while maintaining visual appeal
Color System
Primary Palette
Main Brand Color:
--primary: #cc7a60 - Warm terracotta/orange-brown, used for primary actions, accents, and highlights
--primary-foreground: #fff - White text on primary backgrounds
--primary-dark: #b56850 - Darker shade for hover states
--primary-light: #d8907a - Lighter shade for subtle accents
--ring: #cc7a60 - Focus ring color (same as primary)
Warm Accent:
--warm-red: #c85a3f - Used for code block borders and warm accents
Semantic Colors
Backgrounds:
--background: #fff - Pure white for main backgrounds
--bg-main: #f8f8f8 - Light gray for page background (with subtle grid pattern)
--bg-card: #fff - White for card components
--bg-code: #fafafa - Very light gray for code blocks and window headers
--secondary: #f9fafb - Light gray for secondary backgrounds
--muted: #f3f4f6 - Muted gray for subtle backgrounds
Text Colors:
--foreground: #111827 - Near-black for primary text (excellent readability)
--text-primary: #111827 - Primary text color
--text-secondary: #666666 - Medium gray for secondary text
--text-muted: #5b6370 - Muted gray for less important text
--muted-foreground: #5b6370 - Foreground on muted backgrounds
Borders:
--border: #8b929e - Medium gray for main borders
--border-light: #e5e7eb - Light gray for subtle dividers
--input: #8b929e - Input border color
Status Colors:
--success: #22c55e - Green for success states
--warning: #f59e0b - Amber for warnings
--danger: #ef4444 - Red for errors/destructive actions
--accent: #f59e0b - Amber accent color
Syntax Highlighting Colors
Code Syntax:
--syntax-keyword: #cc7a60 - Primary color for keywords (const, export, etc.)
--syntax-string: #22c55e - Green for strings
--syntax-number: #cc7a60 - Primary color for numbers
--syntax-comment: #6a9955 - Muted green for comments
--syntax-function: #dcdcaa - Light yellow for function names
Command Prefix:
- Command prefix (
$) uses fluorescent green: #39ff14 - Creates terminal-like appearance
Code Elements:
--text-comment: #6a9955 - Comment text color
macOS Window Dots
Terminal Window Controls:
--dot-red: #ff5f57 - Close button (macOS red)
--dot-yellow: #febc2e - Minimize button (macOS yellow)
--dot-green: #28c840 - Maximize button (macOS green)
Color Usage Guidelines
Primary Color (#cc7a60) Usage:
- Command keywords in navigation
- Prompt symbols (
>)
- Active states and highlights
- Focus rings
- Hover borders
- Primary buttons when active
- Chart lines and data visualization
Fluorescent Green (#39ff14) Usage:
- Command prefix (
$) - creates authentic terminal feel
- Only used for dollar signs, never for other elements
Green (#22c55e) Usage:
- Success indicators
- Status dots (online/ready)
- String literals in code
- Positive actions
Blue (#3b82f6) Usage:
- Command keywords (cd, watch, man, api)
- Code keywords (const, let, var)
- Links and interactive elements
Typography System
Font Families
Primary Font Stack:
--font-mono: "JetBrains Mono", "JetBrains Mono Fallback", 'Fira Code', 'Consolas', monospace;
- Primary: JetBrains Mono (400-800 weights)
- Fallbacks: Fira Code, Consolas, system monospace
- Used for: All UI text, navigation, buttons, code blocks
Sans-serif Fallback:
--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
- Used as fallback only, monospace is preferred
Font Size Scale
Base Unit System:
--text-xs: 0.75rem (12px) - Small labels, hints, window status
--text-sm: 0.875rem (14px) - Secondary text, descriptions
--text-base: 1rem (16px) - Body text, default size
--text-lg: 1.125rem (18px) - Slightly emphasized text
--text-xl: 1.25rem (20px) - Subheadings
--text-2xl: 1.5rem (24px) - Section titles
--text-3xl: 1.875rem (30px) - Large numbers, stats
--text-4xl: 2.25rem (36px) - Hero numbers
--text-5xl: 3rem (48px) - Large headings
--text-6xl: 3.75rem (60px) - Extra large headings
Font Weights:
--font-weight-normal: 400 - Body text
--font-weight-medium: 500 - Medium emphasis
--font-weight-semibold: 600 - Semibold (keywords, labels)
--font-weight-bold: 700 - Bold (headings, important text)
--font-weight-extrabold: 800 - Extra bold (hero text)
Line Heights:
--leading-tight: 1.25 - Tight spacing for headings
--leading-relaxed: 1.625 - Relaxed spacing for body text
Typography Usage
Headings:
- Hero titles: 3.5rem, weight 700, line-height 1.1
- Section titles: 2.5rem, weight 700
- FAQ titles: 2rem, weight 700
Body Text:
- Default: 1rem, weight 400, line-height 1.5
- Secondary: 0.875rem, color
--text-secondary
- Muted: 0.75rem, color
--text-muted
Code/Command Text:
- Always use monospace font
- Command prefix: fluorescent green (#39ff14)
- Keywords: primary color (#cc7a60) or blue (#3b82f6)
- Flags/arguments: default foreground color
Spacing System
Base Unit: --spacing: 0.25rem (4px)
Spacing Scale:
--spacing-xs: 4px (0.25rem) - Tight spacing, icon padding
--spacing-sm: 8px (0.5rem) - Small gaps, button padding
--spacing-md: 16px (1rem) - Standard spacing, card padding
--spacing-lg: 24px (1.5rem) - Large gaps, section spacing
--spacing-xl: 32px (2rem) - Extra large gaps, major sections
--spacing-2xl: 48px (3rem) - Maximum spacing, page sections
Usage Guidelines:
- Use consistent spacing multiples (4px base)
- Card padding:
--spacing-md to --spacing-lg
- Section margins:
--spacing-xl to --spacing-2xl
- Button padding:
--spacing-sm to --spacing-md
- Gap between related elements:
--spacing-sm to --spacing-md
Border Radius System
Radius Scale:
--radius-xs: 2px (0.125rem) - Minimal rounding
--radius-sm: 4px (0.25rem) - Small elements
--radius-md: 6px (0.375rem) - Buttons, inputs
--radius-lg: 8px (0.5rem) - Cards, windows (most common)
--radius-xl: 12px (0.75rem) - Large cards
--radius-2xl: 16px (1rem) - Extra large elements
--radius: 10px (0.625rem) - Default radius
Usage:
- Terminal windows:
--radius-lg (8px)
- Buttons:
--radius-lg (8px)
- Cards:
--radius-lg (8px)
- Inputs:
--radius-md (6px)
- Avatar:
9999px (fully rounded)
Shadow System
Shadow Scale:
--shadow-sm: 0 1px 2px rgba(0,0,0,0.05) - Subtle elevation
--shadow-md: 0 4px 6px rgba(0,0,0,0.07) - Medium elevation (cards on hover)
--shadow-lg: 0 10px 25px rgba(0,0,0,0.1) - Large elevation (floating buttons)
Usage:
- Default cards:
--shadow-sm
- Hover states:
--shadow-md
- Floating elements:
--shadow-lg
- Primary-colored shadows:
rgba(204, 122, 96, 0.1) for primary-themed elements
Component Specifications
Terminal Window Component
Structure:
<div class="terminal-window">
<div class="window-header">
<div class="window-dots">
<span class="dot red"></span>
<span class="dot yellow"></span>
<span class="dot green"></span>
</div>
<span class="window-title">filename.ext</span>
<span class="window-status">ready</span>
</div>
<div class="window-content">
<!-- Content -->
</div>
</div>
Styling:
- Background:
--bg-card (#fff)
- Border:
1px solid --border (#8b929e)
- Border radius:
--radius-lg (8px)
- Box shadow:
--shadow-sm
- Header background:
--bg-code (#fafafa)
- Header border-bottom:
1px solid --border-light (#e5e7eb)
- Header padding:
--spacing-sm --spacing-md (8px 16px)
- Content padding:
--spacing-lg (24px)
Window Dots:
- Size:
12px × 12px
- Gap:
6px
- Colors: Red (#ff5f57), Yellow (#febc2e), Green (#28c840)
- Fully rounded (border-radius: 50%)
Window Title:
- Font size:
0.85rem
- Color:
--text-secondary (#666666)
- Font: Monospace
Window Status:
- Font size:
0.75rem
- Color:
--text-muted (#5b6370)
- Position: Right side of header
Navigation Bar
Structure:
<nav class="navbar">
<div class="navbar-container">
<div class="navbar-content">
<!-- Logo, commands, actions -->
</div>
</div>
</nav>
Styling:
- Position:
sticky, top: 0
- Background:
rgba(255, 255, 255, 0.8) with backdrop-filter: blur(8px)
- Border-bottom:
1px solid --border
- Height:
64px (desktop), 56px (mobile)
- Max width:
80rem (1280px), centered
Logo:
- Status indicator: Green dot (8px) + "ready" text
- Path prefix:
~/ in primary color (#cc7a60)
- Path name: Bold, foreground color
- Cursor blink: 2px width, primary color, animated
Navigation Commands:
- Display: Flex, gap
--spacing-md
- Button style: Monospace font, small padding (6px 12px)
- Border:
1px solid --border
- Border radius:
--radius-lg
- Active state: Primary border color with pulse animation
- Hover: Border color changes to primary with 50% opacity
Command Button Structure:
<button class="nav-cmd">
<span class="cmd-prefix">$</span>
<span class="cmd-keyword">ai</span>
<span class="cmd-flag">--search</span>
</button>
Command Colors:
- Prefix (
$): Fluorescent green (#39ff14)
- Keyword: Primary color (#cc7a60) or blue (#3b82f6)
- Flag: Default foreground color
Card Components
Skill Card:
- Background:
--bg-card (#fff in light, #111 in dark)
- Border:
1px solid --border
- Border radius:
--radius-xl (12px)
- Height:
100% with flex column layout
- Hover: Border changes to primary with 50% opacity, shadow increases (
0 25px 50px -12px rgba(204, 122, 96, 0.1)), translateY(-4px)
- Active:
translateY(0) scale(0.99)
- Transition:
all 0.3s ease
- Line Numbers: Absolute positioned on left,
2rem width, subtle background
- Avatar: 24px × 24px, bordered, scales on hover
- Star Icon: 10px × 10px, warning color
- Like Button: SVG heart icon, changes color on hover
Category Card:
- Same base styling as skill card
- Color Themes: Cyan, Blue, Purple, Amber variants
- Folder Icon: SVG icon, color varies by theme, scales on hover
- Category Dot: Small indicator dot, changes on hover
- Arrow Icon: Appears on hover, positioned bottom-right
- JSON Display: Key-value pairs with theme-colored hover effects
- Command Line: Footer with command-style text
Mention Card:
- Same base styling
- Blockquote styling with quotation marks
- Source attribution with border-top separator
Button Components
Primary Button (Active):
- Background:
--primary (#cc7a60)
- Color:
--primary-foreground (#fff)
- Border:
1px solid --primary
- Border radius:
--radius-lg
- Padding:
6px 12px (small) or --spacing-md --spacing-lg (medium)
- Font: Monospace,
--text-xs or --text-sm
Secondary Button:
- Background:
--bg-card
- Border:
1px solid --border
- Color:
--foreground
- Hover: Border color changes to primary with 50% opacity
- Active:
transform: scale(0.95)
Icon Button:
- Square or rounded
- Padding:
6px 12px
- Icon size:
14px or 16px
- Same hover/active states as secondary button
Input Components
Search Input:
- Background: Transparent
- Border: None
- Font: Monospace
- Placeholder:
--text-muted color
- Focus: No visible border (minimal design)
Text Input:
- Background:
--bg-card
- Border:
1px solid --border
- Border radius:
--radius-sm or --radius-md
- Padding:
--spacing-sm
- Font: Monospace
Code Display Components
Code Block:
- Background:
rgba(255, 255, 255, 0.5) with backdrop blur
- Border:
1px solid --border
- Border radius:
--radius-lg
- Padding:
--spacing-md
- Font: Monospace
- Line height:
--leading-relaxed
Code Line:
- Display: Flex, align baseline
- Gap:
--spacing-sm
- Syntax colors applied to different elements
Description Block (Comment Style):
- Border-left:
4px solid rgba(204, 122, 96, 0.5)
- Background:
rgba(204, 122, 96, 0.05)
- Padding-left:
--spacing-md
- Border-radius: Right side only (
--radius-lg)
- Font: Monospace
Grid Layouts
Skills Grid:
- Display: Grid
- Columns:
repeat(3, 1fr) (desktop), repeat(2, 1fr) (tablet), 1fr (mobile)
- Gap:
--spacing-lg (24px)
Categories Grid:
- Display: Grid
- Columns:
repeat(4, 1fr) (desktop), repeat(2, 1fr) (tablet), 1fr (mobile)
- Gap:
--spacing-lg
Mentions Grid:
- Display: Grid
- Columns:
1fr 1fr (desktop), 1fr (mobile)
- Gap:
--spacing-lg
Animation System
Transitions
Default Transition:
- Duration:
0.15s or 0.2s
- Timing:
cubic-bezier(.4,0,.2,1) (ease-in-out)
- Properties:
all or specific properties
Common Transitions:
- Hover states:
all 0.2s ease
- Active states:
transform 0.2s ease
- Color changes:
color 0.2s ease or background-color 0.2s ease
Keyframe Animations
Blink Animation (Cursor):
@keyframes blink {
0%, 50% { opacity: 1; }
51%, 100% { opacity: 0; }
}
- Duration:
1s
- Iteration:
infinite
- Used for: Cursor blink effect
Pulse Border Animation:
@keyframes pulse-border {
0%, 100% { border-color: rgba(204, 122, 96, 0.5); }
50% { border-color: var(--ring); }
}
- Duration:
2s
- Timing:
ease-in-out
- Iteration:
infinite
- Used for: Active navigation items
Fade In Up Animation:
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
- Duration:
0.5s
- Timing:
ease
- Used for: Card entrance animations
- Staggered delays: 0.1s increments for grid items
Interactive States
Hover States:
- Buttons: Border color changes, background lightens
- Cards: Border changes to primary, shadow increases, slight lift
- Links: Color changes to primary
- Scale: No scaling on hover (maintains stability)
Active States:
- Buttons:
transform: scale(0.95) - subtle press effect
- Duration:
0.2s
Focus States:
- Outline:
2px solid --ring with 2px offset
- Used for: Accessibility, keyboard navigation
Background Patterns
Grid Pattern (Page Background)
background-image:
linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
background-size: 20px 20px;
- Very subtle grid (2% opacity black)
- 20px × 20px grid cells
- Creates texture without distraction
- Applied to
body background
Gradient Backgrounds
Avatar Gradient:
background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
- Warm peach gradient
- 135-degree angle
- Used for: User avatars
Chart Gradient:
linearGradient: #cc7a60 with opacity stops (0%: 0.6, 100%: 0)
- Primary color gradient
- Used for: Area charts, data visualization
Responsive Design
Breakpoints
Mobile: < 640px
- Single column layouts
- Reduced font sizes
- Simplified navigation
- Stacked grids
Tablet: 640px - 1024px
- Two column layouts
- Medium font sizes
- Collapsed navigation menu
Desktop: 1024px - 1200px
- Three column layouts
- Full navigation visible
- Standard spacing
Large Desktop: > 1200px
- Four column layouts (where applicable)
- Maximum content width:
1400px
- Generous spacing
Responsive Adjustments
Navigation:
- Desktop (>1024px): Full command menu visible
- Tablet/Mobile: Hamburger menu, simplified layout
- Status indicator: Hidden on mobile, visible on tablet+
Hero Section:
- Desktop: Two column grid (text + chart)
- Mobile: Single column, stacked
Grids:
- Skills: 3 → 2 → 1 columns
- Categories: 4 → 2 → 1 columns
- Mentions: 2 → 1 columns
Typography:
- Hero title: 3.5rem → 2.5rem (mobile)
- Section titles: 2.5rem → 2rem (mobile)
- Body text: Maintains readability
Implementation Guidelines
CSS Variable Usage
Always use CSS variables for:
- Colors (never hardcode hex values)
- Spacing (use spacing scale)
- Typography (use text size scale)
- Border radius (use radius scale)
- Shadows (use shadow scale)
Example:
.button {
background: var(--bg-card);
color: var(--foreground);
padding: var(--spacing-sm) var(--spacing-md);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-sm);
}
Component Structure
Terminal Window Pattern:
- Container with border and radius
- Header with dots, title, status
- Content area with padding
- Consistent spacing throughout
Command-Line Pattern:
- Prefix (
$) in fluorescent green
- Keyword in primary or blue
- Flags/arguments in default color
- Monospace font throughout
Color Application Rules
Primary Color (#cc7a60):
- Use for: Active states, highlights, keywords, prompts
- Avoid: Large background areas (too intense)
- Opacity variants: Use
rgba(204, 122, 96, 0.5) for borders, rgba(204, 122, 96, 0.05) for backgrounds
Fluorescent Green (#39ff14):
- Use ONLY for: Command prefix (
$)
- Never use for: Other text, backgrounds, or accents
Green (#22c55e):
- Use for: Success states, positive indicators, string literals
- Avoid: Primary actions (use primary color instead)
Typography Rules
Always use monospace font for:
- Navigation elements
- Buttons
- Code blocks
- Command-line interfaces
- Window titles
- Status text
Font weight guidelines:
- Body text: 400 (normal)
- Labels/keywords: 600 (semibold)
- Headings: 700 (bold)
- Hero text: 700-800 (bold-extrabold)
Spacing Consistency
Use spacing scale:
- Never use arbitrary values (e.g.,
13px, 27px)
- Stick to: 4px, 8px, 16px, 24px, 32px, 48px
- For gaps between related items:
--spacing-sm to --spacing-md
- For section separation:
--spacing-xl to --spacing-2xl
Animation Best Practices
Keep animations subtle:
- Duration: 0.15s - 0.3s maximum
- Easing: Use provided cubic-bezier curves
- Avoid: Bouncy animations, long durations
- Prefer: Fade, translate, scale (small amounts)
Performance:
- Use
transform and opacity for animations (GPU accelerated)
- Avoid animating
width, height, margin, padding
Common Patterns
Terminal Window Card
<div class="terminal-window">
<div class="window-header">
<div class="window-dots">
<span class="dot red"></span>
<span class="dot yellow"></span>
<span class="dot green"></span>
</div>
<span class="window-title">filename.ext</span>
<span class="window-status">ready</span>
</div>
<div class="window-content">
<!-- Content here -->
</div>
</div>
Command Button
<button class="nav-cmd">
<span class="cmd-prefix">$</span>
<span class="cmd-keyword">command</span>
<span class="cmd-flag">--flag</span>
</button>
Code Block Display
<div class="stats-code-block">
<div class="code-line">
<span class="keyword">const</span>
<span class="variable-name">variable</span>
<span class="operator">=</span>
<span class="number">123</span>
<span class="operator">;</span>
</div>
<div class="code-comment">
<span class="comment-symbol">// </span>Comment text
</div>
</div>
Description Block (Comment Style)
<div class="description-block">
<div class="comment-start">/**</div>
<div class="comment-text">
<span class="comment-asterisk"> * </span>Description text
</div>
<div class="comment-end"> */</div>
</div>
Accessibility Considerations
Color Contrast:
- Primary text (#111827) on white: WCAG AAA compliant
- Secondary text (#666666) on white: WCAG AA compliant
- Primary color (#cc7a60) on white: WCAG AA compliant for large text
Focus States:
- All interactive elements have visible focus indicators
- Focus ring: 2px solid primary color with 2px offset
Keyboard Navigation:
- All interactive elements are keyboard accessible
- Tab order follows visual hierarchy
- Enter/Space activate buttons
Screen Readers:
- Semantic HTML structure
- ARIA labels where needed
- Status indicators use appropriate roles
Dark Mode Implementation
The design system includes a complete dark mode implementation using [data-theme="dark"] attribute selector. Dark mode is fully integrated with smooth transitions and maintains all design principles.
Dark Mode Color System
Primary Colors (Dark Mode):
--primary: #d99178 - Lighter terracotta for better contrast on dark backgrounds
--primary-foreground: #0a0a0a - Dark text on primary backgrounds
--primary-dark: #c57f66 - Darker shade for hover states
--primary-light: #e5a890 - Lighter shade for subtle accents
--ring: #d99178 - Focus ring color (lighter primary)
Backgrounds (Dark Mode):
--background: #0a0a0a - Deep black for main backgrounds
--bg-main: #0a0a0a - Dark background with subtle white grid pattern
--bg-card: #111 - Slightly lighter black for card components
--bg-code: #18181b - Dark gray for code blocks and window headers
--secondary: #1a1a1a - Dark gray for secondary backgrounds
--muted: #262626 - Muted dark gray for subtle backgrounds
Text Colors (Dark Mode):
--foreground: #ededed - Light gray for primary text
--text-primary: #ededed - Primary text color
--text-secondary: #a3a3a3 - Medium gray for secondary text
--text-muted: #a3a3a3 - Muted gray for less important text
--muted-foreground: #a3a3a3 - Foreground on muted backgrounds
Borders (Dark Mode):
--border: #606068 - Lighter gray for visibility on dark backgrounds
--border-light: #27272a - Subtle dark gray for dividers
Syntax Highlighting (Dark Mode):
--syntax-keyword: #d99178 - Lighter primary for keywords
--syntax-string: #22c55e - Green (same as light mode)
--syntax-number: #d99178 - Lighter primary for numbers
--syntax-comment: #6a9955 - Muted green (same as light mode)
- Blue keywords:
#60a5fa (blue-400) - Brighter blue for better contrast
- Purple keywords:
#c084fc (purple-400) - Brighter purple for better contrast
Shadows (Dark Mode):
--shadow-sm: 0 1px 2px rgba(0,0,0,0.3) - Stronger shadows for depth
--shadow-md: 0 4px 6px rgba(0,0,0,0.4) - Medium shadows
--shadow-lg: 0 10px 25px rgba(0,0,0,0.5) - Large shadows
Dark Mode Background Pattern
Dark mode uses a subtle white grid pattern instead of black:
[data-theme="dark"] body {
background-image:
linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}
Theme Toggle Implementation
HTML Structure:
<button class="theme-toggle-btn theme-toggle" title="切换主题" aria-label="切换主题">
<svg class="icon-sun theme-icon"><!-- Sun icon --></svg>
<svg class="icon-moon theme-icon" style="display: none;"><!-- Moon icon --></svg>
</button>
JavaScript Implementation:
- Uses
localStorage to persist theme preference
- Detects system preference on first load
- Smoothly transitions between themes
- Updates icon visibility (sun/moon)
- Listens to system theme changes (when no manual preference set)
Key Features:
- Automatic system preference detection
- Manual override with localStorage persistence
- Smooth CSS transitions (0.2s ease-in-out)
- Icon state management (sun for light, moon for dark)
Dark Mode Component Adaptations
Navigation Bar:
- Background:
rgba(10, 10, 10, 0.8) with backdrop blur
- Status indicator: Darker background with adjusted border
Terminal Windows:
- Card background:
#111 (slightly lighter than main background)
- Window headers:
rgba(38, 38, 38, 0.3) for subtle contrast
- All borders use darker mode colors
Skill Cards:
- Line numbers background:
rgba(38, 38, 38, 0.2)
- Footer background:
rgba(38, 38, 38, 0.2)
- Hover effects maintain same behavior with adjusted colors
Category Cards:
- Each category has theme-specific hover colors:
- Cyan:
#22d3ee (dark) vs #06b6d4 (light)
- Blue:
#60a5fa (dark) vs #3b82f6 (light)
- Purple:
#c084fc (dark) vs #a855f7 (light)
- Amber:
#fbbf24 (dark) vs #f59e0b (light)
Charts:
- Grid lines:
#27272a with 0.5 opacity
- Chart container:
rgba(17, 17, 17, 0.3)
- All text colors adapt to dark mode
FAB Button:
- Light mode: Dark background
#1a1a1a with white icon
- Dark mode: White background with dark icon (inverted)
Dark Mode Best Practices
Color Contrast:
- All text maintains WCAG AA compliance in dark mode
- Primary color is lightened for better visibility
- Borders are lighter for clear definition
Transitions:
- All color changes use
transition: color 0.2s ease-in-out
- Background changes use
transition: background-color 0.2s ease-in-out
- Smooth theme switching without jarring changes
Implementation Pattern:
/* Light mode (default) */
.component {
background: var(--bg-card);
color: var(--foreground);
}
/* Dark mode */
[data-theme="dark"] .component {
background: var(--bg-card); /* Automatically uses dark value */
color: var(--foreground); /* Automatically uses dark value */
}
Maintains:
- Same spacing system
- Same typography scale
- Same component structure
- Same animation timing
- Enhanced shadows for depth perception
Performance Optimization
CSS Variables:
- All colors/spacing use CSS variables for easy theming
- Variables defined in
:root for global access
Animations:
- Use
transform and opacity (GPU accelerated)
- Avoid layout-triggering properties
- Keep durations short (0.15s - 0.3s)
Font Loading:
- Preconnect to Google Fonts
- Use
font-display: swap for better performance
- Provide fallback fonts in stack
Browser Support
Modern Browsers:
- Chrome/Edge: Full support
- Firefox: Full support
- Safari: Full support (with
-webkit- prefixes for backdrop-filter)
Features Used:
- CSS Grid: Full support in modern browsers
- CSS Variables: Full support
- Backdrop Filter: Requires
-webkit- prefix for Safari
- Flexbox: Full support
Design Tokens Summary
Quick Reference:
/* Colors - Light Mode */
Primary: #cc7a60
Fluorescent Green: #39ff14 (command prefix only)
Success: #22c55e
Blue: #3b82f6
Foreground: #111827
Border: #8b929e
/* Colors - Dark Mode */
Primary: #d99178
Foreground: #ededed
Background: #0a0a0a
Card: #111
Border: #606068
Blue: #60a5fa (brighter for contrast)
/* Spacing */
xs: 4px, sm: 8px, md: 16px, lg: 24px, xl: 32px, 2xl: 48px
/* Typography */
Font: JetBrains Mono
Sizes: 0.75rem - 3.75rem scale
Weights: 400, 500, 600, 700, 800
/* Radius */
xs: 2px, sm: 4px, md: 6px, lg: 8px, xl: 12px, 2xl: 16px
/* Shadows - Light Mode */
sm: 0 1px 2px rgba(0,0,0,0.05)
md: 0 4px 6px rgba(0,0,0,0.07)
lg: 0 10px 25px rgba(0,0,0,0.1)
/* Shadows - Dark Mode */
sm: 0 1px 2px rgba(0,0,0,0.3)
md: 0 4px 6px rgba(0,0,0,0.4)
lg: 0 10px 25px rgba(0,0,0,0.5)
Theme Toggle JavaScript Implementation
Complete Implementation:
(function() {
const themeToggles = document.querySelectorAll('.theme-toggle');
const html = document.documentElement;
// Get initial theme from localStorage or system preference
function getInitialTheme() {
const savedTheme = localStorage.getItem('theme');
if (savedTheme) {
return savedTheme;
}
// Check system preference
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
return 'dark';
}
return 'light';
}
// Set theme and update icons
function setTheme(theme) {
if (theme === 'dark') {
html.setAttribute('data-theme', 'dark');
document.querySelectorAll('.icon-sun').forEach(icon => {
icon.style.display = 'none';
});
document.querySelectorAll('.icon-moon').forEach(icon => {
icon.style.display = 'block';
});
} else {
html.removeAttribute('data-theme');
document.querySelectorAll('.icon-sun').forEach(icon => {
icon.style.display = 'block';
});
document.querySelectorAll('.icon-moon').forEach(icon => {
icon.style.display = 'none';
});
}
localStorage.setItem('theme', theme);
}
// Toggle theme
function toggleTheme() {
const currentTheme = html.getAttribute('data-theme');
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
setTheme(newTheme);
}
// Initialize
const initialTheme = getInitialTheme();
setTheme(initialTheme);
// Add event listeners
themeToggles.forEach(button => {
button.addEventListener('click', toggleTheme);
});
// Listen to system theme changes (only if no manual preference)
if (window.matchMedia) {
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
mediaQuery.addEventListener('change', (e) => {
if (!localStorage.getItem('theme')) {
setTheme(e.matches ? 'dark' : 'light');
}
});
}
})();
Key Features:
- Persists theme preference in localStorage
- Detects system preference on first load
- Smoothly transitions between themes
- Updates icon visibility automatically
- Listens to system theme changes (when no manual override)
Usage Examples
When implementing this design system:
- Start with CSS variables - Import or define all color/spacing variables (including dark mode)
- Use terminal window pattern - Wrap content in terminal-window component
- Apply monospace font - Use JetBrains Mono for all UI text
- Follow spacing scale - Use defined spacing values consistently
- Use semantic colors - Apply colors based on meaning, not appearance
- Implement theme toggle - Add theme toggle button and JavaScript
- Maintain consistency - Reuse component patterns throughout
- Test responsiveness - Ensure layouts work at all breakpoints
- Test both themes - Verify light and dark modes work correctly
- Optimize animations - Keep transitions smooth and performant
This design system creates a cohesive, developer-friendly interface that feels both modern and familiar to users comfortable with terminal interfaces. The complete dark mode implementation ensures the interface works beautifully in any lighting condition.
1---2name: terminal-ui-design-system3description: Create terminal-inspired UI interfaces with macOS-style window decorations, monospace typography, and a warm color palette. Use this skill when building developer tools, code marketplaces, technical documentation sites, or any interface that benefits from a terminal/command-line aesthetic. Provides complete design system specifications including color palette, typography, spacing, components, and CSS implementation details.4metadata:5 source: https://skillmd.com/skills/kbarbel640-del/terminal-ui-design-system6---78# Terminal UI Design System910A comprehensive design system for creating terminal-inspired user interfaces with macOS-style window decorations, monospace typography, and a warm, developer-friendly color palette. This design system is optimized for developer tools, code marketplaces, technical documentation, and any interface that benefits from a command-line aesthetic.1112## Design Philosophy1314**Core Principles:**15- **Terminal Aesthetic**: Mimics macOS terminal windows with colored dots, monospace fonts, and command-line syntax16- **Developer-First**: Uses syntax highlighting colors, code-like structures, and terminal metaphors17- **Warm & Approachable**: Warm terracotta primary color (#cc7a60) creates a friendly, non-intimidating feel18- **High Contrast**: Clear visual hierarchy with distinct text colors and backgrounds19- **Functional Beauty**: Every design element serves a purpose while maintaining visual appeal2021## Color System2223### Primary Palette2425**Main Brand Color:**26- `--primary: #cc7a60` - Warm terracotta/orange-brown, used for primary actions, accents, and highlights27- `--primary-foreground: #fff` - White text on primary backgrounds28- `--primary-dark: #b56850` - Darker shade for hover states29- `--primary-light: #d8907a` - Lighter shade for subtle accents30- `--ring: #cc7a60` - Focus ring color (same as primary)3132**Warm Accent:**33- `--warm-red: #c85a3f` - Used for code block borders and warm accents3435### Semantic Colors3637**Backgrounds:**38- `--background: #fff` - Pure white for main backgrounds39- `--bg-main: #f8f8f8` - Light gray for page background (with subtle grid pattern)40- `--bg-card: #fff` - White for card components41- `--bg-code: #fafafa` - Very light gray for code blocks and window headers42- `--secondary: #f9fafb` - Light gray for secondary backgrounds43- `--muted: #f3f4f6` - Muted gray for subtle backgrounds4445**Text Colors:**46- `--foreground: #111827` - Near-black for primary text (excellent readability)47- `--text-primary: #111827` - Primary text color48- `--text-secondary: #666666` - Medium gray for secondary text49- `--text-muted: #5b6370` - Muted gray for less important text50- `--muted-foreground: #5b6370` - Foreground on muted backgrounds5152**Borders:**53- `--border: #8b929e` - Medium gray for main borders54- `--border-light: #e5e7eb` - Light gray for subtle dividers55- `--input: #8b929e` - Input border color5657**Status Colors:**58- `--success: #22c55e` - Green for success states59- `--warning: #f59e0b` - Amber for warnings60- `--danger: #ef4444` - Red for errors/destructive actions61- `--accent: #f59e0b` - Amber accent color6263### Syntax Highlighting Colors6465**Code Syntax:**66- `--syntax-keyword: #cc7a60` - Primary color for keywords (const, export, etc.)67- `--syntax-string: #22c55e` - Green for strings68- `--syntax-number: #cc7a60` - Primary color for numbers69- `--syntax-comment: #6a9955` - Muted green for comments70- `--syntax-function: #dcdcaa` - Light yellow for function names7172**Command Prefix:**73- Command prefix (`$`) uses fluorescent green: `#39ff14` - Creates terminal-like appearance7475**Code Elements:**76- `--text-comment: #6a9955` - Comment text color7778### macOS Window Dots7980**Terminal Window Controls:**81- `--dot-red: #ff5f57` - Close button (macOS red)82- `--dot-yellow: #febc2e` - Minimize button (macOS yellow)83- `--dot-green: #28c840` - Maximize button (macOS green)8485### Color Usage Guidelines8687**Primary Color (#cc7a60) Usage:**88- Command keywords in navigation89- Prompt symbols (`>`)90- Active states and highlights91- Focus rings92- Hover borders93- Primary buttons when active94- Chart lines and data visualization9596**Fluorescent Green (#39ff14) Usage:**97- Command prefix (`$`) - creates authentic terminal feel98- Only used for dollar signs, never for other elements99100**Green (#22c55e) Usage:**101- Success indicators102- Status dots (online/ready)103- String literals in code104- Positive actions105106**Blue (#3b82f6) Usage:**107- Command keywords (cd, watch, man, api)108- Code keywords (const, let, var)109- Links and interactive elements110111## Typography System112113### Font Families114115**Primary Font Stack:**116```css117--font-mono: "JetBrains Mono", "JetBrains Mono Fallback", 'Fira Code', 'Consolas', monospace;118```119- **Primary**: JetBrains Mono (400-800 weights)120- **Fallbacks**: Fira Code, Consolas, system monospace121- Used for: All UI text, navigation, buttons, code blocks122123**Sans-serif Fallback:**124```css125--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";126```127- Used as fallback only, monospace is preferred128129### Font Size Scale130131**Base Unit System:**132- `--text-xs: 0.75rem` (12px) - Small labels, hints, window status133- `--text-sm: 0.875rem` (14px) - Secondary text, descriptions134- `--text-base: 1rem` (16px) - Body text, default size135- `--text-lg: 1.125rem` (18px) - Slightly emphasized text136- `--text-xl: 1.25rem` (20px) - Subheadings137- `--text-2xl: 1.5rem` (24px) - Section titles138- `--text-3xl: 1.875rem` (30px) - Large numbers, stats139- `--text-4xl: 2.25rem` (36px) - Hero numbers140- `--text-5xl: 3rem` (48px) - Large headings141- `--text-6xl: 3.75rem` (60px) - Extra large headings142143**Font Weights:**144- `--font-weight-normal: 400` - Body text145- `--font-weight-medium: 500` - Medium emphasis146- `--font-weight-semibold: 600` - Semibold (keywords, labels)147- `--font-weight-bold: 700` - Bold (headings, important text)148- `--font-weight-extrabold: 800` - Extra bold (hero text)149150**Line Heights:**151- `--leading-tight: 1.25` - Tight spacing for headings152- `--leading-relaxed: 1.625` - Relaxed spacing for body text153154### Typography Usage155156**Headings:**157- Hero titles: 3.5rem, weight 700, line-height 1.1158- Section titles: 2.5rem, weight 700159- FAQ titles: 2rem, weight 700160161**Body Text:**162- Default: 1rem, weight 400, line-height 1.5163- Secondary: 0.875rem, color `--text-secondary`164- Muted: 0.75rem, color `--text-muted`165166**Code/Command Text:**167- Always use monospace font168- Command prefix: fluorescent green (#39ff14)169- Keywords: primary color (#cc7a60) or blue (#3b82f6)170- Flags/arguments: default foreground color171172## Spacing System173174**Base Unit:** `--spacing: 0.25rem` (4px)175176**Spacing Scale:**177- `--spacing-xs: 4px` (0.25rem) - Tight spacing, icon padding178- `--spacing-sm: 8px` (0.5rem) - Small gaps, button padding179- `--spacing-md: 16px` (1rem) - Standard spacing, card padding180- `--spacing-lg: 24px` (1.5rem) - Large gaps, section spacing181- `--spacing-xl: 32px` (2rem) - Extra large gaps, major sections182- `--spacing-2xl: 48px` (3rem) - Maximum spacing, page sections183184**Usage Guidelines:**185- Use consistent spacing multiples (4px base)186- Card padding: `--spacing-md` to `--spacing-lg`187- Section margins: `--spacing-xl` to `--spacing-2xl`188- Button padding: `--spacing-sm` to `--spacing-md`189- Gap between related elements: `--spacing-sm` to `--spacing-md`190191## Border Radius System192193**Radius Scale:**194- `--radius-xs: 2px` (0.125rem) - Minimal rounding195- `--radius-sm: 4px` (0.25rem) - Small elements196- `--radius-md: 6px` (0.375rem) - Buttons, inputs197- `--radius-lg: 8px` (0.5rem) - Cards, windows (most common)198- `--radius-xl: 12px` (0.75rem) - Large cards199- `--radius-2xl: 16px` (1rem) - Extra large elements200- `--radius: 10px` (0.625rem) - Default radius201202**Usage:**203- Terminal windows: `--radius-lg` (8px)204- Buttons: `--radius-lg` (8px)205- Cards: `--radius-lg` (8px)206- Inputs: `--radius-md` (6px)207- Avatar: `9999px` (fully rounded)208209## Shadow System210211**Shadow Scale:**212- `--shadow-sm: 0 1px 2px rgba(0,0,0,0.05)` - Subtle elevation213- `--shadow-md: 0 4px 6px rgba(0,0,0,0.07)` - Medium elevation (cards on hover)214- `--shadow-lg: 0 10px 25px rgba(0,0,0,0.1)` - Large elevation (floating buttons)215216**Usage:**217- Default cards: `--shadow-sm`218- Hover states: `--shadow-md`219- Floating elements: `--shadow-lg`220- Primary-colored shadows: `rgba(204, 122, 96, 0.1)` for primary-themed elements221222## Component Specifications223224### Terminal Window Component225226**Structure:**227```html228<div class="terminal-window">229 <div class="window-header">230 <div class="window-dots">231 <span class="dot red"></span>232 <span class="dot yellow"></span>233 <span class="dot green"></span>234 </div>235 <span class="window-title">filename.ext</span>236 <span class="window-status">ready</span>237 </div>238 <div class="window-content">239 <!-- Content -->240 </div>241</div>242```243244**Styling:**245- Background: `--bg-card` (#fff)246- Border: `1px solid --border` (#8b929e)247- Border radius: `--radius-lg` (8px)248- Box shadow: `--shadow-sm`249- Header background: `--bg-code` (#fafafa)250- Header border-bottom: `1px solid --border-light` (#e5e7eb)251- Header padding: `--spacing-sm --spacing-md` (8px 16px)252- Content padding: `--spacing-lg` (24px)253254**Window Dots:**255- Size: `12px × 12px`256- Gap: `6px`257- Colors: Red (#ff5f57), Yellow (#febc2e), Green (#28c840)258- Fully rounded (border-radius: 50%)259260**Window Title:**261- Font size: `0.85rem`262- Color: `--text-secondary` (#666666)263- Font: Monospace264265**Window Status:**266- Font size: `0.75rem`267- Color: `--text-muted` (#5b6370)268- Position: Right side of header269270### Navigation Bar271272**Structure:**273```html274<nav class="navbar">275 <div class="navbar-container">276 <div class="navbar-content">277 <!-- Logo, commands, actions -->278 </div>279 </div>280</nav>281```282283**Styling:**284- Position: `sticky`, `top: 0`285- Background: `rgba(255, 255, 255, 0.8)` with `backdrop-filter: blur(8px)`286- Border-bottom: `1px solid --border`287- Height: `64px` (desktop), `56px` (mobile)288- Max width: `80rem` (1280px), centered289290**Logo:**291- Status indicator: Green dot (8px) + "ready" text292- Path prefix: `~/` in primary color (#cc7a60)293- Path name: Bold, foreground color294- Cursor blink: 2px width, primary color, animated295296**Navigation Commands:**297- Display: Flex, gap `--spacing-md`298- Button style: Monospace font, small padding (6px 12px)299- Border: `1px solid --border`300- Border radius: `--radius-lg`301- Active state: Primary border color with pulse animation302- Hover: Border color changes to primary with 50% opacity303304**Command Button Structure:**305```html306<button class="nav-cmd">307 <span class="cmd-prefix">$</span>308 <span class="cmd-keyword">ai</span>309 <span class="cmd-flag">--search</span>310</button>311```312313**Command Colors:**314- Prefix (`$`): Fluorescent green (#39ff14)315- Keyword: Primary color (#cc7a60) or blue (#3b82f6)316- Flag: Default foreground color317318### Card Components319320**Skill Card:**321- Background: `--bg-card` (#fff in light, #111 in dark)322- Border: `1px solid --border`323- Border radius: `--radius-xl` (12px)324- Height: `100%` with flex column layout325- Hover: Border changes to primary with 50% opacity, shadow increases (`0 25px 50px -12px rgba(204, 122, 96, 0.1)`), `translateY(-4px)`326- Active: `translateY(0) scale(0.99)`327- Transition: `all 0.3s ease`328- **Line Numbers**: Absolute positioned on left, `2rem` width, subtle background329- **Avatar**: 24px × 24px, bordered, scales on hover330- **Star Icon**: 10px × 10px, warning color331- **Like Button**: SVG heart icon, changes color on hover332333**Category Card:**334- Same base styling as skill card335- **Color Themes**: Cyan, Blue, Purple, Amber variants336- **Folder Icon**: SVG icon, color varies by theme, scales on hover337- **Category Dot**: Small indicator dot, changes on hover338- **Arrow Icon**: Appears on hover, positioned bottom-right339- **JSON Display**: Key-value pairs with theme-colored hover effects340- **Command Line**: Footer with command-style text341342**Mention Card:**343- Same base styling344- Blockquote styling with quotation marks345- Source attribution with border-top separator346347### Button Components348349**Primary Button (Active):**350- Background: `--primary` (#cc7a60)351- Color: `--primary-foreground` (#fff)352- Border: `1px solid --primary`353- Border radius: `--radius-lg`354- Padding: `6px 12px` (small) or `--spacing-md --spacing-lg` (medium)355- Font: Monospace, `--text-xs` or `--text-sm`356357**Secondary Button:**358- Background: `--bg-card`359- Border: `1px solid --border`360- Color: `--foreground`361- Hover: Border color changes to primary with 50% opacity362- Active: `transform: scale(0.95)`363364**Icon Button:**365- Square or rounded366- Padding: `6px 12px`367- Icon size: `14px` or `16px`368- Same hover/active states as secondary button369370### Input Components371372**Search Input:**373- Background: Transparent374- Border: None375- Font: Monospace376- Placeholder: `--text-muted` color377- Focus: No visible border (minimal design)378379**Text Input:**380- Background: `--bg-card`381- Border: `1px solid --border`382- Border radius: `--radius-sm` or `--radius-md`383- Padding: `--spacing-sm`384- Font: Monospace385386### Code Display Components387388**Code Block:**389- Background: `rgba(255, 255, 255, 0.5)` with backdrop blur390- Border: `1px solid --border`391- Border radius: `--radius-lg`392- Padding: `--spacing-md`393- Font: Monospace394- Line height: `--leading-relaxed`395396**Code Line:**397- Display: Flex, align baseline398- Gap: `--spacing-sm`399- Syntax colors applied to different elements400401**Description Block (Comment Style):**402- Border-left: `4px solid rgba(204, 122, 96, 0.5)`403- Background: `rgba(204, 122, 96, 0.05)`404- Padding-left: `--spacing-md`405- Border-radius: Right side only (`--radius-lg`)406- Font: Monospace407408### Grid Layouts409410**Skills Grid:**411- Display: Grid412- Columns: `repeat(3, 1fr)` (desktop), `repeat(2, 1fr)` (tablet), `1fr` (mobile)413- Gap: `--spacing-lg` (24px)414415**Categories Grid:**416- Display: Grid417- Columns: `repeat(4, 1fr)` (desktop), `repeat(2, 1fr)` (tablet), `1fr` (mobile)418- Gap: `--spacing-lg`419420**Mentions Grid:**421- Display: Grid422- Columns: `1fr 1fr` (desktop), `1fr` (mobile)423- Gap: `--spacing-lg`424425## Animation System426427### Transitions428429**Default Transition:**430- Duration: `0.15s` or `0.2s`431- Timing: `cubic-bezier(.4,0,.2,1)` (ease-in-out)432- Properties: `all` or specific properties433434**Common Transitions:**435- Hover states: `all 0.2s ease`436- Active states: `transform 0.2s ease`437- Color changes: `color 0.2s ease` or `background-color 0.2s ease`438439### Keyframe Animations440441**Blink Animation (Cursor):**442```css443@keyframes blink {444 0%, 50% { opacity: 1; }445 51%, 100% { opacity: 0; }446}447```448- Duration: `1s`449- Iteration: `infinite`450- Used for: Cursor blink effect451452**Pulse Border Animation:**453```css454@keyframes pulse-border {455 0%, 100% { border-color: rgba(204, 122, 96, 0.5); }456 50% { border-color: var(--ring); }457}458```459- Duration: `2s`460- Timing: `ease-in-out`461- Iteration: `infinite`462- Used for: Active navigation items463464**Fade In Up Animation:**465```css466@keyframes fadeInUp {467 from {468 opacity: 0;469 transform: translateY(20px);470 }471 to {472 opacity: 1;473 transform: translateY(0);474 }475}476```477- Duration: `0.5s`478- Timing: `ease`479- Used for: Card entrance animations480- Staggered delays: 0.1s increments for grid items481482### Interactive States483484**Hover States:**485- Buttons: Border color changes, background lightens486- Cards: Border changes to primary, shadow increases, slight lift487- Links: Color changes to primary488- Scale: No scaling on hover (maintains stability)489490**Active States:**491- Buttons: `transform: scale(0.95)` - subtle press effect492- Duration: `0.2s`493494**Focus States:**495- Outline: `2px solid --ring` with `2px` offset496- Used for: Accessibility, keyboard navigation497498## Background Patterns499500### Grid Pattern (Page Background)501502```css503background-image: 504 linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),505 linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);506background-size: 20px 20px;507```508509- Very subtle grid (2% opacity black)510- 20px × 20px grid cells511- Creates texture without distraction512- Applied to `body` background513514### Gradient Backgrounds515516**Avatar Gradient:**517```css518background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);519```520- Warm peach gradient521- 135-degree angle522- Used for: User avatars523524**Chart Gradient:**525```css526linearGradient: #cc7a60 with opacity stops (0%: 0.6, 100%: 0)527```528- Primary color gradient529- Used for: Area charts, data visualization530531## Responsive Design532533### Breakpoints534535**Mobile:** `< 640px`536- Single column layouts537- Reduced font sizes538- Simplified navigation539- Stacked grids540541**Tablet:** `640px - 1024px`542- Two column layouts543- Medium font sizes544- Collapsed navigation menu545546**Desktop:** `1024px - 1200px`547- Three column layouts548- Full navigation visible549- Standard spacing550551**Large Desktop:** `> 1200px`552- Four column layouts (where applicable)553- Maximum content width: `1400px`554- Generous spacing555556### Responsive Adjustments557558**Navigation:**559- Desktop (>1024px): Full command menu visible560- Tablet/Mobile: Hamburger menu, simplified layout561- Status indicator: Hidden on mobile, visible on tablet+562563**Hero Section:**564- Desktop: Two column grid (text + chart)565- Mobile: Single column, stacked566567**Grids:**568- Skills: 3 → 2 → 1 columns569- Categories: 4 → 2 → 1 columns570- Mentions: 2 → 1 columns571572**Typography:**573- Hero title: 3.5rem → 2.5rem (mobile)574- Section titles: 2.5rem → 2rem (mobile)575- Body text: Maintains readability576577## Implementation Guidelines578579### CSS Variable Usage580581**Always use CSS variables** for:582- Colors (never hardcode hex values)583- Spacing (use spacing scale)584- Typography (use text size scale)585- Border radius (use radius scale)586- Shadows (use shadow scale)587588**Example:**589```css590.button {591 background: var(--bg-card);592 color: var(--foreground);593 padding: var(--spacing-sm) var(--spacing-md);594 border: 1px solid var(--border);595 border-radius: var(--radius-lg);596 box-shadow: var(--shadow-sm);597}598```599600### Component Structure601602**Terminal Window Pattern:**6031. Container with border and radius6042. Header with dots, title, status6053. Content area with padding6064. Consistent spacing throughout607608**Command-Line Pattern:**6091. Prefix (`$`) in fluorescent green6102. Keyword in primary or blue6113. Flags/arguments in default color6124. Monospace font throughout613614### Color Application Rules615616**Primary Color (#cc7a60):**617- Use for: Active states, highlights, keywords, prompts618- Avoid: Large background areas (too intense)619- Opacity variants: Use `rgba(204, 122, 96, 0.5)` for borders, `rgba(204, 122, 96, 0.05)` for backgrounds620621**Fluorescent Green (#39ff14):**622- Use ONLY for: Command prefix (`$`)623- Never use for: Other text, backgrounds, or accents624625**Green (#22c55e):**626- Use for: Success states, positive indicators, string literals627- Avoid: Primary actions (use primary color instead)628629### Typography Rules630631**Always use monospace font** for:632- Navigation elements633- Buttons634- Code blocks635- Command-line interfaces636- Window titles637- Status text638639**Font weight guidelines:**640- Body text: 400 (normal)641- Labels/keywords: 600 (semibold)642- Headings: 700 (bold)643- Hero text: 700-800 (bold-extrabold)644645### Spacing Consistency646647**Use spacing scale:**648- Never use arbitrary values (e.g., `13px`, `27px`)649- Stick to: 4px, 8px, 16px, 24px, 32px, 48px650- For gaps between related items: `--spacing-sm` to `--spacing-md`651- For section separation: `--spacing-xl` to `--spacing-2xl`652653### Animation Best Practices654655**Keep animations subtle:**656- Duration: 0.15s - 0.3s maximum657- Easing: Use provided cubic-bezier curves658- Avoid: Bouncy animations, long durations659- Prefer: Fade, translate, scale (small amounts)660661**Performance:**662- Use `transform` and `opacity` for animations (GPU accelerated)663- Avoid animating `width`, `height`, `margin`, `padding`664665## Common Patterns666667### Terminal Window Card668669```html670<div class="terminal-window">671 <div class="window-header">672 <div class="window-dots">673 <span class="dot red"></span>674 <span class="dot yellow"></span>675 <span class="dot green"></span>676 </div>677 <span class="window-title">filename.ext</span>678 <span class="window-status">ready</span>679 </div>680 <div class="window-content">681 <!-- Content here -->682 </div>683</div>684```685686### Command Button687688```html689<button class="nav-cmd">690 <span class="cmd-prefix">$</span>691 <span class="cmd-keyword">command</span>692 <span class="cmd-flag">--flag</span>693</button>694```695696### Code Block Display697698```html699<div class="stats-code-block">700 <div class="code-line">701 <span class="keyword">const</span>702 <span class="variable-name">variable</span>703 <span class="operator">=</span>704 <span class="number">123</span>705 <span class="operator">;</span>706 </div>707 <div class="code-comment">708 <span class="comment-symbol">// </span>Comment text709 </div>710</div>711```712713### Description Block (Comment Style)714715```html716<div class="description-block">717 <div class="comment-start">/**</div>718 <div class="comment-text">719 <span class="comment-asterisk"> * </span>Description text720 </div>721 <div class="comment-end"> */</div>722</div>723```724725## Accessibility Considerations726727**Color Contrast:**728- Primary text (#111827) on white: WCAG AAA compliant729- Secondary text (#666666) on white: WCAG AA compliant730- Primary color (#cc7a60) on white: WCAG AA compliant for large text731732**Focus States:**733- All interactive elements have visible focus indicators734- Focus ring: 2px solid primary color with 2px offset735736**Keyboard Navigation:**737- All interactive elements are keyboard accessible738- Tab order follows visual hierarchy739- Enter/Space activate buttons740741**Screen Readers:**742- Semantic HTML structure743- ARIA labels where needed744- Status indicators use appropriate roles745746## Dark Mode Implementation747748The design system includes a complete dark mode implementation using `[data-theme="dark"]` attribute selector. Dark mode is fully integrated with smooth transitions and maintains all design principles.749750### Dark Mode Color System751752**Primary Colors (Dark Mode):**753- `--primary: #d99178` - Lighter terracotta for better contrast on dark backgrounds754- `--primary-foreground: #0a0a0a` - Dark text on primary backgrounds755- `--primary-dark: #c57f66` - Darker shade for hover states756- `--primary-light: #e5a890` - Lighter shade for subtle accents757- `--ring: #d99178` - Focus ring color (lighter primary)758759**Backgrounds (Dark Mode):**760- `--background: #0a0a0a` - Deep black for main backgrounds761- `--bg-main: #0a0a0a` - Dark background with subtle white grid pattern762- `--bg-card: #111` - Slightly lighter black for card components763- `--bg-code: #18181b` - Dark gray for code blocks and window headers764- `--secondary: #1a1a1a` - Dark gray for secondary backgrounds765- `--muted: #262626` - Muted dark gray for subtle backgrounds766767**Text Colors (Dark Mode):**768- `--foreground: #ededed` - Light gray for primary text769- `--text-primary: #ededed` - Primary text color770- `--text-secondary: #a3a3a3` - Medium gray for secondary text771- `--text-muted: #a3a3a3` - Muted gray for less important text772- `--muted-foreground: #a3a3a3` - Foreground on muted backgrounds773774**Borders (Dark Mode):**775- `--border: #606068` - Lighter gray for visibility on dark backgrounds776- `--border-light: #27272a` - Subtle dark gray for dividers777778**Syntax Highlighting (Dark Mode):**779- `--syntax-keyword: #d99178` - Lighter primary for keywords780- `--syntax-string: #22c55e` - Green (same as light mode)781- `--syntax-number: #d99178` - Lighter primary for numbers782- `--syntax-comment: #6a9955` - Muted green (same as light mode)783- Blue keywords: `#60a5fa` (blue-400) - Brighter blue for better contrast784- Purple keywords: `#c084fc` (purple-400) - Brighter purple for better contrast785786**Shadows (Dark Mode):**787- `--shadow-sm: 0 1px 2px rgba(0,0,0,0.3)` - Stronger shadows for depth788- `--shadow-md: 0 4px 6px rgba(0,0,0,0.4)` - Medium shadows789- `--shadow-lg: 0 10px 25px rgba(0,0,0,0.5)` - Large shadows790791### Dark Mode Background Pattern792793Dark mode uses a subtle white grid pattern instead of black:794795```css796[data-theme="dark"] body {797 background-image: 798 linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),799 linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);800}801```802803### Theme Toggle Implementation804805**HTML Structure:**806```html807<button class="theme-toggle-btn theme-toggle" title="切换主题" aria-label="切换主题">808 <svg class="icon-sun theme-icon"><!-- Sun icon --></svg>809 <svg class="icon-moon theme-icon" style="display: none;"><!-- Moon icon --></svg>810</button>811```812813**JavaScript Implementation:**814- Uses `localStorage` to persist theme preference815- Detects system preference on first load816- Smoothly transitions between themes817- Updates icon visibility (sun/moon)818- Listens to system theme changes (when no manual preference set)819820**Key Features:**821- Automatic system preference detection822- Manual override with localStorage persistence823- Smooth CSS transitions (0.2s ease-in-out)824- Icon state management (sun for light, moon for dark)825826### Dark Mode Component Adaptations827828**Navigation Bar:**829- Background: `rgba(10, 10, 10, 0.8)` with backdrop blur830- Status indicator: Darker background with adjusted border831832**Terminal Windows:**833- Card background: `#111` (slightly lighter than main background)834- Window headers: `rgba(38, 38, 38, 0.3)` for subtle contrast835- All borders use darker mode colors836837**Skill Cards:**838- Line numbers background: `rgba(38, 38, 38, 0.2)`839- Footer background: `rgba(38, 38, 38, 0.2)`840- Hover effects maintain same behavior with adjusted colors841842**Category Cards:**843- Each category has theme-specific hover colors:844 - Cyan: `#22d3ee` (dark) vs `#06b6d4` (light)845 - Blue: `#60a5fa` (dark) vs `#3b82f6` (light)846 - Purple: `#c084fc` (dark) vs `#a855f7` (light)847 - Amber: `#fbbf24` (dark) vs `#f59e0b` (light)848849**Charts:**850- Grid lines: `#27272a` with 0.5 opacity851- Chart container: `rgba(17, 17, 17, 0.3)`852- All text colors adapt to dark mode853854**FAB Button:**855- Light mode: Dark background `#1a1a1a` with white icon856- Dark mode: White background with dark icon (inverted)857858### Dark Mode Best Practices859860**Color Contrast:**861- All text maintains WCAG AA compliance in dark mode862- Primary color is lightened for better visibility863- Borders are lighter for clear definition864865**Transitions:**866- All color changes use `transition: color 0.2s ease-in-out`867- Background changes use `transition: background-color 0.2s ease-in-out`868- Smooth theme switching without jarring changes869870**Implementation Pattern:**871```css872/* Light mode (default) */873.component {874 background: var(--bg-card);875 color: var(--foreground);876}877878/* Dark mode */879[data-theme="dark"] .component {880 background: var(--bg-card); /* Automatically uses dark value */881 color: var(--foreground); /* Automatically uses dark value */882}883```884885**Maintains:**886- Same spacing system887- Same typography scale888- Same component structure889- Same animation timing890- Enhanced shadows for depth perception891892## Performance Optimization893894**CSS Variables:**895- All colors/spacing use CSS variables for easy theming896- Variables defined in `:root` for global access897898**Animations:**899- Use `transform` and `opacity` (GPU accelerated)900- Avoid layout-triggering properties901- Keep durations short (0.15s - 0.3s)902903**Font Loading:**904- Preconnect to Google Fonts905- Use `font-display: swap` for better performance906- Provide fallback fonts in stack907908## Browser Support909910**Modern Browsers:**911- Chrome/Edge: Full support912- Firefox: Full support913- Safari: Full support (with `-webkit-` prefixes for backdrop-filter)914915**Features Used:**916- CSS Grid: Full support in modern browsers917- CSS Variables: Full support918- Backdrop Filter: Requires `-webkit-` prefix for Safari919- Flexbox: Full support920921## Design Tokens Summary922923**Quick Reference:**924925```css926/* Colors - Light Mode */927Primary: #cc7a60928Fluorescent Green: #39ff14 (command prefix only)929Success: #22c55e930Blue: #3b82f6931Foreground: #111827932Border: #8b929e933934/* Colors - Dark Mode */935Primary: #d99178936Foreground: #ededed937Background: #0a0a0a938Card: #111939Border: #606068940Blue: #60a5fa (brighter for contrast)941942/* Spacing */943xs: 4px, sm: 8px, md: 16px, lg: 24px, xl: 32px, 2xl: 48px944945/* Typography */946Font: JetBrains Mono947Sizes: 0.75rem - 3.75rem scale948Weights: 400, 500, 600, 700, 800949950/* Radius */951xs: 2px, sm: 4px, md: 6px, lg: 8px, xl: 12px, 2xl: 16px952953/* Shadows - Light Mode */954sm: 0 1px 2px rgba(0,0,0,0.05)955md: 0 4px 6px rgba(0,0,0,0.07)956lg: 0 10px 25px rgba(0,0,0,0.1)957958/* Shadows - Dark Mode */959sm: 0 1px 2px rgba(0,0,0,0.3)960md: 0 4px 6px rgba(0,0,0,0.4)961lg: 0 10px 25px rgba(0,0,0,0.5)962```963964## Theme Toggle JavaScript Implementation965966**Complete Implementation:**967```javascript968(function() {969 const themeToggles = document.querySelectorAll('.theme-toggle');970 const html = document.documentElement;971 972 // Get initial theme from localStorage or system preference973 function getInitialTheme() {974 const savedTheme = localStorage.getItem('theme');975 if (savedTheme) {976 return savedTheme;977 }978 // Check system preference979 if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {980 return 'dark';981 }982 return 'light';983 }984 985 // Set theme and update icons986 function setTheme(theme) {987 if (theme === 'dark') {988 html.setAttribute('data-theme', 'dark');989 document.querySelectorAll('.icon-sun').forEach(icon => {990 icon.style.display = 'none';991 });992 document.querySelectorAll('.icon-moon').forEach(icon => {993 icon.style.display = 'block';994 });995 } else {996 html.removeAttribute('data-theme');997 document.querySelectorAll('.icon-sun').forEach(icon => {998 icon.style.display = 'block';999 });1000 document.querySelectorAll('.icon-moon').forEach(icon => {1001 icon.style.display = 'none';1002 });1003 }1004 localStorage.setItem('theme', theme);1005 }1006 1007 // Toggle theme1008 function toggleTheme() {1009 const currentTheme = html.getAttribute('data-theme');1010 const newTheme = currentTheme === 'dark' ? 'light' : 'dark';1011 setTheme(newTheme);1012 }1013 1014 // Initialize1015 const initialTheme = getInitialTheme();1016 setTheme(initialTheme);1017 1018 // Add event listeners1019 themeToggles.forEach(button => {1020 button.addEventListener('click', toggleTheme);1021 });1022 1023 // Listen to system theme changes (only if no manual preference)1024 if (window.matchMedia) {1025 const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');1026 mediaQuery.addEventListener('change', (e) => {1027 if (!localStorage.getItem('theme')) {1028 setTheme(e.matches ? 'dark' : 'light');1029 }1030 });1031 }1032})();1033```10341035**Key Features:**1036- Persists theme preference in localStorage1037- Detects system preference on first load1038- Smoothly transitions between themes1039- Updates icon visibility automatically1040- Listens to system theme changes (when no manual override)10411042## Usage Examples10431044When implementing this design system:104510461. **Start with CSS variables** - Import or define all color/spacing variables (including dark mode)10472. **Use terminal window pattern** - Wrap content in terminal-window component10483. **Apply monospace font** - Use JetBrains Mono for all UI text10494. **Follow spacing scale** - Use defined spacing values consistently10505. **Use semantic colors** - Apply colors based on meaning, not appearance10516. **Implement theme toggle** - Add theme toggle button and JavaScript10527. **Maintain consistency** - Reuse component patterns throughout10538. **Test responsiveness** - Ensure layouts work at all breakpoints10549. **Test both themes** - Verify light and dark modes work correctly105510. **Optimize animations** - Keep transitions smooth and performant10561057This design system creates a cohesive, developer-friendly interface that feels both modern and familiar to users comfortable with terminal interfaces. The complete dark mode implementation ensures the interface works beautifully in any lighting condition.