Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/assets/css/design-system/tokens/spacing.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
--spacing-10: 5rem;

/* Semantic Spacing */
/* Vertical rhythm: padding on each side of a section, and the gap between a
section header and its content. Tighter on phones, roomier on desktop;
the vw caps keep it from doubling with large text. */
--section-gap: min(1.5rem, 8vw);
--section-header-gap: min(1.5rem, 6.2vw);
--section-padding-y: var(--spacing-8);
--section-padding-y-sm: var(--spacing-6);
--container-padding-x: min(var(--spacing-6), 8.3vw);
Expand All @@ -22,3 +27,17 @@
--button-padding-x: var(--spacing-4);
--button-padding-y: var(--spacing-2);
}

@media (min-width: 768px) {
:root {
--section-gap: min(2.5rem, 8vw);
--section-header-gap: min(2rem, 6.2vw);
}
}

@media (min-width: 1024px) {
:root {
--section-gap: min(4rem, 8vw);
--section-header-gap: min(2.5rem, 6.2vw);
}
}
10 changes: 7 additions & 3 deletions src/components/atoms/HeaderName/HeaderName.css
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,24 @@ noscript ~ * .cursor {

/* Signature: one line, sized by the viewport so large text cannot wrap it */
.header-name__title {
font-size: min(1.75rem, 8vw);
font-family: var(--font-family-jetbrains);
font-weight: var(--font-weight-semibold);
letter-spacing: -0.01em;
color: var(--color-primary);
font-size: min(1.125rem, 5vw);
line-height: 1.1;
white-space: nowrap;
}

@media (min-width: 640px) {
.header-name__title {
font-size: min(2rem, 7vw);
font-size: min(1.5rem, 5vw);
}
}

@media (min-width: 1024px) {
.header-name__title {
font-size: min(2.5rem, 6vw);
font-size: min(1.875rem, 5vw);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/atoms/HeaderName/HeaderName.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import HeaderName from './HeaderName';

// Mock CSS imports to avoid actual CSS loading in tests
vi.mock('./HeaderName.css', () => ({
default: '.cyber-text-animation { font-family: Agustina; }'
default: '.cyber-text-animation { font-family: monospace; }'
}));

describe('HeaderName Component', () => {
Expand Down Expand Up @@ -56,7 +56,7 @@ describe('HeaderName Component', () => {
expect(element).toHaveClass('relative', 'cyber-text-animation');
});

it('uses the Agustina font', () => {
it('uses the mono name style', () => {
const { container } = render(<HeaderName name={defaultName} />);
const element = container.firstChild as HTMLElement;
// Since we're mocking the CSS, we'll check for the class instead
Expand Down
2 changes: 1 addition & 1 deletion src/components/atoms/HeaderName/HeaderName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const HeaderName: React.FC<HeaderNameProps> = ({
onHoverEnd={() => controls.start('initial')}
>
<h2
className="header-name__title font-agustina text-cyan-400 relative tracking-wide flex items-center gap-3"
className="header-name__title relative flex items-center gap-3"
data-content={name}
aria-label={name}
>
Expand Down
13 changes: 2 additions & 11 deletions src/components/layout/Section/Section.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@

.section {
position: relative;
padding: min(6rem, 25vw) 0;
padding: var(--section-gap) 0;
background: transparent;
min-height: 50vh;
overflow: hidden;
}

Expand All @@ -19,7 +18,7 @@
z-index: 10;
text-align: left;
max-width: var(--container-max-width);
margin: 0 auto min(var(--spacing-8), 12.4vw);
margin: 0 auto var(--section-header-gap);
padding: 0 0 min(var(--spacing-5), 6.2vw);
border-bottom: 1px solid rgba(var(--color-cyan-rgb), 0.2);
}
Expand Down Expand Up @@ -71,21 +70,13 @@
}

@media (max-width: 768px) {
.section {
padding: min(3rem, 12.4vw) 0;
}

.section-title {
font-size: min(var(--font-size-2xl), 8vw);
}

.section-subtitle {
font-size: var(--font-size-base);
}

.section .section-content {
padding: min(1.5rem, 6.2vw) 0;
}
}

.section:focus,
Expand Down
4 changes: 2 additions & 2 deletions src/components/layout/Section/Section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ const Section = ({
const contentWrapper = (content: React.ReactNode) => (
<motion.div
variants={slideUpVariants}
className="relative z-10 pt-2"
className="relative z-10"
>
{content}
</motion.div>
);

// Content with optional container
const content = container ? (
<div className={`${containerClasses} py-16`}>
<div className={containerClasses}>
{sectionHeader}
<motion.div
className="section-content"
Expand Down
6 changes: 6 additions & 0 deletions src/components/molecules/SocialLinks/SocialLinks.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@
width: 1.25rem;
height: 1.25rem;
}

/* Touch size: at least 44px square */
.social-links--large .social-link {
width: 2.75rem;
height: 2.75rem;
}
18 changes: 18 additions & 0 deletions src/components/molecules/SocialLinks/SocialLinks.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ const meta = {
control: 'object',
description: 'URLs for `github`, `linkedin` and `contactCard` (a vCard to download). A missing key hides that icon.',
},
size: {
control: 'radio',
options: ['default', 'large'],
description: '`large` makes each icon a 44px touch target; the hero uses it on phones',
},
animated: {
control: 'boolean',
description: 'Whether the icons animate in and react to hover',
Expand Down Expand Up @@ -155,3 +160,16 @@ export const MobileView: Story = {
viewport: { value: 'mobile1', isRotated: false },
},
};

/**
* 44px touch targets, as shown in the phone hero
*/
export const Large: Story = {
args: {
size: 'large',
},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
await expect(canvas.getByLabelText('GitHub Profile').parentElement).toHaveClass('social-links--large');
},
};
6 changes: 4 additions & 2 deletions src/components/molecules/SocialLinks/SocialLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export interface SocialLinksProps {
animated?: boolean;
/** Profile URLs and the vCard to download; an icon shows only if its link is given */
links?: Partial<ProfileLinks>;
/** `large` makes each icon a 44px touch target, for phones */
size?: 'default' | 'large';
}

/**
Expand All @@ -22,7 +24,7 @@ export interface SocialLinksProps {
*
* @component
*/
const SocialLinks = ({ className = '', animated = true, links = {} }: SocialLinksProps) => {
const SocialLinks = ({ className = '', animated = true, links = {}, size = 'default' }: SocialLinksProps) => {
const socialLinks = links;
const shouldAnimate = useMotionEnabled(animated);

Expand Down Expand Up @@ -70,7 +72,7 @@ const SocialLinks = ({ className = '', animated = true, links = {} }: SocialLink

return (
<motion.div
className={`flex items-center flex-wrap gap-3 ${className}`}
className={`flex items-center flex-wrap gap-3 ${size === 'large' ? 'social-links--large' : ''} ${className}`.trim()}
initial={shouldAnimate ? "hidden" : "visible"}
animate="visible"
variants={shouldAnimate ? containerVariants : {}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

.cluster-telemetry {
position: relative;
padding: min(3rem, 10vw) 0;
padding: var(--section-gap) 0;
}

.cluster-telemetry__inner {
display: flex;
flex-direction: column;
gap: min(var(--spacing-5), 6vw);
gap: var(--section-header-gap);
box-sizing: border-box;
width: 100%;
max-width: 1200px;
Expand All @@ -25,7 +25,7 @@
align-items: flex-end;
justify-content: space-between;
gap: var(--spacing-3) var(--spacing-5);
padding-bottom: min(var(--spacing-4), 5vw);
padding-bottom: min(var(--spacing-5), 6.2vw);
border-bottom: 1px solid rgba(var(--color-cyan-rgb), 0.2);
}

Expand Down
9 changes: 4 additions & 5 deletions src/components/organisms/Education/Education.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
position: relative;
width: 100%;
max-width: 100%;
padding: var(--spacing-8) min(var(--spacing-4), 4.2vw);
padding: 0;
z-index: 10;
}

Expand All @@ -21,7 +21,6 @@
grid-template-columns: repeat(auto-fit, minmax(min(100%, 31rem), 1fr));
gap: var(--spacing-6);
width: 100%;
margin-bottom: var(--spacing-8);
}

.education-card-wrapper {
Expand All @@ -35,7 +34,7 @@
display: flex;
justify-content: center;
align-items: center;
min-height: 20rem;
min-height: 0;
}

.empty-state-content {
Expand Down Expand Up @@ -72,13 +71,13 @@

@media (max-width: 768px) {
.education-content-wrapper {
padding: var(--spacing-6) min(var(--spacing-3), 3.1vw);
padding: 0;
}
}

@media (max-width: 480px) {
.education-content-wrapper {
padding: var(--spacing-4) min(var(--spacing-2), 2.1vw);
padding: 0;
}

.empty-state-content {
Expand Down
15 changes: 5 additions & 10 deletions src/components/organisms/Experience/Experience.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
position: relative;
width: 100%;
overflow: hidden;
min-height: 100vh;
}

/* Main experience container - simplified to prevent z-index conflicts */
Expand All @@ -17,13 +16,13 @@
width: 100%;
max-width: 1400px;
margin: 0 auto;
padding: min(2rem, 8.3vw) min(1rem, 4.2vw);
padding: 0 min(1rem, 4.2vw);
/* Removed z-index to allow natural stacking */
}

/* Experience header section */
.experience-header {
margin-bottom: min(3rem, 12.4vw);
margin-bottom: var(--section-header-gap);
position: relative;
width: 100%;
/* Removed high z-index to prevent stacking issues */
Expand Down Expand Up @@ -191,7 +190,7 @@
.experience-load-more {
display: flex;
justify-content: center;
margin: 3rem 0 2rem;
margin: var(--section-header-gap) 0 0;
position: relative;
/* Removed explicit z-index to prevent stacking conflicts */
}
Expand Down Expand Up @@ -414,7 +413,7 @@
@media (max-width: 1024px) {
.experience-container {
max-width: 1200px;
padding: 1.5rem min(1rem, 4.2vw);
padding: 0 min(1rem, 4.2vw);
}

.console-help__grid {
Expand All @@ -428,11 +427,7 @@

@media (max-width: 768px) {
.experience-container {
padding: 1rem min(0.75rem, 3.1vw);
}

.experience-header {
margin-bottom: 2rem;
padding: 0 min(0.75rem, 3.1vw);
}

.console-feedback,
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/GithubProfile/GithubProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const GithubProfile = ({ id = 'contact' }: GithubProfileProps) => {
variants={slideUpVariants}
initial={animationEnabled ? "hidden" : "visible"}
animate="visible"
className="mt-8"
className=""
>
<GithubProfileCard
prof={prof}
Expand Down
Loading
Loading