@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Chakra Petch";
  src: url("fonts/chakra-petch-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --text: #282828;
  --muted: #676767;
  --sans: "GT America", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style BT", "Iowan Old Style", "Source Serif 4", Georgia, serif;
  --header-height: 54px;
  --content-padding: 1.3rem;
}

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

html {
  overflow-y: scroll;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) white;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: white;
  color: var(--text);
  font: 17px / 1.6 var(--serif);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--muted);
  outline-offset: 4px;
}

::selection {
  background: rgb(0 0 0 / 12%);
}

.site-header {
  position: fixed;
  z-index: 1;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding-inline: 1.33rem;
  background: white;
}

.site-name {
  color: var(--muted);
  font: 500 17px / 25px "Chakra Petch", var(--sans);
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.site-header nav {
  color: #3c3836;
  font: 400 15px / 1.6 var(--sans);
  letter-spacing: -0.01em;
}

.page {
  min-height: 100vh;
  padding: var(--header-height) 1rem 0;
}

main {
  width: 100%;
  max-width: calc(660px + 2 * var(--content-padding));
  margin-inline: auto;
  padding: 1rem;
  overflow-wrap: break-word;
}

h1 {
  padding-top: 1rem;
  font: 400 1.6rem / 1.1 var(--sans);
  letter-spacing: -0.015em;
}

.post-list {
  max-width: 660px;
  padding-top: 1.6rem;
  list-style: none;
}

.post-list li {
  padding-bottom: 0.4rem;
}

.post-list li + li {
  padding-top: 0.4rem;
  border-top: 1px solid rgb(103 103 103 / 10%);
}

.post-link {
  display: block;
  margin-inline: -1.6rem;
  padding: 1rem 1.6rem;
  border-radius: 8px;
  line-height: 1.4;
}

.post-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 0;
}

.post-info h2 {
  font: 400 17px / 1.4 var(--serif);
  text-wrap: balance;
  text-decoration: underline transparent;
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}

time {
  color: var(--muted);
  font: 400 15px / 1.4 var(--sans);
  display: block;
  margin-top: 0.25rem;
}

@media (hover: hover) {
  .post-link:hover h2,
  .site-header nav a:hover {
    text-decoration: underline rgb(80 73 69 / 20%);
    text-underline-offset: 2px;
  }

  .site-name:hover {
    opacity: 0.8;
  }
}

@media (min-width: 768px) {
  .post-link {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    align-items: baseline;
    gap: 1.5rem;
    margin-inline: -1.5rem;
    padding: 1.2rem 1.5rem;
  }

  .post-info {
    grid-area: 1 / 2;
  }

  time {
    grid-area: 1 / 1;
    margin-top: 0;
    white-space: nowrap;
  }
}

@media (max-width: 1170px) {
  main {
    padding-inline: var(--content-padding);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 50px;
  }

  .site-header {
    padding-inline: 1rem;
  }

  .page {
    padding-inline: 0.33rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-info h2 {
    transition: none;
  }
}
