@import url("blog-post-theme.css");

.toc-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.toc-list {
  list-style: none;
  border-left: 2px solid var(--emerald-600);
}

.toc-item {
  margin-bottom: 0.5rem;
}

.toc-link {
  display: block;
  text-decoration: none;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding-left: 1rem;
  transition: color 0.2s, border-color 0.2s;
  border-left: 2px solid transparent;
  margin-left: -2px;
}

.toc-link:hover,
.toc-link.active {
  color: var(--cerulean-700);
  border-left-color: var(--cerulean-700);
}

.author-card {
  display: flex;
  gap: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 2rem;
  border-radius: 8px;
  margin: 3rem 0;
  box-shadow: 0 4px 12px var(--shadow-color);
  align-items: flex-start;
}

.author-card__photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--emerald-700);
  flex-shrink: 0;
}

.author-card__info {
  flex: 1;
}

.author-card__bio {
  font-size: 1.2rem;
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.author-card__link {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--cerulean-700);
  text-decoration: none;
  transition: color 0.2s;
}

.author-card__link:hover {
  color: var(--emerald-700);
  text-decoration: underline;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 4rem;
  margin-bottom: 4rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--card-border);
  gap: 2rem;
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  max-width: 45%;
  transition: color 0.2s;
}

.post-nav-link:last-child {
  align-items: flex-end;
  text-align: right;
}

.post-nav-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.post-nav-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: var(--emerald-700);
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.2s;
}

.post-nav-link:hover .post-nav-title,
.post-nav-link:focus .post-nav-title {
  color: var(--cerulean-700);
}

.comment-nav {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  margin-bottom: 4rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
  gap: 1rem;
  border-top: 1px solid var(--card-border);
}

.comment-nav .page-link {
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  background: var(--card-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

section#comments,
#likes {

  a[href^="http"]::after,
  a[href^="https://"]::after {
    width: 0;
    height: 0;
  }
}

section#comments .comment {

  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  margin: 1em auto;
  padding: 1em;

  .avatar-link {
    flex: 0 0 4rem;
    height: 4rem;
    width: 4rem;
    position: relative;

    .avatar {
      height: 100%;
      width: 100%;
      clip-path: circle(32px at center);
    }

    &:hover,
    .avatar:hover {
      background-color: transparent;
      opacity: .8;
    }
  }

  .content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: .5rem;

    .author {
      display: flex;
      align-items: center;
      font-weight: bold;
      gap: .5em;

      .instance {
        font-size: small;
        font-weight: normal;
        --left-pad: .75em;
        padding: .25em var(--left-pad);
        text-decoration: none;
      }
    }

    time {
      font-size: small;
      line-height: 1.5rem;
    }

    main {
      p:first-child {
        margin-top: .25em;
      }

      p:last-child {
        margin-bottom: 0;
      }
    }


    footer {
      border: 0;
      padding: 0;
      margin-top: .925rem;
      gap: .75rem;
      margin-left: 0;

      .faves {
        align-items: start;
        color: inherit;
        text-decoration: none;

        &:hover {
          opacity: 0.8;
          text-decoration: none;
          background: none;
        }

        &::before {
          color: var(--accent-color);
          content: "💚";
          margin-inline-end: 0.25em;

        }
      }
    }
  }

  &.verified {
    .avatar-link::after {
      background-color: transparent !important;
      mask-image: none;
      border-radius: 50%;
      bottom: -.25rem;
      color: var(--secondary-accent-contrast);
      content: "🚀";
      display: block;
      font-size: 1.25rem;
      font-weight: bold;
      height: 1.5rem;
      line-height: 1.5rem;
      position: absolute;
      right: -.25rem;
      text-align: center;
      width: 1.5rem;
    }
  }

  .emoji {
    display: inline;
    height: 1.25em;
    vertical-align: middle;
    width: 1.25em;
    border: 0;
  }

  .invisible {
    display: none;
  }

  .ellipsis::after {
    content: "…";
  }
}

.skill-tag {
    background: var(--emerald-700);
    color: var(--emerald-1000);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    text-decoration: none;
}
.skill-tag:hover, .skill-tag:focus {
    background: var(--emerald-1000);
    color: var(--emerald-700);
}
#avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  mask-image: none;
  background-color: transparent !important;

  a img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    transition: transform .15s ease-in-out;
  }

  a:hover img {
    transform: scale(1.05);
  }

  a:hover {
    background-color: transparent !important;
  }

  :after {
    background-image: none;
    mask-image: none;
  }
}

.no-after::after {
  background-image: none !important;
}

@media (max-width: 480px) {
  section#comments .comment {
    flex-direction: column;
    align-items: stretch;

    .author {
      flex-direction: column;
      align-items: stretch;
    }

    .avatar-link {
      margin: 0 auto;
    }
  }
}

@media (max-width: 900px) {
  .post-wrapper {
    flex-direction: column;
    gap: 2rem;
  }

  .post-sidebar {
    position: static;
    width: 100%;
    margin-bottom: 2rem;
  }

  .toc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    border-left: none;
    padding-left: 0;
  }

  .toc-item {
    margin-bottom: 0;
  }

  .toc-link {
    border-left: none;
    padding-left: 0;
    border-bottom: 2px solid transparent;
  }

  .toc-link:hover,
  .toc-link.active {
    border-bottom-color: var(--cerulean-700);
  }

  .post-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .post-title {
    font-size: 1.8rem;
  }

  article {
    font-size: 1.1rem;
  }

  .comment-nav {
    flex-direction: column;
    text-align: center;
  }

  .author-card {
    flex-direction: column;
  }

  .post-nav-link {
    max-width: 100%;
    align-items: flex-start !important;
    text-align: left !important;
  }
}