/* ============================================================
   Toni Pallaspuro — page styles
   Ports inline React styles from the Claude Design prototype.
   Depends on colors_and_type.css for tokens.
   ============================================================ */

html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
}
::selection { background: var(--color-accent); color: var(--color-fg-on-accent); }

/* Visible focus ring for keyboard users. :focus-visible only — mouse clicks
   don't trigger this, so the focus ring doesn't appear on plain clicks. */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 3px;
}
.cta:focus-visible,
.nav-cta:focus-visible,
.mobile-menu-cta:focus-visible,
.contact-card:focus-visible {
  outline-offset: 4px;
}

/* Override the base body p rule that constrains to var(--measure);
   sections set their own measure via max-width. */
p { max-width: none; color: inherit; }

/* Anchor offset under sticky header */
section[id] { scroll-margin-top: 80px; }

/* ── LAYOUT PRIMITIVES ───────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 48px);
}
.container-narrow { max-width: 960px; }

/* Rail grid: index/eyebrow column + content column */
.rail-grid {
  display: grid;
  grid-template-columns: minmax(80px, 120px) 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

/* ── SHARED ATOMS ────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--color-accent);
}
.eyebrow-mb { margin-bottom: 24px; }

.initials-mark {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--color-fg);
  white-space: nowrap;
}
.initials-mark .dot { color: var(--color-accent); }

.pill {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 2px;
  border: 1px solid var(--color-border);
  color: var(--text-secondary);
  white-space: nowrap;
}
.pill.accent {
  border-color: color-mix(in oklch, var(--color-accent) 45%, transparent);
  color: var(--color-accent);
  background: color-mix(in oklch, var(--color-accent) 10%, transparent);
}
.pill.pill-xs { font-size: 0.6875rem; }

/* Inline em-dash bullets used in lists */
.dash {
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  margin-top: 3px;
  min-width: 18px;
  flex-shrink: 0;
}

/* ── HEADER ──────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 250ms var(--ease-out), border-color 250ms var(--ease-out);
}
.site-header.is-scrolled {
  background: color-mix(in oklch, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.header-mark {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  /* Pad the hit area to at least 44 px tall for thumb-friendly tap. */
  padding: 12px 4px;
  margin: -12px -4px;
}
.header-mark .initials-mark { font-size: 1.625rem; }

.desktop-nav { display: flex; gap: 28px; align-items: center; }
.desktop-nav a {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-fg-muted);
  text-decoration: none;
  transition: color 200ms var(--ease-out);
}
.desktop-nav a:hover { color: var(--color-fg); }
/* 3-way segmented language switcher (EN · FI · SV). Current language is
   rendered as a non-link <span class="lang-switch lang-switch-active">; the
   others are <a class="lang-switch">. The container wraps them in a single
   rounded pill with internal dividers. */
.desktop-nav .lang-switcher {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.desktop-nav .lang-switch {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-fg-muted);
  padding: 6px 10px;
  text-decoration: none;
  border-left: 1px solid var(--color-border);
  transition: color 200ms var(--ease-out), background 200ms var(--ease-out);
}
.desktop-nav .lang-switch:first-child { border-left: 0; }
.desktop-nav a.lang-switch:hover {
  color: var(--color-accent);
  background: color-mix(in oklch, var(--color-accent) 12%, transparent);
}
.desktop-nav .lang-switch-active {
  color: var(--color-fg);
  background: color-mix(in oklch, var(--color-accent) 18%, transparent);
  cursor: default;
}
.desktop-nav .nav-cta {
  font-weight: 600;
  background: var(--color-accent);
  color: var(--color-fg-on-accent);
  padding: 10px 20px;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background 200ms var(--ease-out);
}
.desktop-nav .nav-cta:hover {
  background: var(--color-accent-hover);
  color: var(--color-fg-on-accent);
}
@media (max-width: 760px) {
  .desktop-nav { display: none; }
}

/* Mobile hamburger button + slide-down menu panel. Hidden ≥761 px. */
.menu-toggle {
  display: none;
  appearance: none;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  color: var(--color-fg);
  cursor: pointer;
  transition: border-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.menu-toggle:hover { border-color: var(--color-accent); color: var(--color-accent); }
.menu-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}
.menu-toggle-bars span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 200ms var(--ease-out), opacity 200ms var(--ease-out);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px clamp(24px, 4vw, 48px) 20px;
  border-top: 1px solid var(--color-border);
  background: color-mix(in oklch, var(--color-bg) 96%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.mobile-menu a {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-fg);
  text-decoration: none;
  padding: 14px 4px;
  border-bottom: 1px solid var(--color-border);
}
.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu-cta {
  margin-top: 12px;
  background: var(--color-accent);
  color: var(--color-fg-on-accent) !important;
  border-bottom: 0 !important;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600 !important;
}
@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .mobile-menu[data-open="true"] { display: flex; }
}

/* ── HERO ────────────────────────────────────────────────────── */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(40px, 6vw, 80px); }

.rail-label {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-fg-muted);
  padding-top: 12px;
  text-transform: uppercase;
}
.rail-label-inner {
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
}

.hero-name {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.035em;
  font-size: clamp(4rem, 11vw, 10.5rem);
  color: var(--color-fg);
  margin: 0;
  text-wrap: balance;
}
.hero-name .accent { color: var(--color-accent); }

.hero-body-grid {
  margin-top: clamp(32px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
@media (max-width: 760px) {
  .hero-body-grid { grid-template-columns: 1fr; }
}

.hero-lede {
  font-family: var(--font-body);
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.5;
  color: var(--color-fg);
  max-width: 38ch;
  margin: 0;
  text-wrap: pretty;
}
.hero-lede-accent { color: var(--color-accent); }

.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: clamp(32px, 4vw, 48px);
}

/* CTAs (hero + nav reuse some) */
.cta {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
/* Reset default <button> chrome so a <button class="cta"> matches the
   <a class="cta"> sibling — used by the hero "Download PDF" trigger.
   Border is re-applied in the variant rule below since button.cta beats
   .cta-ghost in specificity (0,1,1 > 0,1,0). */
button.cta {
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  letter-spacing: 0.02em;
}
button.cta-ghost {
  border: 1px solid var(--color-border);
  color: var(--color-fg);
}
button.cta-ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.cta-primary {
  background: var(--color-accent);
  color: var(--color-fg-on-accent);
  padding: 14px 28px;
  transition: background 200ms var(--ease-out);
}
.cta-primary:hover { background: var(--color-accent-hover); }
.cta-ghost {
  background: transparent;
  color: var(--color-fg);
  padding: 13px 27px;
  border: 1px solid var(--color-border);
  transition: border-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.cta-ghost:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ── METRICS ─────────────────────────────────────────────────── */
.metrics {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: clamp(32px, 4vw, 56px) 0;
  background: color-mix(in oklch, var(--color-card) 50%, transparent);
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(16px, 3vw, 48px);
}
.metric { min-width: 0; }
.metric-n {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-fg);
  line-height: 1;
  margin-bottom: 8px;
}
.metric-l {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--color-fg-muted);
  white-space: pre-line;
}

/* ── SECTIONS ────────────────────────────────────────────────── */
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section-banded {
  background: color-mix(in oklch, var(--color-card) 60%, transparent);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-header { margin-bottom: 56px; }
.section-header .eyebrow { margin-bottom: 20px; }

.rail-index {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-fg-muted);
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--color-fg);
  margin: 0;
  text-wrap: balance;
  max-width: 20ch;
}
.section-title + .section-lead { margin-top: 20px; }
.section-lead {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--color-fg-muted);
  max-width: 52ch;
  margin: 0;
}

/* In-section language chips (currently used in #experience). Keeps a reader
   in the same section when switching locales — each chip anchors to the same
   section in the target locale. */
.exp-lang {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.exp-lang-label {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}
.exp-lang-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* thumb-friendly tap target */
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-fg);
  text-decoration: none;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: color 200ms var(--ease-out), border-color 200ms var(--ease-out), background 200ms var(--ease-out);
}
.exp-lang-chip:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: color-mix(in oklch, var(--color-accent) 10%, transparent);
}

/* ── PROFILE ─────────────────────────────────────────────────── */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.profile-lede {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--color-fg);
  max-width: 46ch;
  margin: 0 0 24px;
  text-wrap: pretty;
}
.profile-p {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-fg-muted);
  max-width: 46ch;
  margin: 0 0 24px;
  text-wrap: pretty;
}
.profile-p:last-child { margin-bottom: 0; }

.trusted-card {
  padding: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-card);
}
.trusted-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 14px;
}
.trusted-list li {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-fg);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

/* ── EXPERIENCE TIMELINE ─────────────────────────────────────── */
.timeline { border-bottom: 1px solid var(--color-border); }

.timeline-row {
  border-top: 1px solid var(--color-border);
  padding: clamp(20px, 3vw, 32px) clamp(8px, 1.5vw, 16px);
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr auto;
  gap: clamp(16px, 3vw, 48px);
  align-items: start;
  transition: background 200ms var(--ease-out);
}
.timeline-row.expandable { cursor: pointer; }
.timeline-row.expandable:hover {
  background: color-mix(in oklch, var(--color-accent) 4%, transparent);
}

.timeline-year {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-fg-muted);
  padding-top: 6px;
  white-space: nowrap;
}
.timeline-body { min-width: 0; }
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}
.timeline-company {
  font-family: var(--font-heading);
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-fg);
  line-height: 1.2;
  margin: 0;
}
.timeline-role {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  color: var(--color-accent);
  margin-bottom: 14px;
}
.timeline-summary {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-fg-muted);
  max-width: 64ch;
  margin: 0;
  text-wrap: pretty;
}

.timeline-points {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: none;
  gap: 10px;
}
.timeline-points li {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-fg);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 70ch;
  text-wrap: pretty;
}
.timeline-points .dash {
  font-size: 0.75rem;
  padding-top: 4px;
  margin-top: 0;
}

.timeline-tags {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

/* Open state */
.timeline-row.open .timeline-points { display: grid; }
.timeline-row.open .timeline-tags { display: flex; }

.timeline-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  /* The whole row is clickable, but the button itself also needs a
     reasonable hit area for keyboard/screen-reader users invoking it
     directly. */
  padding: 12px 8px;
  margin: -8px -8px 0 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  cursor: pointer;
}
.timeline-toggle svg {
  transition: transform 200ms var(--ease-out);
}
.timeline-row.open .timeline-toggle svg { transform: rotate(180deg); }

.timeline-toggle-placeholder { width: 1px; }

/* ── STRENGTHS ───────────────────────────────────────────────── */
.strengths-body { display: grid; gap: 48px; }
.strengths-group-title {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 16px;
}
.strengths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.strength {
  padding: 32px 28px;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  min-height: 200px;
}
.strength-n {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 16px;
  letter-spacing: 0.06em;
}
.strength-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-fg);
  margin: 0 0 12px;
  line-height: 1.2;
}
.strength-body {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-fg-muted);
  margin: 0;
  text-wrap: pretty;
}

/* ── EDUCATION + CERTS + LANGUAGES ───────────────────────────── */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
}

.edu-list { }
.edu-item {
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
}
.edu-item-last { border-bottom: 1px solid var(--color-border); }
.edu-year {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-fg-muted);
  margin-bottom: 4px;
}
.edu-school {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-fg);
  margin-bottom: 4px;
  line-height: 1.3;
}
.edu-degree {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--color-fg);
  margin-bottom: 2px;
}
.edu-detail {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-fg-muted);
}

.cert-list {
  list-style: none;
  padding: 0;
  margin: 0 0 48px;
  display: grid;
  gap: 12px;
}
.cert-list li {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-fg);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-top: 1px solid var(--color-border);
}
.cert-list li svg {
  flex-shrink: 0;
  margin-top: 4px;
}

.lang-list { display: grid; gap: 14px; }
.lang-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--color-border);
}
.lang-name {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-fg);
}
.lang-level {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-fg-muted);
  font-style: italic;
}
.lang-dots { display: flex; gap: 4px; }
.lang-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  color: inherit;
}
.lang-dots .dot.on { background: var(--color-accent); }

/* ── MARQUEE ─────────────────────────────────────────────────── */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 28px 0;
  background: var(--color-bg);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 60s linear infinite;
}
.marquee-w {
  padding-right: 64px;
  white-space: nowrap;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--color-fg-muted);
}
.marquee-w-strong { color: var(--color-fg); }
.marquee-sep { color: var(--color-accent); margin: 0 24px; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ── CONTACT ─────────────────────────────────────────────────── */
.contact {
  padding: clamp(64px, 9vw, 128px) 0;
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
}
.contact-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--color-fg);
  margin: 24px 0 32px;
  text-wrap: balance;
  max-width: 18ch;
}
.contact-lead {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--color-fg-muted);
  max-width: 52ch;
  margin: 0 0 56px;
}
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 56px;
}
.contact-card {
  display: block;
  padding: 24px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 200ms var(--ease-out);
  cursor: pointer;
}
.contact-card-static { cursor: default; }
.contact-card:not(.contact-card-static):hover { border-color: var(--color-accent); }
.contact-card-icon { color: var(--color-accent); margin-bottom: 14px; }
.contact-card-label {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-fg-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.contact-card-value {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-fg);
  word-break: break-word;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  padding: 48px 0 32px;
  background: var(--color-bg);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-mark { font-size: 1.125rem; }
.footer-meta {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--color-fg-muted);
  letter-spacing: 0.04em;
}

/* ── MOBILE (≤ 760px) ────────────────────────────────────────── */
@media (max-width: 760px) {
  /* Collapse the rail/content layout to a single column. Empty placeholder
     divs in the content rows would otherwise produce a phantom gap. */
  .rail-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .rail-grid > div:empty { display: none; }

  /* The hero's rail label sits above the name with a slim top hairline. */
  .rail-label { padding-top: 0; }
  .rail-label-inner { padding-top: 8px; }

  /* Section indices read as small uppercase labels above the eyebrow. */
  .rail-index { padding-top: 6px; }

  .section-header { margin-bottom: 36px; }

  /* Lower the hero-name floor so "Pallaspuro." fits at 390 px and below.
     13vw on a 390 viewport ≈ 51 px, well inside the content column. */
  .hero-name { font-size: clamp(2.75rem, 13vw, 10.5rem); }

  /* Hero lede / tag column stack — already collapses, just tighten gap. */
  .hero-body-grid { gap: 24px; }

  /* Header mark shrinks to make room for the hamburger button on mobile. */
  .header-mark .initials-mark { font-size: 1.25rem; }
  .header-inner { height: 64px; }

  /* Trim section padding so a phone shows more content per scroll. */
  .section { padding: clamp(48px, 12vw, 96px) 0; }
  .contact { padding: clamp(48px, 12vw, 96px) 0; }
  .hero { padding: 32px 0 48px; }

  /* Strength card minimum looks fine on desktop grid; on a single column
     it just adds dead space. Drop it. */
  .strength { min-height: 0; padding: 28px 24px; }

  /* Marquee gets compact + slightly faster on mobile so it doesn't dominate. */
  .marquee { padding: 18px 0; }
  .marquee-w { padding-right: 40px; }
  .marquee-sep { margin: 0 14px; }
  .marquee-track { animation-duration: 40s; }

  /* Education sections need more vertical separation when stacked. */
  .education-grid { gap: 32px; }

  /* Tag pills: tighten padding + gap so the longest labels
     ("Certified Board Member", "Digital Transformation",
     "Enterprise Architecture") fit on a 342 px-wide content row. */
  .hero-tags { gap: 6px; }
  .pill { padding: 4px 8px; }

  /* Timeline rows: year + toggle share the top row, body spans full width
     underneath. Restores readable line length on narrow viewports. */
  .timeline-row {
    grid-template-columns: 1fr auto;
    gap: 12px 16px;
    padding: 24px 4px;
  }
  .timeline-year { padding-top: 0; }
  .timeline-body { grid-column: 1 / -1; min-width: 0; }
  .timeline-toggle { padding-top: 0; align-self: center; }
  .timeline-toggle-placeholder { display: none; }

  /* Profile right card sits tight under the body copy on mobile. */
  .trusted-card { padding: 24px; }

  /* Contact CTA cards stack one-up; large heading wraps tighter. */
  .contact-title { font-size: clamp(2rem, 9vw, 4.5rem); max-width: none; }
  .contact-lead  { margin-bottom: 40px; }
}

/* ── PRINT ───────────────────────────────────────────────────────
   Generates a clean PDF/CV from File → Print. All decorative chrome
   (sticky header, marquee, mobile menu, hover states) is hidden;
   every timeline row is forced open so the full record prints.
   ──────────────────────────────────────────────────────────────── */
@media print {
  @page { size: A4; margin: 18mm 16mm; }

  :root {
    color-scheme: light;
  }
  html, body {
    background: #ffffff !important;
    color: #1a1a1a !important;
  }
  body { font-size: 9.5pt; }

  /* Hide anything decorative or interactive. */
  .no-print,
  .site-header,
  .mobile-menu,
  .menu-toggle,
  .marquee,
  .hero-ctas,
  .timeline-toggle,
  .timeline-toggle-placeholder,
  .nav-cta,
  .desktop-nav,
  .site-footer,
  .contact-card-icon { display: none !important; }

  /* Reset section spacing for print. Sections should flow naturally; the
     screen uses generous vertical rhythm that wastes A4 pages. */
  .section, .contact, .hero, .metrics {
    padding: 10pt 0 !important;
    background: transparent !important;
    border: 0 !important;
  }
  .container { max-width: none !important; padding: 0 !important; }

  /* Collapse rail grids into a single linear column for print readability. */
  .rail-grid {
    display: block !important;
  }
  .rail-grid > div:empty { display: none !important; }
  .rail-label, .rail-index { display: none !important; }
  .section-header { margin-bottom: 14pt !important; }

  /* Headline sizing tuned for A4. The 11vw hero name is way too large
     for paper; clamp it to a printable size. */
  /* Keep "Toni\nPallaspuro." on two lines so the <br> stays readable;
     just tighten the line-height for paper. */
  .hero-name { font-size: 24pt !important; line-height: 0.98 !important; color: #1a1a1a !important; margin: 0 0 4pt !important; }
  .hero-name .accent { color: #b8860b !important; }
  .section-title { font-size: 15pt !important; max-width: none !important; color: #1a1a1a !important; }
  .contact-title { font-size: 14pt !important; max-width: none !important; color: #1a1a1a !important; margin: 6pt 0 !important; }
  .hero-lede, .profile-lede, .section-lead, .contact-lead {
    color: #2a2a2a !important; font-size: 9.5pt !important; line-height: 1.45 !important;
  }
  .hero-body-grid { margin-top: 8pt !important; gap: 12pt !important; }
  .profile-p { color: #2a2a2a !important; font-size: 9.5pt !important; line-height: 1.45 !important; margin-bottom: 6pt !important; max-width: none !important; }
  .eyebrow { color: #b8860b !important; margin-bottom: 4pt !important; }
  .eyebrow::before { background: #b8860b !important; }
  .section-header { margin-bottom: 8pt !important; }

  /* Force the timeline open and lay it out without the interaction chrome.
     Page-break-inside:avoid is intentionally OFF here — keeping it on left
     huge empty bottoms when the next role didn't quite fit. Letting roles
     break across pages with a small orphan/widow buffer keeps the doc
     compact (3-4 pages instead of 7). */
  .timeline-row {
    display: grid !important;
    grid-template-columns: 70pt 1fr !important;
    padding: 6pt 0 !important;
    border-top: 0.5pt solid #cccccc !important;
    background: transparent !important;
    orphans: 4;
    widows: 4;
  }
  .timeline { border-bottom: 0.5pt solid #cccccc !important; }
  /* Stack bullets vertically; let tags flow horizontally as on screen. */
  .timeline-row .timeline-points {
    display: block !important;
    margin-top: 4pt !important;
  }
  .timeline-row .timeline-tags { display: flex !important; flex-wrap: wrap !important; gap: 3pt !important; margin-top: 4pt !important; }
  .timeline-points li {
    display: list-item !important;
    list-style: none !important;
    margin-bottom: 2pt !important;
    color: #1a1a1a !important;
    font-size: 9pt !important;
    line-height: 1.4 !important;
    max-width: none !important;
  }
  .timeline-points li .dash { display: inline; margin-right: 5pt; color: #b8860b !important; }
  .timeline-company { font-size: 11pt !important; margin: 0 !important; }
  .timeline-role { font-size: 9.5pt !important; margin-bottom: 3pt !important; }
  .timeline-summary { font-size: 9.5pt !important; line-height: 1.4 !important; max-width: none !important; }
  .timeline-year { font-size: 9pt !important; padding-top: 1pt !important; }
  .trusted-list li,
  .cert-list li { color: #1a1a1a !important; font-size: 9.5pt !important; padding: 4pt 0 !important; }
  .timeline-year, .edu-year { color: #555 !important; }
  .timeline-company, .strength-title, .edu-school,
  .edu-degree, .lang-name {
    color: #1a1a1a !important;
  }
  .timeline-role { color: #b8860b !important; }
  .timeline-summary, .strength-body, .edu-detail, .lang-level {
    color: #444 !important;
  }
  .pill {
    border-color: #999 !important;
    color: #444 !important;
    background: transparent !important;
  }
  .pill.accent { background: transparent !important; color: #b8860b !important; border-color: #b8860b !important; }

  /* Strengths and education grids: keep cards together on a page. */
  .strengths-body { display: block !important; }
  .strengths-group { page-break-inside: avoid; margin-bottom: 8pt; }
  .strengths-group-title {
    font-size: 9pt !important;
    margin: 4pt 0 3pt !important;
    color: #b8860b !important;
  }
  .strengths-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6pt !important;
    border: 0 !important;
  }
  .profile-grid, .education-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8pt !important;
    border: 0 !important;
  }
  /* On paper, contact cards are wasteful boxes. Collapse them into a
     compact inline list — label + value on one line per channel. */
  .contact-cards {
    display: block !important;
    border: 0 !important;
    margin: 4pt 0 0 !important;
  }
  .contact-card, .contact-card-static {
    display: inline-block !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 14pt 2pt 0 !important;
    page-break-inside: avoid;
  }
  .contact-card-label {
    display: inline !important;
    font-size: 7.5pt !important;
    letter-spacing: 0.08em !important;
    margin: 0 4pt 0 0 !important;
    color: #777 !important;
    text-transform: uppercase !important;
  }
  .contact-card-value {
    display: inline !important;
    font-size: 9.5pt !important;
    font-weight: 500 !important;
    word-break: break-word !important;
  }
  .strength, .trusted-card, .edu-item {
    border: 0.5pt solid #cccccc !important;
    background: transparent !important;
    page-break-inside: avoid;
    break-inside: avoid;
    padding: 6pt 8pt !important;
    min-height: 0 !important;
  }
  .edu-item { padding: 5pt 8pt !important; }
  .edu-school { font-size: 10pt !important; margin-bottom: 1pt !important; }
  .edu-degree { font-size: 9pt !important; }
  .edu-detail { font-size: 8.5pt !important; }
  .edu-year { font-size: 8pt !important; margin-bottom: 1pt !important; }
  .strength-title { font-size: 10.5pt !important; margin: 0 0 4pt !important; }
  .strength-n { font-size: 8pt !important; margin-bottom: 4pt !important; }
  .strength-body { font-size: 9pt !important; line-height: 1.4 !important; }
  .cert-list { margin-bottom: 12pt !important; }
  .contact-card-static, .contact-card { color: #1a1a1a !important; }
  .contact-card-value { word-break: break-word !important; color: #1a1a1a !important; font-size: 9.5pt !important; }
  .contact-card-label { color: #555 !important; font-size: 7.5pt !important; margin-bottom: 2pt !important; }
  .contact-cards { margin: 6pt 0 0 !important; }
  .contact-lead { margin: 4pt 0 6pt !important; }
  .contact { padding: 8pt 0 !important; }

  /* Show real URLs after links so a printed CV stays useful. */
  a[href^="http"]::after,
  a[href^="mailto:"]::after,
  a[href^="tel:"]::after {
    content: " (" attr(href) ")";
    font-size: 8.5pt;
    color: #666;
    word-break: break-all;
  }
  a[href^="mailto:"]::after { content: ""; }   /* email already shown in card */
  a[href^="tel:"]::after    { content: ""; }
  a[href^="#"]::after       { content: ""; }
  .contact-card[href]::after { content: ""; }
  a { color: #1a1a1a !important; text-decoration: none !important; }

  /* Metrics: keep readable but compact, single row of cards. */
  .metrics-grid {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 6pt !important;
  }
  .metric-n { font-size: 13pt !important; color: #1a1a1a !important; margin-bottom: 2pt !important; }
  .metric-l { font-size: 8pt !important; color: #555 !important; line-height: 1.3 !important; }

  .lang-row { padding: 4pt 0 !important; }
  .lang-dots .dot { background: #cccccc !important; width: 6pt !important; height: 6pt !important; }
  .lang-dots .dot.on { background: #b8860b !important; }

  /* Section page-break behavior: keep headings with their content. */
  h2, h3 { page-break-after: avoid; break-after: avoid; }
  .section-title + .section-lead { page-break-before: avoid; }
}
