body {
  background: white;
  color: black;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11pt;
  margin: 10px;
  margin-top: 15px;
  margin-bottom: 15px;
  line-height: 1.5;
}

h1,
h2,
h3 {
  text-align: center;
  color: #666;
  margin: 0;
  font-weight: 600;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

h4 {
  color: #666;
  display: inline;
}

img {
  border: 0;
}

figure {
  text-align: center;
  font-style: italic;
  text-indent: 0;
  margin: 0 2em;
}

h2 a,
h3 a {
  color: #666;
}

a {
  text-decoration: none;
  color: #3b5998;
}

a:hover {
  text-decoration: underline;
}

table {
  border-collapse: collapse;
  border: 0;
}

td {
  border: 0;
  padding: 0;
}

#body {
  margin: auto;
  max-width: 850px;
  padding: 0 10px;
  box-sizing: border-box;
}

#top-header {
  margin-bottom: 20px;
  margin-top: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

#header {
  margin-bottom: 25px;
  text-align: center;
}

#projects-grid {
  display: grid;
  grid-row-gap: 1.5rem;
  grid-column-gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  justify-content: space-evenly;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.projects-grid-entry,
#projects-grid-entry {
  display: flex;
  flex-direction: column;
}

.projects-grid-entry a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.projects-grid-entry a:hover .projects-grid-title {
  text-decoration: underline;
  color: #3b5998;
}

.rect-img-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: transparent;
}

.rect-img-container img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  border: 0;
}

.projects-grid-title,
#projects-grid-title {
  text-align: center;
  margin-top: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  color: #333;
}

.projects-grid-desc {
  text-align: center;
  font-size: 0.8rem;
  color: #777;
  margin-top: 3px;
  line-height: 1.3;
}

#footer {
  margin-top: 25px;
  margin-bottom: 40px;
}

@media all and (orientation: portrait) {
  body, p, li {
    font-size: calc(15px + 0.5vw);
  }
  h1 {
    font-size: calc(22px + 1vw);
  }
  h2 {
    font-size: calc(18px + 0.8vw);
  }
  h3, h4 {
    font-size: calc(16px + 0.6vw);
  }
}

@media all and (orientation: landscape) {
  body, p, li {
    font-size: calc(13px + 0.25vw);
  }
  h1 {
    font-size: calc(18px + 0.5vw);
  }
  h2 {
    font-size: calc(15px + 0.4vw);
  }
  h3, h4 {
    font-size: calc(13px + 0.3vw);
  }
}
