- Reduced motion: scroll down, the button appears without the slide-in
+
+
Reduced motion: the button appears without the slide-in
+
+
-
- Animations are switched off with the animated prop, as they are when the visitor prefers reduced motion. Hover and tap effects are disabled too.
-
- {Array.from({ length: 20 }).map((_, i) => (
-
- Content section {i + 1}
-
- ))}
-);
\ No newline at end of file
+);
diff --git a/src/components/atoms/ScrollToTop/ScrollToTop.tsx b/src/components/atoms/ScrollToTop/ScrollToTop.tsx
index 7845971b..d8e2a22c 100644
--- a/src/components/atoms/ScrollToTop/ScrollToTop.tsx
+++ b/src/components/atoms/ScrollToTop/ScrollToTop.tsx
@@ -64,7 +64,7 @@ const ScrollToTop = ({ animated = true }: ScrollToTopProps) => {
hover: {
y: -5,
scale: 1.05,
- boxShadow: '0 6px 15px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.5)',
+ boxShadow: 'var(--shadow-card-hover)',
transition: {
duration: 0.3
}
diff --git a/src/components/atoms/SecurityBadge/SecurityBadge.css b/src/components/atoms/SecurityBadge/SecurityBadge.css
index 799c57b2..c23b34b4 100644
--- a/src/components/atoms/SecurityBadge/SecurityBadge.css
+++ b/src/components/atoms/SecurityBadge/SecurityBadge.css
@@ -1,230 +1,69 @@
-/* SecurityBadge Component Styles
- * Enhanced with improved readability, dark blue containers, and cybersecurity theming
+/**
+ * SecurityBadge
+ *
+ * Chip family: --radius-chip, --surface-inset fill, --surface-border,
+ * JetBrains Mono xs text, no glow. Level modifiers only change the tone.
*/
.security-badge {
+ --tone: var(--color-primary);
+ --tone-rgb: var(--color-primary-rgb);
+
display: inline-flex;
align-items: center;
- background: linear-gradient(
- 135deg,
- rgba(var(--color-navy-rgb), 0.95) 0%,
- rgba(var(--color-navy-rgb), 0.9) 50%,
- rgba(var(--color-navy-rgb), 0.95) 100%
- );
- padding: var(--spacing-2) var(--spacing-4);
- border-radius: var(--border-radius-pill);
+ gap: var(--spacing-2);
+ box-sizing: border-box;
+ min-height: 1.75rem;
+ padding: 0 var(--spacing-3);
font-family: var(--font-family-jetbrains);
- font-size: var(--font-size-sm);
- font-weight: var(--font-weight-semibold);
- color: var(--color-cyan);
- letter-spacing: var(--letter-spacing-wide);
- border: 1px solid rgba(var(--color-cyan-rgb), 0.4);
- box-shadow:
- 0 3px 10px rgba(0, 0, 0, 0.3),
- 0 0 12px rgba(var(--color-cyan-rgb), 0.1),
- inset 0 1px 0 rgba(var(--color-cyan-rgb), 0.1);
- backdrop-filter: blur(8px);
- position: relative;
- overflow: hidden;
- text-shadow: 0 0 4px rgba(var(--color-cyan-rgb), 0.4);
- min-height: 32px;
-}
-
-/* Enhanced grid pattern overlay */
-.security-badge::before {
- content: '';
- position: absolute;
- inset: 0;
- background:
- repeating-linear-gradient(
- 45deg,
- transparent,
- transparent 1px,
- rgba(var(--color-cyan-rgb), 0.02) 1px,
- rgba(var(--color-cyan-rgb), 0.02) 2px
- );
- opacity: 0.7;
- pointer-events: none;
- border-radius: var(--border-radius-pill);
+ font-size: var(--font-size-xs);
+ font-weight: var(--font-weight-medium);
+ letter-spacing: var(--letter-spacing-technical);
+ color: var(--tone);
+ background: var(--surface-inset);
+ border: 1px solid var(--surface-border-strong);
+ border-radius: var(--radius-chip);
}
.security-badge__icon {
- color: var(--color-cyan);
- margin-right: var(--spacing-2);
- font-size: var(--font-size-base);
- filter: drop-shadow(0 0 3px rgba(var(--color-cyan-rgb), 0.4));
- position: relative;
- z-index: 1;
+ color: var(--tone);
+ font-size: var(--font-size-sm);
+ flex-shrink: 0;
}
.security-badge__text {
- font-weight: var(--font-weight-semibold);
- position: relative;
- z-index: 1;
white-space: nowrap;
}
-/* Hover effects */
-.security-badge:hover {
- border-color: rgba(var(--color-cyan-rgb), 0.6);
- box-shadow:
- 0 4px 12px rgba(0, 0, 0, 0.4),
- 0 0 16px rgba(var(--color-cyan-rgb), 0.15),
- inset 0 1px 0 rgba(var(--color-cyan-rgb), 0.12);
- text-shadow: 0 0 6px rgba(var(--color-cyan-rgb), 0.6);
-}
-
-.security-badge:hover .security-badge__icon {
- filter: drop-shadow(0 0 5px rgba(var(--color-cyan-rgb), 0.6));
-}
-
-/* Security level variants */
+/* Levels */
.security-badge--low {
- color: var(--color-level-low);
- border-color: rgba(var(--color-level-low-rgb), 0.4);
- text-shadow: 0 0 4px rgba(var(--color-level-low-rgb), 0.4);
-}
-
-.security-badge--low .security-badge__icon {
- color: var(--color-level-low);
- filter: drop-shadow(0 0 3px rgba(var(--color-level-low-rgb), 0.4));
-}
-
-.security-badge--low:hover {
- border-color: rgba(var(--color-level-low-rgb), 0.6);
- text-shadow: 0 0 6px rgba(var(--color-level-low-rgb), 0.6);
+ --tone: var(--color-level-low);
+ --tone-rgb: var(--color-level-low-rgb);
}
.security-badge--medium {
- color: var(--color-level-medium);
- border-color: rgba(var(--color-level-medium-rgb), 0.4);
- text-shadow: 0 0 4px rgba(var(--color-level-medium-rgb), 0.4);
-}
-
-.security-badge--medium .security-badge__icon {
- color: var(--color-level-medium);
- filter: drop-shadow(0 0 3px rgba(var(--color-level-medium-rgb), 0.4));
-}
-
-.security-badge--medium:hover {
- border-color: rgba(var(--color-level-medium-rgb), 0.6);
- text-shadow: 0 0 6px rgba(var(--color-level-medium-rgb), 0.6);
+ --tone: var(--color-level-medium);
+ --tone-rgb: var(--color-level-medium-rgb);
}
.security-badge--high {
- color: var(--color-level-high);
- border-color: rgba(var(--color-level-high-rgb), 0.4);
- text-shadow: 0 0 4px rgba(var(--color-level-high-rgb), 0.4);
-}
-
-.security-badge--high .security-badge__icon {
- color: var(--color-level-high);
- filter: drop-shadow(0 0 3px rgba(var(--color-level-high-rgb), 0.4));
-}
-
-.security-badge--high:hover {
- border-color: rgba(var(--color-level-high-rgb), 0.6);
- text-shadow: 0 0 6px rgba(var(--color-level-high-rgb), 0.6);
+ --tone: var(--color-level-high);
+ --tone-rgb: var(--color-level-high-rgb);
}
.security-badge--critical {
- color: var(--color-level-critical);
- border-color: rgba(var(--color-level-critical-rgb), 0.5);
- text-shadow: 0 0 5px rgba(var(--color-level-critical-rgb), 0.5);
- font-weight: var(--font-weight-bold);
- box-shadow:
- 0 4px 12px rgba(0, 0, 0, 0.4),
- 0 0 15px rgba(var(--color-level-critical-rgb), 0.15),
- inset 0 1px 0 rgba(var(--color-level-critical-rgb), 0.1);
-}
-
-.security-badge--critical .security-badge__icon {
- color: var(--color-level-critical);
- filter: drop-shadow(0 0 4px rgba(var(--color-level-critical-rgb), 0.5));
+ --tone: var(--color-level-critical);
+ --tone-rgb: var(--color-level-critical-rgb);
}
-.security-badge--critical:hover {
- border-color: rgba(var(--color-level-critical-rgb), 0.7);
- text-shadow: 0 0 8px rgba(var(--color-level-critical-rgb), 0.7);
- box-shadow:
- 0 5px 15px rgba(0, 0, 0, 0.5),
- 0 0 20px rgba(var(--color-level-critical-rgb), 0.2),
- inset 0 1px 0 rgba(var(--color-level-critical-rgb), 0.15);
+.security-badge--low,
+.security-badge--medium,
+.security-badge--high,
+.security-badge--critical {
+ border-color: rgba(var(--tone-rgb), 0.45);
}
-/* Focus styles for accessibility */
.security-badge:focus-visible {
- outline: 2px solid var(--color-cyan);
- outline-offset: 2px;
-}
-
-.security-badge--low:focus-visible {
- outline-color: var(--color-level-low);
-}
-
-.security-badge--medium:focus-visible {
- outline-color: var(--color-level-medium);
-}
-
-.security-badge--high:focus-visible {
- outline-color: var(--color-level-high);
+ outline: none;
+ box-shadow: var(--ring-focus);
}
-
-.security-badge--critical:focus-visible {
- outline-color: var(--color-level-critical);
-}
-
-/* Responsive adjustments with better touch targets */
-@media (max-width: 768px) {
- .security-badge {
- font-size: var(--font-size-sm);
- padding: var(--spacing-2) var(--spacing-3);
- min-height: 30px;
- }
-
- .security-badge__icon {
- font-size: var(--font-size-sm);
- margin-right: var(--spacing-1);
- }
-}
-
-@media (max-width: 480px) {
- .security-badge {
- font-size: var(--font-size-xs);
- padding: var(--spacing-1) var(--spacing-3);
- min-height: 28px;
- }
-
- .security-badge__icon {
- font-size: var(--font-size-xs);
- margin-right: var(--spacing-1);
- }
-}
-
-/* High contrast mode support */
-@media (prefers-contrast: high) {
- .security-badge {
- border-width: 2px;
- background: rgba(var(--color-navy-rgb), 0.98);
- text-shadow: none;
- }
-
- .security-badge::before {
- display: none;
- }
-
- .security-badge__icon {
- filter: none;
- }
-}
-
-/* Reduced motion preferences */
-@media (prefers-reduced-motion: reduce) {
- .security-badge {
- transition: none;
- }
-
- .security-badge:hover {
- transform: none;
- }
-}
\ No newline at end of file
diff --git a/src/components/atoms/SecurityBadge/SecurityBadge.stories.tsx b/src/components/atoms/SecurityBadge/SecurityBadge.stories.tsx
index 7078a80b..f9b98302 100644
--- a/src/components/atoms/SecurityBadge/SecurityBadge.stories.tsx
+++ b/src/components/atoms/SecurityBadge/SecurityBadge.stories.tsx
@@ -17,7 +17,7 @@ const meta = {
parameters: {
docs: {
description: {
- component: 'Security-themed badge component with icon and text for displaying security credentials or roles.',
+ component: 'Chip-family badge with an icon and text, for credentials or roles: inset fill, 1px border, JetBrains Mono xs text.',
},
},
componentSubtitle: 'A security component for displaying credentials and roles',
@@ -39,7 +39,7 @@ const Template = (args: SecurityBadgeProps) => (
@@ -62,7 +62,7 @@ export const Default: Story = {
export const WithLockIcon: Story = {
render: Template,
args: {
- text: 'Security Clearance: Level 5',
+ text: 'Zero Trust Architect',
icon: FaLock,
animate: true,
},
@@ -74,7 +74,7 @@ export const WithLockIcon: Story = {
export const WithUserShieldIcon: Story = {
render: Template,
args: {
- text: 'Security Administrator',
+ text: 'Incident Commander',
icon: FaUserShield,
animate: true,
},
diff --git a/src/components/atoms/SecurityClassification/SecurityClassification.css b/src/components/atoms/SecurityClassification/SecurityClassification.css
index d03fee75..32e9d51f 100644
--- a/src/components/atoms/SecurityClassification/SecurityClassification.css
+++ b/src/components/atoms/SecurityClassification/SecurityClassification.css
@@ -1,31 +1,33 @@
/**
- * SecurityClassification Atom Component Styles
- * Isolated security classification banner with animated bars
+ * SecurityClassification
+ *
+ * A classification banner. Same family as the chips: inset fill, hairline
+ * border, small mono text, no glow. Colour carries the level: cyan for the
+ * default (declassified), green for secure, and red only for the alarming
+ * levels (breach, critical).
*/
.security-classification {
+ --tone-rgb: var(--color-primary-rgb);
+ --tone: var(--color-primary);
+
display: flex;
align-items: center;
justify-content: space-between;
- padding: 0.75rem 1rem;
+ padding: var(--spacing-2) var(--spacing-4);
margin: 0 -2rem 1.5rem;
- background: linear-gradient(
- 90deg,
- rgba(var(--color-cyan-rgb), 0.1),
- rgba(var(--color-cyan-rgb), 0.05),
- rgba(var(--color-cyan-rgb), 0.1)
- );
- border-top: 1px solid rgba(var(--color-cyan-rgb), 0.3);
- border-bottom: 1px solid rgba(var(--color-cyan-rgb), 0.3);
+ background: var(--surface-inset);
+ border-top: 1px solid rgba(var(--tone-rgb), 0.3);
+ border-bottom: 1px solid rgba(var(--tone-rgb), 0.3);
font-family: var(--font-family-jetbrains);
}
.security-classification__label {
- color: var(--color-cyan);
- font-size: 0.8rem;
- font-weight: 700;
- letter-spacing: 2px;
- text-shadow: 0 0 8px rgba(var(--color-cyan-rgb), 0.5);
+ color: var(--tone);
+ font-size: var(--font-size-xs);
+ font-weight: var(--font-weight-semibold);
+ letter-spacing: var(--letter-spacing-technical);
+ text-transform: uppercase;
}
.security-classification__bars {
@@ -36,72 +38,21 @@
.security-classification__bar {
width: 3px;
height: 16px;
- background: rgba(var(--color-cyan-rgb), 0.6);
+ background: rgba(var(--tone-rgb), 0.6);
border-radius: 1px;
}
-/* Variant Styles */
.security-classification--secure {
- background: linear-gradient(
- 90deg,
- rgba(34, 197, 94, 0.1),
- rgba(34, 197, 94, 0.05),
- rgba(34, 197, 94, 0.1)
- );
- border-top-color: rgba(34, 197, 94, 0.3);
- border-bottom-color: rgba(34, 197, 94, 0.3);
-}
-
-.security-classification--secure .security-classification__label {
- color: var(--color-green-400);
- text-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
-}
-
-.security-classification--secure .security-classification__bar {
- background: rgba(34, 197, 94, 0.6);
-}
-
-.security-classification--breach {
- background: linear-gradient(
- 90deg,
- rgba(248, 113, 113, 0.1),
- rgba(248, 113, 113, 0.05),
- rgba(248, 113, 113, 0.1)
- );
- border-top-color: rgba(248, 113, 113, 0.3);
- border-bottom-color: rgba(248, 113, 113, 0.3);
-}
-
-.security-classification--breach .security-classification__label {
- color: var(--color-red-400);
- text-shadow: 0 0 8px rgba(248, 113, 113, 0.5);
-}
-
-.security-classification--breach .security-classification__bar {
- background: rgba(248, 113, 113, 0.6);
+ --tone-rgb: var(--color-level-low-rgb);
+ --tone: var(--color-level-low);
}
+.security-classification--breach,
.security-classification--critical {
- background: linear-gradient(
- 90deg,
- rgba(251, 191, 36, 0.1),
- rgba(251, 191, 36, 0.05),
- rgba(251, 191, 36, 0.1)
- );
- border-top-color: rgba(251, 191, 36, 0.3);
- border-bottom-color: rgba(251, 191, 36, 0.3);
-}
-
-.security-classification--critical .security-classification__label {
- color: var(--color-yellow-400);
- text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
+ --tone-rgb: var(--color-level-critical-rgb);
+ --tone: var(--color-level-critical);
}
-.security-classification--critical .security-classification__bar {
- background: rgba(251, 191, 36, 0.6);
-}
-
-/* Responsive adjustments */
@media (max-width: 768px) {
.security-classification {
margin: 0 -1.25rem 1.25rem;
@@ -111,13 +62,6 @@
@media (max-width: 480px) {
.security-classification {
margin: 0 -1rem 1rem;
- padding: 0.5rem 0.75rem;
+ padding: var(--spacing-2) var(--spacing-3);
}
}
-
-/* Reduced motion */
-@media (prefers-reduced-motion: reduce) {
- .security-classification__bar {
- animation: none;
- }
-}
\ No newline at end of file
diff --git a/src/components/atoms/SecurityClassification/SecurityClassification.stories.tsx b/src/components/atoms/SecurityClassification/SecurityClassification.stories.tsx
index 71816f51..13b4e7b2 100644
--- a/src/components/atoms/SecurityClassification/SecurityClassification.stories.tsx
+++ b/src/components/atoms/SecurityClassification/SecurityClassification.stories.tsx
@@ -6,14 +6,19 @@ const meta = {
component: SecurityClassification,
parameters: {
layout: 'centered',
- backgrounds: {
- default: 'dark',
- values: [
- { name: 'dark', value: '#0a192f' },
- { name: 'navy', value: '#162b3d' },
- ],
+ docs: {
+ description: {
+ component: 'A classification banner in the chip family. Cyan is the neutral default (declassified), green is secure, and red is kept for the alarming levels (breach, critical).',
+ },
},
},
+ decorators: [
+ (Story) => (
+
+
+
+ ),
+ ],
argTypes: {
animated: { control: 'boolean', description: 'Play animations; reduced motion always turns them off' },
variant: {
@@ -66,7 +71,7 @@ export const Critical: Story = {
export const CustomLabel: Story = {
args: {
- label: 'TOP SECRET',
+ label: 'INTERNAL USE ONLY',
variant: 'default',
expanded: true
}
diff --git a/src/components/atoms/SkeletonCard/SkeletonCard.css b/src/components/atoms/SkeletonCard/SkeletonCard.css
index c3216f22..07b8416c 100644
--- a/src/components/atoms/SkeletonCard/SkeletonCard.css
+++ b/src/components/atoms/SkeletonCard/SkeletonCard.css
@@ -1,246 +1,108 @@
-/**
- * SkeletonCard Component
- *
- * Styles for the skeleton loading cards with security-themed variants.
- * Note: Animations are now managed by framer-motion through the AnimationContext
+/*
+ * SkeletonCard: loading placeholders on the shared card surface.
+ * Blocks use the inset fill; a soft cyan-navy shimmer sweeps across.
+ * Shimmer is hidden for reduced motion and when animation is off.
*/
-/* Base skeleton card */
[class*="-card-skeleton"] {
position: relative;
overflow: hidden;
- background-color: var(--color-gray-100);
- border-radius: var(--border-radius);
- padding: 1rem;
- margin-bottom: 1rem;
- /* Animation removed - now handled by framer-motion */
+ background: var(--surface-card);
+ border: 1px solid var(--surface-border);
+ border-radius: var(--radius-card);
+ box-shadow: var(--shadow-card);
+ padding: var(--spacing-4);
+ margin-bottom: var(--spacing-4);
}
-/* Security-themed skeleton cards */
[class*="-card-skeleton"].security {
- background-color: var(--color-navy);
- border: 1px solid rgba(var(--color-cyan-rgb), 0.3);
- padding: 1rem;
+ border-color: var(--surface-border-strong);
}
-/* Terminal-themed skeleton cards */
[class*="-card-skeleton"].terminal {
- background-color: var(--color-navy);
- border: 1px solid var(--color-cyan);
- border-left: 3px solid var(--color-cyan);
- padding: 1rem;
font-family: var(--font-family-jetbrains);
}
-/* Elements in skeleton cards */
+/* Placeholder blocks */
.skeleton-title,
.skeleton-description,
.skeleton-tags,
.skeleton-actions,
.skeleton-header,
-.skeleton-subtitle {
- background-color: var(--color-gray-200);
- border-radius: var(--border-radius-sm);
- margin-bottom: 0.5rem;
-}
-
-/* Security-themed elements */
-.security .skeleton-title,
-.security .skeleton-description,
-.security .skeleton-tags,
-.security .skeleton-actions,
-.security .skeleton-header,
-.security .skeleton-subtitle {
- background-color: rgba(var(--color-navy-rgb), 0.5);
- border: 1px solid rgba(var(--color-cyan-rgb), 0.1);
-}
-
-/* Terminal-themed elements */
-.terminal .skeleton-title,
-.terminal .skeleton-description,
-.terminal .skeleton-tags,
-.terminal .skeleton-actions,
-.terminal .skeleton-header,
-.terminal .skeleton-subtitle {
- background-color: rgba(var(--color-navy-rgb), 0.7);
- border: 1px dashed rgba(var(--color-cyan-rgb), 0.2);
-}
-
-/* Specific element dimensions */
-.skeleton-title {
- height: 1.5rem;
- width: 70%;
-}
-
-.skeleton-description {
- height: 1rem;
- width: 100%;
+.skeleton-subtitle,
+.skeleton-image,
+.skeleton-image-circle,
+.skeleton-icon,
+.skeleton-name {
+ background-color: var(--surface-inset);
+ border: 1px solid var(--surface-divider);
}
+.skeleton-title,
+.skeleton-description,
+.skeleton-tags,
+.skeleton-actions,
+.skeleton-header,
.skeleton-subtitle {
- height: 1rem;
- width: 50%;
-}
-
-.skeleton-tags {
- height: 1.5rem;
- width: 80%;
-}
-
-.skeleton-actions {
- height: 2rem;
- width: 50%;
-}
-
-.skeleton-header {
- height: 2rem;
- width: 100%;
+ border-radius: var(--radius-control);
+ margin-bottom: var(--spacing-2);
}
-/* Security-themed title */
-.security .skeleton-title {
- border-left: 3px solid var(--color-cyan);
-}
-
-/* Terminal-themed description */
-.terminal .skeleton-description {
- height: 0.8rem;
- margin-bottom: 0.8rem;
-}
+.skeleton-title { height: 1.5rem; width: 70%; }
+.skeleton-description { height: 1rem; width: 100%; }
+.skeleton-subtitle { height: 1rem; width: 50%; }
+.skeleton-tags { height: 1.5rem; width: 80%; border-radius: var(--radius-chip); }
+.skeleton-actions { height: 2rem; width: 50%; }
+.skeleton-header { height: 2rem; width: 100%; }
-/* Image placeholders */
.skeleton-image {
width: 100%;
height: 160px;
- background-color: var(--color-gray-200);
- border-radius: var(--border-radius-sm);
- margin-bottom: 1rem;
+ border-radius: var(--radius-control);
+ margin-bottom: var(--spacing-4);
}
.skeleton-image-circle {
width: 60px;
height: 60px;
- background-color: var(--color-gray-200);
border-radius: 50%;
- margin-bottom: 1rem;
+ margin-bottom: var(--spacing-4);
}
-/* Security-themed images */
-.security .skeleton-image,
-.security .skeleton-image-circle {
- background-color: rgba(var(--color-navy-rgb), 0.5);
- border: 1px solid rgba(var(--color-cyan-rgb), 0.2);
-}
-
-/* Terminal-themed images */
-.terminal .skeleton-image {
- border: 1px dashed var(--color-cyan);
- background-color: rgba(var(--color-navy-rgb), 0.7);
-}
-
-.terminal .skeleton-image-circle {
- border: 1px dashed var(--color-cyan);
- background-color: transparent;
-}
-
-/* Icon placeholder */
.skeleton-icon {
width: 3rem;
height: 3rem;
- background-color: var(--color-gray-200);
- border-radius: var(--border-radius-sm);
- margin: 0 auto 0.5rem;
-}
-
-/* Security-themed icon */
-.security .skeleton-icon {
- background-color: rgba(var(--color-navy-rgb), 0.5);
- border: 1px solid rgba(var(--color-cyan-rgb), 0.3);
- border-radius: 8px;
-}
-
-/* Terminal-themed icon */
-.terminal .skeleton-icon {
- background-color: rgba(var(--color-navy-rgb), 0.7);
- border: 1px dashed var(--color-cyan);
- border-radius: 4px;
+ border-radius: var(--radius-control);
+ margin: 0 auto var(--spacing-2);
}
-/* Skill name placeholder */
.skeleton-name {
width: 80%;
height: 1rem;
- background-color: var(--color-gray-200);
- border-radius: var(--border-radius-sm);
+ border-radius: var(--radius-control);
margin: 0 auto;
}
-/* Security-themed name */
-.security .skeleton-name {
- background-color: rgba(var(--color-navy-rgb), 0.5);
- border: 1px solid rgba(var(--color-cyan-rgb), 0.1);
-}
-
-/* Terminal-themed name */
-.terminal .skeleton-name {
- background-color: rgba(var(--color-navy-rgb), 0.7);
- border: 1px dashed rgba(var(--color-cyan-rgb), 0.2);
-}
-
-/* Shimmer effect overlay - static styling, animation now handled by framer-motion */
+/* Shimmer overlay: position is driven by framer-motion */
.skeleton-shimmer {
position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: linear-gradient(
- 90deg,
- rgba(255, 255, 255, 0) 0%,
- rgba(255, 255, 255, 0.2) 50%,
- rgba(255, 255, 255, 0) 100%
- );
- background-size: 200% 100%;
- /* Animation removed - now handled by framer-motion */
-}
-
-/* Security-themed shimmer */
-.security .skeleton-shimmer {
+ inset: 0;
+ pointer-events: none;
background: linear-gradient(
90deg,
- rgba(var(--color-cyan-rgb), 0) 0%,
- rgba(var(--color-cyan-rgb), 0.1) 50%,
- rgba(var(--color-cyan-rgb), 0) 100%
+ transparent 0%,
+ rgba(var(--color-primary-rgb), 0.08) 50%,
+ transparent 100%
);
background-size: 200% 100%;
- /* Animation removed - now handled by framer-motion */
}
-/* Terminal-themed shimmer */
-.terminal .skeleton-shimmer {
- background: linear-gradient(
- 90deg,
- rgba(var(--color-navy-rgb), 0) 0%,
- rgba(var(--color-cyan-rgb), 0.05) 50%,
- rgba(var(--color-navy-rgb), 0) 100%
- );
- background-size: 200% 100%;
- /* Animation removed - now handled by framer-motion */
+.skeleton-static .skeleton-shimmer {
+ display: none;
}
-/*
- * Animations removed - now implemented with framer-motion variants
- * @keyframes fadeIn {...}
- * @keyframes shimmer {...}
- */
-
-/* Reduced motion preferences - No longer needed as handled by AnimationContext */
@media (prefers-reduced-motion: reduce) {
- [class*="-card-skeleton"] {
- /* No CSS animations to disable - framer-motion handles reduced motion preferences */
- }
-
.skeleton-shimmer {
- /* No CSS animations to disable - framer-motion handles reduced motion preferences */
+ display: none;
}
}
diff --git a/src/components/atoms/SkeletonCard/SkeletonCard.tsx b/src/components/atoms/SkeletonCard/SkeletonCard.tsx
index 4cc287d5..5598eed7 100644
--- a/src/components/atoms/SkeletonCard/SkeletonCard.tsx
+++ b/src/components/atoms/SkeletonCard/SkeletonCard.tsx
@@ -38,6 +38,7 @@ const SkeletonCard = ({
const combinedClassName = [
baseClass,
variant, // Will add 'security' or 'terminal' class if provided
+ shouldAnimate ? '' : 'skeleton-static',
className
].filter(Boolean).join(' ');
diff --git a/src/components/atoms/Skill/Skill.css b/src/components/atoms/Skill/Skill.css
index 9d9286ff..418fa960 100644
--- a/src/components/atoms/Skill/Skill.css
+++ b/src/components/atoms/Skill/Skill.css
@@ -1,12 +1,8 @@
-/**
- * Skill Component
- *
- * Styles for the Skill component following atomic design principles.
- * Updated with improved readability, dark blue containers, and enhanced cybersecurity theming.
- * Animations now handled by framer-motion.
+/*
+ * Skill: an icon tile on the shared card surface, with an optional
+ * proficiency badge. Animations are handled by framer-motion.
*/
-/* Base skill icon wrapper with improved spacing */
.skill-icon-wrapper {
position: relative;
display: inline-flex;
@@ -15,380 +11,96 @@
margin: var(--spacing-2);
cursor: pointer;
padding: var(--spacing-1);
- border-radius: 8px;
- transition: none; /* animations handled by framer-motion */
+ border-radius: var(--radius-card);
}
-/* Skill icon container with dark blue background */
.skill-icon {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
- border-radius: 8px;
- background: linear-gradient(
- 135deg,
- rgba(var(--color-navy-rgb), 0.95) 0%,
- rgba(var(--color-navy-rgb), 0.9) 100%
- );
- border: 1px solid rgba(var(--color-cyan-rgb), 0.3);
- overflow: hidden;
- box-shadow:
- 0 3px 8px rgba(0, 0, 0, 0.3),
- 0 0 12px rgba(var(--color-cyan-rgb), 0.08),
- inset 0 1px 0 rgba(var(--color-cyan-rgb), 0.1);
- backdrop-filter: blur(8px);
+ border-radius: var(--radius-card);
+ background: var(--surface-card);
+ border: 1px solid var(--surface-border);
+ box-shadow: var(--shadow-card);
position: relative;
}
-/* Enhanced grid pattern for skill icons */
-.skill-icon::after {
- content: '';
- position: absolute;
- inset: 0;
- background:
- repeating-linear-gradient(
- 0deg,
- transparent,
- transparent 1px,
- rgba(var(--color-cyan-rgb), 0.02) 1px,
- rgba(var(--color-cyan-rgb), 0.02) 2px
- ),
- repeating-linear-gradient(
- 90deg,
- transparent,
- transparent 1px,
- rgba(var(--color-cyan-rgb), 0.02) 1px,
- rgba(var(--color-cyan-rgb), 0.02) 2px
- );
- opacity: 0.6;
- pointer-events: none;
-}
-
-/* Enhanced security-themed skill icon */
.skill-security .skill-icon {
- background: linear-gradient(
- 135deg,
- rgba(var(--color-navy-rgb), 0.98) 0%,
- rgba(var(--color-navy-rgb), 0.95) 100%
- );
- border: 1px solid rgba(var(--color-cyan-rgb), 0.5);
- box-shadow:
- 0 4px 12px rgba(0, 0, 0, 0.4),
- 0 0 15px rgba(var(--color-cyan-rgb), 0.15),
- inset 0 1px 0 rgba(var(--color-cyan-rgb), 0.12);
- backdrop-filter: blur(10px);
-}
-
-.skill-security .skill-icon::after {
- background:
- repeating-linear-gradient(
- 45deg,
- transparent,
- transparent 1px,
- rgba(var(--color-cyan-rgb), 0.03) 1px,
- rgba(var(--color-cyan-rgb), 0.03) 2px
- );
- opacity: 0.8;
-}
-
-/* Size variants with improved proportions */
-.skill-icon-sm {
- width: 2.75rem;
- height: 2.75rem;
+ background: var(--surface-card-raised);
+ border-color: var(--surface-border-strong);
}
-.skill-icon-md {
- width: 3.75rem;
- height: 3.75rem;
-}
+/* Sizes */
+.skill-icon-sm { width: 2.75rem; height: 2.75rem; }
+.skill-icon-md { width: 3.75rem; height: 3.75rem; }
+.skill-icon-lg { width: 5.25rem; height: 5.25rem; }
-.skill-icon-lg {
- width: 5.25rem;
- height: 5.25rem;
-}
-
-/* Security size variants with slightly larger dimensions */
-.skill-security.skill-icon-sm {
- width: 3rem;
- height: 3rem;
-}
-
-.skill-security.skill-icon-md {
- width: 4rem;
- height: 4rem;
-}
-
-.skill-security.skill-icon-lg {
- width: 5.5rem;
- height: 5.5rem;
-}
+.skill-security.skill-icon-sm { width: 3rem; height: 3rem; }
+.skill-security.skill-icon-md { width: 4rem; height: 4rem; }
+.skill-security.skill-icon-lg { width: 5.5rem; height: 5.5rem; }
-/* Enhanced skill SVG icon with better contrast */
.skill-icon-svg {
width: 1.75rem;
height: 1.75rem;
- color: var(--color-cyan);
- filter: drop-shadow(0 0 3px rgba(var(--color-cyan-rgb), 0.3));
+ color: var(--color-primary);
position: relative;
- z-index: 1;
}
-.skill-icon-sm .skill-icon-svg {
- width: 1.5rem;
- height: 1.5rem;
-}
-
-.skill-icon-md .skill-icon-svg {
- width: 2rem;
- height: 2rem;
-}
-
-.skill-icon-lg .skill-icon-svg {
- width: 2.75rem;
- height: 2.75rem;
-}
-
-/* Enhanced security-themed skill SVG icon */
-.skill-security .skill-icon-svg {
- color: var(--color-cyan);
- filter: drop-shadow(0 0 4px rgba(var(--color-cyan-rgb), 0.6));
- text-shadow: 0 0 8px rgba(var(--color-cyan-rgb), 0.4);
-}
+.skill-icon-sm .skill-icon-svg { width: 1.5rem; height: 1.5rem; }
+.skill-icon-md .skill-icon-svg { width: 2rem; height: 2rem; }
+.skill-icon-lg .skill-icon-svg { width: 2.75rem; height: 2.75rem; }
-/* Improved proficiency level indicator */
+/* Proficiency badge: a small mono chip on the tile corner */
.skill-level {
position: absolute;
bottom: -6px;
right: -6px;
- width: 1.2rem;
- height: 1.2rem;
- border-radius: 50%;
- background: linear-gradient(
- 135deg,
- var(--color-cyan) 0%,
- color-mix(in srgb, var(--color-cyan) 85%, var(--color-primary-dark)) 100%
- );
- border: 2px solid rgba(var(--color-navy-rgb), 0.9);
+ min-width: 1.25rem;
+ height: 1.25rem;
+ padding: 0 var(--spacing-1);
+ border-radius: var(--radius-chip);
+ background: var(--surface-card-raised);
+ border: 1px solid var(--color-primary);
+ color: var(--color-primary);
display: flex;
justify-content: center;
align-items: center;
- font-size: 0.7rem;
- color: var(--color-navy);
+ font-size: var(--font-size-xs);
font-weight: var(--font-weight-bold);
font-family: var(--font-family-jetbrains);
- box-shadow:
- 0 2px 6px rgba(0, 0, 0, 0.3),
- 0 0 8px rgba(var(--color-cyan-rgb), 0.3);
- text-shadow: 0 1px 1px rgba(var(--color-navy-rgb), 0.3);
z-index: 2;
}
-/* Enhanced security-themed proficiency levels */
-.skill-security .skill-level {
- bottom: -8px;
- right: -8px;
- width: 1.4rem;
- height: 1.4rem;
- background: linear-gradient(
- 135deg,
- rgba(var(--color-navy-rgb), 0.95) 0%,
- rgba(var(--color-navy-rgb), 0.9) 100%
- );
- border: 2px solid var(--color-cyan);
- color: var(--color-cyan);
- font-family: var(--font-family-jetbrains);
- box-shadow:
- 0 3px 8px rgba(0, 0, 0, 0.4),
- 0 0 10px rgba(var(--color-cyan-rgb), 0.3),
- inset 0 1px 0 rgba(var(--color-cyan-rgb), 0.1);
- text-shadow: 0 0 4px rgba(var(--color-cyan-rgb), 0.5);
-}
-
-.skill-security .skill-level.level-1 {
- background: linear-gradient(
- 135deg,
- var(--color-level-low) 0%,
- color-mix(in srgb, var(--color-level-low) 85%, black) 100%
- );
- color: var(--color-white);
- border-color: var(--color-level-low);
- text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
-}
-
-.skill-security .skill-level.level-2 {
- background: linear-gradient(
- 135deg,
- var(--color-level-medium) 0%,
- color-mix(in srgb, var(--color-level-medium) 85%, black) 100%
- );
+/* Higher levels read as stronger, not as danger: cyan fills in */
+.skill-level.level-4,
+.skill-level.level-5 {
+ background: var(--color-primary);
color: var(--color-navy);
- border-color: var(--color-level-medium);
- text-shadow: 0 1px 1px rgba(var(--color-navy-rgb), 0.3);
-}
-
-.skill-security .skill-level.level-3 {
- background: linear-gradient(
- 135deg,
- var(--color-level-high) 0%,
- color-mix(in srgb, var(--color-level-high) 85%, black) 100%
- );
- color: var(--color-white);
- border-color: var(--color-level-high);
- text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}
-.skill-security .skill-level.level-4 {
- background: linear-gradient(
- 135deg,
- var(--color-level-critical) 0%,
- color-mix(in srgb, var(--color-level-critical) 85%, black) 100%
- );
- color: var(--color-white);
- border-color: var(--color-level-critical);
- text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
- box-shadow:
- 0 3px 8px rgba(0, 0, 0, 0.4),
- 0 0 12px rgba(var(--color-level-critical-rgb), 0.4);
-}
-
-.skill-security .skill-level.level-5 {
- background: linear-gradient(
- 135deg,
- var(--color-level-critical) 0%,
- color-mix(in srgb, var(--color-level-critical) 90%, white) 100%
- );
- color: var(--color-white);
- border-color: color-mix(in srgb, var(--color-level-critical) 90%, white);
- text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
- box-shadow:
- 0 4px 10px rgba(0, 0, 0, 0.5),
- 0 0 15px rgba(var(--color-level-critical-rgb), 0.5),
- inset 0 1px 0 rgba(255, 255, 255, 0.1);
- animation: critical-pulse 2s ease-in-out infinite alternate;
-}
-
-@keyframes critical-pulse {
- 0% {
- box-shadow:
- 0 4px 10px rgba(0, 0, 0, 0.5),
- 0 0 15px rgba(var(--color-level-critical-rgb), 0.5);
- }
- 100% {
- box-shadow:
- 0 4px 10px rgba(0, 0, 0, 0.5),
- 0 0 20px rgba(var(--color-level-critical-rgb), 0.7);
- }
-}
-
-/* Hover enhancement for skill wrapper */
.skill-icon-wrapper:hover .skill-icon {
- border-color: rgba(var(--color-cyan-rgb), 0.5);
- box-shadow:
- 0 4px 12px rgba(0, 0, 0, 0.4),
- 0 0 16px rgba(var(--color-cyan-rgb), 0.15),
- inset 0 1px 0 rgba(var(--color-cyan-rgb), 0.12);
+ border-color: var(--surface-border-strong);
+ box-shadow: var(--shadow-card-hover);
}
-.skill-icon-wrapper:hover .skill-icon-svg {
- filter: drop-shadow(0 0 5px rgba(var(--color-cyan-rgb), 0.5));
-}
-
-.skill-security .skill-icon-wrapper:hover .skill-icon {
- border-color: rgba(var(--color-cyan-rgb), 0.7);
- box-shadow:
- 0 5px 15px rgba(0, 0, 0, 0.5),
- 0 0 20px rgba(var(--color-cyan-rgb), 0.2),
- inset 0 1px 0 rgba(var(--color-cyan-rgb), 0.15);
-}
-
-.skill-security .skill-icon-wrapper:hover .skill-icon-svg {
- filter: drop-shadow(0 0 6px rgba(var(--color-cyan-rgb), 0.7));
-}
-
-/* Accessibility: Enhanced focus styles */
.skill-icon-wrapper:focus-visible {
- outline: 2px solid var(--color-cyan);
- outline-offset: 3px;
- border-radius: 10px;
-}
-
-.skill-security:focus-visible {
- outline: 2px solid var(--color-cyan);
- outline-offset: 3px;
- box-shadow:
- 0 0 0 4px rgba(var(--color-cyan-rgb), 0.3),
- 0 4px 12px rgba(0, 0, 0, 0.4);
-}
-
-/* Reduced motion support */
-@media (prefers-reduced-motion: reduce) {
- .skill-security .skill-level.level-5 {
- animation: none;
- }
-
- @keyframes critical-pulse {
- 0%, 100% {
- box-shadow:
- 0 4px 10px rgba(0, 0, 0, 0.5),
- 0 0 15px rgba(var(--color-level-critical-rgb), 0.5);
- }
- }
+ box-shadow: var(--ring-focus);
+ outline: none;
}
-/* High contrast mode support */
@media (prefers-contrast: high) {
- .skill-icon {
- border-width: 2px;
- background: rgba(var(--color-navy-rgb), 0.98);
- }
-
- .skill-icon::after {
- display: none;
- }
-
- .skill-icon-svg {
- filter: none;
- text-shadow: none;
- }
-
- .skill-level {
- border-width: 3px;
- font-weight: var(--font-weight-bold);
- }
+ .skill-icon { border-width: 2px; }
+ .skill-level { border-width: 2px; }
}
-/* Responsive adjustments */
@media (max-width: 768px) {
.skill-icon-wrapper {
margin: var(--spacing-1);
padding: calc(var(--spacing-1) / 2);
}
-
- .skill-icon-sm {
- width: 2.5rem;
- height: 2.5rem;
- }
-
- .skill-icon-md {
- width: 3.5rem;
- height: 3.5rem;
- }
-
- .skill-icon-lg {
- width: 4.75rem;
- height: 4.75rem;
- }
-
- .skill-level {
- width: 1.1rem;
- height: 1.1rem;
- font-size: 0.65rem;
- }
-
- .skill-security .skill-level {
- width: 1.25rem;
- height: 1.25rem;
- }
-}
\ No newline at end of file
+ .skill-icon-sm { width: 2.5rem; height: 2.5rem; }
+ .skill-icon-md { width: 3.5rem; height: 3.5rem; }
+ .skill-icon-lg { width: 4.75rem; height: 4.75rem; }
+}
diff --git a/src/components/atoms/Skill/Skill.stories.tsx b/src/components/atoms/Skill/Skill.stories.tsx
index b174bb23..76e51566 100644
--- a/src/components/atoms/Skill/Skill.stories.tsx
+++ b/src/components/atoms/Skill/Skill.stories.tsx
@@ -132,8 +132,9 @@ const exampleSkills = [
const SkillContainer = ({ children, style = {} }: { children: ReactNode; style?: CSSProperties }) => (
{children}
@@ -142,8 +143,15 @@ const SkillContainer = ({ children, style = {} }: { children: ReactNode; style?:
// Default skill
export const Default: StoryFn = () => (
-
-
+
+
+ Toolbox
+
+
+ {exampleSkills.map((skill, index) => (
+
+ ))}
+
);
@@ -152,15 +160,15 @@ export const Sizes: StoryFn = () => (
-
Small
+ Small
-
Medium
+ Medium
-
Large
+ Large
@@ -172,11 +180,11 @@ export const Variants: StoryFn = () => (
-
Default
+ Default
-
Security
+ Security
@@ -189,7 +197,7 @@ export const WithLevels: StoryFn = () => (
{exampleSkills.slice(0, 5).map((skill, index) => (
-
Level {skill.level}
+
Level {skill.level}
(
-
Frontend
+
Frontend
{exampleSkills
.filter(skill => skill.category === 'frontend')
@@ -241,7 +249,7 @@ export const SkillGrid: StoryFn = () => (
-
Backend
+
Backend
{exampleSkills
.filter(skill => skill.category === 'backend')
@@ -258,7 +266,7 @@ export const SkillGrid: StoryFn = () => (
-
DevOps & Cloud
+
DevOps & Cloud
{exampleSkills
.filter(skill => ['devops', 'cloud'].includes(skill.category))
@@ -281,7 +289,7 @@ export const SkillGrid: StoryFn = () => (
export const Responsive: StoryFn = () => (
- Desktop View
+ Desktop View
(
- Mobile View
+ Mobile View
(
-
-
+
{showNavigation && (
-
-
-
+
+
{['Home', 'About', 'Projects', 'Contact'].map((item) => (
- {
- e.target.style.backgroundColor = variant.includes('security') || variant.includes('terminal')
- ? 'rgba(100, 255, 218, 0.1)'
- : '#e0e0e0';
- }}
- onBlur={(e) => {
- e.target.style.backgroundColor = 'transparent';
+ padding: '0.5rem 0.75rem',
+ borderRadius: 'var(--radius-control)',
}}
>
{item}
@@ -125,17 +105,8 @@ const PageLayout = ({ children, mainContent, variant = '', showNavigation = true
)}
-
-
+
+
{mainContent || children}
@@ -144,11 +115,15 @@ const PageLayout = ({ children, mainContent, variant = '', showNavigation = true
// Default example
export const Default: StoryFn = () => (
- Main Content Area
- Press Tab to see the skip link. It will appear at the top of the page when focused.
- This helps keyboard users bypass the navigation menu and jump directly to the main content.
+ Derek Mackley
+ The skip link is hidden until it takes focus. It is focused here so you can see it; press Tab on any page to reveal it.
+ It lets keyboard users jump past the navigation straight to this content.
);
+Default.play = async ({ canvasElement }) => {
+ await userEvent.tab();
+ await expect(within(canvasElement).getByRole('link', { name: 'Skip to main content' })).toHaveFocus();
+};
// Security variant
export const SecurityVariant: StoryFn = () => (
@@ -163,7 +138,7 @@ export const SecurityVariant: StoryFn = () => (
export const TerminalVariant: StoryFn = () => (
Terminal-Themed Content
- This variant uses a terminal-like appearance with dashed borders.
+ This variant uses a terminal-like appearance with a mono face.
Press Tab to see the terminal-styled skip link.
);
@@ -183,20 +158,20 @@ export const Interactive: StoryFn = () => {
Focus Order:
Skip Link (on first Tab)
Navigation Items
Main Content
@@ -221,7 +196,7 @@ export const KeyboardNavigation: StoryFn = () => (
marginTop: '20px',
padding: '15px',
background: 'rgba(100, 255, 218, 0.1)',
- border: '1px solid var(--color-cyan, #64ffda)',
+ border: '1px solid var(--color-primary)',
borderRadius: '4px'
}}>
Focus Management
@@ -246,7 +221,7 @@ export const Responsive: StoryFn = () => (
marginBottom: '10px'
}}>Desktop View
@@ -268,7 +243,7 @@ export const Responsive: StoryFn = () => (
marginBottom: '10px'
}}>Mobile View
(
marginTop: '20px',
padding: '15px',
background: 'rgba(100, 255, 218, 0.1)',
- border: '1px solid var(--color-cyan, #64ffda)',
+ border: '1px solid var(--color-primary)',
borderRadius: '4px'
}}>
Testing Notes
diff --git a/src/components/atoms/TechBadge/TechBadge.css b/src/components/atoms/TechBadge/TechBadge.css
index 056ef73a..199a3e16 100644
--- a/src/components/atoms/TechBadge/TechBadge.css
+++ b/src/components/atoms/TechBadge/TechBadge.css
@@ -1,394 +1,92 @@
/**
- * TechBadge Component Styles
- * Styling for the TechBadge component with improved readability and cybersecurity theming
- * Enhanced with darker blue containers and better contrast for accessibility
+ * TechBadge
+ *
+ * Part of the chip family (TechBadge, SecurityBadge, DateChip,
+ * SecurityClassification, SkillChip): --radius-chip, --surface-inset fill,
+ * --surface-border, small JetBrains Mono text, no glow.
*/
-/* Base styles with improved readability and dark blue container */
.tech-badge {
- background: linear-gradient(
- 135deg,
- rgba(var(--color-navy-rgb), 0.95) 0%,
- rgba(var(--color-navy-rgb), 0.9) 100%
- );
- color: var(--color-cyan);
- font-size: var(--font-size-sm);
- font-weight: var(--font-weight-semibold);
- padding: var(--spacing-2) var(--spacing-3);
- border-radius: 6px;
+ --chip-tone-rgb: var(--color-offwhite-rgb);
+
+ display: inline-flex;
+ align-items: center;
+ box-sizing: border-box;
+ min-height: 1.75rem;
+ padding: 0 var(--spacing-3);
font-family: var(--font-family-jetbrains);
- white-space: nowrap;
- display: inline-block;
- border: 1px solid rgba(var(--color-cyan-rgb), 0.4);
- will-change: transform, background-color;
- text-shadow: 0 0 4px rgba(var(--color-cyan-rgb), 0.4);
- position: relative;
- box-shadow:
- 0 3px 8px rgba(0, 0, 0, 0.3),
- 0 0 12px rgba(var(--color-cyan-rgb), 0.1),
- inset 0 1px 0 rgba(var(--color-cyan-rgb), 0.1);
- overflow: hidden;
- letter-spacing: var(--letter-spacing-wide);
- backdrop-filter: blur(8px);
- min-height: 28px;
+ font-size: var(--font-size-xs);
+ font-weight: var(--font-weight-medium);
+ letter-spacing: var(--letter-spacing-technical);
line-height: 1.2;
+ white-space: nowrap;
+ color: var(--color-offwhite);
+ background: var(--surface-inset);
+ border: 1px solid var(--surface-border);
+ border-radius: var(--radius-chip);
+ transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
-/* Enhanced decoration with subtle grid pattern */
-.tech-badge::after {
- content: '';
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background:
- repeating-linear-gradient(
- 0deg,
- transparent,
- transparent 1px,
- rgba(var(--color-cyan-rgb), 0.02) 1px,
- rgba(var(--color-cyan-rgb), 0.02) 2px
- ),
- repeating-linear-gradient(
- 90deg,
- transparent,
- transparent 1px,
- rgba(var(--color-cyan-rgb), 0.02) 1px,
- rgba(var(--color-cyan-rgb), 0.02) 2px
- );
- opacity: 0.7;
- pointer-events: none;
- z-index: 0;
-}
-
-/* Badge label with proper z-index */
.tech-badge__label {
display: inline-block;
- vertical-align: middle;
- position: relative;
- z-index: 1;
}
-/* Size variants with improved proportions */
+/* Sizes */
.tech-badge--sm {
- font-size: var(--font-size-xs);
- padding: var(--spacing-1) var(--spacing-2);
- min-height: 24px;
- border-radius: 4px;
-}
-
-.tech-badge--md {
- font-size: var(--font-size-sm);
- padding: var(--spacing-2) var(--spacing-3);
- min-height: 28px;
- border-radius: 6px;
+ min-height: 1.5rem;
+ padding: 0 var(--spacing-2);
}
.tech-badge--lg {
- font-size: var(--font-size-base);
- padding: var(--spacing-3) var(--spacing-4);
- min-height: 32px;
- border-radius: 8px;
- font-weight: var(--font-weight-bold);
+ min-height: 2rem;
+ padding: 0 var(--spacing-4);
+ font-size: var(--font-size-sm);
}
-/* Enhanced security variant */
+/* Variants: tone changes the text and border colour only */
.tech-badge--security {
- background: linear-gradient(
- 135deg,
- rgba(var(--color-navy-rgb), 0.98) 0%,
- rgba(var(--color-navy-rgb), 0.95) 100%
- );
- color: var(--color-cyan);
- border: 1px solid rgba(var(--color-cyan-rgb), 0.5);
- box-shadow:
- 0 4px 12px rgba(0, 0, 0, 0.4),
- 0 0 15px rgba(var(--color-cyan-rgb), 0.15),
- inset 0 1px 0 rgba(var(--color-cyan-rgb), 0.12);
- text-shadow: 0 0 6px rgba(var(--color-cyan-rgb), 0.5);
+ color: var(--color-primary);
+ border-color: var(--surface-border-strong);
}
-.tech-badge--security::after {
- background:
- repeating-linear-gradient(
- 45deg,
- transparent,
- transparent 1px,
- rgba(var(--color-cyan-rgb), 0.03) 1px,
- rgba(var(--color-cyan-rgb), 0.03) 2px
- );
-}
-
-/* Terminal variant with enhanced styling */
.tech-badge--terminal {
- background: linear-gradient(
- 135deg,
- rgba(var(--color-navy-rgb), 0.96) 0%,
- rgba(var(--color-navy-rgb), 0.92) 100%
- );
color: var(--color-level-info);
- border: 1px solid rgba(var(--color-level-info-rgb), 0.4);
- box-shadow:
- 0 3px 10px rgba(0, 0, 0, 0.3),
- 0 0 12px rgba(var(--color-level-info-rgb), 0.1),
- inset 0 1px 0 rgba(var(--color-level-info-rgb), 0.1);
- text-shadow: 0 0 4px rgba(var(--color-level-info-rgb), 0.4);
+ border-color: rgba(var(--color-level-info-rgb), 0.4);
}
-/* Security level variations with improved contrast */
+/* Security levels */
.tech-badge--low {
- background: linear-gradient(
- 135deg,
- rgba(var(--color-navy-rgb), 0.95) 0%,
- rgba(var(--color-navy-rgb), 0.9) 100%
- );
color: var(--color-level-low);
- border: 1px solid rgba(var(--color-level-low-rgb), 0.5);
- box-shadow:
- 0 3px 8px rgba(0, 0, 0, 0.3),
- 0 0 12px rgba(var(--color-level-low-rgb), 0.15),
- inset 0 1px 0 rgba(var(--color-level-low-rgb), 0.1);
- text-shadow: 0 0 4px rgba(var(--color-level-low-rgb), 0.4);
+ border-color: rgba(var(--color-level-low-rgb), 0.45);
}
.tech-badge--medium {
- background: linear-gradient(
- 135deg,
- rgba(var(--color-navy-rgb), 0.95) 0%,
- rgba(var(--color-navy-rgb), 0.9) 100%
- );
color: var(--color-level-medium);
- border: 1px solid rgba(var(--color-level-medium-rgb), 0.5);
- box-shadow:
- 0 3px 8px rgba(0, 0, 0, 0.3),
- 0 0 12px rgba(var(--color-level-medium-rgb), 0.15),
- inset 0 1px 0 rgba(var(--color-level-medium-rgb), 0.1);
- text-shadow: 0 0 4px rgba(var(--color-level-medium-rgb), 0.4);
+ border-color: rgba(var(--color-level-medium-rgb), 0.45);
}
.tech-badge--high {
- background: linear-gradient(
- 135deg,
- rgba(var(--color-navy-rgb), 0.95) 0%,
- rgba(var(--color-navy-rgb), 0.9) 100%
- );
color: var(--color-level-high);
- border: 1px solid rgba(var(--color-level-high-rgb), 0.5);
- box-shadow:
- 0 3px 8px rgba(0, 0, 0, 0.3),
- 0 0 12px rgba(var(--color-level-high-rgb), 0.15),
- inset 0 1px 0 rgba(var(--color-level-high-rgb), 0.1);
- text-shadow: 0 0 4px rgba(var(--color-level-high-rgb), 0.4);
+ border-color: rgba(var(--color-level-high-rgb), 0.45);
}
.tech-badge--critical {
- background: linear-gradient(
- 135deg,
- rgba(var(--color-navy-rgb), 0.95) 0%,
- rgba(var(--color-navy-rgb), 0.9) 100%
- );
color: var(--color-level-critical);
- border: 1px solid rgba(var(--color-level-critical-rgb), 0.5);
- box-shadow:
- 0 4px 10px rgba(0, 0, 0, 0.4),
- 0 0 15px rgba(var(--color-level-critical-rgb), 0.2),
- inset 0 1px 0 rgba(var(--color-level-critical-rgb), 0.12);
- text-shadow: 0 0 6px rgba(var(--color-level-critical-rgb), 0.5);
- font-weight: var(--font-weight-bold);
-}
-
-.tech-badge--critical::after {
- background:
- repeating-linear-gradient(
- 45deg,
- transparent,
- transparent 1px,
- rgba(var(--color-level-critical-rgb), 0.04) 1px,
- rgba(var(--color-level-critical-rgb), 0.04) 2px
- );
+ border-color: rgba(var(--color-level-critical-rgb), 0.5);
}
-/* Interactive state */
+/* Interactive */
.tech-badge--interactive {
cursor: pointer;
- transition: all 0.2s ease;
}
.tech-badge--interactive:hover {
- transform: translateY(-1px);
- border-color: rgba(var(--color-cyan-rgb), 0.6);
- box-shadow:
- 0 5px 15px rgba(0, 0, 0, 0.4),
- 0 0 20px rgba(var(--color-cyan-rgb), 0.2),
- inset 0 1px 0 rgba(var(--color-cyan-rgb), 0.15);
-}
-
-.tech-badge--interactive:active {
- transform: translateY(0);
-}
-
-/* Tech stack colors in compact view with improved styling */
-.compact-tech-stack .tech-badge {
- margin-right: var(--spacing-2);
- margin-bottom: var(--spacing-2);
- box-shadow:
- 0 2px 6px rgba(0, 0, 0, 0.3),
- 0 0 8px rgba(var(--color-cyan-rgb), 0.08);
- border-width: 1px;
+ color: var(--color-primary);
+ border-color: var(--surface-border-strong);
+ background: rgba(var(--color-primary-rgb), 0.1);
}
-/* Enhanced color variations for timeline entries */
-.timeline-entry:nth-child(5n+1) .tech-badge {
- color: var(--color-entry1, var(--color-cyan));
- border-color: rgba(var(--color-entry1-rgb, 100, 255, 218), 0.5);
- background: linear-gradient(
- 135deg,
- rgba(var(--color-navy-rgb), 0.95) 0%,
- rgba(var(--color-navy-rgb), 0.9) 100%
- );
- text-shadow: 0 0 4px rgba(var(--color-entry1-rgb, 100, 255, 218), 0.4);
- box-shadow:
- 0 3px 8px rgba(0, 0, 0, 0.3),
- 0 0 12px rgba(var(--color-entry1-rgb, 100, 255, 218), 0.1);
-}
-
-.timeline-entry:nth-child(5n+2) .tech-badge {
- color: var(--color-entry2, var(--color-level-high));
- border-color: rgba(var(--color-entry2-rgb, 255, 157, 0), 0.5);
- background: linear-gradient(
- 135deg,
- rgba(var(--color-navy-rgb), 0.95) 0%,
- rgba(var(--color-navy-rgb), 0.9) 100%
- );
- text-shadow: 0 0 4px rgba(var(--color-entry2-rgb, 255, 157, 0), 0.4);
- box-shadow:
- 0 3px 8px rgba(0, 0, 0, 0.3),
- 0 0 12px rgba(var(--color-entry2-rgb, 255, 157, 0), 0.1);
-}
-
-.timeline-entry:nth-child(5n+3) .tech-badge {
- color: var(--color-entry3, var(--color-level-critical));
- border-color: rgba(var(--color-entry3-rgb, 255, 94, 120), 0.5);
- background: linear-gradient(
- 135deg,
- rgba(var(--color-navy-rgb), 0.95) 0%,
- rgba(var(--color-navy-rgb), 0.9) 100%
- );
- text-shadow: 0 0 4px rgba(var(--color-entry3-rgb, 255, 94, 120), 0.4);
- box-shadow:
- 0 3px 8px rgba(0, 0, 0, 0.3),
- 0 0 12px rgba(var(--color-entry3-rgb, 255, 94, 120), 0.1);
-}
-
-.timeline-entry:nth-child(5n+4) .tech-badge {
- color: var(--color-entry4, var(--color-level-info));
- border-color: rgba(var(--color-entry4-rgb, 167, 139, 250), 0.5);
- background: linear-gradient(
- 135deg,
- rgba(var(--color-navy-rgb), 0.95) 0%,
- rgba(var(--color-navy-rgb), 0.9) 100%
- );
- text-shadow: 0 0 4px rgba(var(--color-entry4-rgb, 167, 139, 250), 0.4);
- box-shadow:
- 0 3px 8px rgba(0, 0, 0, 0.3),
- 0 0 12px rgba(var(--color-entry4-rgb, 167, 139, 250), 0.1);
-}
-
-.timeline-entry:nth-child(5n+5) .tech-badge {
- color: var(--color-entry5, var(--color-level-low));
- border-color: rgba(var(--color-entry5-rgb, 45, 212, 191), 0.5);
- background: linear-gradient(
- 135deg,
- rgba(var(--color-navy-rgb), 0.95) 0%,
- rgba(var(--color-navy-rgb), 0.9) 100%
- );
- text-shadow: 0 0 4px rgba(var(--color-entry5-rgb, 45, 212, 191), 0.4);
- box-shadow:
- 0 3px 8px rgba(0, 0, 0, 0.3),
- 0 0 12px rgba(var(--color-entry5-rgb, 45, 212, 191), 0.1);
-}
-
-/* Focus styles with enhanced visibility */
.tech-badge:focus-visible {
- outline: 2px solid var(--color-cyan);
- outline-offset: 2px;
- box-shadow:
- 0 0 0 4px rgba(var(--color-cyan-rgb), 0.3),
- 0 4px 12px rgba(0, 0, 0, 0.4);
+ outline: none;
+ box-shadow: var(--ring-focus);
}
-
-.tech-badge--security:focus-visible {
- outline-color: var(--color-cyan);
- box-shadow:
- 0 0 0 4px rgba(var(--color-cyan-rgb), 0.4),
- 0 4px 15px rgba(0, 0, 0, 0.5);
-}
-
-.tech-badge--terminal:focus-visible {
- outline-color: var(--color-level-info);
- box-shadow:
- 0 0 0 4px rgba(var(--color-level-info-rgb), 0.3),
- 0 4px 12px rgba(0, 0, 0, 0.4);
-}
-
-/* Responsive styles with improved readability */
-@media (max-width: 768px) {
- .tech-badge {
- font-size: var(--font-size-sm);
- padding: var(--spacing-2) calc(var(--spacing-2) + 2px);
- min-height: 26px;
- }
-
- .tech-badge--sm {
- font-size: var(--font-size-xs);
- padding: var(--spacing-1) var(--spacing-2);
- min-height: 22px;
- }
-
- .tech-badge--lg {
- font-size: var(--font-size-base);
- padding: var(--spacing-2) var(--spacing-3);
- min-height: 30px;
- }
-
- .compact-tech-stack .tech-badge {
- font-size: calc(var(--font-size-xs) + 1px);
- padding: calc(var(--spacing-1) + 1px) var(--spacing-2);
- margin-right: var(--spacing-1);
- margin-bottom: var(--spacing-1);
- }
-}
-
-/* Improved contrast for small screens */
-@media (max-width: 480px) {
- .tech-badge {
- border-width: 1.5px;
- text-shadow: 0 0 6px rgba(var(--color-cyan-rgb), 0.5);
- }
-
- .tech-badge--security,
- .tech-badge--critical {
- font-weight: var(--font-weight-bold);
- }
-}
-
-/* High contrast mode support */
-@media (prefers-contrast: high) {
- .tech-badge {
- border-width: 2px;
- background: rgba(var(--color-navy-rgb), 0.98);
- text-shadow: none;
- }
-
- .tech-badge::after {
- display: none;
- }
-}
-
-/* Reduced motion preferences */
-@media (prefers-reduced-motion: reduce) {
- .tech-badge--interactive:hover {
- transform: none;
- }
-}
\ No newline at end of file
diff --git a/src/components/atoms/TechBadge/TechBadge.stories.tsx b/src/components/atoms/TechBadge/TechBadge.stories.tsx
index d348c3de..7d48ad9b 100644
--- a/src/components/atoms/TechBadge/TechBadge.stories.tsx
+++ b/src/components/atoms/TechBadge/TechBadge.stories.tsx
@@ -10,7 +10,7 @@ const meta = {
componentSubtitle: 'Display technology badges with various styles and security levels',
docs: {
description: {
- component: 'TechBadge is a versatile component for displaying technology labels, skills, and security clearance levels. It supports different sizes, variants, and interactive states.'
+ component: 'TechBadge is a chip: --radius-chip, --surface-inset fill, 1px border and JetBrains Mono xs text. Variants and levels only change the text and border tone; red appears only at the critical level.'
}
}
},
@@ -69,7 +69,7 @@ const BadgeContainer = ({ children }: { children: ReactNode }) => (
// Default badge
export const Default: StoryFn = () => (
-
+
);
// Size variants
@@ -106,13 +106,13 @@ export const Interactive: StoryFn = () => (
alert('Badge clicked!')}
+ onClick={() => undefined}
/>
alert('Security badge clicked!')}
+ onClick={() => undefined}
/>
);
@@ -120,92 +120,59 @@ export const Interactive: StoryFn = () => (
// Tech stack example
export const TechStack: StoryFn = () => (
-
Frontend
+ Platform
-
-
-
-
+
+
+
+
-
- Backend
+
+ Languages
-
-
-
-
+
+
+
+
-
+
Security
-
-
-
-
+
+
+
+
);
-// Custom styling
-export const CustomStyling: StoryFn = () => (
-
-
-
-
-
-);
-
// Responsive example
export const Responsive: StoryFn = () => (
diff --git a/src/components/atoms/TechBadge/TechBadge.tsx b/src/components/atoms/TechBadge/TechBadge.tsx
index 50cd1ca4..d2864463 100644
--- a/src/components/atoms/TechBadge/TechBadge.tsx
+++ b/src/components/atoms/TechBadge/TechBadge.tsx
@@ -79,23 +79,12 @@ const TechBadge: FC = ({
ease: "easeOut"
}
},
- hover: isClickable ? {
- y: -2,
- scale: 1.05,
- boxShadow: "0 3px 6px rgba(0, 0, 0, 0.2)",
- transition: {
- duration: 0.2
- }
- } : {
+ hover: isClickable ? {
y: -1,
- boxShadow: "0 3px 6px rgba(0, 0, 0, 0.2)",
- transition: {
- duration: 0.2
- }
- },
+ transition: { duration: 0.2 }
+ } : {},
tap: isClickable ? {
- scale: 0.95,
- y: -1,
+ scale: 0.97,
transition: {
duration: 0.1
}
diff --git a/src/components/atoms/TerminalControls/TerminalControls.css b/src/components/atoms/TerminalControls/TerminalControls.css
index cc10329d..9765186d 100644
--- a/src/components/atoms/TerminalControls/TerminalControls.css
+++ b/src/components/atoms/TerminalControls/TerminalControls.css
@@ -6,13 +6,12 @@
/* Base variables */
:root {
- --terminal-background: var(--color-navy, #0a192f);
- --terminal-text: var(--color-text, #e6f1ff);
- --terminal-prompt: var(--color-primary, #64ffda);
- --terminal-border: rgba(var(--color-primary-rgb, 100, 255, 218), 0.3);
- --terminal-glow: rgba(var(--color-primary-rgb, 100, 255, 218), 0.15);
- --terminal-header: rgba(var(--color-background-alt-rgb, 20, 40, 70), 0.8);
- --terminal-font: var(--font-family-jetbrains, 'JetBrains Mono', monospace);
+ --terminal-background: var(--surface-card);
+ --terminal-text: var(--color-text);
+ --terminal-prompt: var(--color-primary);
+ --terminal-border: var(--surface-border);
+ --terminal-header: var(--surface-card-raised);
+ --terminal-font: var(--font-family-jetbrains);
}
/* Terminal window controls */
@@ -43,54 +42,35 @@
justify-content: space-between;
padding: 0.5rem 1rem;
background-color: var(--terminal-header);
- border-bottom: 1px solid var(--terminal-border);
- border-top-left-radius: var(--border-radius-md);
- border-top-right-radius: var(--border-radius-md);
+ border-bottom: 1px solid var(--surface-divider);
+ border-top-left-radius: var(--radius-card);
+ border-top-right-radius: var(--radius-card);
position: relative;
z-index: 2;
}
-/* Terminal footer with enhanced cyberpunk styling */
+/* Terminal footer: inset strip on the card surface */
.terminal-footer {
display: flex;
justify-content: space-between;
align-items: center;
padding: var(--spacing-2) var(--spacing-3);
- border-top: 1px solid var(--terminal-border);
+ border-top: 1px solid var(--surface-divider);
font-family: var(--terminal-font);
font-size: var(--font-size-xs);
+ letter-spacing: var(--letter-spacing-technical);
color: var(--terminal-prompt);
- background-color: rgba(0, 0, 0, 0.4); /* Darker for better contrast */
+ background-color: var(--surface-inset);
position: relative;
z-index: 2;
- box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.2);
overflow: hidden;
}
-/* Add cyberpunk circuit pattern to footer */
-.terminal-footer::before {
- content: '';
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-image:
- radial-gradient(circle at 30% 30%, rgba(var(--color-primary-rgb), 0.1) 1px, transparent 1px),
- linear-gradient(to right, rgba(var(--color-primary-rgb), 0.05) 1px, transparent 1px),
- linear-gradient(to bottom, rgba(var(--color-primary-rgb), 0.05) 1px, transparent 1px);
- background-size: 25px 25px, 15px 15px, 15px 15px;
- opacity: 0.2;
- pointer-events: none;
- z-index: 0;
-}
-
.status-indicator {
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: var(--spacing-2);
- box-shadow: 0 0 10px currentColor;
position: relative;
animation: pulse 2s infinite ease-in-out;
background-color: var(--color-primary);
@@ -129,7 +109,7 @@
@keyframes levelPulse {
0%, 100% { color: var(--terminal-prompt); }
- 50% { color: #ffffff; }
+ 50% { color: var(--color-text); }
}
@keyframes blinkCursor {
@@ -150,72 +130,23 @@
background-color: #27c93f;
}
-/* KITTY TERMINAL CONTROLS - Refined and elegant */
+/* Kitty controls: flat dots */
.terminal-controls-kitty {
- gap: 8px; /* Improved spacing */
+ gap: 8px;
}
.terminal-controls-kitty .terminal-circle {
- width: 14px; /* Slightly larger */
+ width: 14px;
height: 14px;
- border-radius: 50%;
- margin-right: 0; /* Use gap instead */
- border: 1px solid rgba(255, 255, 255, 0.1);
- position: relative;
- background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
- backdrop-filter: blur(10px);
- box-shadow:
- 0 2px 4px rgba(0, 0, 0, 0.2),
- inset 0 1px 2px rgba(255, 255, 255, 0.1);
- transition: all 0.2s ease;
+ margin-right: 0;
}
-.terminal-controls-kitty .terminal-circle-close {
- background: linear-gradient(135deg, #ff6b6b, #e74c3c);
- border-color: rgba(231, 76, 60, 0.3);
- box-shadow:
- 0 2px 6px rgba(231, 76, 60, 0.3),
- inset 0 1px 2px rgba(255, 255, 255, 0.2);
-}
-
-.terminal-controls-kitty .terminal-circle-minimize {
- background: linear-gradient(135deg, #ffd93d, #f39c12);
- border-color: rgba(243, 156, 18, 0.3);
- box-shadow:
- 0 2px 6px rgba(243, 156, 18, 0.3),
- inset 0 1px 2px rgba(255, 255, 255, 0.2);
-}
+.terminal-controls-kitty .terminal-circle-close { background: #ff5f56; }
+.terminal-controls-kitty .terminal-circle-minimize { background: #ffbd2e; }
+.terminal-controls-kitty .terminal-circle-maximize { background: #27c93f; }
-.terminal-controls-kitty .terminal-circle-maximize {
- background: linear-gradient(135deg, #6bcf7f, #27ae60);
- border-color: rgba(39, 174, 96, 0.3);
- box-shadow:
- 0 2px 6px rgba(39, 174, 96, 0.3),
- inset 0 1px 2px rgba(255, 255, 255, 0.2);
-}
-
-/* Kitty hover effects */
.terminal-controls-interactive.terminal-controls-kitty .terminal-circle:hover {
- transform: scale(1.1);
- filter: brightness(1.1);
-}
-
-.terminal-controls-interactive.terminal-controls-kitty .terminal-circle-close:hover {
- box-shadow:
- 0 3px 8px rgba(231, 76, 60, 0.4),
- inset 0 1px 2px rgba(255, 255, 255, 0.3);
-}
-
-.terminal-controls-interactive.terminal-controls-kitty .terminal-circle-minimize:hover {
- box-shadow:
- 0 3px 8px rgba(243, 156, 18, 0.4),
- inset 0 1px 2px rgba(255, 255, 255, 0.3);
-}
-
-.terminal-controls-interactive.terminal-controls-kitty .terminal-circle-maximize:hover {
- box-shadow:
- 0 3px 8px rgba(39, 174, 96, 0.4),
- inset 0 1px 2px rgba(255, 255, 255, 0.3);
+ filter: brightness(1.15);
}
/* Terminal controls for Windows */
@@ -229,12 +160,12 @@
height: 14px;
border-radius: 0;
background-color: transparent;
- border: 1px solid #999;
+ border: 1px solid var(--color-text-muted);
}
.terminal-controls-windows .terminal-circle-close {
- background-color: #d83b3b;
- border-color: #a12828;
+ background-color: #ff5f56;
+ border-color: #ff5f56;
position: relative;
}
@@ -244,7 +175,7 @@
position: absolute;
width: 8px;
height: 1px;
- background-color: white;
+ background-color: var(--color-text);
top: 50%;
left: 50%;
}
@@ -266,7 +197,7 @@
position: absolute;
width: 8px;
height: 1px;
- background-color: #999;
+ background-color: var(--color-text-muted);
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
@@ -274,19 +205,19 @@
.terminal-controls-windows .terminal-circle-maximize {
position: relative;
- border: 1px solid #999;
+ border: 1px solid var(--color-text-muted);
}
/* Terminal controls for Linux */
.terminal-controls-linux .terminal-circle {
- border: 1px solid rgba(255, 255, 255, 0.5);
+ border: 1px solid var(--color-text-muted);
background-color: transparent;
}
.terminal-controls-linux .terminal-circle-close {
- border-color: #d83b3b;
+ border-color: #ff5f56;
position: relative;
- background-color: rgba(216, 59, 59, 0.5);
+ background-color: rgba(255, 95, 86, 0.5);
}
.terminal-controls-linux .terminal-circle-close::before,
@@ -295,7 +226,7 @@
position: absolute;
width: 6px;
height: 1px;
- background-color: white;
+ background-color: var(--color-text);
top: 50%;
left: 50%;
}
@@ -315,9 +246,9 @@
}
/* Hover effect removed - now handled by framer-motion */
-.terminal-controls-interactive .terminal-circle:focus {
- outline: 2px solid var(--color-primary);
- outline-offset: 2px;
+.terminal-controls-interactive .terminal-circle:focus-visible {
+ box-shadow: var(--ring-focus);
+ outline: none;
}
/* Media queries */
diff --git a/src/components/atoms/TerminalCursor/TerminalCursor.css b/src/components/atoms/TerminalCursor/TerminalCursor.css
index 44c8982e..24f27250 100644
--- a/src/components/atoms/TerminalCursor/TerminalCursor.css
+++ b/src/components/atoms/TerminalCursor/TerminalCursor.css
@@ -1,63 +1,47 @@
/**
- * TerminalCursor Component Styles
- * Styling for the blinking terminal cursor with enhanced visibility
+ * TerminalCursor: blinking block cursor. Cyan by default, green for the
+ * terminal variant.
*/
-/* Base cursor styles */
.terminal-cursor {
display: inline-block;
width: 10px;
height: 18px;
- background-color: var(--color-info);
+ background-color: var(--color-primary);
vertical-align: middle;
margin-left: var(--spacing-1);
flex-shrink: 0;
- transition: var(--transition-fast);
- box-shadow: 0 0 6px rgba(var(--color-info-rgb), 0.6);
border-radius: 1px;
}
-/* Focused state - enhanced visibility */
.terminal-cursor--focused {
- background-color: var(--color-cyan);
- box-shadow: 0 0 10px rgba(var(--color-cyan-rgb), 0.8);
width: 12px;
height: 20px;
}
-/* Variant styles */
-.terminal-cursor--security {
- background-color: var(--color-cyan);
- box-shadow: 0 0 8px var(--color-cyan);
+.terminal-cursor--security,
+.terminal-cursor--kitty {
+ background-color: var(--color-primary);
}
.terminal-cursor--terminal {
- background-color: var(--color-info);
- box-shadow: 0 0 6px rgba(var(--color-info-rgb), 0.6);
-}
-
-.terminal-cursor--kitty {
- background-color: var(--color-cyan);
- box-shadow: 0 0 8px rgba(var(--color-cyan-rgb), 0.6);
+ background-color: var(--color-success);
}
-/* Responsive styles */
@media (max-width: 768px) {
.terminal-cursor {
height: 16px;
width: 8px;
}
-
+
.terminal-cursor--focused {
height: 18px;
width: 10px;
}
}
-/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
.terminal-cursor {
- /* Static cursor when reduced motion is preferred */
animation: none;
}
-}
\ No newline at end of file
+}
diff --git a/src/components/atoms/TerminalFooter/TerminalFooter.css b/src/components/atoms/TerminalFooter/TerminalFooter.css
index f77405c0..194beb6f 100644
--- a/src/components/atoms/TerminalFooter/TerminalFooter.css
+++ b/src/components/atoms/TerminalFooter/TerminalFooter.css
@@ -1,72 +1,62 @@
/**
- * TerminalFooter Atom Component Styles
- * Isolated terminal-style footer with prompt and cursor
+ * TerminalFooter: prompt-and-cursor strip on the shared card surface.
+ * Secure is green, breach is red, critical is amber: status colours only.
*/
.terminal-footer {
- margin-top: 1.5rem;
- padding: 0.75rem 1rem;
- background: rgba(var(--color-navy-rgb), 0.8);
- border: 1px solid rgba(var(--color-cyan-rgb), 0.3);
- border-radius: 6px;
+ margin-top: var(--spacing-5);
+ padding: var(--spacing-3) var(--spacing-4);
+ background: var(--surface-card);
+ border: 1px solid var(--surface-border);
+ border-radius: var(--radius-card);
+ box-shadow: var(--shadow-card);
font-family: var(--font-family-jetbrains);
- font-size: 0.8rem;
+ font-size: var(--font-size-xs);
+ letter-spacing: var(--letter-spacing-technical);
display: flex;
align-items: center;
}
.terminal-footer__prompt {
- color: var(--color-cyan);
- margin-right: 0.5rem;
- text-shadow: 0 0 8px rgba(var(--color-cyan-rgb), 0.5);
+ color: var(--color-primary);
+ margin-right: var(--spacing-2);
}
.terminal-footer__cursor {
- color: var(--color-cyan);
- font-weight: bold;
- text-shadow: 0 0 8px rgba(var(--color-cyan-rgb), 0.5);
-}
-
-/* Variant Styles */
-.terminal-footer--secure {
- border-color: rgba(34, 197, 94, 0.3);
+ color: var(--color-primary);
+ font-weight: var(--font-weight-bold);
}
.terminal-footer--secure .terminal-footer__prompt,
.terminal-footer--secure .terminal-footer__cursor {
- color: var(--color-green-400);
- text-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
+ color: var(--color-success);
}
.terminal-footer--breach {
- border-color: rgba(248, 113, 113, 0.3);
+ border-color: var(--color-danger);
}
.terminal-footer--breach .terminal-footer__prompt,
.terminal-footer--breach .terminal-footer__cursor {
- color: var(--color-red-400);
- text-shadow: 0 0 8px rgba(248, 113, 113, 0.5);
+ color: var(--color-danger);
}
.terminal-footer--critical {
- border-color: rgba(251, 191, 36, 0.3);
+ border-color: var(--color-warning);
}
.terminal-footer--critical .terminal-footer__prompt,
.terminal-footer--critical .terminal-footer__cursor {
- color: var(--color-yellow-400);
- text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
+ color: var(--color-warning);
}
-/* Accessibility */
.terminal-footer:focus-within {
- outline: 2px solid rgba(var(--color-cyan-rgb), 0.7);
- outline-offset: 2px;
+ box-shadow: var(--ring-focus);
+ outline: none;
}
-/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
.terminal-footer__cursor {
animation: none;
}
-}
\ No newline at end of file
+}
diff --git a/src/components/atoms/TerminalPrompt/TerminalPrompt.css b/src/components/atoms/TerminalPrompt/TerminalPrompt.css
index 1de1bef0..aa55e1fb 100644
--- a/src/components/atoms/TerminalPrompt/TerminalPrompt.css
+++ b/src/components/atoms/TerminalPrompt/TerminalPrompt.css
@@ -1,57 +1,33 @@
/**
- * TerminalPrompt Component Styles
- * Styling for terminal command prompts with cybersecurity theming
+ * TerminalPrompt: command prompt in mono. Green by default (a live shell),
+ * cyan for the security variant.
*/
-/* Base prompt styles */
.terminal-prompt {
- color: var(--color-level-low);
+ color: var(--color-success);
margin-right: var(--spacing-2);
font-weight: var(--font-weight-medium);
user-select: none;
flex-shrink: 0;
font-family: var(--font-family-jetbrains);
- transition: var(--transition-fast);
+ letter-spacing: var(--letter-spacing-technical);
}
-/* Variant styles */
.terminal-prompt--security {
- color: var(--color-cyan);
- text-shadow: 0 0 5px rgba(var(--color-cyan-rgb), 0.5);
+ color: var(--color-primary);
}
.terminal-prompt--terminal {
- color: var(--color-info);
+ color: var(--color-success);
}
-/* Mobile optimizations */
.terminal-prompt--mobile {
font-size: var(--font-size-sm);
}
-/* Enhanced security variant with glow effects */
-.terminal-prompt--security:hover {
- text-shadow: 0 0 8px rgba(var(--color-cyan-rgb), 0.7);
-}
-
-/* Focus-within context enhancement for security variant */
-.console-content:focus-within .terminal-prompt--security {
- text-shadow: 0 0 10px rgba(var(--color-cyan-rgb), 0.9);
-}
-
-/* Terminal variant hover effects */
-.terminal-prompt--terminal:hover {
- text-shadow: 0 0 5px rgba(var(--color-info-rgb), 0.5);
-}
-
-.console-content:focus-within .terminal-prompt--terminal {
- text-shadow: 0 0 8px rgba(var(--color-info-rgb), 0.7);
-}
-
-/* Responsive styles */
@media (max-width: 768px) {
.terminal-prompt {
font-size: var(--font-size-sm);
margin-right: var(--spacing-1);
}
-}
\ No newline at end of file
+}
diff --git a/src/components/atoms/decorations/BinaryStream/BinaryStream.css b/src/components/atoms/decorations/BinaryStream/BinaryStream.css
index ffba083b..acbd8448 100644
--- a/src/components/atoms/decorations/BinaryStream/BinaryStream.css
+++ b/src/components/atoms/decorations/BinaryStream/BinaryStream.css
@@ -2,8 +2,7 @@
:root {
/* Define the accent color directly in this component */
- --binary-stream-color: #05d5fa;
- --binary-stream-glow: rgba(5, 213, 250, 0.5);
+ --binary-stream-color: var(--color-primary);
}
/* Binary digits */
@@ -11,8 +10,7 @@
position: absolute;
font-family: monospace;
font-size: 12px;
- color: var(--binary-stream-color, #05d5fa);
- text-shadow: 0 0 5px var(--binary-stream-glow, rgba(5, 213, 250, 0.5));
+ color: var(--binary-stream-color);
/* Removed animation properties - now handled by framer-motion */
box-sizing: border-box;
/* Add transition for smooth changes when motion is disabled */
diff --git a/src/components/atoms/decorations/BinaryStream/BinaryStream.stories.tsx b/src/components/atoms/decorations/BinaryStream/BinaryStream.stories.tsx
index 5b0d60fd..f7de7000 100644
--- a/src/components/atoms/decorations/BinaryStream/BinaryStream.stories.tsx
+++ b/src/components/atoms/decorations/BinaryStream/BinaryStream.stories.tsx
@@ -55,7 +55,7 @@ export const Customized: Story = {
height: 400,
width: 40,
fontSize: 24,
- color: '#00ff99',
+ color: '#64ffda',
speed: 1,
moveSpeed: 0.2,
},
@@ -65,9 +65,9 @@ export const Customized: Story = {
export const MultipleStreams: Story = {
render: () => (
-
-
-
+
+
+
),
};
@@ -75,7 +75,7 @@ export const MultipleStreams: Story = {
// Positioned streams
export const PositionedStreams: Story = {
render: () => (
-
+
@@ -105,7 +105,7 @@ export const SpeedComparison: Story = {
// Background example
export const AsBackground: Story = {
render: () => (
-
+
Binary Borders
@@ -172,15 +171,15 @@ export const ColorVariations: Story = {
),
diff --git a/src/components/atoms/decorations/BinaryStream/BinaryStream.tsx b/src/components/atoms/decorations/BinaryStream/BinaryStream.tsx
index 1920546b..1e9568fb 100644
--- a/src/components/atoms/decorations/BinaryStream/BinaryStream.tsx
+++ b/src/components/atoms/decorations/BinaryStream/BinaryStream.tsx
@@ -4,7 +4,7 @@ import { useMotionEnabled } from '@utils/motion';
import './BinaryStream.css';
export interface BinaryStreamProps extends Omit, 'color'> {
- /** Text color for the binary stream (default: #0F0) */
+ /** Text color for the binary stream (default: #64ffda) */
color?: string;
/** Font size for the characters (default: 20) */
fontSize?: number;
@@ -26,7 +26,7 @@ export interface BinaryStreamProps extends Omit, 'color'>
const BinaryStream = (props: BinaryStreamProps) => {
const {
- color = '#0F0',
+ color = '#64ffda',
fontSize = 20,
speed = 1,
moveSpeed = 0.3,
diff --git a/src/components/atoms/decorations/MatrixStream/MatrixStream.stories.tsx b/src/components/atoms/decorations/MatrixStream/MatrixStream.stories.tsx
index b4e9689c..1108afcd 100644
--- a/src/components/atoms/decorations/MatrixStream/MatrixStream.stories.tsx
+++ b/src/components/atoms/decorations/MatrixStream/MatrixStream.stories.tsx
@@ -49,7 +49,7 @@ export const Customized: Story = {
height: 400,
width: 40,
fontSize: 24,
- color: '#00ff99',
+ color: '#64ffda',
speed: 1,
moveSpeed: 0.2,
},
@@ -69,7 +69,7 @@ export const MultipleStreams: Story = {
// Positioned streams
export const PositionedStreams: Story = {
render: () => (
-
+
@@ -99,7 +99,7 @@ export const SpeedComparison: Story = {
// Background example
export const AsBackground: Story = {
render: () => (
-
+
Content Between Streams
diff --git a/src/components/atoms/decorations/MatrixStream/MatrixStream.tsx b/src/components/atoms/decorations/MatrixStream/MatrixStream.tsx
index 730e0505..415747ca 100644
--- a/src/components/atoms/decorations/MatrixStream/MatrixStream.tsx
+++ b/src/components/atoms/decorations/MatrixStream/MatrixStream.tsx
@@ -11,7 +11,7 @@ import './MatrixStream.css';
* @returns {React.ReactElement} MatrixStream component
*/
export interface MatrixStreamProps extends Omit, 'color'> {
- /** Text color for the matrix rain (default: #0F0) */
+ /** Text color for the matrix rain (default: #64ffda) */
color?: string;
/** Font size for the characters (default: 20) */
fontSize?: number;
@@ -33,7 +33,7 @@ export interface MatrixStreamProps extends Omit, 'color'>
const MatrixStream = (props: MatrixStreamProps) => {
const {
- color = '#0F0',
+ color = '#64ffda',
fontSize = 20,
speed = 1,
moveSpeed = 0.3,
diff --git a/src/components/layout/Background/Background.stories.tsx b/src/components/layout/Background/Background.stories.tsx
index a269120b..5f2b6163 100644
--- a/src/components/layout/Background/Background.stories.tsx
+++ b/src/components/layout/Background/Background.stories.tsx
@@ -122,32 +122,35 @@ export const Default: Story = {
justifyContent: 'center',
}}>
+
+ ~/background
+
- CYBERPUNK BACKGROUND
+ The page backdrop
-
- This cyberpunk-themed background creates an immersive digital environment
- for your portfolio site. It features Matrix-style digital rain, animated
- binary streams, circuit grid patterns, and a subtle scanline effect for
- that retro-futuristic aesthetic.
-
-
- All effects are purely decorative and won't interfere with the content's
- accessibility. The component also respects user preferences for reduced motion.
+
+ Digital rain, binary streams, a circuit grid and a faint scanline sit behind
+ the content. They are decorative only and switch off for visitors who prefer
+ reduced motion.
diff --git a/src/components/layout/Footer/Footer.css b/src/components/layout/Footer/Footer.css
index d3a72c3f..9f1af5c9 100644
--- a/src/components/layout/Footer/Footer.css
+++ b/src/components/layout/Footer/Footer.css
@@ -10,16 +10,37 @@ footer a:focus {
text-decoration: none;
}
-/* Social links in footer */
-footer .social-link {
- margin-left: 0.5rem;
- margin-right: 0.5rem;
- color: var(--color-gray-400);
+/* Cluster line: a live dot before the text */
+.footer-cluster-line {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.5rem;
+ font-family: var(--font-family-jetbrains);
}
-footer .social-link:hover,
-footer .social-link:focus {
- color: var(--color-white);
+.footer-cluster-dot {
+ width: 8px;
+ height: 8px;
+ border-radius: 50%;
+ background: var(--color-gray-600);
+ flex-shrink: 0;
+}
+
+.footer-cluster-dot--live {
+ background: var(--color-cyan);
+ box-shadow: 0 0 6px rgba(var(--color-cyan-rgb), 0.7);
+ animation: footer-cluster-pulse 1.8s ease-in-out infinite;
+}
+
+@keyframes footer-cluster-pulse {
+ 0%, 100% { opacity: 0.4; }
+ 50% { opacity: 1; }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .footer-cluster-dot--live {
+ animation: none;
+ }
}
/* Reduced motion preferences now handled by AnimationContext */
diff --git a/src/components/layout/Footer/Footer.stories.tsx b/src/components/layout/Footer/Footer.stories.tsx
index 1939be4f..8356e3c3 100644
--- a/src/components/layout/Footer/Footer.stories.tsx
+++ b/src/components/layout/Footer/Footer.stories.tsx
@@ -5,11 +5,12 @@ import { within, userEvent, expect } from 'storybook/test';
import PortfolioContext from '@context/PortfolioContext';
import type { PortfolioTestValue } from '@context/PortfolioContext';
import type { PortfolioData } from '@/types/portfolio';
+import { withSiteData } from '../../organisms/storyFixtures';
// Context with only a name: no resume link, so the Resume link falls back to the default PDF
const minimalPortfolioData: PortfolioTestValue = {
greetings: {
- name: "Jane Smith"
+ name: "Alex Example"
}
};
@@ -21,16 +22,40 @@ const createPortfolioDecorator = (data: PortfolioTestValue): Decorator => (Story
);
+// Stubs the cluster-status endpoint for a story. Other requests pass through.
+const clusterFeed = (respond: () => Response | Promise
) => ({
+ loaders: [
+ async () => {
+ const realFetch = window.fetch;
+ window.fetch = ((input: RequestInfo | URL, init?: RequestInit) =>
+ String(input).includes('/api/cluster-status') ? Promise.resolve(respond()) : realFetch(input, init)) as typeof window.fetch;
+ return {};
+ },
+ ],
+});
+
+const badge = (title: string, value: string, color = 'green') => ({ title, value, color });
+const feedBody = (clusterState: string) =>
+ JSON.stringify({
+ updatedAt: '2026-11-20T14:32:00.000Z',
+ badges: {
+ cluster_status: badge('Cluster', clusterState),
+ cluster_node_count: badge('Nodes', '11'),
+ cluster_pod_count: badge('Pods', '266'),
+ },
+ });
+
const meta = {
title: 'Layout/Footer',
component: Footer,
tags: ['autodocs'],
+ decorators: [withSiteData()],
parameters: {
layout: 'fullscreen',
docs: {
description: {
component:
- 'Site footer with the copyright line, in-page navigation links, resume and contact card downloads, and the social links. ' +
+ 'Site footer with the copyright line, in-page navigation links, resume and contact card downloads, and a line saying the site is served from the garage cluster with live node and pod counts (from `useClusterStatus`, with a plain fallback when the feed is unavailable). ' +
'It takes no props: the name and resume link come from `PortfolioContext` (`greetings`) through the `useFooter` hook. ' +
'Below the `md` breakpoint the three groups stack and centre.',
},
@@ -52,7 +77,7 @@ export default meta;
type Story = StoryObj;
/**
- * The footer with the site data from the global context
+ * The footer with the real site data
*/
export const Default: Story = {
play: async ({ canvasElement, step }) => {
@@ -84,8 +109,34 @@ export const Default: Story = {
},
};
+/** Live numbers from the cluster feed. */
+export const ClusterUp: Story = {
+ ...clusterFeed(() => new Response(feedBody('up'))),
+ play: async ({ canvasElement }) => {
+ const canvas = within(canvasElement);
+ await expect(await canvas.findByText(/11 nodes · 266 pods · all systems up/)).toBeInTheDocument();
+ await expect(canvas.getByTestId('footer-cluster-line')).toHaveAttribute('href', 'https://github.com/dapperdivers/dapper-cluster');
+ },
+};
+
+export const ClusterDegraded: Story = {
+ ...clusterFeed(() => new Response(feedBody('degraded'))),
+ play: async ({ canvasElement }) => {
+ await expect(await within(canvasElement).findByText(/266 pods · degraded/)).toBeInTheDocument();
+ },
+};
+
+/** Feed down: only the fixed text, no numbers. */
+export const ClusterUnavailable: Story = {
+ ...clusterFeed(() => new Response('{}', { status: 503 })),
+ play: async ({ canvasElement }) => {
+ const line = within(canvasElement).getByTestId('footer-cluster-line');
+ await expect(line).toHaveTextContent(/^Served from a Talos cluster in my garage$/);
+ },
+};
+
/**
- * Mobile viewport: the groups stack and the "Made with" line moves under the social links
+ * Mobile viewport: the groups stack and centre
*/
export const Mobile: Story = {
globals: {
@@ -110,7 +161,7 @@ export const MinimalData: Story = {
decorators: [createPortfolioDecorator(minimalPortfolioData)],
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
- await expect(canvas.getByText(/Jane Smith/)).toBeInTheDocument();
+ await expect(canvas.getByText(/Alex Example/)).toBeInTheDocument();
await expect(canvas.getByText("Resume")).toHaveAttribute('href', '/files/Cybersecurity_2025.pdf');
},
};
diff --git a/src/components/layout/Footer/Footer.test.tsx b/src/components/layout/Footer/Footer.test.tsx
index a084debc..53774016 100644
--- a/src/components/layout/Footer/Footer.test.tsx
+++ b/src/components/layout/Footer/Footer.test.tsx
@@ -29,15 +29,10 @@ vi.mock('@/hooks/useCallbackHandlers', () => ({
default: () => mockUseCallbackHandlers()
}));
-// Mock the SocialLinks component
-vi.mock('@molecules/SocialLinks', () => ({
- default: () => Social Links
-}));
-
-// Mock the FaHeart and FaChevronUp icons
-vi.mock('react-icons/fa', () => ({
- FaHeart: () => ,
- FaChevronUp: () =>
+// Mock the cluster status hook
+const mockUseClusterStatus = vi.fn();
+vi.mock('@hooks/useClusterStatus', () => ({
+ default: () => mockUseClusterStatus()
}));
// Mock AnimationContext
@@ -66,6 +61,7 @@ describe('Footer Component', () => {
vi.clearAllMocks();
mockUseFooter.mockReturnValue(mockFooterData);
mockUseCallbackHandlers.mockReturnValue(mockHandlersData);
+ mockUseClusterStatus.mockReturnValue({ status: 'loading', data: null });
});
it('renders correctly with all required data', () => {
@@ -78,8 +74,8 @@ describe('Footer Component', () => {
const footerText = screen.getByText(/© 2025/);
expect(footerText).toBeInTheDocument();
- // Check that social links component is rendered
- expect(screen.getByTestId('social-links')).toBeInTheDocument();
+ // The social icon row is gone from the footer
+ expect(screen.queryByTestId('social-links')).not.toBeInTheDocument();
// Check for navigation links
expect(screen.getByText('Home')).toBeInTheDocument();
@@ -88,14 +84,7 @@ describe('Footer Component', () => {
expect(screen.getByText('Contact')).toBeInTheDocument();
expect(screen.getByText('Resume')).toBeInTheDocument();
expect(screen.getByText('Contact Card')).toBeInTheDocument();
-
- // Check for "Made with" text (appears twice for responsive layout)
- const madeWithTexts = screen.getAllByText(/Made with/);
- expect(madeWithTexts.length).toBeGreaterThan(0);
-
- // Check for "using React" text
- const usingReactTexts = screen.getAllByText(/using React/);
- expect(usingReactTexts.length).toBeGreaterThan(0);
+ expect(screen.queryByText(/Made with/)).not.toBeInTheDocument();
});
@@ -122,4 +111,40 @@ describe('Footer Component', () => {
expect(mockHandlersData.handleDownload).toHaveBeenCalledTimes(1);
expect(mockHandlersData.handleDownload).toHaveBeenCalledWith('/contact/Derek_Mackley.vcf', 'Derek_Mackley.vcf');
});
-});
\ No newline at end of file
+
+ describe('cluster line', () => {
+ const okData = {
+ updatedAt: '2026-11-20T14:32:00.000Z',
+ badges: {
+ cluster_status: { title: 'Cluster', value: 'up', color: 'green' },
+ cluster_node_count: { title: 'Nodes', value: '11', color: 'green' },
+ cluster_pod_count: { title: 'Pods', value: '266', color: 'green' }
+ }
+ };
+
+ it('shows live numbers and links to the cluster repo', () => {
+ mockUseClusterStatus.mockReturnValue({ status: 'ok', data: okData });
+ render();
+ const line = screen.getByTestId('footer-cluster-line');
+ expect(line).toHaveTextContent('Served from a Talos cluster in my garage · 11 nodes · 266 pods · all systems up');
+ expect(line).toHaveAttribute('href', 'https://github.com/dapperdivers/dapper-cluster');
+ });
+
+ it('says degraded when the cluster is not up', () => {
+ mockUseClusterStatus.mockReturnValue({
+ status: 'ok',
+ data: { ...okData, badges: { ...okData.badges, cluster_status: { title: 'Cluster', value: 'degraded', color: 'yellow' } } }
+ });
+ render();
+ expect(screen.getByTestId('footer-cluster-line')).toHaveTextContent(/11 nodes · 266 pods · degraded$/);
+ });
+
+ it.each(['loading', 'error'] as const)('shows only the fixed text while %s', (status) => {
+ mockUseClusterStatus.mockReturnValue({ status, data: null });
+ render();
+ const line = screen.getByTestId('footer-cluster-line');
+ expect(line).toHaveTextContent(/^Served from a Talos cluster in my garage$/);
+ expect(line.textContent).not.toMatch(/\d/);
+ });
+ });
+});
diff --git a/src/components/layout/Footer/Footer.tsx b/src/components/layout/Footer/Footer.tsx
index 5569ac8b..1456e0a4 100644
--- a/src/components/layout/Footer/Footer.tsx
+++ b/src/components/layout/Footer/Footer.tsx
@@ -1,13 +1,31 @@
import React, { memo } from 'react';
-import { FaHeart } from 'react-icons/fa';
import { motion, AnimatePresence, Variants } from 'framer-motion';
import { useAnimation } from '@context/AnimationContext';
-import SocialLinks from '@molecules/SocialLinks';
-import { profileLinks } from '@/portfolio';
+import useClusterStatus from '@hooks/useClusterStatus';
+import { clusterHealth, healthLabel } from '@molecules/ClusterStatus/clusterSummary';
import useFooter from '@hooks/useFooter';
import useCallbackHandlers from '@/hooks/useCallbackHandlers';
import './Footer.css';
+interface ClusterLine {
+ text: string;
+ live: boolean;
+}
+
+// "Served from a Talos cluster in my garage · 11 nodes · 266 pods · all systems up".
+// Without live data only the fixed part is shown.
+const buildClusterLine = ({ status, data }: ReturnType): ClusterLine => {
+ const parts = ['Served from a Talos cluster in my garage'];
+ if (status !== 'ok' || !data) return { text: parts[0], live: false };
+ const nodes = data.badges.cluster_node_count?.value;
+ const pods = data.badges.cluster_pod_count?.value;
+ const health = healthLabel(clusterHealth(data));
+ if (nodes) parts.push(`${nodes} nodes`);
+ if (pods) parts.push(`${pods} pods`);
+ if (health) parts.push(health);
+ return { text: parts.join(' · '), live: true };
+};
+
/**
* Footer component with essential information and links in a concise format.
* Enhanced with framer-motion animations.
@@ -19,6 +37,8 @@ const Footer = () => {
const { currentYear, greetings } = useFooter();
const { handleDownload } = useCallbackHandlers();
const { animationEnabled } = useAnimation();
+ const cluster = useClusterStatus();
+ const clusterLine = buildClusterLine(cluster);
// Animation variants for footer elements
const footerVariants: Variants = {
@@ -60,17 +80,6 @@ const Footer = () => {
}
} satisfies Variants;
- const heartVariants: Variants = {
- pulse: {
- scale: [1, 1.1, 1],
- transition: {
- duration: 2,
- repeat: Infinity,
- ease: "easeInOut"
- }
- }
- };
-
const downloadContactCard = (e: React.MouseEvent) => {
e.preventDefault();
handleDownload('/contact/Derek_Mackley.vcf', 'Derek_Mackley.vcf');
@@ -87,7 +96,7 @@ const Footer = () => {
>
- {/* Copyright and Made with */}
+ {/* Copyright */}
{
© {currentYear} {greetings.name}
-
- Made with {' '}
-
-
-
- {' '} using React
-
{/* Essential Links */}
@@ -138,25 +137,18 @@ const Footer = () => {
- {/* Social Links */}
-
-
-
+
- Made with {' '}
-
-
-
- {' '} using React
-
+
+ {clusterLine.text}
+
diff --git a/src/components/layout/Head/Head.stories.tsx b/src/components/layout/Head/Head.stories.tsx
index ad904c1a..5291eea2 100644
--- a/src/components/layout/Head/Head.stories.tsx
+++ b/src/components/layout/Head/Head.stories.tsx
@@ -2,17 +2,13 @@ import React from 'react';
import type { Meta, StoryObj } from '@storybook/react-vite';
import Head from './Head';
import type { HeadProps } from './Head';
-import { mockStructuredData } from '@stories-utils';
-import { HelmetProvider } from 'react-helmet-async';
-
-// We need to wrap the Head component in HelmetProvider
-// for it to work properly in Storybook (Note: This is now handled globally)
-const helmetContext = {};
const meta = {
title: 'Layout/Head',
component: Head,
tags: ['autodocs'],
+ // Head renders nothing itself, so every story shows a preview of what it sets
+ render: (args) => ,
argTypes: {
title: {
control: 'text',
@@ -55,27 +51,86 @@ const meta = {
export default meta;
type Story = StoryObj;
-// Template for the component
-const Template = (args: HeadProps) => {
- // Since we can't directly visualize Head changes in Storybook,
- // we'll display some information about what tags would be set
+// Schema.org samples for the structured data stories
+const structuredDataSamples = {
+ person: {
+ '@context': 'https://schema.org',
+ '@type': 'Person',
+ name: 'Derek Mackley',
+ jobTitle: 'Principal Security Engineer',
+ url: 'https://www.derekmackley.com',
+ knowsAbout: ['Product Security', 'Kubernetes', 'AI Agent Security'],
+ },
+ article: {
+ '@context': 'https://schema.org',
+ '@type': 'Article',
+ headline: 'Running a Kubernetes cluster from the garage',
+ author: { '@type': 'Person', name: 'Derek Mackley' },
+ datePublished: '2026-11-01',
+ },
+ product: {
+ '@context': 'https://schema.org',
+ '@type': 'SoftwareApplication',
+ name: 'Developer Portfolio',
+ operatingSystem: 'Web Browser',
+ applicationCategory: 'WebApplication',
+ },
+};
+
+const DEFAULT_TITLE = 'Derek Mackley | Principal Security Engineer';
+const DEFAULT_DESCRIPTION = 'Derek Mackley - Principal Security Engineer working across product security, Kubernetes platform engineering and AI agent security';
+
+const previewLabel = {
+ margin: '0 0 var(--spacing-2)',
+ color: 'var(--color-primary)',
+ fontFamily: 'var(--font-family-jetbrains)',
+ fontSize: 'var(--font-size-xs)',
+ letterSpacing: 'var(--letter-spacing-technical)',
+ textTransform: 'uppercase',
+} as const;
+
+// Head modifies document.head and renders no UI, so show what it sets: the
+// browser tab and search result, then the tags that carry the same values.
+const HeadPreview = (args: HeadProps) => {
+ const title = args.title || DEFAULT_TITLE;
+ const description = args.description || DEFAULT_DESCRIPTION;
+ const tags = [
+ `${title} `,
+ ` `,
+ args.canonicalUrl ? ` ` : '',
+ args.imageUrl ? ` ` : '',
+ args.imageUrl ? ` ` : '',
+ args.structuredData ? `