Harri Kilpiö/Design System
Living Specificationv1.5.0

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.

Font: Space Grotesk
Scale: Utopia Fluid (320px → 1400px)
Grid: 4px / 8px Base Spacing
Framework: Vanilla CSS + Astro

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.

#F0ECE4#18181B
--color-bg

Main canvas background (warm beige / soft slate)

#FFFFFF#242428
--color-surface

Card & container surface

#F5F1EB#2E2E34
--color-surface-hover

Interactive surface hover state

#EDE9E1#2B2B30
--color-surface-elevated

Subtle header / footer elevated surface

Typography & Content

Accessible grayscale hierarchy tuned for maximum readability.

#1A1A1E#F5F5F7
--color-text-primary

Headlines, strong text & high emphasis

#4A4A52#C2C2CC
--color-text-secondary

Body copy, descriptions & paragraphs

#636368#9494A0
--color-text-muted

Captions, hints, timestamps & labels

Borders & Dividers

Structural boundary lines separating sections and card surfaces.

#D8D2C8#383842
--color-border

Primary card borders & major dividers

#E8E3DA#2D2D35
--color-border-subtle

Hairline dividers & table borders

Accents & Category Highlights

Primary interaction colors and category markers.

#1A1A1E#F4F4F6
--color-accent

Primary CTA and interactive accent

#3A3A44#DDDDE4
--color-accent-hover

Button & link hover state

rgba(26, 26, 30, 0.08)rgba(244, 244, 246, 0.10)
--color-accent-subtle

Low-contrast accent background

#922B21#E57368
--color-accent-category

Category & warning rust accent

rgba(146, 43, 33, 0.08)rgba(229, 115, 104, 0.14)
--color-accent-category-subtle

Category tag tint

rgba(146, 43, 33, 0.25)rgba(229, 115, 104, 0.32)
--color-accent-category-border

Category tag border

Experience Badges

Semantic tones indicating career proficiency levels.

#CBE5D9#224233
--badge-experienced-bg

Experienced background (sage green)

#1A1A1E#B4EBD6
--badge-experienced-text

Experienced text colour

#A8BFB2#31604A
--badge-experienced-border

Experienced border tone

#E8E3DA#302C28
--badge-comfortable-bg

Comfortable background (warm gray)

#4A4A52#DCD2C5
--badge-comfortable-text

Comfortable text colour

#C8C2B8#48423C
--badge-comfortable-border

Comfortable 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.

Aa Bb Gg 123 &%
Space Grotesk

Primary Sans-Serif • Weights 400 (Regular), 500 (Medium), 600 (Semibold), 700 (Bold)

const code = true;
ui-monospace / SFMono

Code & Technical Identifiers

Fluid Type Ladder

--font-size-4xl40px → 61pxDisplay & Hero Titles
Display Title
--font-size-3xl33px → 49pxPage Titles (H1)
Page Headline
--font-size-2xl28px → 39pxSection Headings (H2)
Section Heading
--font-size-xl23px → 31pxSubsection Titles (H3)
Subsection Title
--font-size-lg19px → 25pxLead Paragraphs & Subtitles
Lead Paragraph Style
--font-size-base16px → 20pxBody Text & General Copy
Standard body copy for readability across all device viewports.
--font-size-sm13px → 16pxSecondary Copy & Table Text
Supporting detail text and metadata.
--font-size-xs12px → 13pxBadges, Labels & Tooltips
TAG & BADGE LABEL

Weights, Line Height & Tracking

--font-weight-normal / -medium / -semibold / -bold400 / 500 / 600 / 700

Space Grotesk weights; bold for headings, semibold for strong emphasis

--line-height-tight1.25

Headings (H1–H6)

--line-height-normal1.5

Base document line height and compact UI text

--line-height-relaxed1.75

Paragraphs, list items, code blocks and case study copy

--letter-spacing-tight-0.02em

Large display headings

--letter-spacing-wide0.05em

Reserved for uppercase labels and badges

--letter-spacing-wider0.08em

Reserved 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.

--space-px2px (2px)
--space-14px (0.25rem)
--space-28px (0.5rem)
--space-312px (0.75rem)
--space-416px (1.0rem)
--space-520px (1.25rem)
--space-624px (1.5rem)
--space-832px (2.0rem)
--space-1040px (2.5rem)
--space-1248px (3.0rem)
--space-1664px (4.0rem)

Container Constraints

--container-max-width900px

Centered main column width providing optimal reading line length

--container-wide-max-width1400px

Wide column for multi-column layouts such as the Work Approach skills grid

--prose-max-width800px

Maximum width for long-form text blocks inside wider containers

--container-paddingvar(--space-6) = 24px

Responsive horizontal gutters protecting content on small viewports

Borders, Radii & Motion

Tactile edge styling and calibrated transition timings for interactive micro-interactions.

--radius-sm
4px

Inline code, small tags, sub-elements

--radius-md
8px

Cards, buttons, table wrappers

--radius-lg
12px

Modal overlays & featured hero cards

--radius-full
9999px

Pill badges, status indicators

Border Width & Style

--border-width-11px

Default card, divider and timeline borders

--border-width-22px

Emphasis borders such as active tab underlines and timeline markers

--border-style-solidsolid

Standard border style

--border-style-nonenone

Removes a border where a style value is required

Hover Me (150ms)
--transition-fast150ms ease

Button hovers, link color shifts, badge background updates

Hover Me (250ms)
--transition-normal250ms ease

Card elevations, drawer toggles, layout state changes

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.

Experienced.badge.badge--experienced
Comfortable.badge.badge--comfortable
Architecture & DesignWith 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.

Design Systems

Token architectures, component libraries, and documentation.

Full-Stack Development

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.

Primary Action.btn.btn--primary
Secondary Action.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.

Design Systems

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.

Featured Project2023–Present

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.

  1. Company Name

    2021–Present
    Lead Product Designer

    Led 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 Tokens Reference
Design TokenCategoryDefault ValueStatus
--color-bgSurface Color#F0ECE4Active
--font-family-sansTypographySpace GroteskActive
--radius-mdBorder Radius8pxActive
--transition-fastMotion150ms easeStandard
<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 5

Design Engineering

Depth: 4 of 5

Research

Depth: 3 of 5

Visual Design

Depth: 3 of 5

AI 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.

text-primary on bg17.35:1 / 16.27:1
text-secondary on bg7.45:1 / 10.02:1
text-muted on bg5.07:1 / 5.91:1
accent-category on bg6.88:1 / 5.89:1

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.