.timeline {
  position: relative;
  overflow: auto;
}
.timeline:before {
  content: '';
  position: absolute;
  height: 100%;
  width: 5px;
  background: #dddddd;
  left: 0;
}
.timeline h2 {
  max-width: 6em;
  margin: 0 auto 1em;
  padding: 0.5em;
  text-align: center;
  position: relative;
  clear: both;
}
.timeline ul {
  list-style: none;
  padding: 0 0 0 1em;
  z-index: 1;
}
.timeline li {
  padding: 1em;
  margin-bottom: 1em;
  position: relative;
}
.timeline li:before {
  content: '';
  width: 0;
  height: 0;
  border-top: 1em solid;
  border-left: 1em solid transparent;
  position: absolute;
  left: -1em;
  top: 0;
}
.timeline h3 {
  margin-top: 0;
}
.timeline time {
  font-style: italic;
}

@media screen and (min-width: 40em) {

  .timeline:before {
    left: 50%;
  }
  .timeline ul {
    padding-left: 0;
    max-width: 700px;
    margin: 0 auto;
  }
  .timeline li {
    width: 42%;
  }
  .timeline li:nth-child(even) {
    float: right;
    margin-top: 2em;
  }
  .timeline li:nth-child(odd) {
    float: left;
  }
  .timeline li:nth-child(odd):before {
    border-top: 1em solid;
    border-right: 1em solid transparent;
    right: -1em;
    left: auto;
  }
  .timeline li:nth-of-type(2n+1) {
    clear: both;
  }
}
