/* General Styles - v3.1 Fixed Alignment */
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 2rem;
  background: #f8f9fa;
  color: #333;
}

.topbar {
  width: 100%;
  padding: 1rem 2rem;
  background-color: #007bff;
  color: white;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.contact {
  font-size: 0.9rem;
  color: #555;
  margin: 0 auto 1rem auto;
  padding: 1rem 2rem;
  max-width: 1080px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid #ddd;
}

.contact .linkedin-link {
  margin-left: auto;
}

.container {
  max-width: 1080px;
  margin: auto;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.left,
.right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.columns {
  display: flex;
  gap: 2rem;
}

.left,
.right {
  flex: 1;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
  text-align: center;
}

h2 {
  font-size: 1.2rem;
  border-bottom: 2px solid #007bff;
  padding-bottom: 0.2rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.job-meta {
  font-size: 0.85rem;
  color: #666;
}

ul {
  margin-top: 0.3rem;
  padding-left: 1.2rem;
}

ul li {
  margin-bottom: 0.4rem;
}

.summary,
.achievements,
.skills,
.interests {
  margin-bottom: 2rem;
}

.badge-list span {
  display: inline-block;
  background: #e9ecef;
  padding: 0.3rem 0.6rem;
  margin: 0.2rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.achievement {
  margin-bottom: 1rem;
}

.achievement h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #007bff;
}

.achievement p {
  margin: 0.2rem 0 0.6rem 0;
  font-size: 0.85rem;
}

/* Certificates Table Styling */
.certificates {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.certificates th,
.certificates td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.certificates th {
  background-color: #f8f9fa;
  font-weight: bold;
  color: #333;
}

.certificates tr:hover {
  background-color: #f8f9fa;
}

/* Print Styles */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  @page {
    size: letter;
    margin: 0.25in;
  }

  body {
    font-family: 'Times New Roman', serif;
    font-size: 9pt;
    line-height: 1.1;
    margin: 0;
    padding: 0;
    background: white !important;
    color: black !important;
  }

  .topbar {
    background: black !important;
    color: white !important;
    padding: 0.5rem 1rem;
    font-size: 12pt;
    border-radius: 0;
    margin-bottom: 0.5rem;
  }

  .contact {
    font-size: 9pt;
    color: black !important;
    margin: 0 auto 0.3rem auto;
    padding: 0 0 0.15rem 0;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
    border-bottom: 1pt solid #000;
    white-space: normal;
  }

  .contact .linkedin-link {
    margin-left: auto;
  }

  .contact a {
    color: black !important;
    text-decoration: none;
  }

  .container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    background: white !important;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    page-break-inside: avoid;
  }

  .columns {
    display: flex;
    gap: 1rem;
  }

  .left,
  .right {
    flex: 1;
    break-inside: avoid;
  }

  h1 {
    font-size: 12pt;
    font-weight: bold;
    margin-bottom: 0.08rem;
    color: black !important;
    text-align: center;
  }

  h2 {
    font-size: 10pt;
    font-weight: bold;
    border-bottom: 1pt solid #000;
    padding-bottom: 0.05rem;
    margin-top: 0.3rem;
    margin-bottom: 0.15rem;
    color: black !important;
    page-break-after: avoid;
  }

  h3 {
    font-size: 10pt;
    font-weight: bold;
    margin-bottom: 0.05rem;
    color: black !important;
    page-break-after: avoid;
  }

  .job-meta {
    font-size: 9pt;
    color: black !important;
    font-style: italic;
    margin-bottom: 0.15rem;
  }

  ul {
    margin-top: 0.08rem;
    margin-bottom: 0.15rem;
    padding-left: 0.85rem;
  }

  ul li {
    margin-bottom: 0.04rem;
    font-size: 8pt;
    page-break-inside: avoid;
  }

  .summary {
    font-size: 8pt;
    margin-bottom: 0.3rem;
    text-align: justify;
  }

  .achievement {
    margin-bottom: 0.2rem;
    page-break-inside: avoid;
  }

  .achievement h4 {
    font-size: 8.5pt;
    font-weight: bold;
    margin: 0;
    color: black !important;
  }

  .achievement p {
    font-size: 8pt;
    margin: 0.05rem 0 0.15rem 0;
  }

  .badge-list {
    display: block;
  }

  .badge-list span {
    display: inline;
    background: none !important;
    padding: 0;
    margin: 0;
    border-radius: 0;
    font-size: 8.5pt;
    color: black !important;
  }

  .badge-list span:after {
    content: " • ";
  }

  .badge-list span:last-child:after {
    content: "";
  }

  /* Certificates Table Print Styling */
  .certificates {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.25rem;
    font-size: 7pt;
  }

  .certificates th,
  .certificates td {
    padding: 0.08rem 0.18rem;
    text-align: left;
    border-bottom: 0.5pt solid #000;
  }

  .certificates th {
    background-color: white !important;
    font-weight: bold;
    color: black !important;
  }

  .certificates tr {
    page-break-inside: avoid;
  }

  .interests {
    margin-bottom: 0;
  }

  .interests li {
    font-size: 8pt;
  }

  .container,
  .left,
  .right {
    page-break-inside: avoid;
  }

  p {
    margin-top: 0;
    margin-bottom: 0.15rem;
  }

  .contact br {
    display: none;
  }
}