/* Variables */

:root {
  --color-bg: #eee;
  --color-text: hsl(0, 0%, 15%);
  --color-subdued: hsl(0, 0%, 33%);
  --color-link: hsl(0, 0%, 0%);
  --sans-serif: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
  --mono: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
}

/* Modern CSS Reset */
/* https://www.joshwcomeau.com/css/custom-css-reset/ */
*, *::before, *::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
input, button, textarea, select {
  font: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}
p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}
#root, #__next {
  isolation: isolate;
}

/* End CSS Reset */

body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100dvh;
  gap: 2rem;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--sans-serif);
}

img {
  margin-top: 1rem;
}

main {
  display: grid;
  max-width: 80ch;
  padding: 0 1rem;
  height: max-content;
  margin: 0 auto;
  gap: 3rem;
}

.tweet {
  display: grid;
  grid-auto-rows: auto;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: white;
}

.meta {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--color-subdued);
}

.meta > span {
  display: flex;
  flex-direction: row;
  align-items: center;
}

a.permalink {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  font-size: 0.875rem;
  color: var(--color-subdued);
  text-decoration: none;
}

a.permalink:hover {
  text-decoration: underline;

  svg.icon {
    color: var(--color-link);
  }
}



/* Icons */
svg.icon {
  height: 16px;
  width: 16px;
  margin-right: 4px;
}

.icon.heart {
  color: hsl(0, 100%, 50%);
}

.icon.retweet {
  color: hsl(120, 50%, 40%);
}



header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 1rem;
  color: var(--color-text);
}

header a {
  color: var(--color-text);
}

footer {
  display: block;
  text-align: center;
  padding: 2rem;
  font-size: 0.875rem;
  color: var(--color-subdued);
}

footer a {
  color: var(--color-subdued);
}



.pagination {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 1rem;
}

.pagination .pg {
  display: grid;
  place-content: center;
  height: 40px;
  width: 40px;
  outline: 2px solid var(--color-subdued);
  font-weight: bold;
  color: var(--color-text);
  text-decoration: none;
}

.pagination .pg:hover {
  background-color: var(--color-link);
  color: #fff;
}

.pagination .pg[aria-current="page"] {
  background-color: var(--color-text);
  color: #fff;
}