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.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
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. Use when this capability is needed.4---56# Terminal UI Design System78A 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.910## Design Philosophy1112**Core Principles:**13- **Terminal Aesthetic**: Mimics macOS terminal windows with colored dots, monospace fonts, and command-line syntax14- **Developer-First**: Uses syntax highlighting colors, code-like structures, and terminal metaphors15- **Warm & Approachable**: Warm terracotta primary color (#cc7a60) creates a friendly, non-intimidating feel16- **High Contrast**: Clear visual hierarchy with distinct text colors and backgrounds17- **Functional Beauty**: Every design element serves a purpose while maintaining visual appeal1819## Color System2021### Primary Palette2223**Main Brand Color:**24- `--primary: #cc7a60` - Warm terracotta/orange-brown, used for primary actions, accents, and highlights25- `--primary-foreground: #fff` - White text on primary backgrounds26- `--primary-dark: #b56850` - Darker shade for hover states27- `--primary-light: #d8907a` - Lighter shade for subtle accents28- `--ring: #cc7a60` - Focus ring color (same as primary)2930**Warm Accent:**31- `--warm-red: #c85a3f` - Used for code block borders and warm accents3233### Semantic Colors3435**Backgrounds:**36- `--background: #fff` - Pure white for main backgrounds37- `--bg-main: #f8f8f8` - Light gray for page background (with subtle grid pattern)38- `--bg-card: #fff` - White for card components39- `--bg-code: #fafafa` - Very light gray for code blocks and window headers40- `--secondary: #f9fafb` - Light gray for secondary backgrounds41- `--muted: #f3f4f6` - Muted gray for subtle backgrounds4243**Text Colors:**44- `--foreground: #111827` - Near-black for primary text (excellent readability)45- `--text-primary: #111827` - Primary text color46- `--text-secondary: #666666` - Medium gray for secondary text47- `--text-muted: #5b6370` - Muted gray for less important text48- `--muted-foreground: #5b6370` - Foreground on muted backgrounds4950**Borders:**51- `--border: #8b929e` - Medium gray for main borders52- `--border-light: #e5e7eb` - Light gray for subtle dividers53- `--input: #8b929e` - Input border color5455**Status Colors:**56- `--success: #22c55e` - Green for success states57- `--warning: #f59e0b` - Amber for warnings58- `--danger: #ef4444` - Red for errors/destructive actions59- `--accent: #f59e0b` - Amber accent color6061### Syntax Highlighting Colors6263**Code Syntax:**64- `--syntax-keyword: #cc7a60` - Primary color for keywords (const, export, etc.)65- `--syntax-string: #22c55e` - Green for strings66- `--syntax-number: #cc7a60` - Primary color for numbers67- `--syntax-comment: #6a9955` - Muted green for comments68- `--syntax-function: #dcdcaa` - Light yellow for function names6970**Command Prefix:**71- Command prefix (`$`) uses fluorescent green: `#39ff14` - Creates terminal-like appearance7273**Code Elements:**74- `--text-comment: #6a9955` - Comment text color7576### macOS Window Dots7778**Terminal Window Controls:**79- `--dot-red: #ff5f57` - Close button (macOS red)80- `--dot-yellow: #febc2e` - Minimize button (macOS yellow)81- `--dot-green: #28c840` - Maximize button (macOS green)8283### Color Usage Guidelines8485**Primary Color (#cc7a60) Usage:**86- Command keywords in navigation87- Prompt symbols (`>`)88- Active states and highlights89- Focus rings90- Hover borders91- Primary buttons when active92- Chart lines and data visualization9394**Fluorescent Green (#39ff14) Usage:**95- Command prefix (`$`) - creates authentic terminal feel96- Only used for dollar signs, never for other elements9798**Green (#22c55e) Usage:**99- Success indicators100- Status dots (online/ready)101- String literals in code102- Positive actions103104**Blue (#3b82f6) Usage:**105- Command keywords (cd, watch, man, api)106- Code keywords (const, let, var)107- Links and interactive elements108109## Typography System110111### Font Families112113**Primary Font Stack:**114```css115--font-mono: "JetBrains Mono", "JetBrains Mono Fallback", 'Fira Code', 'Consolas', monospace;116```117- **Primary**: JetBrains Mono (400-800 weights)118- **Fallbacks**: Fira Code, Consolas, system monospace119- Used for: All UI text, navigation, buttons, code blocks120121**Sans-serif Fallback:**122```css123--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";124```125- Used as fallback only, monospace is preferred126127### Font Size Scale128129**Base Unit System:**130- `--text-xs: 0.75rem` (12px) - Small labels, hints, window status131- `--text-sm: 0.875rem` (14px) - Secondary text, descriptions132- `--text-base: 1rem` (16px) - Body text, default size133- `--text-lg: 1.125rem` (18px) - Slightly emphasized text134- `--text-xl: 1.25rem` (20px) - Subheadings135- `--text-2xl: 1.5rem` (24px) - Section titles136- `--text-3xl: 1.875rem` (30px) - Large numbers, stats137- `--text-4xl: 2.25rem` (36px) - Hero numbers138- `--text-5xl: 3rem` (48px) - Large headings139- `--text-6xl: 3.75rem` (60px) - Extra large headings140141**Font Weights:**142- `--font-weight-normal: 400` - Body text143- `--font-weight-medium: 500` - Medium emphasis144- `--font-weight-semibold: 600` - Semibold (keywords, labels)145- `--font-weight-bold: 700` - Bold (headings, important text)146- `--font-weight-extrabold: 800` - Extra bold (hero text)147148**Line Heights:**149- `--leading-tight: 1.25` - Tight spacing for headings150- `--leading-relaxed: 1.625` - Relaxed spacing for body text151152### Typography Usage153154**Headings:**155- Hero titles: 3.5rem, weight 700, line-height 1.1156- Section titles: 2.5rem, weight 700157- FAQ titles: 2rem, weight 700158159**Body Text:**160- Default: 1rem, weight 400, line-height 1.5161- Secondary: 0.875rem, color `--text-secondary`162- Muted: 0.75rem, color `--text-muted`163164**Code/Command Text:**165- Always use monospace font166- Command prefix: fluorescent green (#39ff14)167- Keywords: primary color (#cc7a60) or blue (#3b82f6)168- Flags/arguments: default foreground color169170## Spacing System171172**Base Unit:** `--spacing: 0.25rem` (4px)173174**Spacing Scale:**175- `--spacing-xs: 4px` (0.25rem) - Tight spacing, icon padding176- `--spacing-sm: 8px` (0.5rem) - Small gaps, button padding177- `--spacing-md: 16px` (1rem) - Standard spacing, card padding178- `--spacing-lg: 24px` (1.5rem) - Large gaps, section spacing179- `--spacing-xl: 32px` (2rem) - Extra large gaps, major sections180- `--spacing-2xl: 48px` (3rem) - Maximum spacing, page sections181182**Usage Guidelines:**183- Use consistent spacing multiples (4px base)184- Card padding: `--spacing-md` to `--spacing-lg`185- Section margins: `--spacing-xl` to `--spacing-2xl`186- Button padding: `--spacing-sm` to `--spacing-md`187- Gap between related elements: `--spacing-sm` to `--spacing-md`188189## Border Radius System190191**Radius Scale:**192- `--radius-xs: 2px` (0.125rem) - Minimal rounding193- `--radius-sm: 4px` (0.25rem) - Small elements194- `--radius-md: 6px` (0.375rem) - Buttons, inputs195- `--radius-lg: 8px` (0.5rem) - Cards, windows (most common)196- `--radius-xl: 12px` (0.75rem) - Large cards197- `--radius-2xl: 16px` (1rem) - Extra large elements198- `--radius: 10px` (0.625rem) - Default radius199200**Usage:**201- Terminal windows: `--radius-lg` (8px)202- Buttons: `--radius-lg` (8px)203- Cards: `--radius-lg` (8px)204- Inputs: `--radius-md` (6px)205- Avatar: `9999px` (fully rounded)206207## Shadow System208209**Shadow Scale:**210- `--shadow-sm: 0 1px 2px rgba(0,0,0,0.05)` - Subtle elevation211- `--shadow-md: 0 4px 6px rgba(0,0,0,0.07)` - Medium elevation (cards on hover)212- `--shadow-lg: 0 10px 25px rgba(0,0,0,0.1)` - Large elevation (floating buttons)213214**Usage:**215- Default cards: `--shadow-sm`216- Hover states: `--shadow-md`217- Floating elements: `--shadow-lg`218- Primary-colored shadows: `rgba(204, 122, 96, 0.1)` for primary-themed elements219220## Component Specifications221222### Terminal Window Component223224**Structure:**225```html226<div class="terminal-window">227 <div class="window-header">228 <div class="window-dots">229 <span class="dot red"></span>230 <span class="dot yellow"></span>231 <span class="dot green"></span>232 </div>233 <span class="window-title">filename.ext</span>234 <span class="window-status">ready</span>235 </div>236 <div class="window-content">237 <!-- Content -->238 </div>239</div>240```241242**Styling:**243- Background: `--bg-card` (#fff)244- Border: `1px solid --border` (#8b929e)245- Border radius: `--radius-lg` (8px)246- Box shadow: `--shadow-sm`247- Header background: `--bg-code` (#fafafa)248- Header border-bottom: `1px solid --border-light` (#e5e7eb)249- Header padding: `--spacing-sm --spacing-md` (8px 16px)250- Content padding: `--spacing-lg` (24px)251252**Window Dots:**253- Size: `12px × 12px`254- Gap: `6px`255- Colors: Red (#ff5f57), Yellow (#febc2e), Green (#28c840)256- Fully rounded (border-radius: 50%)257258**Window Title:**259- Font size: `0.85rem`260- Color: `--text-secondary` (#666666)261- Font: Monospace262263**Window Status:**264- Font size: `0.75rem`265- Color: `--text-muted` (#5b6370)266- Position: Right side of header267268### Navigation Bar269270**Structure:**271```html272<nav class="navbar">273 <div class="navbar-container">274 <div class="navbar-content">275 <!-- Logo, commands, actions -->276 </div>277 </div>278</nav>279```280281**Styling:**282- Position: `sticky`, `top: 0`283- Background: `rgba(255, 255, 255, 0.8)` with `backdrop-filter: blur(8px)`284- Border-bottom: `1px solid --border`285- Height: `64px` (desktop), `56px` (mobile)286- Max width: `80rem` (1280px), centered287288**Logo:**289- Status indicator: Green dot (8px) + "ready" text290- Path prefix: `~/` in primary color (#cc7a60)291- Path name: Bold, foreground color292- Cursor blink: 2px width, primary color, animated293294**Navigation Commands:**295- Display: Flex, gap `--spacing-md`296- Button style: Monospace font, small padding (6px 12px)297- Border: `1px solid --border`298- Border radius: `--radius-lg`299- Active state: Primary border color with pulse animation300- Hover: Border color changes to primary with 50% opacity301302**Command Button Structure:**303```html304<button class="nav-cmd">305 <span class="cmd-prefix">$</span>306 <span class="cmd-keyword">ai</span>307 <span class="cmd-flag">--search</span>308</button>309```310311**Command Colors:**312- Prefix (`$`): Fluorescent green (#39ff14)313- Keyword: Primary color (#cc7a60) or blue (#3b82f6)314- Flag: Default foreground color315316### Card Components317318**Skill Card:**319- Background: `--bg-card` (#fff in light, #111 in dark)320- Border: `1px solid --border`321- Border radius: `--radius-xl` (12px)322- Height: `100%` with flex column layout323- Hover: Border changes to primary with 50% opacity, shadow increases (`0 25px 50px -12px rgba(204, 122, 96, 0.1)`), `translateY(-4px)`324- Active: `translateY(0) scale(0.99)`325- Transition: `all 0.3s ease`326- **Line Numbers**: Absolute positioned on left, `2rem` width, subtle background327- **Avatar**: 24px × 24px, bordered, scales on hover328- **Star Icon**: 10px × 10px, warning color329- **Like Button**: SVG heart icon, changes color on hover330331**Category Card:**332- Same base styling as skill card333- **Color Themes**: Cyan, Blue, Purple, Amber variants334- **Folder Icon**: SVG icon, color varies by theme, scales on hover335- **Category Dot**: Small indicator dot, changes on hover336- **Arrow Icon**: Appears on hover, positioned bottom-right337- **JSON Display**: Key-value pairs with theme-colored hover effects338- **Command Line**: Footer with command-style text339340**Mention Card:**341- Same base styling342- Blockquote styling with quotation marks343- Source attribution with border-top separator344345### Button Components346347**Primary Button (Active):**348- Background: `--primary` (#cc7a60)349- Color: `--primary-foreground` (#fff)350- Border: `1px solid --primary`351- Border radius: `--radius-lg`352- Padding: `6px 12px` (small) or `--spacing-md --spacing-lg` (medium)353- Font: Monospace, `--text-xs` or `--text-sm`354355**Secondary Button:**356- Background: `--bg-card`357- Border: `1px solid --border`358- Color: `--foreground`359- Hover: Border color changes to primary with 50% opacity360- Active: `transform: scale(0.95)`361362**Icon Button:**363- Square or rounded364- Padding: `6px 12px`365- Icon size: `14px` or `16px`366- Same hover/active states as secondary button367368### Input Components369370**Search Input:**371- Background: Transparent372- Border: None373- Font: Monospace374- Placeholder: `--text-muted` color375- Focus: No visible border (minimal design)376377**Text Input:**378- Background: `--bg-card`379- Border: `1px solid --border`380- Border radius: `--radius-sm` or `--radius-md`381- Padding: `--spacing-sm`382- Font: Monospace383384### Code Display Components385386**Code Block:**387- Background: `rgba(255, 255, 255, 0.5)` with backdrop blur388- Border: `1px solid --border`389- Border radius: `--radius-lg`390- Padding: `--spacing-md`391- Font: Monospace392- Line height: `--leading-relaxed`393394**Code Line:**395- Display: Flex, align baseline396- Gap: `--spacing-sm`397- Syntax colors applied to different elements398399**Description Block (Comment Style):**400- Border-left: `4px solid rgba(204, 122, 96, 0.5)`401- Background: `rgba(204, 122, 96, 0.05)`402- Padding-left: `--spacing-md`403- Border-radius: Right side only (`--radius-lg`)404- Font: Monospace405406### Grid Layouts407408**Skills Grid:**409- Display: Grid410- Columns: `repeat(3, 1fr)` (desktop), `repeat(2, 1fr)` (tablet), `1fr` (mobile)411- Gap: `--spacing-lg` (24px)412413**Categories Grid:**414- Display: Grid415- Columns: `repeat(4, 1fr)` (desktop), `repeat(2, 1fr)` (tablet), `1fr` (mobile)416- Gap: `--spacing-lg`417418**Mentions Grid:**419- Display: Grid420- Columns: `1fr 1fr` (desktop), `1fr` (mobile)421- Gap: `--spacing-lg`422423## Animation System424425### Transitions426427**Default Transition:**428- Duration: `0.15s` or `0.2s`429- Timing: `cubic-bezier(.4,0,.2,1)` (ease-in-out)430- Properties: `all` or specific properties431432**Common Transitions:**433- Hover states: `all 0.2s ease`434- Active states: `transform 0.2s ease`435- Color changes: `color 0.2s ease` or `background-color 0.2s ease`436437### Keyframe Animations438439**Blink Animation (Cursor):**440```css441@keyframes blink {442 0%, 50% { opacity: 1; }443 51%, 100% { opacity: 0; }444}445```446- Duration: `1s`447- Iteration: `infinite`448- Used for: Cursor blink effect449450**Pulse Border Animation:**451```css452@keyframes pulse-border {453 0%, 100% { border-color: rgba(204, 122, 96, 0.5); }454 50% { border-color: var(--ring); }455}456```457- Duration: `2s`458- Timing: `ease-in-out`459- Iteration: `infinite`460- Used for: Active navigation items461462**Fade In Up Animation:**463```css464@keyframes fadeInUp {465 from {466 opacity: 0;467 transform: translateY(20px);468 }469 to {470 opacity: 1;471 transform: translateY(0);472 }473}474```475- Duration: `0.5s`476- Timing: `ease`477- Used for: Card entrance animations478- Staggered delays: 0.1s increments for grid items479480### Interactive States481482**Hover States:**483- Buttons: Border color changes, background lightens484- Cards: Border changes to primary, shadow increases, slight lift485- Links: Color changes to primary486- Scale: No scaling on hover (maintains stability)487488**Active States:**489- Buttons: `transform: scale(0.95)` - subtle press effect490- Duration: `0.2s`491492**Focus States:**493- Outline: `2px solid --ring` with `2px` offset494- Used for: Accessibility, keyboard navigation495496## Background Patterns497498### Grid Pattern (Page Background)499500```css501background-image: 502 linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),503 linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);504background-size: 20px 20px;505```506507- Very subtle grid (2% opacity black)508- 20px × 20px grid cells509- Creates texture without distraction510- Applied to `body` background511512### Gradient Backgrounds513514**Avatar Gradient:**515```css516background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);517```518- Warm peach gradient519- 135-degree angle520- Used for: User avatars521522**Chart Gradient:**523```css524linearGradient: #cc7a60 with opacity stops (0%: 0.6, 100%: 0)525```526- Primary color gradient527- Used for: Area charts, data visualization528529## Responsive Design530531### Breakpoints532533**Mobile:** `< 640px`534- Single column layouts535- Reduced font sizes536- Simplified navigation537- Stacked grids538539**Tablet:** `640px - 1024px`540- Two column layouts541- Medium font sizes542- Collapsed navigation menu543544**Desktop:** `1024px - 1200px`545- Three column layouts546- Full navigation visible547- Standard spacing548549**Large Desktop:** `> 1200px`550- Four column layouts (where applicable)551- Maximum content width: `1400px`552- Generous spacing553554### Responsive Adjustments555556**Navigation:**557- Desktop (>1024px): Full command menu visible558- Tablet/Mobile: Hamburger menu, simplified layout559- Status indicator: Hidden on mobile, visible on tablet+560561**Hero Section:**562- Desktop: Two column grid (text + chart)563- Mobile: Single column, stacked564565**Grids:**566- Skills: 3 → 2 → 1 columns567- Categories: 4 → 2 → 1 columns568- Mentions: 2 → 1 columns569570**Typography:**571- Hero title: 3.5rem → 2.5rem (mobile)572- Section titles: 2.5rem → 2rem (mobile)573- Body text: Maintains readability574575## Implementation Guidelines576577### CSS Variable Usage578579**Always use CSS variables** for:580- Colors (never hardcode hex values)581- Spacing (use spacing scale)582- Typography (use text size scale)583- Border radius (use radius scale)584- Shadows (use shadow scale)585586**Example:**587```css588.button {589 background: var(--bg-card);590 color: var(--foreground);591 padding: var(--spacing-sm) var(--spacing-md);592 border: 1px solid var(--border);593 border-radius: var(--radius-lg);594 box-shadow: var(--shadow-sm);595}596```597598### Component Structure599600**Terminal Window Pattern:**6011. Container with border and radius6022. Header with dots, title, status6033. Content area with padding6044. Consistent spacing throughout605606**Command-Line Pattern:**6071. Prefix (`$`) in fluorescent green6082. Keyword in primary or blue6093. Flags/arguments in default color6104. Monospace font throughout611612### Color Application Rules613614**Primary Color (#cc7a60):**615- Use for: Active states, highlights, keywords, prompts616- Avoid: Large background areas (too intense)617- Opacity variants: Use `rgba(204, 122, 96, 0.5)` for borders, `rgba(204, 122, 96, 0.05)` for backgrounds618619**Fluorescent Green (#39ff14):**620- Use ONLY for: Command prefix (`$`)621- Never use for: Other text, backgrounds, or accents622623**Green (#22c55e):**624- Use for: Success states, positive indicators, string literals625- Avoid: Primary actions (use primary color instead)626627### Typography Rules628629**Always use monospace font** for:630- Navigation elements631- Buttons632- Code blocks633- Command-line interfaces634- Window titles635- Status text636637**Font weight guidelines:**638- Body text: 400 (normal)639- Labels/keywords: 600 (semibold)640- Headings: 700 (bold)641- Hero text: 700-800 (bold-extrabold)642643### Spacing Consistency644645**Use spacing scale:**646- Never use arbitrary values (e.g., `13px`, `27px`)647- Stick to: 4px, 8px, 16px, 24px, 32px, 48px648- For gaps between related items: `--spacing-sm` to `--spacing-md`649- For section separation: `--spacing-xl` to `--spacing-2xl`650651### Animation Best Practices652653**Keep animations subtle:**654- Duration: 0.15s - 0.3s maximum655- Easing: Use provided cubic-bezier curves656- Avoid: Bouncy animations, long durations657- Prefer: Fade, translate, scale (small amounts)658659**Performance:**660- Use `transform` and `opacity` for animations (GPU accelerated)661- Avoid animating `width`, `height`, `margin`, `padding`662663## Common Patterns664665### Terminal Window Card666667```html668<div class="terminal-window">669 <div class="window-header">670 <div class="window-dots">671 <span class="dot red"></span>672 <span class="dot yellow"></span>673 <span class="dot green"></span>674 </div>675 <span class="window-title">filename.ext</span>676 <span class="window-status">ready</span>677 </div>678 <div class="window-content">679 <!-- Content here -->680 </div>681</div>682```683684### Command Button685686```html687<button class="nav-cmd">688 <span class="cmd-prefix">$</span>689 <span class="cmd-keyword">command</span>690 <span class="cmd-flag">--flag</span>691</button>692```693694### Code Block Display695696```html697<div class="stats-code-block">698 <div class="code-line">699 <span class="keyword">const</span>700 <span class="variable-name">variable</span>701 <span class="operator">=</span>702 <span class="number">123</span>703 <span class="operator">;</span>704 </div>705 <div class="code-comment">706 <span class="comment-symbol">// </span>Comment text707 </div>708</div>709```710711### Description Block (Comment Style)712713```html714<div class="description-block">715 <div class="comment-start">/**</div>716 <div class="comment-text">717 <span class="comment-asterisk"> * </span>Description text718 </div>719 <div class="comment-end"> */</div>720</div>721```722723## Accessibility Considerations724725**Color Contrast:**726- Primary text (#111827) on white: WCAG AAA compliant727- Secondary text (#666666) on white: WCAG AA compliant728- Primary color (#cc7a60) on white: WCAG AA compliant for large text729730**Focus States:**731- All interactive elements have visible focus indicators732- Focus ring: 2px solid primary color with 2px offset733734**Keyboard Navigation:**735- All interactive elements are keyboard accessible736- Tab order follows visual hierarchy737- Enter/Space activate buttons738739**Screen Readers:**740- Semantic HTML structure741- ARIA labels where needed742- Status indicators use appropriate roles743744## Dark Mode Implementation745746The 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.747748### Dark Mode Color System749750**Primary Colors (Dark Mode):**751- `--primary: #d99178` - Lighter terracotta for better contrast on dark backgrounds752- `--primary-foreground: #0a0a0a` - Dark text on primary backgrounds753- `--primary-dark: #c57f66` - Darker shade for hover states754- `--primary-light: #e5a890` - Lighter shade for subtle accents755- `--ring: #d99178` - Focus ring color (lighter primary)756757**Backgrounds (Dark Mode):**758- `--background: #0a0a0a` - Deep black for main backgrounds759- `--bg-main: #0a0a0a` - Dark background with subtle white grid pattern760- `--bg-card: #111` - Slightly lighter black for card components761- `--bg-code: #18181b` - Dark gray for code blocks and window headers762- `--secondary: #1a1a1a` - Dark gray for secondary backgrounds763- `--muted: #262626` - Muted dark gray for subtle backgrounds764765**Text Colors (Dark Mode):**766- `--foreground: #ededed` - Light gray for primary text767- `--text-primary: #ededed` - Primary text color768- `--text-secondary: #a3a3a3` - Medium gray for secondary text769- `--text-muted: #a3a3a3` - Muted gray for less important text770- `--muted-foreground: #a3a3a3` - Foreground on muted backgrounds771772**Borders (Dark Mode):**773- `--border: #606068` - Lighter gray for visibility on dark backgrounds774- `--border-light: #27272a` - Subtle dark gray for dividers775776**Syntax Highlighting (Dark Mode):**777- `--syntax-keyword: #d99178` - Lighter primary for keywords778- `--syntax-string: #22c55e` - Green (same as light mode)779- `--syntax-number: #d99178` - Lighter primary for numbers780- `--syntax-comment: #6a9955` - Muted green (same as light mode)781- Blue keywords: `#60a5fa` (blue-400) - Brighter blue for better contrast782- Purple keywords: `#c084fc` (purple-400) - Brighter purple for better contrast783784**Shadows (Dark Mode):**785- `--shadow-sm: 0 1px 2px rgba(0,0,0,0.3)` - Stronger shadows for depth786- `--shadow-md: 0 4px 6px rgba(0,0,0,0.4)` - Medium shadows787- `--shadow-lg: 0 10px 25px rgba(0,0,0,0.5)` - Large shadows788789### Dark Mode Background Pattern790791Dark mode uses a subtle white grid pattern instead of black:792793```css794[data-theme="dark"] body {795 background-image: 796 linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),797 linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);798}799```800801### Theme Toggle Implementation802803**HTML Structure:**804```html805<button class="theme-toggle-btn theme-toggle" title="切换主题" aria-label="切换主题">806 <svg class="icon-sun theme-icon"><!-- Sun icon --></svg>807 <svg class="icon-moon theme-icon" style="display: none;"><!-- Moon icon --></svg>808</button>809```810811**JavaScript Implementation:**812- Uses `localStorage` to persist theme preference813- Detects system preference on first load814- Smoothly transitions between themes815- Updates icon visibility (sun/moon)816- Listens to system theme changes (when no manual preference set)817818**Key Features:**819- Automatic system preference detection820- Manual override with localStorage persistence821- Smooth CSS transitions (0.2s ease-in-out)822- Icon state management (sun for light, moon for dark)823824### Dark Mode Component Adaptations825826**Navigation Bar:**827- Background: `rgba(10, 10, 10, 0.8)` with backdrop blur828- Status indicator: Darker background with adjusted border829830**Terminal Windows:**831- Card background: `#111` (slightly lighter than main background)832- Window headers: `rgba(38, 38, 38, 0.3)` for subtle contrast833- All borders use darker mode colors834835**Skill Cards:**836- Line numbers background: `rgba(38, 38, 38, 0.2)`837- Footer background: `rgba(38, 38, 38, 0.2)`838- Hover effects maintain same behavior with adjusted colors839840**Category Cards:**841- Each category has theme-specific hover colors:842 - Cyan: `#22d3ee` (dark) vs `#06b6d4` (light)843 - Blue: `#60a5fa` (dark) vs `#3b82f6` (light)844 - Purple: `#c084fc` (dark) vs `#a855f7` (light)845 - Amber: `#fbbf24` (dark) vs `#f59e0b` (light)846847**Charts:**848- Grid lines: `#27272a` with 0.5 opacity849- Chart container: `rgba(17, 17, 17, 0.3)`850- All text colors adapt to dark mode851852**FAB Button:**853- Light mode: Dark background `#1a1a1a` with white icon854- Dark mode: White background with dark icon (inverted)855856### Dark Mode Best Practices857858**Color Contrast:**859- All text maintains WCAG AA compliance in dark mode860- Primary color is lightened for better visibility861- Borders are lighter for clear definition862863**Transitions:**864- All color changes use `transition: color 0.2s ease-in-out`865- Background changes use `transition: background-color 0.2s ease-in-out`866- Smooth theme switching without jarring changes867868**Implementation Pattern:**869```css870/* Light mode (default) */871.component {872 background: var(--bg-card);873 color: var(--foreground);874}875876/* Dark mode */877[data-theme="dark"] .component {878 background: var(--bg-card); /* Automatically uses dark value */879 color: var(--foreground); /* Automatically uses dark value */880}881```882883**Maintains:**884- Same spacing system885- Same typography scale886- Same component structure887- Same animation timing888- Enhanced shadows for depth perception889890## Performance Optimization891892**CSS Variables:**893- All colors/spacing use CSS variables for easy theming894- Variables defined in `:root` for global access895896**Animations:**897- Use `transform` and `opacity` (GPU accelerated)898- Avoid layout-triggering properties899- Keep durations short (0.15s - 0.3s)900901**Font Loading:**902- Preconnect to Google Fonts903- Use `font-display: swap` for better performance904- Provide fallback fonts in stack905906## Browser Support907908**Modern Browsers:**909- Chrome/Edge: Full support910- Firefox: Full support911- Safari: Full support (with `-webkit-` prefixes for backdrop-filter)912913**Features Used:**914- CSS Grid: Full support in modern browsers915- CSS Variables: Full support916- Backdrop Filter: Requires `-webkit-` prefix for Safari917- Flexbox: Full support918919## Design Tokens Summary920921**Quick Reference:**922923```css924/* Colors - Light Mode */925Primary: #cc7a60926Fluorescent Green: #39ff14 (command prefix only)927Success: #22c55e928Blue: #3b82f6929Foreground: #111827930Border: #8b929e931932/* Colors - Dark Mode */933Primary: #d99178934Foreground: #ededed935Background: #0a0a0a936Card: #111937Border: #606068938Blue: #60a5fa (brighter for contrast)939940/* Spacing */941xs: 4px, sm: 8px, md: 16px, lg: 24px, xl: 32px, 2xl: 48px942943/* Typography */944Font: JetBrains Mono945Sizes: 0.75rem - 3.75rem scale946Weights: 400, 500, 600, 700, 800947948/* Radius */949xs: 2px, sm: 4px, md: 6px, lg: 8px, xl: 12px, 2xl: 16px950951/* Shadows - Light Mode */952sm: 0 1px 2px rgba(0,0,0,0.05)953md: 0 4px 6px rgba(0,0,0,0.07)954lg: 0 10px 25px rgba(0,0,0,0.1)955956/* Shadows - Dark Mode */957sm: 0 1px 2px rgba(0,0,0,0.3)958md: 0 4px 6px rgba(0,0,0,0.4)959lg: 0 10px 25px rgba(0,0,0,0.5)960```961962## Theme Toggle JavaScript Implementation963964**Complete Implementation:**965```javascript966(function() {967 const themeToggles = document.querySelectorAll('.theme-toggle');968 const html = document.documentElement;969 970 // Get initial theme from localStorage or system preference971 function getInitialTheme() {972 const savedTheme = localStorage.getItem('theme');973 if (savedTheme) {974 return savedTheme;975 }976 // Check system preference977 if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {978 return 'dark';979 }980 return 'light';981 }982 983 // Set theme and update icons984 function setTheme(theme) {985 if (theme === 'dark') {986 html.setAttribute('data-theme', 'dark');987 document.querySelectorAll('.icon-sun').forEach(icon => {988 icon.style.display = 'none';989 });990 document.querySelectorAll('.icon-moon').forEach(icon => {991 icon.style.display = 'block';992 });993 } else {994 html.removeAttribute('data-theme');995 document.querySelectorAll('.icon-sun').forEach(icon => {996 icon.style.display = 'block';997 });998 document.querySelectorAll('.icon-moon').forEach(icon => {999 icon.style.display = 'none';1000 });1001 }1002 localStorage.setItem('theme', theme);1003 }1004 1005 // Toggle theme1006 function toggleTheme() {1007 const currentTheme = html.getAttribute('data-theme');1008 const newTheme = currentTheme === 'dark' ? 'light' : 'dark';1009 setTheme(newTheme);1010 }1011 1012 // Initialize1013 const initialTheme = getInitialTheme();1014 setTheme(initialTheme);1015 1016 // Add event listeners1017 themeToggles.forEach(button => {1018 button.addEventListener('click', toggleTheme);1019 });1020 1021 // Listen to system theme changes (only if no manual preference)1022 if (window.matchMedia) {1023 const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');1024 mediaQuery.addEventListener('change', (e) => {1025 if (!localStorage.getItem('theme')) {1026 setTheme(e.matches ? 'dark' : 'light');1027 }1028 });1029 }1030})();1031```10321033**Key Features:**1034- Persists theme preference in localStorage1035- Detects system preference on first load1036- Smoothly transitions between themes1037- Updates icon visibility automatically1038- Listens to system theme changes (when no manual override)10391040## Usage Examples10411042When implementing this design system:104310441. **Start with CSS variables** - Import or define all color/spacing variables (including dark mode)10452. **Use terminal window pattern** - Wrap content in terminal-window component10463. **Apply monospace font** - Use JetBrains Mono for all UI text10474. **Follow spacing scale** - Use defined spacing values consistently10485. **Use semantic colors** - Apply colors based on meaning, not appearance10496. **Implement theme toggle** - Add theme toggle button and JavaScript10507. **Maintain consistency** - Reuse component patterns throughout10518. **Test responsiveness** - Ensure layouts work at all breakpoints10529. **Test both themes** - Verify light and dark modes work correctly105310. **Optimize animations** - Keep transitions smooth and performant10541055This 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.10561057---1058> Converted and distributed by [TomeVault](https://tomevault.io/claim/demerzels-lab) — claim your Tome and manage your conversions.1059<!-- tomevault:4.0:skill_md:2026-04-13 -->