/* ─────────────────────────────────────────────
   Micke Rantanen — CV
   Industry: teräksensininen vaalealla teknisellä pohjalla
   ───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=Barlow+Condensed:wght@500;600;700&display=swap');

:root {
  --bg: #f2f2f3;
  --surface: #e4e4e6;
  --ink: #1d1f20;
  --ink-soft: #424244;
  --muted: #5d5d60;
  --accent: #5980a6;
  --accent-700: #416180;
  --accent-900: #2c455d;
  --line: rgba(29, 31, 32, 0.16);
  --line-strong: rgba(29, 31, 32, 0.35);

  --font-heading: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow', system-ui, -apple-system, sans-serif;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 14px;
  --s-4: 20px;
  --s-5: 30px;
  --s-6: 44px;
  --s-7: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(89, 128, 166, 0.28); }

a {
  color: var(--accent-700);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent-900); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Rakenne ───────────────────────────────── */

.sheet {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--s-6) var(--s-5) var(--s-7);
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}

/* ── Otsikko ───────────────────────────────── */

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-5);
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--s-4);
}

.kicker {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-700);
  margin-bottom: var(--s-2);
}

.masthead h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.75rem, 9vw, 5.25rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 var(--s-2);
}

.tagline {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  margin: 0;
}

/* Blueprint-raami rekisterimerkeillä */
.blueprint { position: relative; border: 1px solid var(--line-strong); }
.blueprint > .corner {
  position: absolute;
  font-family: var(--font-body);
  font-size: 11px;
  font-style: normal;
  line-height: 1;
  color: rgba(29, 31, 32, 0.55);
  pointer-events: none;
}
.blueprint > .tl { left: -5px; top: -9px; }
.blueprint > .tr { right: -5px; top: -9px; }
.blueprint > .bl { left: -5px; bottom: -9px; }
.blueprint > .br { right: -5px; bottom: -9px; }

.portrait {
  width: 132px;
  height: 132px;
  flex: none;
  overflow: hidden;
}
.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Yhteystiedot ──────────────────────────── */

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.94rem;
  color: var(--muted);
}
.contact strong { color: var(--ink); font-weight: 600; }

/* ── Ingressi ──────────────────────────────── */

.intro {
  background: var(--surface);
  padding: var(--s-4) var(--s-5);
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.55;
  text-wrap: pretty;
}

/* ── Osiot ─────────────────────────────────── */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: var(--s-7);
  align-items: start;
}

.col { display: flex; flex-direction: column; gap: var(--s-6); }
.col--side { gap: var(--s-5); }

section { display: flex; flex-direction: column; gap: var(--s-3); }

h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-700);
  margin: 0;
  padding-bottom: var(--s-1);
  border-bottom: 1px solid var(--line);
}

/* ── Työkokemus ────────────────────────────── */

.roles { display: flex; flex-direction: column; gap: var(--s-4); }

.role { display: flex; flex-direction: column; gap: var(--s-1); }

.role__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-1) var(--s-3);
}

.role__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0;
}

.role__dates {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.role__org {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.role ul {
  margin: var(--s-1) 0 0;
  padding-left: 1.1em;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}
.role li { text-wrap: pretty; }
.role li::marker { color: var(--accent); }

.role__note { font-size: 0.9rem; color: var(--muted); margin: var(--s-1) 0 0; }

/* ── Koulutus ──────────────────────────────── */

.entries { display: flex; flex-direction: column; gap: var(--s-3); }
.entry__name { font-weight: 600; }
.entry__meta { color: var(--muted); font-size: 0.94rem; }

/* ── Osaaminen ─────────────────────────────── */

.tags { display: flex; flex-wrap: wrap; gap: var(--s-1) 6px; }
.tag {
  border: 1px solid rgba(89, 128, 166, 0.55);
  color: var(--accent-700);
  padding: 3px 9px;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ── Kielet ────────────────────────────────── */

.langs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-1) var(--s-3);
  margin: 0;
  font-size: 0.94rem;
}
.langs dt { font-weight: 600; }
.langs dd { margin: 0; color: var(--muted); }

/* ── Alatunniste ───────────────────────────── */

footer {
  border-top: 1px solid var(--line);
  padding-top: var(--s-3);
  font-size: 0.84rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  justify-content: space-between;
}

/* ── Responsiivisuus ───────────────────────── */

@media (max-width: 840px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
}

@media (max-width: 560px) {
  .sheet { padding: var(--s-5) var(--s-4) var(--s-6); gap: var(--s-5); }
  .masthead { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .portrait { order: -1; width: 104px; height: 104px; }
  .intro { padding: var(--s-3) var(--s-4); }
}

/* ── Tulostus ──────────────────────────────── */

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 10.4pt; }
  .sheet { max-width: none; padding: 0; gap: 18px; }
  .layout { gap: 34px; }
  footer, .no-print { display: none; }
  .role, section { break-inside: avoid; }
}
