:root {
  --blackish: #464646;
  --greyish: #a8a8a8;
  --link: #2b5797;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--blackish);
  font-size: 10.5pt;
  line-height: 1.35;
}

#resume {
  max-width: 8.5in;
  margin: 0 auto;
  padding: 0.5in 0.54in;
  position: relative;
}

.print-button {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--link);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 14pt;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  transition: background-color 0.2s;
}

.print-button:hover {
  background-color: #1e4378;
}

.print-button i {
  font-size: 16pt;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 0.6em;
}
.header h1 {
  font-size: 26pt;
  font-weight: 700;
  margin: 0 0 0.25em;
  letter-spacing: 0.01em;
}
.header .label {
  font-size: 11pt;
  color: #666;
  margin-bottom: 0.4em;
}
.contact {
  font-size: 9.5pt;
  color: var(--blackish);
}
.contact i {
  margin-right: 0.3em;
  color: var(--greyish);
}
.contact span.sep {
  color: var(--greyish);
  margin: 0 0.6em;
}

/* Sections */
section {
  margin-bottom: 0.9em;
}
section h2 {
  font-size: 12pt;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-top: 1px solid var(--blackish);
  padding-top: 0.35em;
  margin: 0 0 0.5em;
}

/* Skills */
.skills-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.skills-list li {
  margin-bottom: 0.3em;
}
.skills-list .category {
  font-weight: 700;
}

/* Work / Education entries */
.entry {
  margin-bottom: 0.7em;
  padding-bottom: 0.6em;
  border-bottom: 1px solid var(--greyish);
  break-inside: avoid;
}
.entry:last-child {
  border-bottom: none;
}
.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
}
.entry-header .org {
  font-weight: 700;
}
.entry-header .dates {
  font-weight: 700;
  white-space: nowrap;
}
.entry-subheader {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
  font-style: italic;
  color: #333;
  margin-bottom: 0.35em;
}
.entry ul.highlights {
  margin: 0.3em 0 0;
  padding-left: 1.2em;
}
.entry ul.highlights li {
  margin-bottom: 0.15em;
}
.entry .keywords {
  font-size: 9pt;
  color: var(--greyish);
  font-style: italic;
  margin-top: 0.3em;
}

/* Projects */
.projects-intro {
  color: var(--greyish);
  margin: 0 0 0.4em;
}
.project-item {
  margin-bottom: 0.3em;
}
.project-item .name {
  font-weight: 700;
}

/* Education */
.courses {
  margin-top: 0.3em;
}
.courses .label {
  font-weight: 700;
}

@media print {
  @page {
    size: letter;
    margin: 0.4in 0.5in;
  }
  body {
    font-size: 9.5pt;
    line-height: 1.3;
  }
  #resume {
    padding: 0;
    max-width: none;
  }
  .print-button {
    display: none !important;
  }
  .header {
    margin-bottom: 0.5em;
  }
  .header h1 {
    font-size: 23pt;
    margin: 0 0 0.2em;
  }
  .header .label {
    font-size: 10.5pt;
    margin-bottom: 0.3em;
  }
  .contact {
    font-size: 9pt;
  }
  .contact i {
    margin-right: 0.25em;
  }
  section {
    margin-bottom: 0.75em;
  }
  section h2 {
    font-size: 11.5pt;
    padding-top: 0.3em;
    margin: 0 0 0.4em;
  }
  .skills-list li {
    margin-bottom: 0.25em;
  }
  .entry {
    margin-bottom: 0.6em;
    padding-bottom: 0.5em;
  }
  .entry ul.highlights {
    margin: 0.25em 0 0;
    padding-left: 1.1em;
  }
  .entry ul.highlights li {
    margin-bottom: 0.15em;
  }
  .entry .keywords {
    font-size: 8.5pt;
    margin-top: 0.25em;
  }
  .entry-subheader {
    margin-bottom: 0.3em;
  }
}

@media (max-width: 640px) {
  #resume {
    padding: 0.25in 0.25in;
    overflow-x: hidden;
  }

  .print-button {
    position: fixed;
    top: auto;
    bottom: 20px;
    right: 20px;
    left: 20px;
    font-size: 12pt;
    padding: 10px 16px;
    justify-content: center;
  }

  .print-button i {
    font-size: 14pt;
  }

  .header {
    text-align: left;
  }

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

  .contact {
    font-size: 8.5pt;
    line-height: 1.6;
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }

  .contact a {
    word-break: break-all;
    display: inline;
  }

  .contact span.sep {
    margin: 0 0.3em;
    white-space: nowrap;
  }

  .entry-header, .entry-subheader {
    flex-direction: column;
    gap: 0.1em;
  }
}
