/* --- RESET / BASE --- */

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

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: 
    -apple-system, BlinkMacSystemFont, 
    "Helvetica Neue", Helvetica, 
    "Nimbus Sans L", Arial, 
    sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #111;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

/* --- STICKY FOOTER LAYOUT --- */

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 20px;
}

.site-main {
  flex: 1;
}

/* --- HOME LAYOUT --- */

.home-layout {
  position: relative;
}

.home-main {
  max-width: 65ch;
}

.home-side {
  margin-top: 20px;
  max-width: 28ch;
}

@media (min-width: 1000px) {
  .home-layout {
    display: grid;
    grid-template-columns: 65ch 1fr;
    column-gap: 80px;
  }

  .home-side {
    margin-top: 0;
    align-self: start;
  }
}

/* --- BIO --- */

.site-bio {
  margin-bottom: 60px;
}

.site-bio p {
  margin: 0;
}

.site-name {
  text-decoration: none;
  font-weight: 500;
}

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

/* --- POST LIST --- */

.post-list {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.post-title-meta {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.post-meta {
  color: #777;
  font-size: 1em;
  white-space: nowrap;
}

/* --- POST PAGE --- */

.post-content {
  max-width: 65ch;
}

.post-header {
  margin-bottom: 2.5em;
}

.post-header h1 {
  margin: 0.4em 0 0;
  font-size: 1.6rem;
  font-weight: 500;
}

.back-link {
  font-size: 1em;
  text-decoration: none;
  color: #777;
}

.back-link:hover {
  color: #111;
  opacity: 1;
}

/* --- TYPOGRAPHY --- */

p {
  margin: 0 0 1.2em 0;
}

h1, h2, h3 {
  font-weight: 500;
  line-height: 1.3;
  margin: 2.2em 0 0.6em;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }

/* --- FOOTER --- */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 60px;
  padding-bottom: 20px;
  font-size: 1em;
  color: #444;
  max-width: 90ch;
}

/* --- LINKS --- */

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

a:hover {
  opacity: 0.6;
}

.side-links a {
  display: inline-block;
  text-decoration: none;
}

.side-links a:hover {
  text-decoration: underline;
}

/* --- MISC --- */

small {
  font-size: 0.85em;
  color: #777;
}

hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 3em 0;
}

img {
  max-width: 100%;
  height: auto;
}
