.main {
  width: min(1000px, calc(100vw - 2rem));
}
.header {
  width: min(1000px, calc(100vw - 2rem));
}

.content {
  padding-inline: 1rem;
}

.content img {
  display: block;
  margin: 2rem auto;
  max-width: min(700px, 100%);
  height: auto;
}

.highlight {
  max-width: 100%;
}

.highlight pre {
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.postTitle:hover {
  text-decoration: underline;
}
.homePageMain {
  width: min(1200px, calc(100vw - 3rem)) !important;
}

.homePostsGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2.5rem;
  align-items: start;
  margin-top: 2rem;
}

.homeContentGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 2.5rem;
  align-items: start;
  margin-top: 2rem;
}

.homeMainColumn,
.homeSidebar {
  min-width: 0;
}

.tagSidebarBlock {
  padding: 1rem 1.2rem;
  background-color: #2f2f2f;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tagSidebarLine + .tagSidebarLine {
  margin-top: 0.85rem;
}

.tagSidebarLine a:hover {
  text-decoration: underline;
}

.postListItem {
  position: relative;
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.postListItem:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.postListItemOverlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.postListItemContent {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.postListItemContent a {
  pointer-events: auto;
  position: relative;
  z-index: 3;
}

.postMetaLink {
  text-decoration: none;
}

.postMetaLink:hover {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .homeContentGrid {
    grid-template-columns: 1fr;
  }
}

.indexWrapper img,
.indexWrapper .avatar img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.authorImageWrapper {
  display: flex;
  justify-content: center;
}

.authorImageWrapper a {
  display: inline-block;
  border-radius: 50%;
}

.socialNavbar svg {
  width: 1.8rem;
  height: 1.8rem;
}

.socialNavbar {
  font-size: 1.8rem;
}

.postContent table,
.postExcerpt table,
main table,
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
  word-break: normal;
  overflow-wrap: normal;
  white-space: nowrap;
}

.postContent th,
.postContent td,
.postExcerpt th,
.postExcerpt td,
main th,
main td,
article th,
article td {
  padding: 0.8rem 1rem;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.postContent thead th,
.postExcerpt thead th,
main thead th,
article thead th {
  background: rgba(255, 255, 255, 0.06);
  font-weight: 600;
}

.postContent tbody tr:nth-child(even),
.postExcerpt tbody tr:nth-child(even),
main tbody tr:nth-child(even),
article tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}

.postContent tbody tr:hover,
.postExcerpt tbody tr:hover,
main tbody tr:hover,
article tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.socialNavbar a {
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}

.socialNavbar a:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.singleContentWrapper {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  position: relative;
}

.postContent {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.tocAside {
  position: sticky;
  top: 2rem;
  margin-top: 2rem;
  width: 250px;
  flex-shrink: 0;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  padding: 1rem;
  background-color: #2f2f2f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.tocTitle {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
}

.tocAside nav#TableOfContents > ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tocAside nav#TableOfContents ul ul {
  list-style: none;
  padding-left: 1rem;
  margin-top: 0.4rem;
}

.tocAside nav#TableOfContents li {
  margin: 0.4rem 0;
}

.tocAside nav#TableOfContents a {
  text-decoration: none;
  color: #a0a0a0;
  display: block;
  font-size: 0.9rem;
  line-height: 1.4;
  transition:
    color 0.2s,
    transform 0.2s;
}

.tocAside nav#TableOfContents a:hover {
  color: #fff;
}

.tocAside nav#TableOfContents a.active {
  color: #61afef;
  font-weight: 600;
  transform: translateX(3px);
}

@media (max-width: 1000px) {
  .singleContentWrapper {
    flex-direction: column;
  }
  .tocAside {
    position: static;
    width: 100%;
    margin-top: 2rem;
  }
}
