/* smoother blog image */
img {
  border-radius: 1em;
}

#blog .md div {
  border-radius: 1em;
  position: relative;
  background: var(--bg-color);
}
/* pretty diffused border gradient */
#blog .md div::before {
  content: "";
  z-index: -1;
  position: absolute;
  inset: 0;
  background: linear-gradient(-45deg, var(--hover) 0%, var(--link-color) 100% );
  transform: translate3d(0px, 0px, 0) scale(1);
  filter: blur(50px);
  /* opacity: 0.5; */
  opacity: 0.3;
  transition: opacity 0.3s;
  border-radius: inherit;
}

#blog .md div::after {
  content: "";
  z-index: -1;
  position: absolute;
  inset: 0;
  background: inherit;
  border-radius: inherit;
}

/* adjust post reading for big screens */
@media screen and (min-width: 1200px) {
  #post {
    max-width: 40em;
    width: 70vw;
    font-size: 22px;
  }
}

/* adjust post reading for medium (e.g., small laptops, tablets, etc.) */
@media screen and (min-width: 641px) and (max-width: 1199px) {
  #post {
    max-width: 40em;
    width: 90vw;
    font-size: 20px;
  }
}

#post article {
  position: relative;
  background: var(--bg-color);
  border-radius: 1em;
  padding: max(2vh, 2em) max(3vw, 3em);
}

/* pretty diffused border gradient */
#post article::before {
  content: "";
  z-index: -1;
  position: absolute;
  inset: 0;
  background: linear-gradient(-45deg, var(--hover) 0%, var(--link-color) 100% );
  transform: translate3d(0px, 0px, 0) scale(1);
  filter: blur(50px);
  /* opacity: 0.5; */
  opacity: 0.3;
  transition: opacity 0.3s;
  border-radius: inherit;
}

#post article::after {
  content: "";
  z-index: -1;
  position: absolute;
  inset: 0;
  background: inherit;
  border-radius: inherit;
}

#post-footer {
  position: relative;
  border-radius: 1em;
  margin-top: 1em;
  padding: 1em 2em;
  padding-bottom: 2em;
  font-size: 0.7em;
}

/* pretty diffused background gradient for the footer */
#post-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, var(--hover) 0%, var(--link-color) 100%);
  filter: blur(100px);
  opacity: 0.5;
  z-index: 0;
}

#post-footer > * {
  position: relative;
  z-index: 1;
}

/* contrasting text color */
#post-footer p {
  color: white;
  mix-blend-mode: difference;
}

/* pretty gradient color for links */
a {
  position: relative;
  text-decoration: none !important;

  background: linear-gradient(-20deg, var(--link-color) 20%, var(--hover) 100%);

  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  font-weight: bold;
  transition: all 1s ease;
}

/* fancy underline for links on hover */
a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 2px;
  background: linear-gradient(to left, var(--link-color) 20%, var(--hover) 100%);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s ease;
  text-decoration: none !important;
}

a:hover::after {
  transform: scaleX(1);
  transition: transform 0.3s ease;
  text-decoration: none !important;
}

/* bug fix: additionally define link behavior for footer, to get proper color behavior */
#post-footer a {
  position: relative;
  text-decoration: none;

  background: linear-gradient(-20deg, var(--link-color) 20%, var(--hover) 100%);

  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  font-weight: bold;
  transition: all 1s ease;
}

#post-footer a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: linear-gradient(to left, var(--link-color) 20%, var(--hover) 100%);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s ease;
}

#post-footer a:hover::after {
  transform: scaleX(1);
  transition: transform 0.3s ease;
}

.tag {
  transition: all 0.3s ease;
}

.tag:hover {
  /* box-shadow: 20px 20px 20px linear-gradient(-20deg, var(--link-color) 20%, var(--hover) 100%); */
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  transition: all 0.1s ease;
}

/* .tag a:hover { */
/*   mix-blend-mode: difference; */
/* } */

