:root {
  --text: #1a1a1a;
  --muted: #5a5a5a;
  --line: #d9d9d9;
  --accent: #243b67;
  --bg: #ffffff;
  --maxw: 920px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 15px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--text);
}

/* Page background */
.page {
  min-height: 100vh;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 102, 170, 0.12) 0%,
      rgba(0, 102, 170, 0.06) 140px,
      rgba(255, 255, 255, 1) 420px
    );
}

/* Main content card */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto 40px auto;
  padding: 28px;
  background: var(--bg);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 18px;
}

.header-left {
  flex: 1;
  min-width: 0;
}

.header-right {
  flex: 0 0 auto;
}

h1,
.header h1 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 700;
  color: var(--accent);
}

.subtitle {
  margin-top: 4px;
  font-size: 14px;
  color: #334;
}

.meta {
  margin-top: 6px;
  font-size: 13px;
  color: #556;
}

.meta a {
  color: inherit;
}

.meta a:hover {
  text-decoration: underline;
}

.avatar,
.header-right img {
  width: 84px;
  height: 84px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* Sections */
section {
  margin-bottom: 10px;
}

h2 {
  margin: 0 0 8px;
  padding-top: 2em;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

p {
  margin: 0 0 7px;
}

/* Experience */
.job {
  margin-bottom: 13px;
}

.job-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.job-title {
  padding-top: 0.5em;
  font-weight: 700;
}

.job-period {
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.94rem;
}

.job-meta {
  margin: 1px 0 6px;
  color: var(--muted);
  font-size: 0.95rem;
  font-style: italic;
}

/* Lists */
ul {
  margin: 5px 0 0 18px;
  padding: 0;
}

li {
  margin: 0 0 1px;
}

/* Skills */
.skills-group {
  margin-bottom: 7px;
}

.label {
  display: inline;
  font-weight: 700;
}

/* Footer/actions */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2em;
  padding-top: 2em;
  color: var(--muted);
  font-size: 0.88rem;
}

.actions {
  margin-top: 10px;
  text-align: center;
  font-size: 0.95rem;
}

.actions a {
  margin: 0 8px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.actions a:hover {
  text-decoration: underline;
}

/* Print/PDF */
@page {
  size: A4;
  margin: 12mm;
}

@media print {
  body {
    background: white !important;
    font-size: 11pt;
    line-height: 1.32;
  }

  .page {
    background: none !important;
  }

  .wrap {
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  .actions,
  .no-print {
    display: none !important;
  }

  .avatar,
  .header-right img {
    box-shadow: none;
  }

  section {
    break-inside: auto;
    page-break-inside: auto;
  }

  .job {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .certifications {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .certifications h2 {
    break-after: avoid;
    page-break-after: avoid;
  }
}