body {
  font-family: Arial, sans-serif;
  font-size: 16px;
  margin: 0;
  padding: 0;
  background-color: #121212;
  color: #e0e0e0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

.container {
  display: grid;
  grid-template-columns: 17.5em auto;
  gap: 2.5em;
  width: 100%;
  max-width: 68.75em;
  background-color: #1e1e1e;
  padding: 2.5em;
  margin: 1.25em;
  box-shadow: 0px 0.25em 0.625em rgba(0, 0, 0, 0.5);
  border-radius: 0.5em;
}

.left-column {
  max-width: 17.5em;
  padding-right: 1.25em;
  border-right: 0.0625em solid #333;
  position: sticky;
  top: 1.25em;
  height: fit-content;
}

.header-info {
  display: block;
}

h1 {
  font-size: 2em;
  color: #ffffff;
  margin-bottom: 0.625em;
}

.contact-details {
  font-size: 1em;
  color: #90caf9;
  margin-bottom: 1.25em;
  white-space: nowrap;
  overflow-wrap: normal;
}

.toc {
  list-style-type: none;
  padding: 0;
}

.toc li {
  margin-bottom: 0.625em;
}

.toc a {
  color: #90caf9;
  text-decoration: none;
  font-size: 1em;
}

.toc a:hover {
  color: #64b5f6;
}

main {
  max-width: 46.875em;
  width: 100%;
}

h2,
.employer h3,
.role-header h4,
.certification-info h4,
.expertise-title h3 {
  color: #ffffff;
}

h2 {
  font-size: 1.5em;
  margin-bottom: 1.25em;
}

.employer h3 {
  font-size: 1.6em;
}

.role-header h4 {
  font-size: 1.3em;
  margin: 0;
}

.certification-info h4 {
  font-size: 1em;
  margin: 0 0 0.3125em 0;
}

.expertise-title h3 {
  font-size: 1.1em;
  margin: 0;
}

.description,
.expertise-category p {
  font-size: 1em;
  color: #cccccc;
  margin-top: 0;
  margin-bottom: 1.25em;
  line-height: 1.5;
}

.time-range,
.valid-dates {
  font-size: 0.875em;
  color: #b0b0b0;
  font-style: italic;
}

.section {
  margin-bottom: 2.5em;
  padding-bottom: 1.25em;
}

.employer {
  display: flex;
  align-items: center;
  margin-bottom: 1.25em;
}

.company-logo {
  width: 3.75em;
  height: 3.75em;
  margin-right: 0.9375em;
  object-fit: contain;
}

.timeline {
  position: relative;
  margin-left: 1.875em;
  border-left: 0.125em solid #90caf9;
  padding-left: 1.25em;
}

.role {
  margin-bottom: 1.25em;
  position: relative;
  padding-left: 1.25em;
}

.role-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.625em;
}

.role::before {
  content: '';
  position: absolute;
  left: -1.6875em;
  top: 0.625em;
  width: 0.75em;
  height: 0.75em;
  background-color: #90caf9;
  border-radius: 50%;
}

.role:not(:last-child) {
  border-bottom: 0.0625em solid #333;
  padding-bottom: 0.625em;
}

.certification-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25em;
  margin-bottom: 1.25em;
}

.certification {
  display: flex;
  align-items: center;
  border-bottom: 0.0625em solid #333;
  padding-bottom: 0.625em;
  flex-basis: calc(33.33% - 1.25em);
  box-sizing: border-box;
}

.certification-logo {
  width: 3.125em;
  height: 3.125em;
  margin-right: 0.625em;
  object-fit: contain;
}

.certification-info {
  display: flex;
  flex-direction: column;
  font-size: 0.875em;
}

.expertise-category {
  overflow: hidden; /* Ensure floating content does not overflow */
  margin-bottom: 1.25em;
}

.expertise-title {
  display: flex; /* Use flexbox for vertical alignment */
  align-items: center; /* Vertically center the logo and title */
  float: left;
  width: auto;
  margin-right: 1em;
}

.expertise-logo {
  width: 2.5em; /* Adjust size as needed */
  height: 2.5em;
  margin-right: 0.5em;
  object-fit: contain; /* Ensure logo scales correctly */
}

.expertise-title h3 {
  margin: 0;
  font-size: 1.1em;
  vertical-align: middle; /* Align the text with the logo */
}

.expertise-category p {
  margin: 0;
  font-size: 1em;
  color: #cccccc;
  line-height: 1.5;
  text-align: justify; /* Ensure the text wraps and aligns nicely */
}

@media (max-width: 768px) {
  .container {
      grid-template-columns: 1fr;
      gap: 1.25em;
      padding: 1.25em;
  }

  .left-column {
      position: static;
      max-width: 100%;
      border-right: none;
      padding-right: 0;
      padding-bottom: 1.25em;
      border-bottom: 0.0625em solid #333;
  }

  main {
      max-width: 100%;
  }

  .toc {
      text-align: center;
  }

  h1 {
      font-size: 1.8em;
  }

  .contact-details {
      font-size: 0.9em;
  }

  .toc li {
      margin-bottom: 0.5em;
  }

  h2 {
      font-size: 1.3em;
  }

  .certification {
      flex-basis: 100%;
      font-size: 1em;
  }

  .certification-info h4 {
      font-size: 1em;
  }

  .valid-dates {
      font-size: 0.875em;
  }

  .expertise-title {
      float: none;
      width: auto;
      margin-right: 0;
      margin-bottom: 0.5em;
  }

  .expertise-category p {
      margin-left: 0;
  }
}

@media print {
  body {
      background-color: #ffffff;
      color: #000000;
      font-size: 12px;
  }

  .container {
      display: block;
      width: 100%;
      max-width: none;
      margin: 0;
      padding: 0;
      box-shadow: none;
      border-radius: 0;
  }

  .header-info {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 0.5em; /* Reduced margin */
  }

  .header-info h1 {
      font-size: 1.2em;
      color: #000000;
      font-weight: bold;
      margin: 0;
  }

  .header-info .contact-details {
      font-size: 1em;
      color: #000000;
      margin: 0;
  }

  .toc {
      display: none;
  }

  main {
      max-width: none;
      width: 100%;
  }

  h2,
  .employer h3,
  .role-header h4,
  .certification-info h4,
  .expertise-title h3 {
      color: #000000;
      font-weight: bold;
      margin-bottom: 0.25em; /* Reduced margin for headers */
  }

  h2 {
      text-align: center;
      font-size: 1.2em;
      text-decoration: underline;
      margin-bottom: 0.5em; /* Reduced margin */
  }

  h3,
  .employer h3 {
      font-size: 1.1em;
      margin-bottom: 0.25em; /* Reduced margin between title and content */
  }

  h4,
  .role h4 {
      font-size: 1em;
      margin-bottom: 0.25em; /* Reduced margin */
  }

  .description,
  .expertise-category p {
      color: #333333;
      margin-bottom: 0.5em; /* Reduced margin for description */
  }

  .time-range,
  .valid-dates {
      color: #666666;
      margin-bottom: 0.25em; /* Reduced margin for date ranges */
  }

  p,
  .description,
  .time-range,
  .valid-dates {
      font-size: 0.9em;
  }

  .company-logo {
      width: 2em;
      height: auto;
      max-width: 2em;
      max-height: 2em;
  }

  .expertise-logo {
      display: none;
  }

  .certification-logo {
      display: none;
  }

  .container,
  .left-column,
  main {
      background-color: transparent;
      box-shadow: none;
  }

  .section {
      margin-bottom: 0.5em; /* Reduced margin between sections */
      padding-bottom: 0.25em; /* Reduced padding */
  }

  .role {
      margin-bottom: 0.5em; /* Reduced margin */
  }

  .role:not(:last-child) {
      border-bottom: none;
      padding-bottom: 0;
  }

  .certification {
      border-bottom: none;
      padding-bottom: 0.5em;
      align-items: flex-start;
  }

  .certification-container {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5em;
  }

  .certification {
      flex-basis: calc(50% - 0.5em);
      box-sizing: border-box;
  }

  .expertise-category {
      overflow: hidden;
      margin-bottom: 0.5em; /* Reduced margin for expertise sections */
  }

  .expertise-title {
      float: left;
      width: 8em;
      margin-right: 0.5em; /* Reduced margin for titles */
  }

  .expertise-title h3 {
      font-size: 1em;
  }

  .expertise-category p {
      margin: 0;
      font-size: 0.9em;
      color: #333333;
      line-height: 1.5;
  }

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

  a:hover {
      color: inherit;
  }
}

