:root {
  --sidebar-bg: #cce9e6;
  --pill-bg: #8ccec8;
  --heading-color: #231f20;
  --title-color: #414042;
  --body-color: #000000;
  --divider-color: #404040;
  --page-bg: #ededed;
  --page-w: 794.56px; /* A4 at 96dpi, matches the original PDF's 595.92pt width */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Titillium Web', 'Segoe UI', sans-serif;
  background: var(--page-bg);
  color: var(--body-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 12px 40px;
}

.page {
  position: relative;
  width: 100%;
  max-width: var(--page-w);
  min-height: calc(var(--page-w) * 1.41266);
  margin: auto;
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: stretch;
}

.page + .page {
  margin-top: 28px;
}

.sidebar.sidebar--cont {
  padding-top: 2%;
}

.content.content--cont {
  padding-top: 4.5%;
}


/* ---------- Sidebar ---------- */

.sidebar {
  width: 33.72%;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  padding: 27.06% 6% 1% 6%;
}

/* ---------- Photo (overlaps top of sidebar) ---------- */

.photo-wrap {
  position: absolute;
  left: 5.86%;
  top: 22px;
  width: 22%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 7.5px solid #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  z-index: 3;
}

.photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.side-section {
  margin-bottom: 9px;
}

.side-heading,
.main-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--heading-color);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--divider-color);
}

.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.info-icon {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  flex-shrink: 0;
  fill: none;
  stroke: #000000;
  stroke-opacity: 0.7;
  stroke-width: 1.7px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-label {
  display: block;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--title-color);
}

.info-value {
  display: block;
  font-size: 13.5px;
  font-weight: 300;
  color: var(--body-color);
  line-height: 1.5;
  text-decoration: none;
}

a.info-value:hover {
  text-decoration: underline;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 5px;
}

.pill {
  background: var(--pill-bg);
  color: var(--body-color);
  font-size: 12.5px;
  font-weight: 300;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.3;
}

.interests {
  display: flex;
  justify-content: space-between;
  text-align: center;
}

.interest-icon {
  width: 24px;
  height: 24px;
  display: block;
  margin: 0 auto 6px;
  fill: var(--heading-color);
}

.interest span {
  font-size: 13px;
  font-weight: 300;
}

/* ---------- Header card (floats above sidebar + content) ---------- */

.header-card {
  position: absolute;
  left: 17.52%;
  top: 45.67px;
  width: 76.31%;
  height: 132px;
  z-index: 2;
  background: #ffffff;
  border: 1px solid #e6e7e8;
  border-radius: 16px;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 0 147.6px;
}

.header-text h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 400;
  color: var(--body-color);
  white-space: nowrap;
}

.header-text h1 .first-name {
  font-weight: 700;
}

.job-title {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  color: var(--body-color);
}

.qr {
  width: 19%;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

/* ---------- Main content ---------- */

.content {
  flex: 1;
  min-width: 0;
  padding: 27.06% 6.3% 2% 2.3%;
}

.main-section {
  margin-bottom: 24px;
}

.summary-text {
  margin: 0;
  font-size: 13.3px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--body-color);
}

.main-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.heading-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  fill: var(--heading-color);
}

.entry {
  margin-bottom: 11px;
}

.entry-title {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--title-color);
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 7px;
}

.entry-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  fill: none;
  stroke: #000000;
  stroke-opacity: 0.7;
  stroke-width: 1.9px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.entry-meta em {
  font-style: italic;
  font-weight: 300;
  font-size: 13px;
  color: var(--body-color);
}

.bullets {
  margin: 0;
  padding-left: 18px;
}

.bullets li {
  font-size: 13.3px;
  font-weight: 300;
  line-height: 1.42;
  color: var(--body-color);
  margin-bottom: 1px;
}

.award .entry-title {
  margin-bottom: 2px;
}

.award-sub {
  margin: 0;
  font-size: 13.5px;
  font-weight: 300;
  font-style: italic;
  color: var(--body-color);
}

.education-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.edu-entry .entry-title {
  font-size: 13.5px;
}

.edu-entry p {
  margin: 2px 0;
  font-size: 13.5px;
  font-weight: 300;
  color: var(--body-color);
}

/* ---------- Download button ---------- */

.download-bar {
  width: 100%;
  max-width: var(--page-w);
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Titillium Web', 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--heading-color);
  background: var(--pill-bg);
  border: 1px solid #6fb8ab;
  border-radius: 999px;
  padding: 12px 30px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(35, 31, 32, 0.15);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.download-btn:hover {
  background: #7bc0b3;
  box-shadow: 0 5px 14px rgba(35, 31, 32, 0.2);
}

.download-btn:active {
  transform: translateY(1px);
}

.download-btn:disabled {
  cursor: default;
  opacity: 0.75;
}

.download-icon {
  flex-shrink: 0;
}

/* ---------- Print ---------- */

@page {
  size: 210mm 297mm;
  margin: 0;
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  html, body {
    width: 210mm;
  }
  body {
    background: #ffffff;
    padding: 0;
    align-items: stretch;
  }
  .page {
    box-shadow: none;
    max-width: 100%;
    width: 210mm;
    min-height: 297mm;
    height: 297mm;
    margin: 0 auto;
    overflow: hidden;
  }
  .page + .page {
    margin-top: 0;
    page-break-before: always;
    break-before: page;
  }
  .download-bar {
    display: none;
  }
  .entry,
  .edu-entry,
  .side-section {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}
