/*
TODO: Would be cool to implement a "masonry" layout (i.e. staggered cards)
that way, images with very long descriptions wouldn't really matter, they could still be inline with the flow
https://www.smashingmagazine.com/2021/02/things-you-can-do-with-css-today/

oh... lol, it isn't supported yet. Well, maybe in the future
*/
* {
  box-sizing: border-box;
}

html, body {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  --bg-color: #fcf0d1;
  --border-color: #999;
  --shadow-color: #777777aa;
  --font-color: #333;
  --link-color: #5391c1;

  background: var(--bg-color);
  font-size: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: var(--font-color);
}

@media (prefers-color-scheme: dark) {
  body {
    --bg-color: #242321;
    --border-color: rgb(228, 228, 228);
    --shadow-color: #dedadaaa;
    --font-color: rgb(240, 239, 239);
    --link-color: #9fc8e7;
  }
}

h1,
h2,
h3 {
  text-align: center;
  color: var(--font-color);
}

h1,
h2 {
  margin-bottom: 0;
}

.source {
  font-family: monospace;
  font-weight: 900;
}

.github-logo {
  width: 1em;
  transition: 0.3s all;
}

.github-logo:hover {
  transform: translateY(-0.05em);
  box-shadow: 0em 0.05em 0.1em var(--shadow-color);
}

.vert-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  justify-content: space-between;
  padding: 1em;
}

.vert-spacer {
  flex: 1 1 auto;
}

.cards {
  display: flex;
  align-items: flex-start;
  justify-items: center;
  flex-direction: column;
  margin: auto;
}

.card {
  width: 100%;
  text-decoration: none;
  color: var(--font-color);
  margin-bottom: 2em;
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
}

.flex-col-center {
  display: flex;
  flex-flow: column;
  align-items: center;
  align-content: center;
  justify-content: center;
}

.flex-row-center {
  display: flex;
  flex-flow: row;
  align-items: center;
  align-content: center;
  justify-content: center;
}

.image-container {
  width: 100%;
}

.card .description {
  text-decoration: none;
  color: var(--font-color);
  width: 100%;
}

a,
a:active,
a:visited,
a:hover,
a:link {
  color: var(--link-color);
}

.card .img {
  width: 100%;
}

.img {
  display: block;
  max-height: 100vh;
  max-width: 100%;
  border: 1px solid var(--border-color);
  transition: 1.3s all;
}

.img:hover {
  /* transform: translateY(-0.25em); */
  box-shadow: 0em 0em 2.9em 1em var(--shadow-color);
}

.card-detail {
  padding: 0;
  margin: 1em auto;
}

.card-detail description {
  padding: 2em;
  max-width: 1200px;
}

@media screen and (min-width: 960px) {
  .card {
    max-width: 50em;
  }
}

.load-more-container {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: center;
  justify-items: center;
  width: 100%;
  margin: auto;
}

#load-more-btn {
  width: 100%;
  max-width: 300px;
  height: 4em;
  display: block;
  font-size: 1em;
  background: none;
  border: 1px solid var(--font-color);
  color: var(--font-color);
  border-radius: 2em;
  cursor: pointer;
}

.pagination-btn {
  font-size: 0.75em;
  width: 3em;
  height: 3em;
  border-radius: 1.5em;
  border: 1px solid var(--font-color);
  color: var(--font-color);
  margin: 1em;
  background: var(--bg-color);
  cursor: pointer;
}

.pagination-btn.active {
  background: var(--font-color);
  color: var(--bg-color);
}

footer {
  text-align: center;
  width: 100%;
  padding: 2em 0;
  font-size: 0.9em;
}

blockquote {
  display: block;
  position: relative;
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
  line-height: 1.5rem;
  margin:20px 0;
  font-style:normal;
  border-radius: 0.2rem;
  border-left: 0.4rem solid var(--border-color);
  background: var(--bg-color);
  color: var(--font-color);
}

/*********************
Utility
**********************/
.display-none {
  display: none !important;
}

.text-align-center {
  text-align: center;
}
