.article-container { width: 100%; max-width: 1120px; margin: 0 auto; padding-right: 1.5rem; padding-left: 1.5rem; }
.logo-img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
main > article > .article-hero { position: static; z-index: auto; padding: 4.5rem 0 4rem; background: radial-gradient(circle at 85% 20%, rgba(36,123,160,.1), transparent 32%), var(--bg-main); border-bottom: 1px solid var(--border); backdrop-filter: none; }
.article-hero .article-container { max-width: 920px; }
.back-link { display: inline-flex; align-items: center; gap: .35rem; margin-bottom: 2.25rem; color: var(--text-muted); font-size: .9rem; font-weight: 700; }
.back-link:hover { color: var(--primary); }
.back-link svg { width: 17px; height: 17px; }
.post-meta { display: flex; flex-wrap: wrap; gap: .5rem; color: var(--primary); font-size: .76rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.article-hero h1 { max-width: 900px; margin: .9rem 0 1.25rem; font-size: clamp(2.35rem, 5vw, 4.1rem); }
.article-lead { max-width: 720px; color: var(--text-muted); font-size: 1.14rem; }
.author-row { display: flex; align-items: center; gap: .7rem; margin-top: 2rem; color: var(--text-muted); font-size: .9rem; }
.author-row strong { color: var(--text-main); }
.author-avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: var(--primary); background: var(--primary-light); font-size: .72rem; font-weight: 800; }
.article-layout { display: grid; grid-template-columns: 190px minmax(0, 720px); justify-content: center; gap: 4.75rem; padding-top: 4.5rem; padding-bottom: 6rem; }
.article-content section { scroll-margin-top: 6rem; }
.table-of-contents { position: sticky; top: 100px; align-self: start; }
.toc-cover { width: 100%; margin-bottom: 1.15rem; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.toc-links { border-left: 2px solid var(--border); padding-left: 1rem; }
.toc-links p { margin-bottom: .7rem; color: var(--text-light); font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.table-of-contents nav { display: flex; flex-direction: column; gap: .45rem; }
.table-of-contents a { color: var(--text-muted); font-size: .86rem; font-weight: 600; }
.table-of-contents a:hover { color: var(--primary); }
.article-content section + section { margin-top: 4.75rem; }
.article-content h2 { margin-bottom: 1rem; font-size: clamp(1.65rem, 3vw, 2.1rem); letter-spacing: -.04em; line-height: 1.25; }
.article-content p { margin-bottom: 1rem; color: var(--text-muted); font-size: 1.02rem; text-align: justify; }
.article-content a { color: var(--primary); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--primary) 55%, transparent); text-underline-offset: .18em; }
.article-content a:hover,
.article-content a:focus-visible { color: var(--primary); text-decoration-color: currentColor; }
.article-content :not(pre) > code,
.article-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.article-content :not(pre) > code { padding: .15rem .35rem; border: 1px solid var(--border); border-radius: 4px; color: var(--text-main); background: #f1f3f5; font-size: .9em; }
.article-content pre { margin: 1.5rem 0; overflow-x: auto; padding: 1.25rem 1.4rem; border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-main); background: #f1f3f5; box-shadow: var(--shadow-sm); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: .9rem; line-height: 1.7; tab-size: 2; }
.article-content pre code { color: inherit; font: inherit; }
.article-content figure { width: 75%; margin: 2rem auto 2rem; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-sub); box-shadow: var(--shadow-sm); }
.article-content img { width: 100%; height: auto; }
.article-content figure img { cursor: zoom-in; }
.article-content figure img:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.article-content figcaption { padding: .8rem 1rem; color: var(--text-light); font-size: .78rem; line-height: 1.5; border-top: 1px solid var(--border); }
.article-content .wide-figure { width: 75%; }
.article-closing { padding: .25rem 0; }
.image-zoom-dialog { width: min(94vw, 1400px); max-width: none; max-height: 92vh; margin: auto; padding: 0; overflow: visible; border: 0; background: transparent; }
.image-zoom-dialog::backdrop { background: rgba(15, 23, 42, .82); backdrop-filter: blur(3px); }
.image-zoom-dialog img { display: block; max-width: 100%; max-height: 88vh; margin: 0 auto; border-radius: var(--radius-sm); box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.image-zoom-caption { margin: .75rem auto 0; color: #fff; font-size: .86rem; line-height: 1.5; text-align: center; }
.image-zoom-close { position: absolute; top: -2.6rem; right: 0; display: grid; width: 2rem; height: 2rem; place-items: center; border: 0; border-radius: 50%; color: var(--text-main); background: #fff; cursor: pointer; font-size: 1.5rem; line-height: 1; }
.image-zoom-close:hover { color: #fff; background: var(--primary); }
.improvements { margin-top: 5.5rem !important; padding: 2rem; border-radius: var(--radius-md); background: var(--primary-light); }
.improvements ol { margin: 1rem 0 0 1.2rem; color: var(--text-muted); }
.improvements li + li { margin-top: .75rem; }
.improvements strong { color: var(--text-main); }

@media (max-width: 950px) {
  .article-layout { display: block; max-width: 800px; }
  .table-of-contents { position: static; margin-bottom: 3.5rem; }
  .table-of-contents nav { flex-direction: row; flex-wrap: wrap; column-gap: 1rem; }
  .article-content .wide-figure { margin-right: 0; margin-left: 0; }
}

@media (max-width: 767px) {
  .article-hero { padding: 3.25rem 0 3rem; }
  .article-layout { padding-top: 3.25rem; padding-bottom: 4rem; }
  .article-content section + section { margin-top: 3.75rem; }
  .article-content figure { margin-top: 1.5rem; }
  .article-content figure,
  .article-content .wide-figure { width: 100%; }
  .improvements { padding: 1.5rem; }
}
