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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  font-size: 1rem;
  color: #16171a;
  background-color: #fff;
}

main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  max-width: 60rem;
  margin: 2rem auto;
  padding: 1rem;
}

header {
  flex-basis: 10rem;
  flex-grow: 1;
  padding: 1rem;
}

header .logo {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

header .logo a {
  text-decoration: none;
}

nav ul {
  list-style: none;
  border-right: 1px solid #edf2f7;
  padding-top: 3px;
}

nav li {
  margin-bottom: 0.2rem;
  text-align: right;
  margin-right: 2rem;
  white-space: nowrap;
}

nav a {
  text-decoration: none;
  font-size: 0.95rem;
}

nav a:hover {
  text-decoration: underline;
}

nav a.active {
  font-weight: 600;
}

section {
  flex-basis: 0;
  flex-grow: 999;
  min-width: 70%;
  padding: 1rem;
}

section h1 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.5;
}

.subtitle {
  font-size: 0.85rem;
  color: #9ca3af;
  font-style: italic;
  margin-bottom: 1rem;
}

section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

section p {
  margin-bottom: 1rem;
}

section ul,
section ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

section li {
  margin-bottom: 0.3rem;
}

a {
  color: #16171a;
  text-decoration: underline;
  text-decoration-skip-ink: auto;
}

article {
  padding: 1.5rem 0;
  border-bottom: 1px solid #edf2f7;
}

article:last-of-type {
  border-bottom: none;
}

article h2 {
  font-size: 0.85rem;
  font-weight: 400;
  color: #6b7280;
  margin-top: 0;
  margin-bottom: 0.25rem;
}

.post-type {
  display: inline-block;
  font-size: 0.75rem;
  color: #9ca3af;
  text-transform: lowercase;
  margin-bottom: 0.75rem;
}

.video-embed {
  position: relative;
  display: inline-block;
  margin: 0.5rem 0;
}

.video-embed img {
  max-width: 100%;
  height: auto;
  display: block;
}

.video-embed .play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: #fff;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.video-embed a {
  text-decoration: none;
}

article p {
  margin-bottom: 0.75rem;
}

article p:last-child {
  margin-bottom: 0;
}

article img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.5rem 0;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0 1rem;
  border-top: 1px solid #edf2f7;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.pagination span {
  color: #6b7280;
}

.pagination a {
  text-decoration: none;
}

.pagination a:hover {
  text-decoration: underline;
}

.masonry {
  columns: 3;
  column-gap: 0.75rem;
  margin-top: 1rem;
}

.masonry img {
  width: 100%;
  display: block;
  margin-bottom: 0.75rem;
  break-inside: avoid;
}

@media screen and (max-width: 45rem) {
  header {
    flex-basis: 100%;
  }

  header .logo {
    margin-bottom: 0.75rem;
  }

  nav ul {
    border-right: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0;
  }

  nav li {
    display: inline;
    text-align: left;
    margin-right: 1rem;
    margin-bottom: 0;
  }

  section {
    min-width: 100%;
  }

  .masonry {
    columns: 2;
  }
}
