*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin-top: 0;
}

html {
  background: var(--bg);
  box-sizing: border-box;
  overflow-y: scroll;
}

body {
  background: var(--bg);
  margin: 0;
  min-height: 100dvh;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

main {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: 1.75rem 1.25rem;
  width: 100%;
}

nav {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  padding-bottom: 0.8rem;
  position: relative;
}

nav a {
  color: var(--nav-link);
  text-decoration: none;
}

.nav-links {
  align-items: center;
  display: flex;
  gap: 2.5rem;
  justify-content: center;
}

.home-layout {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
}

.home-column {
  min-width: 0;
}

.home-bio-column,
article,
.section-intro,
.page-list {
  max-width: 44rem;
}

article,
.section-intro,
.page-list {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.home-card {
  margin-top: 0;
}

.home-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.link-list,
.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-list li {
  align-items: baseline;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-left: 0;
}

.page-list {
  display: grid;
  gap: 0.9rem;
}

.page-row {
  border-bottom: 1px dotted var(--border-strong);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: 0.9rem;
}

.page-row a,
.home-writing-entry a {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
}

.page-row aside {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.2rem;
}

.page-row time {
  color: var(--muted);
  flex-shrink: 0;
  font-size: 0.82rem;
}

footer {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: center;
  margin-top: auto;
  padding-top: 3rem;
  width: 100%;
}

@media (min-width: 880px) {
  main {
    padding: 1.75rem 2.5rem 2.5rem;
  }

  .home-layout {
    gap: 4vw;
    grid-template-columns: minmax(18rem, 1fr) minmax(24rem, 1.2fr) minmax(18rem, 1fr);
  }
}

@media (max-width: 620px) {
  nav {
    padding-right: 3.5rem;
  }

  .nav-links,
  footer {
    gap: 1.5rem;
  }

  .page-row,
  .link-list li {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }
}
