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

html {overflow-y: scroll;}

body {
  font: 1rem sans-serif;
  color: #444;
  background: #eee;
}

#menu {
  background: #ddd;
  height: 100vh;
  left: 0;
  overflow-x: hidden;
  padding: 1rem;
  position: fixed;
  text-align: right;
  top: 0;
  /*z-index: 1;*/
  width: 16rem;
}

ul.topnav {
  list-style-type: none;
  margin: 0;
  padding: 0;
  width: 100%; /* Full width */
}

ul.topnav li a {
  display: block;
  text-align: right;
  padding: 14px 16px;
  text-decoration: none;
}  

a:hover, a:visited:hover {
  background-color: #444;
  color: #eee;
}

#logo > h1, #logo > p {
  text-align: right;
  line-height: 1;  
  padding: 0;
}
 
main {
  padding: 1rem 2rem;
  margin-left: 16rem;
}

div[id^="progress-bar-"] {
  background-color: #336b9c;
  height: 20px;
}

#progress-bar-skill {width:100%;}
#progress-bar-bpm {width:75%;}
#progress-bar-python {width:70%;}
#progress-bar-arch {width:70%;}
#progress-bar-cooking {width:70%;}
#progress-bar-algo {width:65%;}
#progress-bar-sql {width:65%;}
#progress-bar-skiing {width:65%;}
#progress-bar-web {width:60%;}
#progress-bar-diving {width:55%;}
#progress-bar-obsd {width:45%;}
#progress-bar-js {width:40%;}
#progress-bar-cs {width:30%;}
#progress-bar-ps {width:30%;}
#progress-bar-java {width:20%;}
#progress-bar-guitar {width:15%;}
#progress-bar-dancing {width:10%;}
#progress-bar-go {width:5%;}
#progress-bar-rust {width:5%;}
#progress-bar-r {width:5%;}

/* The actual timeline (the vertical ruler) */
#timeline {position: relative;}

/* The actual timeline (the vertical ruler) */
#timeline::after {
  content: '';
  position: absolute;
  width: 6px;
  background-color: white;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
}

/* Container around content */
.timeline-container {
  position: relative;
  background-color: inherit;
  width: 50%;
}

/* The circles on the timeline */
.timeline-container::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  right: -12px;
  background-color: white;
  border: 4px solid #336b9c;
  top: 20px;
  border-radius: 50%;
  z-index: 1;
}

/* Place the container to the left */
.timeline-left {padding: 10px 40px 10px 0px;}

.timeline-left p {margin-right: 0;}

/* Place the container to the right */
.timeline-right {
  padding: 10px 0px 10px 40px;
  left: 50%;
}

.timeline-left::before, .timeline-right::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 22px;
  width: 0;
  z-index: 1;
  border: medium solid white;
}

/* Add arrows to the left container (pointing right) */
.timeline-left::before {
  right: 31px;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent white;
}

/* Add arrows to the right container (pointing left) */
.timeline-right::before {
  left: 30px;
  border-width: 10px 10px 10px 0;
  border-color: transparent white transparent transparent;
}

/* Fix the circle for containers on the right side */
.timeline-right::after {left: -12px;}

/* The actual content */
.timeline-content {
  padding: 20px 30px;
  background-color: white;
  position: relative;
  border-radius: 6px;
}

.timeline-left .timeline-content {text-align: right;}

a {
  color: #336b9c;
  text-decoration: none;
}

h1 {font-size: 200%;}

h1, h2 {
  padding: 1em 0;
  font-weight: 400;
  text-align: center;
}

p, ol {
  margin: auto;
  line-height: 1.5;
}

#about p, article p, article ol {
  max-width: 50rem;
  text-align: justify;
}

article p {
  font: 17px serif;
}

footer p {
  padding: 1rem 0;
  width: 50rem;
  text-align: right;
}

p.center {text-align: center;}
  
#logo p {margin-right: 0;}

@media screen and (max-width: 60rem) {
  ul.topnav li {float: left;}
  ul.topnav {position: static;}
  
  #menu {
    height: auto;
    width: auto;
    position: static;
  }
 
  main {
    position: static;
    margin-left: 0;
    width: 100%;
    padding: 1rem;
  }

  .timeline-content p {
    margin: 0;
  }
  
  p, #skills, article p, article ol {
    max-width: none;
  }

  article p, article ol {
    font: 17px sans-serif;
  }

  footer p {
    width: auto;
  }
}

@media screen and (max-width: 38rem) {
  ul.topnav li {float: none;}
  ul.topnav li a {text-align: left;}
  #logo > h1, #logo > p {text-align: left;}

  #timeline {margin: 0;}
  
  /* Place the timelime to the left */
  #timeline::after {left: 28px;}
  
  /* Full-width containers */
  .timeline-container {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  /* Make sure that all arrows are pointing leftwards */
  .timeline-container::before {
    left: 60px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
  }

  /* Make sure all circles are at the same spot */
  .timeline-left::after, .timeline-right::after {left: 15px;}
  
  /* Make all right containers behave like the left ones */
  .timeline-right {left: 0%;}

  .timeline-left > .timeline-content {text-align: left;}
}
