:root {
  color-scheme: light;
  --bg: #f7f3ec;
  --paper: #fffdfa;
  --ink: #24211d;
  --muted: #615a50;
  --line: #d9d0c3;
  --accent: #1f5f5b;
  --accent-ink: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 32px 20px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}

main {
  max-width: 840px;
  margin: 0 auto;
  padding: 40px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin: 34px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h3 {
  margin: 18px 0 4px;
  font-size: 17px;
  line-height: 1.25;
}

p {
  margin-bottom: 10px;
}

ul {
  padding-left: 1.15rem;
  margin-bottom: 12px;
}

li {
  margin-bottom: 5px;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--accent), transparent 25%);
  text-underline-offset: 0.16em;
}

.site-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--accent);
}

.role {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}

.summary {
  max-width: 66ch;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 18px;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 0;
  margin: 0 0 28px;
  color: var(--muted);
  list-style: none;
}

.contact li {
  margin: 0;
}

.strengths,
.skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 22px;
}

.updated {
  margin: 34px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 700px) {
  body {
    padding: 0;
  }

  main {
    min-height: 100vh;
    padding: 28px 20px;
    border: 0;
    border-radius: 0;
  }

  h1 {
    font-size: 34px;
  }

  .site-actions {
    justify-content: flex-start;
  }

  .strengths,
  .skills {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 8mm;
  }

  :root {
    --paper: #ffffff;
    --ink: #111111;
    --muted: #333333;
    --line: #bbbbbb;
    --accent: #111111;
  }

  body {
    padding: 0;
    font-size: 8.1px;
    line-height: 1.17;
    color: var(--ink);
    background: #ffffff;
  }

  main {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #ffffff;
  }

  .screen-only {
    display: none !important;
  }

  h1 {
    margin-bottom: 0.6mm;
    font-size: 19px;
    line-height: 1;
  }

  h2 {
    margin: 2.5mm 0 1mm;
    padding-top: 1.6mm;
    font-size: 8.6px;
    letter-spacing: 0.03em;
    break-after: avoid;
  }

  h3 {
    margin: 1.7mm 0 0.4mm;
    font-size: 8.8px;
    break-after: avoid;
  }

  p,
  ul {
    margin-bottom: 1mm;
  }

  ul {
    padding-left: 3mm;
  }

  li {
    margin-bottom: 0.25mm;
  }

  a {
    color: var(--ink);
    text-decoration: none;
  }

  .contact a {
    text-decoration: underline;
    text-underline-offset: 0.12em;
  }

  .role {
    margin-bottom: 1.4mm;
    font-size: 11px;
  }

  .summary {
    max-width: none;
    margin-bottom: 1.8mm;
    font-size: 8.8px;
  }

  .contact {
    display: grid;
    grid-template-columns: repeat(5, auto);
    gap: 1.4mm 2.5mm;
    margin-bottom: 2.4mm;
    font-size: 7.4px;
  }

  .strengths,
  .skills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35mm 4mm;
  }
}
