/* Reset */

*, *::before, *::after {
  box-sizing: border-box;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

h1, h2, h3, h4, p {
  padding: 0;
  margin: 0;
}

/* Common */

* {
  font-family: 'Open Sans', sans-serif;
}

html {
  font-size: medium;
}

body {
  display: flex;
  align-items: center;
  flex-direction: column;
}

h1, h2 {
  font-family: Garamond, Georgia, serif;
}

h1 {
  font-variant: small-caps;
  font-size: 2.75em;
  margin: 0;
}

h2 {
  font-size: 1.5em;
}

h3, h4 {
  font-size: 1em;
}

hr {
  border: none;
  border-top: 2px solid gray;
  width: 100%;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

section {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Header */

header {
  text-align: center;
  margin-top: 2em;
  margin-bottom: 2em;
  display: flex;
  flex-direction: column;
  align-items: center
}

header h1 {
  margin-bottom: 0.75rem;
}

header h2 {
  margin-bottom: 0.5em;
}

ul.contact_info {
  display: flex;
  justify-content: center;
  padding-left: 0;
  flex-wrap: wrap;
}

ul.contact_info li {
  display: inline;
}

ul.contact_info > li:not(:first-child)::before {
  content: '•';
  margin: 0 0.5em;
}

.portrait {
  position: absolute;
  top: 0;
  right: 32px;
  width: 128px;
  height: 128px;
  border-left: 2px solid lightgray;
  border-bottom: 2px solid lightgray;
}

.portrait img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.paper_clip {
  pointer-events: none;
}

section h2 {
  margin-bottom: 1.5rem;
}

/* Summary */

.summary > p:not(:last-child) {
  margin-bottom: 0.5em;
}

/* Skills */

.skills-item {
  display: flex;
  flex-direction: row;
  width: 100%;
}

.skills-title {
  width: 7em;
  flex: none;
  font-weight: 600;
}

time {
  text-align: right;
}

.skills-content {
  flex: auto;
}

.skills-item:not(:last-child) {
  margin-bottom: 0.5em;
}

/* Experience */

.job_list-title {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1em;
  font-size: 1.15em;
}

.job_list > li:not(:last-child) {
  margin-bottom: 1.5em;
}

.role_list {
  margin-left: 1em;
}

.role_list-title {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1em;
  font-size: 1.1em;
}

.role_list > li:not(:last-child) {
  margin-bottom: 1em;
}

.role_description {
  margin-left: 1.75em;
  list-style: square;
}

.role_description > li {
  padding-left: 0.5em;
}

.role_description > li:not(:last-child) {
  margin-bottom: 0.75em;
}

/* Device-specific */

footer {
  margin-top: 2rem;
  margin-bottom: 2.5rem;
}

@media screen and (width >= 800px) {
  article {
    width: 80%;
  }
}

@media screen and (width < 800px) {
  article {
    margin-left: 2rem;
    margin-right: 2rem;
  }

  .portrait {
    position: relative;
    top: 0;
    right: 0;
    margin-bottom: 1rem;
    border: none;
  }

  .paper_clip {
    display: none;
  }
}

@media screen and (width < 600px) {
  html {
    font-size: small;
  }
}

@media screen {
  .print-link {
    display: none;
  }
}

@media print {
  html {
    font-size: x-small;
  }

  header {
    position: relative;
  }

  .portrait {
    top: 50%;
    right: 0;
    margin-top: -32px;
    width: 64px;
    height: 64px;
    border: none;
  }

  .paper_clip {
    display: none;
  }

  a:link, a:visited {
    color: inherit;
    text-decoration: none;
  }

  .print-button {
    display: none;
  }
}