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

html {
  font-family: Garamond, serif;
  /* We set the font-size directly here 
  and then use rem in the rest of the css
  in line with the advice given here:
  https://stackoverflow.com/questions/6905834/should-i-set-the-default-font-size-on-the-body-or-html-element */
  font-size: 21px;
  color: #585858;
  background-color: #FFF1E0;
}

@media screen and (max-width: 1000px) {
  html {
    font-size: calc(18px + 3 * ((100vw - 320px) / 680));
  }
}

@media screen and (max-width: 320px) {
  html {
    font-size: 18px;
  }
}

body {
  height: 100vh;
  display: grid;
  grid-template-columns: auto minmax(100vw, 1192px) auto;
  grid-template-rows: auto 1fr;
  justify-items: center;
}

header {
  /* Grid system used to get fixed header with guidance from this article:
  https://css-tricks.com/how-to-use-css-grid-for-sticky-headers-and-footers/ */
  display: flex;
  background-color: #FFF1E0;
  justify-content: space-around;
  border-bottom-style: solid;
  border-width: 1px;
  border-color: #BA7781;
  align-items: center;
  height: auto;
  width: 1192px;
  max-width: 100vw;
  padding-top: env(safe-area-inset-top); 
  padding-right: env(safe-area-inset-right);
  padding-left: env(safe-area-inset-left);
  grid-area: 1 / 2 / 1 / 3;
}

header > h1 {
  font-size: 1.5rem;
  white-space: nowrap;
}

.nav-btn {
  display: none;
}

#nav-check {
  display: none;
}

/* Responsive nav bar media query starts here */
@media screen and (max-width: 768px) {
  header {
    height: auto;
    flex-wrap: wrap;
  }

  .nav-btn {
    display: flex;
    margin: 0rem 0rem;
  }

  .nav-btn * {
    width: 20px;
    height: 20px;
  }

  #nav-check:not(:checked) ~ .list-nav {
    display: none;
  }

  #nav-check:checked ~ .list-nav {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    width: 100vw;
    margin: 0rem 0rem;
  }

  .nav-link{
    margin: 0.115rem 0rem;
  }

  h1 {
    /* font-size: 1.2rem; */
  }

  .hamburger-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .hamburger-button > div {
    width: 15px;
    height: 3px;
    border-radius: 3px;
    background-color: #585858;
    margin: 1px 0px;
  }
}

.list-nav {
  display: flex;
  list-style-type: none;
  justify-content: space-between;
  margin: 0.75rem 0.75rem;
}

.list-nav > li {
  display: flex;
  width: auto;
  margin: 0px 10px;
}

#blog-posts {
  display: flex;
  flex-direction: column;
  list-style-type: none;
  justify-content: space-between;
}

#blog-posts > li {
  display: flex;
  flex-direction: column;
  width: auto;
}

.nav-link {
  text-decoration: none;
  color: #585858;
}

.nav-link:hover {
  color: #BA7781;
  text-decoration: underline;
}

main {
  width: 100vw;
  overflow: auto;
  display: grid;
  grid-template-rows: 1fr auto;
  grid-template-columns: 1fr;
  grid-area: 2 / 2 / 2 / 3;
  justify-items: center;
}

.data-content {
  width: 680px;
  grid-area: 1 / 1 / 2 / 1;
  margin: 1rem 0rem;
}

@media screen and (max-width: 768px) {
  .data-content {
    width: 98vw;
    margin: 2vh 1vw;
  }
}

footer {
  grid-area: 2 / 1 / 3 / 1;
}

time {
  margin: 0.5rem 0rem;
  font-size: 0.65rem;
  font-weight: 300;
}

p {
  margin: 1rem 0rem;
}

iframe {
  margin: 1rem 0rem;
  width: 100%;
  height: (9 / 16) * 100vw;
}

a {
  color: #BA7781;
}

code {
  background-color: grey;
  opacity: 90%;
  font-size: 0.9em;
}

.profile-pic {
  width: 40%;
  display: inline;
  float: right;
  margin-left: 36px;
}

img {
  width: 100%;
}

.captioned-image {
  display: flex;
  flex-direction: column;
}

.captioned-image > img {
  margin-bottom: 0%;
}

.captioned-image > a {
  /* display is flex so in figcaptions the caption lines up with photo */
  display: flex;
}

figcaption {
  width: fit-content;
  font-size: 0.65rem;
  background-color: #5E6D8F;
  color: #F0F1F3;
  padding: 2px 3px;
}

.footnote-item {
  font-size: 0.65rem;
  display: inline;
}

.footnote-item > p {
  display: list-item;
  list-style-position: inside;
  margin-top: 0;
  margin-bottom: 0;
}

ol > li {
  list-style-position: inside;
}

#projects-list {
  display: flex;
  flex-direction: column;
  list-style-type: none;
  justify-content: space-between;
  font-size: 0.8rem;
}

#projects-list > li {
  display: grid;
  grid-template-columns: 90px 1fr;
  grid-template-rows: 160px;
  margin: 1rem 0rem;
  column-gap: 10px;
}

.project-img {
  width: 90px;
  height: 160px;
}

#projects-list > li:nth-child(even) {
  grid-template-columns: 1fr 90px;
}

#projects-list > li:nth-child(odd) > .project-even {
  display: none;
}

#projects-list > li:nth-child(even) > .project-odd {
  display: none;
}

.project-para > p {
  margin: 2px 0px 0px 0px;
}

@media screen and (max-width: 900px)  {
  #projects-list > li {
    grid-template-rows: 1fr;
  }

  .project-img {
    align-self: center;
  }
}

.utterances {
  min-height: 300px;
}

.four04 {
  text-align: center;
  align-self: center;
  margin: 15% 0%;
}