@import url("post.css");

/** Variables **/
:root {
  --text-color: #333;
  --background-color: #fff;
  --link-color: #082840;
  --link-color-visited: #9248c8;
  --border-color: rgba(128, 128, 128, 0.25);
}
@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #ddd;
    --background-color: #2a2a2a;
    --link-color: #45a1ff;
    --link-color-visited: #c876ff;
  }
}

/** General styles **/
* {
  box-sizing: border-box;
}
html,
body {
  padding: 0;
  margin: 0;
  font: normal normal 400 1em/1.5 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
}
body {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 1em;
  padding-bottom: 3em;
  color: var(--text-color);
  background-color: var(--background-color);
}
a:any-link {
  color: var(--link-color);
}
a:any-link:visited {
  color: var(--link-color-visited);
}
a:any-link:not(:hover) {
  text-decoration: none;
}
img {
  max-width: 100%;
}
.tmpl-post img {
  cursor: pointer;
}
blockquote {
  border-left: 2px solid;
  margin-left: 0;
  padding-left: 2em;
  font-style: italic;
}
figure {
  margin-left: 0;
  margin-right: 0;
  text-align: center;
}
figcaption {
  font-style: italic;
}
.flex {
  display: flex;
}
.grow {
  flex-grow: 1;
}
.float-right {
  float: right;
}
figure.float-left,
figure.float-right {
  max-width: 30%;
  margin: 1em;
}

/** Header **/
header {
  overflow: auto;
}
.nav-wrapper,
.media-links {
  padding: 1.5em 1.4vw;
}
.nav-wrapper {
  float: left;
  padding-left: 0;
  padding-bottom: 0.8em;
}
.nav {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}
.nav-wrapper .title {
  cursor: default;
  color: inherit !important;
  text-decoration: none;
  margin-inline-end: 1em;
}
.nav-item {
  display: flex;
  align-items: center;
  transition: transform 0.1s;
  overflow: hidden;
  text-transform: uppercase;
  transition: all 0.3s;
}
body:not(.not-found) .nav-wrapper:not(:hover):not(:focus-within) .nav-item:not(.nav-item-active) {
  transform: scaleY(0);
  opacity: 0;
}
.nav-item a {
  display: block;
  color: inherit !important;
}
.nav-item-active {
  order: -1;
  font-weight: bold;
}
.nav-item-active::after {
  content: "";
  -webkit-mask: url(../img/arrow-dropdown.svg) no-repeat center;
  mask: url(../img/arrow-dropdown.svg) no-repeat center;
  background-color: currentColor;
  display: inline-block;
  margin-inline-start: 1ch;
  height: 1em;
  width: 1em;
  pointer-events: none;
}

/** Social links **/
.media-links {
  float: right;
  padding-right: 0;
}
.media-link {
  display: inline-block;
  text-decoration: none;
  color: inherit !important;
  margin-left: 1em;
  margin-bottom: 1em;
}
.media-link::after {
  content: "";
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: cover;
  mask-size: cover;
  background-color: currentColor;
}
#media-twitter::after {
  -webkit-mask-image: url(../img/twitter.svg);
  mask-image: url(../img/twitter.svg);
}
#media-linkedin::after {
  -webkit-mask-image: url(../img/linkedin.svg);
  mask-image: url(../img/linkedin.svg);
}
#media-github::after {
  -webkit-mask-image: url(../img/github.svg);
  mask-image: url(../img/github.svg);
}

/** Posts **/
.postlist {
  list-style: none;
  padding: 0;
}
.postlist-item {
  display: block;
  padding-bottom: 2em;
}
:not(.tmpl-post) .postlist-item:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.25em;
}
.postlist-description {
  margin: 0.5em 0;
}
.postlist-metadata {
  font-size: 0.8125em;
}
.postlist-link {
  display: inline-block;
  text-decoration: none;
  margin: .1em 0;
  font-size: 1.1875em;
  font-weight: 700;
}
.postlist-link[target="_blank"]::after {
  content: "";
  -webkit-mask: url(../img/open-in-new.svg) no-repeat center;
  mask: url(../img/open-in-new.svg) no-repeat center;
  background-color: currentColor;
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
  margin-left: .5ch;
}
.postlist-item-active .postlist-link {
  font-weight: bold;
}
.dot-separator {
  margin: 0 1ch;
}


/** Tags **/
.tag {
  display: inline-block;
  vertical-align: text-top;
  font-size: 0.8em;
  padding: 2px 4px;
  background-color: rgba(128, 128, 128, 0.25);
  color: inherit !important;
  border-radius: 0.25em;
  text-decoration: none;
}

.tag:not(:first-child) {
  margin-left: 1ch;
}

/** Footer **/
footer {
  margin-bottom: 1.5em;
  overflow: auto;
  flex-wrap: wrap;
  justify-content: center;
}
:not(.tmpl-postslist) + footer {
  margin-top: 4em;
}
.tmpl-postslist + footer {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5em;
}
footer div {
  flex-basis: 20ch;
}
footer h1 {
  margin-top: 0;
  font-size: 1.1em;
  text-transform: uppercase;
}
footer em {
  font-style: normal;
  font-weight: bold;
}
footer img {
  border-radius: 100%;
  width: 7em;
  height: 7em;
  margin-left: 1em;
  margin-top: 1em;
  align-self: center;
  flex-shrink: 0;
}
