:root {
  --bg-color: #ebebeb;
  --title-color: #0f8b8d;
  --text-color: #143642;
  /* profile pic */
  --pic-size: 150px;
  --pic-radius: 15%;
}
body {
  font-family: 'Lato', sans-serif;
  box-sizing: content-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--bg-color);
}
/* Colors */
h1, h2, h3 {
  color: var(--text-color);
}
/* Header */
h1 {
  font-size: 3rem;
  align-self: center;
}
h2 {
  font-size: 2.5rem;
}
header {
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  justify-content: flex-end;
  column-gap: 2em;
}
.profile-pic {
  z-index: 1;
}
.profile-pic img {
  max-width: var(--pic-size);
  max-height: var(--pic-size);
  /*border-bottom-left-radius: 1em 10%;
  border-bottom-right-radius: 1em 10%;
  */
  background-clip: content-box;
  border: 3px solid var(--text-color);
}

.profile-pic img::after {
  border: 1px solid var(--text-color);
  content: ' ';
  position: absolute;
}

.print {
  display: none;
}
/* Honest to god, I should stop playing with CSS */
/* .profile-pic::after{
  position: absolute;
  display: block;
  z-index: -2;
  transform: rotate(45deg);
  content: ' ';
  background-color: #b1b1b1;
  border-radius: var(--img-radius);
  width: 180px;
  height: 180px;
  margin: -192px 10px;
} */

/* Body */
article {
  max-width: max(50%, 600px);
}
article .about, article .experience, article .education {
  display: flex;
  justify-content: center;
  flex-direction: column;
}
.about li {
  list-style: square;
}
.job {
  margin-top: 1rem;
}
.job:hover {
  cursor: pointer;
}
.job .date {
  font-style: italic;
  font-size: 0.8rem;
  margin-right: 1rem;
}
.job .keywords {
  font-size: 0.7rem;
  margin-left: 5.2rem;
}
.job .keywords ul {
  display: inline-block;
  margin: 0 0;
  padding-left: 0.2rem;
}
.job .keywords li {
  display: inline-block;
}
.job .keywords li:not(:last-child):after {
  content: ',';
}
/* Tested by Sonja, it seems people don't notice it's expendable
summary {
  display: block;
}
summary::-webkit-details-marker {
  display: none;
}*/
summary {
  list-style-image: url('/img/baseline-expand_more-24px.svg');
}
summary::-moz-list-bullet {
  position: absolute;
  margin-left: 95%;
  margin-bottom: -1.3rem;
}

details[open] summary {
  list-style-image: url('/img/baseline-expand_less-24px.svg');
}
summary::-webkit-details-marker {
  float: right;
  background-position: center;
  background-image: url('/img/baseline-expand_more-24px.svg');
  color: transparent;
}

details[open] summary::-webkit-details-marker {
  float: right;
  background-position: center;
  background-image: url('/img/baseline-expand_less-24px.svg');
  color: transparent;
}
.details {
  border-left: 1px solid black;
  margin-left: 2rem;
  font-size: 0.9rem;
}

.details p {
  margin-left: 1rem;
  margin-top: 0;
  margin-bottom: 0;
  white-space: pre-line;
}
details[open] .details p {
  padding-top: 1rem;
}

.job:not(:last-child)::after {
  display: block;
  border-left: 1px solid black;
  content: ' ';
  height: 2rem;
  width: 1px;
  margin-left: 2rem;
}

/* Specific to education */
.education .job:not(:last-child)::after {
  margin-top: 1rem;
}
.education .job:hover {
  cursor: inherit;
}
/* Footer */
footer {
  display: block;
}
footer h3 {
  text-align: center;
}
footer a:not(:first-child) {
  margin-left: 1em;
}
/* TEST STYLING*/
h2 {
  background-color: var(--text-color);
  color: rgb(255,255,255);
}
h2::before {
  content: ' ';
  /*border-bottom: 5px solid black;*/
  width: 1rem;
  height: 1rem;
  display: inline-block;
}
h2::after {
  animation: blink-animation 8s steps(2, start) infinite;
  content: ' ';
  width: 1rem;
  height: 2rem;
  margin-left: 1rem;
  background-color: red;
  display: inline-block;
}
@keyframes blink-animation {
  0% {
    background-color: var(--text-color); 
  }
  20% {
    background-color: red;
  }
  100% {
    background-color: red; 
  }
}
article {
  /*border-left: 5px solid var(--text-color);*/
}
header {
  /*border-right: 10px solid black;
  border-bottom: 8px solid black;
  background-color: rgb(255,255,255);*/
}
.details {
  border-left-width: 2px;
  border-color: var(--text-color);
}
.job:not(:last-child)::after {
  border-left-width: 2px;
  border-color: var(--text-color);
}
.job .date {
  font-size: 1rem;
}
.printer {
  float: right;
  background-color: var(--text-color);
  color: white;
  font-size: 3rem;
  margin-top: -4rem;
  padding: 0.5rem;
  border: none;
  cursor: pointer;
}

.printer:hover {
  color: red;
}

.strike {
  text-decoration: line-through;
}

@media print {
  :root {
    --bg-color: initial; 
  } 
  h2 {
    background-color: initial;
    color: var(--text-color);
  }
  h2::after {
    animation: none;
    background-color: initial !important;
  }
  .profile-pic img {
    border: none;
    border-radius: 0px;
  }
}

@media (max-width: 500px) {
  h1 {
    display: flex;
    align-content: space-between;
    column-gap: 2rem;
    flex-wrap: wrap;
  }
  h1 > span {
    display: block;
    width: 100%;
  }
  h1 > span:last-child {
    text-align: center;
  }
  .details {
    margin-left: 1rem;
  }
  .job:not(:last-child)::after {
    margin-left: 1rem;
  }
  .job .keywords {
    margin-left: 2rem;
  }
  .job .company {
    display: inline-block;
    min-width: 300px;
    margin-left: 2rem;
  }
}
