Portfolio Design System
A single source of truth for the typography, color palette, spacing scale, and reusable UI components powering harrikilpio.com. Built with pure CSS custom properties, Utopia fluid typography, and Astro SSR.
Color Palette
Warm, high-contrast, editorial palette designed for comfort during long reading sessions.
Surfaces & Backgrounds
Foundation layers used to establish depth and contrast across views.
--color-bgMain canvas background (warm beige / soft slate)
--color-surfaceCard & container surface
--color-surface-hoverInteractive surface hover state
--color-surface-elevatedSubtle header / footer elevated surface
Typography & Content
Accessible grayscale hierarchy tuned for maximum readability.
--color-text-primaryHeadlines, strong text & high emphasis
--color-text-secondaryBody copy, descriptions & paragraphs
--color-text-mutedCaptions, hints, timestamps & labels
Borders & Dividers
Structural boundary lines separating sections and card surfaces.
--color-borderPrimary card borders & major dividers
--color-border-subtleHairline dividers & table borders
Accents & Category Highlights
Primary interaction colors and category markers.
--color-accentPrimary CTA and interactive accent
--color-accent-hoverButton & link hover state
--color-accent-subtleLow-contrast accent background
--color-accent-categoryCategory & warning rust accent
--color-accent-category-subtleCategory tag tint
--color-accent-category-borderCategory tag border
Experience Badges
Semantic tones indicating career proficiency levels.
--badge-experienced-bgExperienced background (sage green)
--badge-experienced-textExperienced text colour
--badge-experienced-borderExperienced border tone
--badge-comfortable-bgComfortable background (warm gray)
--badge-comfortable-textComfortable text colour
--badge-comfortable-borderComfortable border tone
Typography
Space Grotesk primary typeface paired with system monospace. The type scale dynamically clamps across screen sizes from mobile (320px) to desktop (1400px) with Utopia calculations.
Fluid Type Ladder
Weights, Line Height & Tracking
--font-weight-normal / -medium / -semibold / -bold400 / 500 / 600 / 700Space Grotesk weights; bold for headings, semibold for strong emphasis
--line-height-tight1.25Headings (H1–H6)
--line-height-normal1.5Base document line height and compact UI text
--line-height-relaxed1.75Paragraphs, list items, code blocks and case study copy
--letter-spacing-tight-0.02emLarge display headings
--letter-spacing-wide0.05emReserved for uppercase labels and badges
--letter-spacing-wider0.08emReserved for small uppercase eyebrows and meta tags
Spacing & Layout
An 8-point base grid with 4px sub-increments creates harmonic layout rhythm across margins, paddings, and component gaps.
Container Constraints
--container-max-width900pxCentered main column width providing optimal reading line length
--container-wide-max-width1400pxWide column for multi-column layouts such as the Work Approach skills grid
--prose-max-width800pxMaximum width for long-form text blocks inside wider containers
--container-paddingvar(--space-6) = 24pxResponsive horizontal gutters protecting content on small viewports
Borders, Radii & Motion
Tactile edge styling and calibrated transition timings for interactive micro-interactions.
--radius-smInline code, small tags, sub-elements
--radius-mdCards, buttons, table wrappers
--radius-lgModal overlays & featured hero cards
--radius-fullPill badges, status indicators
Border Width & Style
--border-width-11pxDefault card, divider and timeline borders
--border-width-22pxEmphasis borders such as active tab underlines and timeline markers
--border-style-solidsolidStandard border style
--border-style-nonenoneRemoves a border where a style value is required
UI Components
Live instances of portfolio UI components rendered with standard HTML classes.
Experience Badges (.badge)
Used on the homepage and work approach pages to classify skill mastery levels.
.badge.badge--experienced.badge.badge--comfortableWith custom skill text<span class="badge badge--experienced">
Experienced
</span>
<span class="badge badge--comfortable">
Comfortable
</span>Skill Cards (.skill-card)
T-shaped skill matrix cards with experienced and comfortable level styling.
Token architectures, component libraries, and documentation.
Astro SSR, TypeScript, Node.js, and API design.
<div class="skill-card skill-card--experienced">
<strong class="skill-name">Design Systems</strong>
<p class="skill-desc">Token architectures, component libraries, and documentation.</p>
</div>
<div class="skill-card skill-card--comfortable">
<strong class="skill-name">Full-Stack Development</strong>
<p class="skill-desc">Astro SSR, TypeScript, Node.js, and API design.</p>
</div>Buttons & CTAs (.btn)
Primary call-to-action and secondary navigation buttons.
.btn.btn--primary.btn.btn--secondary<a href="/case-studies" class="btn btn--primary">
Primary Action
</a>
<a href="/work-approach" class="btn btn--secondary">
Secondary Action
</a>Switch (.desc-switch)
On/off setting for a view preference, used on the Work Approach page to show or hide skill descriptions. A <button role="switch"> with aria-checked and aria-controls. The label never changes; only the track and thumb reflect the state. Render it with the hidden attribute and reveal it from a script, so the content stays fully visible without JavaScript.
Token architectures, component libraries, and documentation.
<button
type="button"
role="switch"
class="desc-switch"
aria-checked="false"
aria-controls="skills-grid"
>
<span class="desc-switch__track" aria-hidden="true">
<span class="desc-switch__thumb"></span>
</span>
<span class="desc-switch__label">Show skill descriptions</span>
</button>
<!-- Script: flip aria-checked on click and toggle
a "collapsed" class on the controlled element. -->Surface Cards (.card)
Bordered content container with hover elevation and accent border highlight.
Design System Architecture
This card element demonstrates the standard .card class styling, including hover background shifts, border accent coloring, and padding tokens.
<div class="card">
<div class="card-header">
<span class="badge badge--experienced">
Featured Project
</span>
</div>
<h4>Design System Architecture</h4>
<p>Card body text goes here.</p>
<a href="/case-studies" class="ds-text-link">
Explore case study →
</a>
</div>Career Timeline (.timeline)
Ordered vertical timeline list with milestone dot indicators and role metadata.
- Lead Product Designer
Company Name
2021–PresentLed end-to-end design systems and frontend architecture.
<ol class="timeline" role="list">
<li class="timeline-item">
<div class="timeline-header">
<h4 class="role-company">Company Name</h4>
<span class="role-period badge badge--comfortable">2021–Present</span>
</div>
<span class="role-title">Lead Product Designer</span>
<p class="role-desc">Led end-to-end design systems and frontend architecture.</p>
</li>
</ol>Data Tables (.table-container)
Responsive scrollable tables with sticky headers and zebra striping.
| Design Token | Category | Default Value | Status |
|---|---|---|---|
--color-bg | Surface Color | #F0ECE4 | Active |
--font-family-sans | Typography | Space Grotesk | Active |
--radius-md | Border Radius | 8px | Active |
--transition-fast | Motion | 150ms ease | Standard |
<div class="table-container">
<table>
<caption class="sr-only">Caption</caption>
<thead>
<tr>
<th scope="col">Token</th>
<th scope="col">Value</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>--color-bg</code></td>
<td>#F0ECE4</td>
</tr>
</tbody>
</table>
</div>Case Study Stat Band (.stat-band)
Used in case study markdown to group structured sections — My Role, Design Process, Key Learnings, Business Outcomes — as scannable stat rows. Each section is a <dl class="stat-row"> with .stat-number (bold, primary) and .stat-label (small, muted) pairs. The band sits between two horizontal rules.
My Role
- Facilitated
- workshops and co-design sessions
- Collaborated
- with client and technology partner
- Contributed
- to front-end implementation
Design Process
- Lean UX
- cycles drove the process
- Coded
- prototypes for early testing
- Short loops
- to refine through feedback
<div class="stat-band">
## My Role
<dl class="stat-row">
<div class="stat">
<dt class="stat-number">Facilitated</dt>
<dd class="stat-label">workshops and co-design sessions</dd>
</div>
<div class="stat">
<dt class="stat-number">Collaborated</dt>
<dd class="stat-label">with client and technology partner</dd>
</div>
<div class="stat">
<dt class="stat-number">Contributed</dt>
<dd class="stat-label">to front-end implementation</dd>
</div>
</dl>
## Design Process
<dl class="stat-row">
<div class="stat">
<dt class="stat-number">Lean UX</dt>
<dd class="stat-label">cycles drove the process</dd>
</div>
<div class="stat">
<dt class="stat-number">Coded</dt>
<dd class="stat-label">prototypes for early testing</dd>
</div>
<div class="stat">
<dt class="stat-number">Short loops</dt>
<dd class="stat-label">to refine through feedback</dd>
</div>
</dl>
</div>Skill Depth Radar (RadarChart.astro)
Spider graph with a per-category depth bar, used on the Work Approach page. Each category has a self-assessed numeric depth (0–5, half steps allowed) on a fixed scale, so adding skills never moves an axis. The SVG and bars are aria-hidden; screen readers get a .sr-only depth line per category. Colours come from --color-border, --color-accent and --color-accent-category.
Depth by domain
Self-assessed depth on a scale of 0 to 5. Distance from the centre shows depth, not the number of skills listed.
Design
Depth: 5 of 5Design Engineering
Depth: 4 of 5Research
Depth: 3 of 5Visual Design
Depth: 3 of 5AI tools & skills
Depth: 3.5 of 5---
import RadarChart from '../components/RadarChart.astro';
---
<RadarChart locale={locale} />
// Data: workApproach.skillCategories in en.json / fi.json
// { "category": "Research", "depth": 3.5, … }
// depth is 0–5; use the same value in both locales.Code
Inline and block code patterns used throughout the design system documentation. No syntax highlighting — monochrome styling using existing tokens.
Inline Code (<code>)
Use inline <code> within prose to reference token names, class names, or short values.
Apply var(--color-text-primary) for headlines and set spacing with var(--space-4). Surface cards use the .card class; badges use .badge--experienced or .badge--comfortable.
Block Code (<pre><code>)
Use a .code-block wrapper around <pre><code> for multi-line snippets. The "Copy" button writes the content to the clipboard.
:root {
--color-bg: #F0ECE4;
--color-surface: #FFFFFF;
--color-accent: #1A1A1E;
--space-4: 16px;
--radius-md: 8px;
--transition-fast: 150ms ease;
}<div class="card">
<h3 class="card__title">Project Title</h3>
<p class="card__body">A short description of the project.</p>
<span class="badge badge--experienced">Experienced</span>
</div>Accessibility
WCAG 2.1 Level AA patterns implemented across the design system and portfolio. These conventions must be preserved when adding new components or tokens.
Focus Styles
All interactive elements use a global :focus-visible rule. Never suppress focus outlines — provide a visible replacement if overriding.
Token: --color-accent · Width: 2px · Offset: 3px · Shape: --radius-sm
Reduced Motion
Transition tokens are set to 0ms for users who prefer reduced motion. Always use var(--transition-fast) or var(--transition-normal) — never hardcode ms values.
--transition-fast150ms ease → 0ms (reduced motion)--transition-normal250ms ease → 0ms (reduced motion)Colour Contrast
All text/background token pairs meet WCAG AA (≥ 4.5:1 normal text). Verified in both light and dark mode. Ratios are documented as comments in tokens.css.
Ratios shown as Light / Dark. Verify new token pairs with the WebAIM Contrast Checker before committing.
Screen-reader Utilities
Global utility classes available from global.css on all portfolio pages.
.sr-onlyVisually hidden, still announced by screen readers. Use for captions, labels, contextual text, and prose headings that are duplicated in the visual layout (e.g. markdown H1 hidden from view but kept in the accessibility tree)..skip-linkOff-screen skip-to-main link. Positioned via BaseLayout.astro; becomes visible on keyboard focus.Navigation Landmarks
All <nav> elements carry a distinct aria-label so screen readers can distinguish them. Navigation link lists use <ul>/<li> so assistive tech announces the item count. The site brand link carries an explicit aria-label — never rely on child span text alone.
<nav aria-label={t('a11y.mainNav')}>Primary nav — announced as a distinct landmark. Translated: "Main Navigation" / "Päävalikko".<nav aria-label={t('a11y.footerNav')}><ul>…</ul></nav>Footer nav wrapped in a list so screen readers announce item count.aria-label="EN – English (current language)"Language switcher links prefix the display text with the ISO code for clarity: "EN – English {t('a11y.currentLanguage')}" / "FI – Suomi {t('a11y.currentLanguage')}". The inactive link omits the current-language suffix.Never hardcode a landmark labelPages exist in EN and FI, so every aria-label on a landmark comes from a translation key in both JSON files.Case Study Pages
The case study detail layout (CaseStudyDetail.astro) keeps a strict heading outline, labels each <nav> with a translated name and renders only the list items that exist.
h1 → h2The study title is the h1; markdown sections use ## so no heading level is skipped. Never use ### for top-level sections.<nav aria-label="Case study navigation">Back link and pagination each have their own translated label (caseStudies.backNavLabel, caseStudies.paginationLabel).<ul><li>…</li></ul>Prev/next renders an <li> only when that study exists, so screen readers never announce an empty list item.loading="eager" fetchpriority="high"The hero illustration is above the fold and loads first; the team illustration below the prose stays lazy.Protected-link Indicator
Links to password-protected pages show a decorative 🔒 prefix. The icon is aria-hidden; the state is conveyed to assistive tech through .sr-only text, so it never relies on the icon or colour alone.
<span aria-hidden="true">🔒 </span>Visual cue only — hidden from screen readers.<span class="sr-only">(password protected)</span>Translated via a11y.passwordProtected; removed once the visitor is authenticated.External Links
Every link with target="_blank" carries rel="noopener noreferrer" and an aria-label that ends with the translated new-tab notice (a11y.newTab), so the destination and the behaviour are both announced.
aria-label="LinkedIn (opens in new tab)"Visible link text first, then the notice. Finnish pages use (avautuu uudessa välilehdessä).Tables
Every table has a <caption class="sr-only"> and every <th> declares its scope, so screen readers can announce the table name and the header for each cell.
<caption class="sr-only">Accessible table name without changing the visual layout.<th scope="col"> / <th scope="row">Column or row header, set explicitly on every <th>.Clickable Cards
A fully clickable card uses the stretched-link pattern: one link on the heading, expanded over the whole card with a pseudo-element. Do not add a second link to the same URL.
.study-card-link::after { position: absolute; inset: 0 }The card needs position: relative. The link text stays the heading, so the link name is meaningful.<span aria-hidden="true">Read case study →</span>Decorative call to action, hidden from assistive tech to avoid a duplicate announcement.<article aria-labelledby="study-title-slug">Every <article> points to its heading, whose id must be set.Illustrations
Illustrations are decorative in context. The image has an empty alt and the description lives in a translated, visually hidden caption.
<Image alt="" … />Empty alt keeps the image out of the accessibility tree.<figcaption class="sr-only">Text from caseStudies.illustrationAlt or caseStudies.teamIllustrationAlt.Hide-on-scroll Header
The sticky site header uses a progressive-enhancement pattern to maximise reading space. By default (position: sticky; top: 0) it is always visible. When JavaScript runs, a requestAnimationFrame-throttled scroll listener adds .site-header--hidden (transform: translateY(-100%)) when scrolling down past the header height, and removes it when scrolling up.
transition: transform var(--transition-normal)Always uses the token — resolves to 0ms under prefers-reduced-motion: reduce, making the hide/show instant for users who prefer it.will-change: transformPromotes the header to its own compositor layer so the transform never triggers a layout or paint..site-header:focus-within { transform: translateY(0) }CSS rule that unconditionally reveals the header whenever keyboard focus lands inside it — no JavaScript required for this guarantee.siteHeader.addEventListener('focusin', …)JS listener removes .site-header--hidden on focusin, keeping the header visible for the duration of keyboard interaction without relying on the CSS rule alone.