/* INDIVIDUAL BLOG POSTS VIEW – COMMON CSS */

.blog-post-container {
  /*display: none;*/
}

.blog-post-vertical-scroll-helper {
  position: absolute;
  height: 100%;
  top: calc(var(--outside-margin) - 1px);
  color: rgba(0, 0, 0, 0);
}

.blog-post-container .overlay-container {
  grid-template-rows: auto 1fr;
  background: rgb(10 10 10);
  /*background: rgb(10 10 10 / 0.92w);*/
  grid-row-gap: .7em;
}

.blog-post-container h1 {
  grid-row: 1;
  display: inline;
  font-size: unset;
  margin-block-start: 0;
  margin-block-end: 0;
  margin-inline-start: 0;
  margin-inline-end: 0;
  font-weight: unset;
  text-align: center;
  /*float: left;*/
  width: 88%;
  /*position: relative;*/
  margin: 0.3em auto 0.2em;
}

.blog-post-container .overlay-title {
  font-size: clamp(34.4px, 11.8vw, 4em);

  position: static;
  display: unset;
  /*width: 100%;*/
}

.blog-post-container .close-button {
  font-size: clamp(18px, 6vw, 2em);
  padding-right: max(10px, 0.5em);
  padding-top: max(6px, 0.3em);
  /*font-size: 0.5em;*/
}

@supports (-moz-appearance: none) {
  .blog-post-container .close-button {
    font-size: clamp(18px, 6vw, 3em);
    padding-right: max(8px, 0.3em);
    padding-top: max(10px, 0.35em);
  }
}

.blog-post {
  --gap: 1em;
  --side-margin: 2em;
  --divider-line-width: calc(70% + 54px);
  width: auto;
  margin: 0 var(--side-margin);
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /*grid-template-rows: minmax(min-content, max-content);*/
  grid-template-rows: repeat(8, auto);
  /*row-gap: var(--gap);*/
}

.blog-post hr {
  grid-column: 1 / -1;
  width: var(--divider-line-width);
}

.blog-post hr:nth-of-type(1) {
  grid-row: 1;  
}

.blog-post-timestamp-author {
  grid-row: 2;
  grid-column: 1 / -1;

  justify-self: center;
  font-size: 1.4em;
  font-size: clamp(14.4px, 4.9vw, 1.4em);
  letter-spacing: .14em;
  
  padding: 0.2em 0 0.3em;
  
}

.jaybird {
  font-family: 'Noto Color Emoji', sans-serif;
}

.blog-post hr:nth-of-type(2) {
  grid-row: 3;
}

.blog-post-share-link:before {
  content: "Share ";
  font-weight: normal;
}

.blog-post-share-link {
  grid-row: 4;
  grid-column: 1 / -1;
  justify-self: center;
  font-size: 1.4em;
  font-size: clamp(14.6px, 5vw, 1.4em);
  padding: 0.247em 0 0.297em;
  text-shadow: none;
}

/* Force fixed height with static font-size */
.blog-post-share-link[style*="visibility: hidden"] {
  font-size: 1.4em;
}

.blog-post-share-link:hover {
  cursor: pointer;
  animation-name: link-color-warp;
  animation-delay: 0s;
  animation-fill-mode: forwards;
  animation-duration: .7s;
}

.blog-post-share-link span {
  font-family: 'Cambria Math', sans-serif;
  line-height: 1.25;
}

.blog-post-share-link .share-arrow-symbol {
  position: absolute; 
  transform: rotateZ(330deg); 
  margin-left: 0.3em; 
  margin-top: -0.14em;
}

.blog-post-copy-link {
  display: none;
  grid-row: 4;
  grid-column: 1 / -1;

  /*border: 1px solid green;*/
  height: 73%;

  width: calc(var(--divider-line-width) - 0.2em);
  align-self: center;
  justify-self: center;
  /*display: inline-block;*/
  margin-top: 0.1em;
  text-align: center;
  font-size: 1.2em;
  /*display: flex;*/
  vertical-align: middle;
  /*column-gap: 0.4em;*/
}

.blog-post-copy-link textarea {
  margin-top: -0.1em;
  margin-left: -0.2em;
  margin-right: 0.4em;

  font-size: 1.0em;
  font-size: clamp(11px, 1.9vw, 1.0em);
  font-weight: normal;
  resize: none;
  width: 100%;
  
  text-align: center;
  line-height: 25px;
  overflow: hidden;

  border-radius: 0.4em;
  border: 1px solid #444;
  box-shadow: inset -0.0em -0.0em 0em 0.15em rgb(120, 120, 120);
  
  background-color: #333;
  color: #f0fff0;
}

.blog-post-copy-link button {
  /*display: inline-block;*/
  border-radius: 0.4em;
  width: 2.2em;
  height: 94%;
  border: none;
  box-shadow: 0.1em 0.06em 0em 0.12em rgb(120, 120, 120);
  margin-top: -0.05em;
  margin-left: -0.2em;
}

.blog-post-copy-link button:before {
  content: "📄";
  position: absolute;
  margin-top: 0.05em;
  margin-left: -0.5em;
}

.blog-post-copy-link button:after {
  content: "📄";
  position: absolute;
  margin-top: -0.3em;
  margin-left: -0.6em;
}

.blog-post-copy-link button:hover:enabled {
  background-color: #999;
  box-shadow: 0.1em 0.06em 0em 0.08em rgb(70, 70, 70); 
}

.blog-post-copy-link button:active:enabled {
  background-color: #080;
}

.blog-post hr:nth-of-type(3) {
  grid-row: 5;
}

.blog-post-metadata-container {
  grid-row: 6;
  grid-column: 1 / -1;

  display: flex;

  padding: 0 0.4em;
  margin: 1em 0 2.2em;

  font-size: 1.4em;
  font-size: clamp(15px, 1.4em, 4vw);
  letter-spacing: .05em;
  /*white-space: nowrap;*/
}

.blog-post-metadata-container * {
  --side-margin: 1em;
  flex: 1 1 0px;

  display: flex;
  flex-direction: column;
  justify-content: center;

  text-align: center;
  /*background: blue;*/
  border-radius: 10px;
  padding: 8px 0.6em;
}

@media only screen and (max-width: 689.9px) {
  .blog-post-metadata-container {
    flex-direction: column;
  }

  @supports not (font-size: clamp(1px, 1px, 1px)) {
    .blog-post-metadata-container * {
      font-size:4vw;
      padding-top: 1.7em;
      padding-bottom: 1.7em;
    }
  }

  .blog-post-metadata-container * {
    margin: 0.1em 0 !important;
  }
}

.blog-post-stack { margin-right: var(--side-margin); }

.blog-post-level { margin: 0 var(--side-margin); }

.blog-post-concepts {
  margin-left: var(--side-margin);
  background-color: rgba(146, 3, 148, 0.8);
}

.blog-post-header-image {
  grid-row: 7;
  grid-column: 1 / -1;
  box-sizing: border-box; 
  max-width: calc(100% - 1vw);
  max-height: 75vh;

  display: inline-block;
  justify-self: center;
  border: 4px solid #a978ff; 
  box-shadow: 0 4px min(2em, 3vw) min(0.5vw, 0.4em) rgba(169, 120, 255, 0.8);
  border-radius: 16vw;
}

@supports (box-shadow: 0 4px min(2em, 3vw) min(0.5vw, 0.4em) rgba(169, 120, 255, 0.8)) {
  .blog-post-header-image {
    border: none;
    padding: 0px 0.8vw 1.2vw 0px;
  }
}

@supports (border-radius: min(16vw, 290px)) {
  .blog-post-header-image {
    border-radius: min(16vw, 290px);
  }
}

.blog-post-content {
  grid-row: 9;
  grid-column: 1 / -1;
  /*border: 1px solid red;*/
  border-radius: 8px;
  margin-top: 1em;

  /*padding: 0.8em 1vw;*/
  /*word-break: break-word;*/
  font-size: 1.4em;
  font-size: clamp(15px, 1.4em, 5vw);
  width: 100%;
}

/* Scale down font size on narrow viewports */
@media only screen and (max-width: 448px) {
  @supports not (font-size: clamp(1px, 1px, 1px)) {
    .blog-post-content {
      font-size: 5vw;
    }
  }
}

.blog-post-content a[href*="#toc"] {
  text-decoration: none;
  color: unset;
}

.blog-post-content .toc {
  display: flex;

  font-variant: small-caps;
  
  letter-spacing: 0.2em;
  color: #a978ff;
  text-shadow:
    0 0 0.25em rgb(169 120 255 / 0.5),
    0 0 0.06em rgb(255 255 255 / 0.4);
}

.blog-post-content .toc div {
  flex-grow: 0;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.blog-post-content .toc .toc-left-ornament, 
.blog-post-content .toc .toc-right-ornament {
  margin-top: 0.0em;
  position: relative;
  font-size: 140%;
  font-family: 'Segoe UI Symbol', sans-serif;
}

.blog-post-content .toc .toc-left-ornament:before {
  content: "🙚";
  text-align: right;
}

.blog-post-content .toc .toc-right-ornament:before {
  content: "🙘";
}

.blog-post-content .toc .toc-left-line, 
.blog-post-content .toc .toc-right-line {
  flex-grow: 100;

  position: relative; 
  box-shadow: 0 0 0.05em 0.2px rgba(169, 120, 255, 1);
  top: 0.105em;
  vertical-align: middle;
  border: none;
  border-top: 2px solid rgba(169, 120, 255, 0.9);
  height: 0px;
  top: 0.2em;
}

.blog-post-content .toc .toc-left-line {
  margin: auto 0em auto 0;
  position: relative;
  right: 0.32em;
}

.blog-post-content .toc .toc-right-line {
  margin: auto 0.0em auto 0.04em;
  position: relative;
  left: 0.14em;
}


.blog-post-content .toc div:before, .blog-post-content .toc div:after {
  font-size: 100%;
  /*position: relative;*/
  /*bottom: 0.14em;*/
}

.blog-post-content .toc h2 {
  font-size: 1.8em;
  margin: 0.8em 0;
  text-align: center;
  /*flex-grow: 0;*/
  /*flex-shrink: 2;*/
}

.blog-post-content > p:first-of-type:first-letter {
  font-size: 300%;
  line-height: 0;
  margin-left: -0.06em;
  text-shadow: 0 0 0.32em rgb(255 255 255 / 1);
}

.blog-post-content hr {
  border-color: white;
  width: 100%;
}

.blog-post-content a {
  color: #4DAAF6;
}

.blog-post-content a[href^="blog/"][href$=".png"] {
  --img-side-margin: 2vw;
  display: inline-block;
  margin-left: var(--img-side-margin);
  width: calc(100% - var(--img-side-margin));
}

.blog-post-content a:hover {
  color: #a978ff;
}

.blog-post-content a img {
  width: 100%;
  box-shadow: 7px 10px 0.08em 0px #444; /*, 0px 0px 0.2em 2px #fff;*/
  /*margin-left: var(--img-side-margin);*/
}

.blog-post-content ul {
  list-style-type: disc;
}

.blog-post-content .post-image {
  display: inline-block;
}

.blog-post-content .issue {
  color: #f40;
  padding: 0.05em 0.3em;
  margin-right: 0.2em;
  text-shadow: 0 0 0.20em #f40;
  background: #400;
  box-shadow: 0px 0px 0.2em 2px #c00;
}

.blog-post-content .pro-tip {
  color: #2f8;
  padding: 0.05em 0.69em;
  margin-right: 0.2em;
  text-shadow: 0 0 0.20em #2f8;
  background: #040;
  box-shadow: 0px 0px 0.2em 2px #0c6;
}


.blog-post-content .highlight {
  background-color: #333;
  padding: 0 0.2em;
}

.blog-post-content .hotkey {
  color: #2c6;
  /*font-weight: bold;*/
}

.blog-post-content .hotkey-function {
  color: #eb2;
}

.blog-post-content .ordinary-quote {
  font-style: italic;
  color: #fc6;
}

.blog-post-content .blockquote-statement {
  font-style: italic;
  font-size: 120%;
  color: #fa0;
  margin-left: 30%;
  background-color: #333;
  padding: 0.3em;
  /*padding-bottom: 0.3em;*/
  border-radius: 0.3em;
}

.blog-post-content .blockquote-statement.quote:before {
  content: "“";
  line-height: 0;
  position: relative;
  top: 0.15em;
  left: -0.1em;
  font-size: 160%;
}

/*.blog-post-content .blockquote-statement.prayer:after {*/

/*}*/

.blog-post-content .blockquote-code {
  float: right;
  margin: 0 0 1em 0;
  font-size: 20px;
  display: inline-block;
  max-width: 100%;
  /*font-size: clamp(9px, 4.57vw, 0.9em);*/
}

.blog-post-content .blockquote-code pre {
  padding: 0.7em !important;
  overflow: visible !important;
}

.checkmark-list li::marker {
  content: "✓   ";
  color: #0f0;
  font-weight: bold;
}

/* Manually adjusted to .overlay-container min-width */
@media only screen and (max-width: 292px) {
  @supports not (font-size: clamp(1px, 1px, 1px)) {
    /* Clamp title min font size */
    .blog-post-container .overlay-title {
      font-size: 2.1em !important;
    }

    /* Clamp close button min font size */
    .close-button {
      font-size: 1.05em !important;
    }

    /* Clamp metadata min font size */
    .blog-post-metadata-container * {
      font-size: 0.52em;
    }

    /* Clamp timestamp min font size */
    .blog-post-timestamp-author {
      font-size: 0.81em !important;
    }

    /* Clamp content min font size */
    .blog-post-content {
      font-size: 0.91em;
    }
  }
}

/* Blog post title resize */
/* Blog post timestamp resize */
@media only screen and (max-width: 500px) {
  @supports not (font-size: clamp(1px, 1px, 1px)) {
    .blog-post-container .overlay-title {
      font-size: calc(14.4vw - 8px);
    }

    .close-button {
      font-size: calc(7.2vw - 4px);
    }

    .blog-post-timestamp-author {
      font-size: 4.5vw;
    }
  }
}