Scope: Applies to the entire repository unless a more-specific AGENTS.md overrides it.
Purpose: Keep UI consistent by always using the design system, reusable components, and tokens already defined in this codebase.
- Prefer reusable components over inline styling or one-off Tailwind classes.
- Always use tokens and utilities from
@/lib/design-systemand@/lib/utils. - Constrain colors to brand tokens; avoid ad‑hoc hex values and non-brand Tailwind colors.
- Preserve intentional differences: brutalist Home typography and pink background on Hire Me are deliberate.
- Import typography/spacing tokens from
@/lib/design-system(e.g.,typography,spacing). - Use
cnfrom@/lib/utilsfor class composition. - Opacity rules:
- Decorative/background text: 30
- Secondary text: 70
- Primary text: 100
- Disabled: 50
- Containers/sections: use
spacing.containerandspacing.section; do not hardcodepx/pyper page. - Card padding:
- Default:
p-6 md:p-8 lg:p-10 - Compact:
p-4 md:p-6
- Default:
- Use the
Titlecomponent for headings; select the rightasandvariant(e.g.,variant="card"). - Main titles:
text-5xl sm:text-6xl md:text-8xl font-black leading-tight(implemented viatypography.title). - Subtitles:
text-lg sm:text-xl md:text-2xl font-medium leading-relaxed(usetypography.subtitle). - Do not mix
font-extrabold/font-boldfor main titles; stick tofont-black(except on Home per design).
- Card:
components/ui/cardwithvariant: 'default' | 'compact' | 'hero'andinteractiveflag. - Button:
components/ui/buttonwithvariant: 'primary' | 'secondary' | 'ghost'andsize: 'sm' | 'md' | 'lg'; hover transitions ~300ms. - Badge/Tag:
components/ui/badgefor status/tech; no bespoke tag styles. - Toggle/Segmented:
components/segmented-switch; do not create custom toggles. - Animation wrappers:
EaseInfor entrances andTiltCardfor interactive cards (max tilt ≈ 6deg). Use them consistently.
- Brand backgrounds: default
bg-brand-yellow; usebg-brand-pinkonly for intentional sections (e.g., Hire Me). - Cards:
bg-white border-4 border-brand-black hover:border-brand-pink. - Status badges:
- Live:
bg-brand-black text-brand-yellow - In Progress:
bg-brand-yellow text-brand-black - Inactive:
bg-gray-200 text-gray-700 - Special:
bg-brand-pink text-brand-black
- Live:
- Border width:
border-4for cards. - Radius:
rounded-2xl md:rounded-3xlfor cards;rounded-fullfor buttons and badges. - Shadows: default
shadow-lg, hovershadow-2xl, elevatedshadow-xlwhen needed.
- Use
getAnimationDelay(index, 50, 200)for lists andgetAnimationDelay(index, 75, 300)for grids;100, 300for hero. EaseIndefault duration ≈ 500ms; hover transitions ≈ 300ms.- Respect
prefers-reduced-motionand ensure keyboard/focus states.
- Maintain semantic heading hierarchy with
Titleand proper HTML tags. - Ensure keyboard operability for interactive cards and controls.
- Check color contrast when pairing brand colors.
- Do: reuse components, apply tokens, keep styles consistent across pages.
- Do: centralize new patterns into shared components.
- Don’t: introduce raw hex colors or non-brand Tailwind palettes.
- Don’t: hardcode padding/spacing where tokens/utilities exist.
- Don’t: create ad‑hoc buttons/cards/toggles.
- Home page brutalist typography may deviate as designed.
- Hire Me page uses a pink background intentionally.
- UI alignment plan:
UI_ALIGNMENT_PLAN.md - UI consistency analysis:
UI_CONSISTENCY_ANALYSIS.md
When in doubt, follow these rules and the referenced docs; update shared components/utilities instead of adding page-specific styles.