html {
  width: 100%;
  height: 100%;
}

body {
  width: 100%;
  height: 100%;
  background-color: #e0e0e0;
  font-family: 'Hind Vadodara', sans-serif;
}

header.page-header,
footer.page-footer {
  padding: 50px 0;
  text-align: center;
  background-color: #005289;
}

footer.page-footer {
  padding: 10px 0;
}

h1 {
  font-family: 'Roboto Slab', serif;
  margin-top: 0;
  color: #fff;
}

a {
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

header.page-header p,
footer.page-footer p {
  width: 80%;
  max-width: 1400px;
  line-height: 120%;
  color: #eee;
  margin: 0px auto 10px auto;
}

header.page-header a,
footer.page-footer a {
  color: #7acbff;
}

.timeline {
  position: relative;
  width: 90%;
  max-width: 1600px;
  margin: 0px auto;
  padding: 20px 0 100px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50.2%;
  height: 100%;
  width: 4px;
  background: #ccc;
}

.no-js .timeline-filter-wrapper {
  display: none;
}

.timeline-filter-wrapper {
  background-color: #ccc;
  padding: 10px 0;
}

.timeline-filter {
  width: 90%;
  max-width: 1600px;
  margin: 0px auto;
}

.timeline-filter ul {
  list-style: none;
  padding: 0;
  margin: 0;
  -webkit-margin-before: 0;
  -webkit-margin-after: 0;
}

.timeline-filter ul li {
  display: inline;
  padding-right: 20px;
}

.timeline-entry {
  position: relative;
  margin-top: -75px;
}

.timeline-entry.first {
  margin-top: 10px;
}

.timeline-entry.short {
  margin-top: -50px;
}

.timeline-icon {
  position: absolute;
  left: 50%;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  border: 4px solid #ccc;
  border-radius: 50%;
  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3);
  text-align: center;
  vertical-align: middle;
  z-index: 2;
}

.timeline-icon i {
  color: #fff;
  font-size: 20px;
  line-height: 40px;
}

.timeline-description {
  box-sizing: border-box;
  position: relative;
  width: 45%;
  background-color: #fff;
  padding: 20px;
  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
  display: inline-block;
  z-index: 1;
}

.sub-entry {
  clear: both;
  margin-top: 30px;
}

.timeline-entry.odd .timeline-description {
  margin-left: 55%;
}

.timeline-description .timestamp {
  font-style: italic;
  font-size: 80%;
}

.timeline-description .timestamp .note {
  color: #888;
}

.timeline-description h2 {
  font-family: 'Roboto Slab', serif;
  line-height: 110%;
}

.timeline-description h2 a {
  text-decoration: inherit;
  color: inherit;
  float: right;
  visibility: hidden;
}

.timeline-description h2:hover a {
  visibility: visible;
  opacity: 0.5;
}

.timeline-description h2,
.timeline-description ul {
  margin: 5px 0;
  -webkit-margin-before: 5px;
  -webkit-margin-after: 5px;
}

.timeline-description p,
.timeline-description ul {
  margin: 5px 0 10px 0;
  -webkit-margin-before: 5px;
  -webkit-margin-after: 10px;
}

.timeline-description img {
  max-width: 150px;
  display: block;
}

.timeline-description .landscape img {
  max-width: 200px;
}

.image-right {
  float: right;
  padding: 10px 0 20px 20px;
}

.captioned-image .caption {
  display: block;
  line-height: 120%;
  font-style: italic;
  font-size: 90%;
}

.captioned-image .attribution-link {
  font-size: 70%;
}

.captioned-image {
  max-width: 150px;
  clear: both;
}

.captioned-image.landscape {
  max-width: 200px;
}

section.attribution {
  width: 90%;
  max-width: 1600px;
  margin: 0 auto;
  padding-bottom: 20px;
}

div.etc {
  width: 90%;
  max-width: 1600px;
  margin: 0px auto;
  padding: 30px 0;
}

div.etc h1 {
  color: #005289;
}

div.etc .description {
  font-size: 80%;
  font-style: italic;
}

.timeline-icon.green {
  background-color: #59bf51;
}

.timeline-icon.red {
  background-color: #bf413e;
}

.timeline-icon.grey {
  background-color: #999;
}

/* Make this less sad on mobile */

@media only screen and (min-width: 769px) {
  .timeline-entry.even .timeline-description::after {
    left: 100%;
    border-left-color: #fff;
  }
}

@media only screen and (max-width: 768px) and (min-width: 415px) {
  .timeline-entry.even .timeline-description::after {
    right: 100%;
    border-right-color: #fff;
  }
}


@media only screen and (min-width: 415px) {
  .timeline-description::after {
    top: 20px;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
    border-width: 10px;
    margin-top: -10px;
    z-index: 100;
  }
  
  .timeline-entry.odd .timeline-description::after {
    right: 100%;
    border-right-color: #fff;
  }
}

@media only screen and (max-width: 768px) {
  .timeline::before {
    left: 0;
  }

  .timeline-icon {
    left: 0;
  }

  .timeline-entry,
  .timeline-entry.short  {
    margin-top: 25px;
  }

  .timeline-entry.odd .timeline-description,
  .timeline-entry.even .timeline-description {
    margin-left: 50px;
  }

  .timeline-description {
    width: 90%;
  }
}

/* Small screens */
@media only screen and (max-width: 414px) {
  .timeline-description img,
  .captioned-image {
    max-width: none;
    width: 100%;
  }

  .timeline::after {
    display: none;
  }  

  .timeline-icon {
    width: 30px;
    height: 30px;
    margin-left: -15px;
  }

  .timeline-icon i {
    font-size: 15px;
    line-height: 30px;
  }

  .timeline-entry.odd .timeline-description,
  .timeline-entry.even .timeline-description {
    margin-left: 35px;
  }
}

/* Fallback for no Javascript */

.no-js .timeline::before {
  left: 0;
}

.no-js .timeline-icon {
  left: 0;
}

.no-js .timeline-entry,
.no-js .timeline-entry.short {
  margin-top: 25px;
}

.no-js .timeline-entry .timeline-description {
  margin-left: 50px;
}

.no-js .timeline-entry .timeline-description::after {
  right: 100%;
  border-right-color: #fff;
}

.no-js .timeline-description {
  width: 90%;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #222;
  }

  header.page-header,
  footer.page-footer {
    background-color: #003356;
  }

  h1,
  header.page-header p,
  footer.page-footer p,
  .timeline-description,
  .timeline-filter,
  .timeline-icon i,
  .attribution,
  .etc {
    color: #ccc;
  }
  
  .timeline-description a,
  .attribution a,
  .etc a {
    color: #7acbff
  }

  div.etc h1 {
    color: #3086bf;
  }

  .timeline-description {
    background-color: #333;
  }

  .timeline-filter-wrapper {
    background-color: #000;
  }

  .timeline::before {
    background-color: #888;
  }

  .timeline-icon {
    border-color: #888;
  }

  /* 20% darker than the light mode versions */
  .timeline-icon.green {
    background-color: #337c2e; 
  }

  .timeline-icon.red {
    background-color: #722725;
  }

  .timeline-icon.grey {
    background-color: #666;
  }

  /* Arrows */
  .no-js .timeline-entry .timeline-description::after {
    border-right-color: #333;
  }
  @media only screen and (min-width: 769px) {
    .timeline-entry.even .timeline-description::after {
      border-left-color: #333;
    }
  }
  @media only screen and (max-width: 768px) and (min-width: 415px) {
    .timeline-entry.even .timeline-description::after {
      border-right-color: #333;
    }
  }
  @media only screen and (min-width: 415px) {
    .timeline-entry.odd .timeline-description::after {
      border-right-color: #333;
    }
  }
}
