@page {
  size: A4;
  margin: 20mm 15mm;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 10pt;
  line-height: 1.4;
  color: #222;
  background: #fff;
}

.page {
  max-width: 210mm;
  margin: 0 auto;
  padding: 20mm 15mm;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
}

.header h1 {
  font-size: 22pt;
  font-weight: 600;
  color: #222;
  letter-spacing: 0.5px;
}

.header-contact {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px 10px;
  font-size: 9pt;
  margin-top: 2px;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.contact-item .icon {
  flex-shrink: 0;
  line-height: 1;
}

.contact-item svg.icon {
  width: 10px;
  height: 10px;
  color: #2b5797;
}

.contact-item .icon.emoji {
  font-size: 11px;
}

.contact-item.phone svg.icon {
  color: #34a853;
}

.contact-item.linkedin .icon {
  color: #0a66c2;
}

.contact-item.github .icon {
  color: #181717;
}

.header-contact a {
  color: #2b5797;
  text-decoration: none;
}

.header-contact a:hover {
  text-decoration: underline;
}

/* Summary */
.summary {
  margin-bottom: 12px;
  font-size: 9.5pt;
  color: #333;
  text-align: justify;
}

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

.section-title {
  font-size: 12pt;
  font-weight: 600;
  color: #2b5797;
  margin-bottom: 8px;
  padding-bottom: 3px;
  border-bottom: 1.5px solid #2b5797;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.section-title-meta {
  font-size: 9pt;
  font-weight: 400;
  color: #555;
}

/* Experience */
.experience {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.experience-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.experience-logo-link {
  display: block;
  line-height: 0;
  flex-shrink: 0;
}

.experience-content {
  flex: 1;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.experience-title {
  font-weight: 600;
  font-size: 10pt;
}

.experience-company {
  font-weight: 400;
  color: #444;
}

.experience-company a {
  color: #444;
  text-decoration: none;
}

.experience-company a:hover {
  text-decoration: underline;
}

.experience-date {
  font-size: 9pt;
  color: #555;
  white-space: nowrap;
}

.experience-meta {
  font-size: 9pt;
  color: #555;
  margin-bottom: 4px;
}

.experience-tech {
  font-size: 8.5pt;
  color: #555;
  margin-bottom: 4px;
  font-style: italic;
}

.experience-desc {
  margin-top: 4px;
  font-size: 9.5pt;
}

.experience ul {
  padding-left: 16px;
  margin-top: 4px;
}

.experience ul li {
  margin-bottom: 1px;
  font-size: 9.5pt;
}

.experience ul li a {
  color: #2b5797;
  text-decoration: none;
}

.experience ul li.client {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-left: -16px;
}

.client-logo-link {
  display: block;
  flex-shrink: 0;
  line-height: 0;
  margin-top: 4px;
}

.client-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.client-text {
  flex: 1;
}

.experience ul li.client .experience-company a {
  color: #444;
}

/* Lists */
.section ul {
  padding-left: 16px;
}

.oss-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}

.section ul li {
  margin-bottom: 2px;
  font-size: 9.5pt;
}

/* Two-column bottom section */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}

.two-col .section-title {
  font-size: 11pt;
}

.two-col ul li {
  font-size: 9pt;
}

.two-col ul li a {
  color: #2b5797;
  text-decoration: none;
}

/* Mobile */
@media screen and (max-width: 640px) {
  .page {
    padding: 16px;
  }

  .header h1 {
    font-size: 18pt;
  }

  .header-contact {
    flex-wrap: wrap;
  }

  .experience-header {
    flex-wrap: wrap;
    gap: 2px 8px;
  }

  .experience-date {
    flex-basis: 100%;
  }

  .experience-logo,
  .client-logo {
    width: 32px;
    height: 32px;
  }

  .oss-list,
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* Print styles */
@media print {
  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .page {
    padding: 0;
    max-width: none;
  }

  a {
    text-decoration: none;
  }

  .experience,
  .section,
  .two-col {
    break-inside: avoid;
  }

  .section:has(.experience) {
    break-inside: auto;
  }
}
