/* cv.css - Marcin Sęk resume */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  color: #1d1f22;
  font-family: "IBM Plex Sans", Helvetica, Arial, sans-serif;
  font-style: normal;
  font-weight: 400;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
a { color: #2f5d8a; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── A4 canvas, two columns ───────────────────────────────────── */
.page {
  width: 210mm;
  min-height: 297mm;
  margin: 32px auto;
  background: #fff;
  box-shadow: 0 6px 32px rgb(36 48 45 / 10%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62mm;
}
@media screen {
  html { background: #e4e3e0; }
  body { font-size: 16px; }
}
@media screen and (max-width: 900px) {
  .page { margin: 0; width: 100%; min-height: 100vh; box-shadow: none; }
}

/* ── Main column ───────────────────────────────────────────────── */
.content { padding: 14mm 10mm 12mm 12mm; min-width: 0; }
.masthead { margin-bottom: 6mm; }
.header h1 {
  font-size: 28pt;
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -.02em;
}
.header .tagline {
  font: 500 10pt/1.3 "IBM Plex Mono", monospace;
  color: #2f5d8a;
  margin-top: 1mm;
}
.section-heading {
  margin-bottom: 2.5mm;
  padding-bottom: 1mm;
  border-bottom: .6pt solid #d6d4cf;
  font: 500 7.5pt/1 "IBM Plex Mono", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #2f5d8a;
}
.main-section { margin-bottom: 6mm; }
.main-section > p { font-size: 9pt; line-height: 1.45; color: #3a3d42; }

/* Experience */
.experience-list { display: flex; flex-direction: column; gap: 4mm; }
.experience-entry { display: flex; flex-direction: column; gap: .6mm; }
.exp-heading { display: flex; justify-content: space-between; gap: 3mm; align-items: baseline; }
.exp-company { font-size: 10.5pt; font-weight: 600; }
.exp-location { font: 8pt "IBM Plex Mono", monospace; color: #55595f; white-space: nowrap; }
.exp-roles { display: flex; justify-content: space-between; gap: 3mm; align-items: baseline; flex-wrap: wrap; }
.exp-role { font-weight: 500; font-size: 9.5pt; }
.exp-date { font: 8pt "IBM Plex Mono", monospace; color: #55595f; white-space: nowrap; }
.exp-duties {
  margin-top: .5mm;
  padding-left: 4mm;
  display: flex;
  flex-direction: column;
  gap: .4mm;
  font-size: 8.7pt;
  line-height: 1.4;
  color: #3a3d42;
}

/* Projects */
.projects-list { display: flex; flex-direction: column; gap: 2.5mm; }
.project-entry { display: flex; flex-direction: column; gap: .3mm; }
.project-name { display: flex; justify-content: space-between; gap: 3mm; align-items: baseline; }
.project-name h3 { font-size: 10pt; font-weight: 600; }
.project-meta { font: 8pt "IBM Plex Mono", monospace; color: #55595f; white-space: nowrap; }
.project-desc { font-size: 8.7pt; line-height: 1.4; color: #3a3d42; }

/* ── Sidebar ───────────────────────────────────────────────────── */
.sidebar {
  background: #f2f1ee;
  padding: 14mm 7mm 12mm;
  display: flex;
  flex-direction: column;
  gap: 8mm;
}
.sidebar-section { display: flex; flex-direction: column; gap: 2mm; }
.sidebar-label {
  font: 500 7.5pt/1 "IBM Plex Mono", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #2f5d8a;
}
.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 1mm;
  font-family: "IBM Plex Mono", monospace;
  font-size: 8.5pt;
  line-height: 1.45;
  color: #1d1f22;
}
.sidebar-list strong { font-weight: 600; }
.sidebar-list .muted { color: #55595f; }
.sidebar-list .modules { font-size: 8pt; line-height: 1.4; color: #3a3d42; }
.sidebar-list .modules-label { font-weight: 600; color: #2f5d8a; }
.skill-row { display: flex; flex-direction: column; gap: .5mm; }
.skill-row strong { color: #2f5d8a; font-size: 8pt; }

/* Contact with icons */
.contact { list-style: none; padding: 0; }
.contact li { display: flex; align-items: flex-start; gap: 2mm; font-size: 8.5pt; line-height: 1.45; }
.contact li + li { margin-top: 2mm; }
.contact svg { width: 3.5mm; height: 3.5mm; flex: none; margin-top: .3mm; color: #55595f; }
.contact a { color: #2f5d8a; word-break: break-word; }
.contact a:hover { text-decoration: underline; text-underline-offset: .2em; }
.contact span { color: #1d1f22; }

/* Spoken languages */
.language-list {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1mm 3mm;
  font-family: "IBM Plex Mono", monospace;
  font-size: 8.5pt;
  line-height: 1.45;
}
.language-list dt { color: #1d1f22; }
.language-list dd { color: #55595f; }

/* ── Mobile ────────────────────────────────────────────────────── */
@media screen and (max-width: 900px) {
  html { background: #fff; }
  body { font-size: 16px; }
  .page { grid-template-columns: minmax(0, 1fr); }
  .content { padding: 28px 20px 20px; }
  .sidebar { padding: 24px 20px 40px; gap: 28px; }

  .masthead { margin-bottom: 28px; }
  .header h1 { font-size: 34px; }
  .header .tagline { font-size: 13px; margin-top: 8px; }
  .section-heading { font-size: 11px; margin-bottom: 14px; padding-bottom: 6px; }
  .main-section { margin-bottom: 32px; }
  .main-section > p { font-size: 15px; line-height: 1.6; }

  /* On narrow screens, let labels and dates flow inline instead of
     being pushed apart by the A4 two-column layout. */
  .exp-heading, .exp-roles, .project-name { display: block; }
  .exp-heading h3, .exp-role, .project-name h3 { display: inline; }
  .exp-location::before, .exp-date::before, .project-meta::before {
    content: " · ";
    color: #8b8e93;
  }
  .exp-location, .exp-date, .project-meta { white-space: normal; }

  .experience-list { gap: 24px; }
  .experience-entry { gap: 6px; }
  .exp-company, .project-name h3 { font-size: 17px; }
  .exp-role { font-size: 15px; }
  .exp-location, .exp-date, .project-meta { font-size: 12.5px; }
  .exp-duties { margin-top: 4px; padding-left: 18px; gap: 4px; font-size: 14px; line-height: 1.55; }

  .projects-list { gap: 20px; }
  .project-entry { gap: 4px; }
  .project-desc { font-size: 14px; line-height: 1.55; }

  .sidebar-label { font-size: 11px; }
  .sidebar-section { gap: 10px; }
  .sidebar-list { font-size: 13.5px; line-height: 1.55; gap: 4px; }
  .sidebar-list .modules { font-size: 13px; line-height: 1.55; }
  .skill-row { gap: 2px; }
  .skill-row strong { font-size: 11.5px; }

  .contact li { font-size: 14px; gap: 10px; }
  .contact li + li { margin-top: 10px; }
  .contact svg { width: 16px; height: 16px; margin-top: 3px; }
  .contact a { display: inline-flex; align-items: center; min-height: 32px; }
  .language-list { font-size: 13.5px; gap: 4px 12px; }
}

/* ── Print ─────────────────────────────────────────────────────── */
@page { size: A4 portrait; margin: 0; }
@media print {
  html, body { background: #fff; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .page { width: 210mm; min-height: 0; margin: 0; box-shadow: none; }
  .sidebar { background: #f2f1ee !important; }
  .content { padding: 12mm 10mm 10mm 12mm; }
  .sidebar { padding: 12mm 7mm 10mm; gap: 6mm; }
  .experience-list { gap: 3.5mm; }
  .projects-list { gap: 2mm; }
  .main-section { margin-bottom: 5mm; }
  .experience-entry, .project-entry, .sidebar-section { break-inside: avoid; }
  .section-heading, .sidebar-label { break-after: avoid; }
  a { color: inherit; text-decoration: none; }
}
