.post-container {
  max-width: 1000px;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 2px;
  height: 0;
  background: var(--accent-bright);
  z-index: 200;
  pointer-events: none;
  transition: height 0.1s linear;
}

.section-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  font-weight: 400;
  opacity: 0.5;
}

.post-list {
  display: flex;
  flex-direction: column;
  margin: 0 calc(var(--space-2) * -1);
}

.post-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: var(--space-6) var(--space-2);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

.post-card:first-child {
  border-top: 1px solid var(--border-color);
}

.post-card:hover {
  background: rgba(255, 255, 255, 0.015);
}

.slide-up {
  opacity: 0;
  animation: slideUp 0.5s ease forwards;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs2);
  color: var(--text-tertiary);
}

.post-card-title {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: var(--space-2);
  opacity: 0.9;
  transition: opacity var(--transition-fast);
}

.post-card:hover .post-card-title {
  opacity: 1;
}

.post-card-excerpt {
  color: var(--text-secondary);
  font-size: var(--text-sm2);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.post-card-more {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs2);
  color: var(--text-tertiary);
  transition: color var(--transition-fast);
}

.post-card-more i {
  margin-left: var(--space-2);
  font-size: var(--text-xs);
  transition: transform var(--transition-fast);
}

.post-card:hover .post-card-more {
  color: var(--text-color);
}

.post-card:hover .post-card-more i {
  transform: translateX(3px);
}

.blog-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: var(--space-9);
  align-items: start;
}

.blog-layout--single {
  grid-template-columns: 1fr;
}

.toc {
  position: sticky;
  top: var(--space-8);
  align-self: start;
  max-height: calc(100vh - var(--space-8) * 2);
  overflow-y: auto;
}

.toc details {
  border: none;
}

.toc summary {
  list-style: none;
  cursor: default;
  pointer-events: none;
  margin-bottom: var(--space-4);
  display: block;
}

.toc summary::-webkit-details-marker {
  display: none;
}

.toc-list {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-color);
}

.toc-link {
  position: relative;
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs2);
  line-height: 1.4;
  color: var(--text-tertiary);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  margin-left: -1px;
  border-left: 2px solid transparent;
  transition:
    color var(--transition-fast),
    border-color var(--transition-fast);
}

.toc-link.toc-h3 {
  padding-left: var(--space-6);
  font-size: var(--text-2xs);
}

.toc-link.toc-h4 {
  padding-left: var(--space-8);
  font-size: var(--text-2xs);
  opacity: 0.85;
}

.toc-link:hover {
  color: var(--text-secondary);
}

.toc-link.active {
  color: var(--text-color);
  border-left-color: var(--accent-bright);
}

.post-header {
  margin-bottom: var(--space-8);
}

.post-title {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs2);
  color: var(--text-tertiary);
}

.post-meta .meta-dot {
  font-size: var(--text-dot);
  opacity: 0.4;
}

.article {
  font-size: var(--text-md);
  color: #cfcfcf;
  line-height: var(--leading-normal);
}

.article>*+* {
  margin-top: var(--space-5);
}

.article h1,
.article h2,
.article h3,
.article h4,
.article h5,
.article h6 {
  color: var(--text-color);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  scroll-margin-top: var(--space-7);
}

.article h1 {
  font-size: var(--text-xl2);
  margin-top: var(--space-9);
  margin-bottom: var(--space-2);
}

.article h2 {
  font-size: var(--text-xl);
  margin-top: var(--space-9);
  margin-bottom: var(--space-2);
}

.article h3 {
  font-size: var(--text-lg);
  margin-top: var(--space-7);
  margin-bottom: var(--space-2);
}

.article h4 {
  font-size: var(--text-md);
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

.article h5 {
  font-size: var(--text-sm2);
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
  color: #e6e6e6;
}

.article h6 {
  font-family: var(--font-mono);
  font-size: var(--text-xs2);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
}

.article h1:first-child,
.article h2:first-child,
.article h3:first-child,
.article h4:first-child,
.article h5:first-child,
.article h6:first-child {
  margin-top: 0;
}

.article p {
  color: #cfcfcf;
}

.article a {
  color: var(--text-color);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-color);
  padding-bottom: 1px;
  transition: border-color var(--transition-fast);
}

.article a:hover {
  border-color: var(--text-color);
}

.article a:has(> img) {
  border-bottom: none;
  padding-bottom: 0;
}

.article strong {
  color: var(--text-color);
  font-weight: 600;
}

.article em {
  color: #e6e6e6;
}

.article del,
.article s {
  color: var(--text-tertiary);
  text-decoration: line-through;
  text-decoration-color: var(--accent-color);
}

.article kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--hover-bg);
  border: 1px solid var(--border-color);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  padding: 0.1em 0.45em;
  color: var(--text-color);
}

.article mark {
  background: rgba(127, 208, 243, 0.18);
  color: var(--text-color);
  padding: 0.05em 0.25em;
  border-radius: var(--radius-sm);
}

.article sub,
.article sup {
  font-size: 0.75em;
  line-height: 0;
}

.article abbr[title] {
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  cursor: help;
}

.article ul,
.article ol {
  padding-left: var(--space-6);
}

.article li {
  margin-top: var(--space-2);
}

.article li>*+* {
  margin-top: var(--space-2);
}

.article li::marker {
  color: var(--text-tertiary);
}

.article ul:has(> li > input[type='checkbox']) {
  list-style: none;
  padding-left: 0;
}

.article li:has(> input[type='checkbox']) {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.article li:has(> input[type='checkbox']) input[type='checkbox'] {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 0.35em;
  accent-color: var(--accent-bright);
  cursor: default;
}

.article li:has(> input[type='checkbox']:checked) {
  color: var(--text-tertiary);
  text-decoration: line-through;
  text-decoration-color: var(--accent-color);
}

.article blockquote {
  border-left: 2px solid var(--accent-color);
  padding: var(--space-1) 0 var(--space-1) var(--space-5);
  color: var(--text-secondary);
  font-style: italic;
}

.article blockquote>*+* {
  margin-top: var(--space-4);
}

.article blockquote p {
  color: inherit;
}

.article blockquote blockquote {
  margin-top: var(--space-3);
  border-left-color: var(--border-color);
  color: var(--text-tertiary);
}

.article code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.4em;
  color: #e6e6e6;
}

.article pre {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
}

.article pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: var(--text-sm);
  color: #d8d8d8;
}

.article pre code.hljs {
  background: transparent;
  padding: 0;
}

.code-copy {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  cursor: pointer;
  opacity: 0;
  transition:
    opacity var(--transition-fast),
    color var(--transition-fast),
    background var(--transition-fast);
}

.article pre:hover .code-copy,
.code-copy:focus-visible {
  opacity: 1;
}

.code-copy:hover {
  color: var(--text-color);
  background: var(--hover-bg);
}

.code-copy.copied {
  color: #2ecc71;
  opacity: 1;
}

@media (hover: none) {
  .code-copy {
    opacity: 1;
  }
}

.article img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.article hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: var(--space-8) 0;
}

.article table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm2);
}

.article th,
.article td {
  border: 1px solid var(--border-color);
  padding: var(--space-2) var(--space-3);
  text-align: left;
  word-break: break-word;
}

.article th {
  background: var(--card-bg);
  font-family: var(--font-mono);
  font-size: var(--text-xs2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.article th[align='center'],
.article td[align='center'] {
  text-align: center;
}

.article th[align='right'],
.article td[align='right'] {
  text-align: right;
}

.article figure {
  margin-top: var(--space-5);
}

.article figure img {
  margin: 0 auto;
}

.article figcaption {
  margin-top: var(--space-3);
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs2);
  line-height: 1.5;
  color: var(--text-tertiary);
}

.article .footnote-ref a {
  border-bottom: none;
  padding: 0 0.15em;
  color: var(--accent-bright);
  font-weight: 500;
}

.article .footnotes {
  font-size: var(--text-sm2);
  color: var(--text-secondary);
}

.article .footnotes hr {
  margin: 0 0 var(--space-5);
}

.article .footnotes ol {
  padding-left: var(--space-5);
}

.article .footnotes li {
  margin-top: var(--space-3);
}

.article .footnotes li::marker {
  color: var(--text-tertiary);
}

.article .footnote-back {
  border-bottom: none;
  margin-left: var(--space-1);
  color: var(--text-tertiary);
  font-style: normal;
}

.article .footnote-back:hover {
  color: var(--accent-bright);
}

.heading-anchor {
  margin-left: var(--space-3);
  color: var(--text-tertiary);
  font-weight: 400;
  text-decoration: none;
  border: none !important;
  opacity: 0;
  transition:
    opacity var(--transition-fast),
    color var(--transition-fast);
}

.article h2:hover .heading-anchor,
.article h3:hover .heading-anchor,
.article h4:hover .heading-anchor {
  opacity: 0.55;
}

.heading-anchor:hover {
  color: var(--accent-bright) !important;
  opacity: 1 !important;
}

.toast {
  position: fixed;
  bottom: var(--space-7);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-family: var(--font-mono);
  font-size: var(--text-xs3);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--transition),
    transform var(--transition);
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.post-status {
  text-align: center;
  color: var(--text-secondary);
  padding: var(--space-9) 0;
  font-size: var(--text-sm2);
}

.post-status a {
  color: var(--text-color);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-color);
  transition: border-color var(--transition-fast);
}

.post-status a:hover {
  border-color: var(--text-color);
}

.article-wrap--status {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.article-wrap--status .post-header {
  margin-bottom: var(--space-4);
}

.article-wrap--status .post-status {
  padding: var(--space-6) 0 var(--space-8);
  font-size: var(--text-md);
  line-height: 1.6;
}

.post-footer {
  margin-top: var(--space-9);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-color);
}

.post-footer .back-link {
  margin-bottom: 0;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.post-nav-cell {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.post-nav-cell.post-nav-newer {
  text-align: right;
  align-items: flex-end;
}

a.post-nav-cell:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--accent-color);
}

.post-nav-empty {
  border: none;
  padding: 0;
}

.post-nav-dir {
  font-family: var(--font-mono);
  font-size: var(--text-xs2);
  color: var(--text-tertiary);
}

.post-nav-title {
  font-size: var(--text-sm2);
  color: var(--text-color);
  opacity: 0.9;
  line-height: 1.3;
}

.article img.zoomable {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-7);
  background: rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  cursor: zoom-out;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.lightbox.show {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: min(1100px, 92vw);
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.embed {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--card-bg);
}

.embed-video {
  position: relative;
  aspect-ratio: 16 / 9;
}

.embed-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.article .twitter-tweet {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .toc {
    position: static;
    max-height: none;
    overflow: visible;
    margin-bottom: var(--space-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    background: rgba(255, 255, 255, 0.015);
  }

  .toc summary {
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
  }

  .toc summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: var(--text-xs);
    opacity: 0.5;
    transition: transform var(--transition-fast);
  }

  .toc details[open] summary::after {
    transform: rotate(180deg);
  }

  .toc details[open] .toc-list {
    margin-top: var(--space-3);
  }
}

@media (max-width: 768px) {
  .post-title {
    font-size: var(--text-xl2);
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav-cell.post-nav-newer {
    text-align: left;
    align-items: flex-start;
  }

  .post-nav-empty {
    display: none;
  }
}