/* HowlingJack News — Single Post */

.article-header { padding: 56px 0 40px; border-bottom: 0.5px solid var(--border-subtle); margin-bottom: 48px; }
.article-header__cats { margin-bottom: 16px; }
.article-header__title { font-family: var(--font-sans); font-size: clamp(26px, 4.5vw, 44px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; color: var(--text-primary); margin-bottom: 18px; max-width: 760px; }
.article-header__excerpt { font-size: 17px; color: var(--text-secondary); line-height: 1.65; max-width: 640px; margin-bottom: 24px; }
.article-header__meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.author-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--bg-elevated); border: 0.5px solid var(--border-default); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--accent); }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.article-header__meta-text { font-size: 13px; color: var(--text-muted); }
.article-header__meta-author { font-weight: 500; color: var(--text-secondary); }

.article-featured-img { margin-bottom: 48px; }
.article-featured-img img { width: 100%; border-radius: var(--radius-lg); border: 0.5px solid var(--border-subtle); aspect-ratio: 16/7; object-fit: cover; }

.article-body { font-family: var(--font-sans); font-size: 16px; line-height: 1.78; color: var(--text-secondary); max-width: var(--content-width); margin: 0 auto; }
.article-body h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--text-primary); margin: 40px 0 16px; line-height: 1.25; }
.article-body h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; color: var(--text-primary); margin: 32px 0 12px; }
.article-body h4 { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 24px 0 10px; }
.article-body p { margin-bottom: 22px; }
.article-body a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(137,255,0,0.3); text-underline-offset: 3px; transition: text-decoration-color var(--transition-fast); }
.article-body a:hover { text-decoration-color: var(--accent); }
.article-body ul, .article-body ol { margin: 0 0 22px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote { border-left: 3px solid var(--accent); padding: 12px 0 12px 20px; margin: 28px 0; color: var(--text-primary); font-size: 17px; font-style: italic; }
.article-body code { background: var(--bg-elevated); border: 0.5px solid var(--border-default); border-radius: var(--radius-sm); font-size: 13px; padding: 2px 6px; font-family: 'SF Mono','Fira Code','Cascadia Code',monospace; color: var(--accent); }
.article-body pre { background: var(--bg-surface); border: 0.5px solid var(--border-default); border-radius: var(--radius-md); padding: 20px; overflow-x: auto; margin: 24px 0; }
.article-body pre code { background: none; border: none; padding: 0; font-size: 13px; color: var(--text-primary); }
.article-body img { border-radius: var(--radius-md); margin: 28px 0; border: 0.5px solid var(--border-subtle); }
.article-body hr { border: none; border-top: 0.5px solid var(--border-subtle); margin: 36px 0; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 24px 0; }
.article-body th { text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); border-bottom: 0.5px solid var(--border-default); }
.article-body td { padding: 10px 14px; border-bottom: 0.5px solid var(--border-subtle); color: var(--text-secondary); }
.article-body tr:last-child td { border-bottom: none; }

.article-footer { max-width: var(--content-width); margin: 48px auto 0; padding-top: 32px; border-top: 0.5px solid var(--border-subtle); }
.article-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.article-tag { font-size: 12px; color: var(--text-muted); padding: 5px 12px; border-radius: var(--radius-pill); border: 0.5px solid var(--border-default); background: var(--bg-elevated); text-decoration: none; transition: all var(--transition-fast); }
.article-tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.author-box { display: flex; gap: 16px; background: var(--bg-surface); border: 0.5px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 20px; margin: 32px 0; align-items: flex-start; }
.author-box__avatar { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--bg-elevated); border: 0.5px solid var(--border-default); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; color: var(--accent); }
.author-box__avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-box__name { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.author-box__bio { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

.related-posts { padding: 48px 0; border-top: 0.5px solid var(--border-subtle); }
.related-posts__title { font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 24px; }

.article-layout { display: grid; grid-template-columns: 1fr 240px; gap: 48px; max-width: var(--container-width); margin: 0 auto; padding: 0 24px; align-items: start; }
.article-sidebar { position: sticky; top: calc(var(--nav-height) + 24px); }
.sidebar-widget { background: var(--bg-surface); border: 0.5px solid var(--border-subtle); border-radius: var(--radius-md); padding: 16px; margin-bottom: 16px; }
.sidebar-widget__title { font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; padding-bottom: 10px; border-bottom: 0.5px solid var(--border-subtle); }

.toc-list { list-style: none; }
.toc-item { padding: 5px 0; border-bottom: 0.5px solid var(--border-subtle); }
.toc-item:last-child { border-bottom: none; }
.toc-link { font-size: 12px; color: var(--text-muted); text-decoration: none; transition: color var(--transition-fast); display: block; line-height: 1.5; }
.toc-link:hover, .toc-link.active { color: var(--accent); }

.reading-progress { position: fixed; top: var(--nav-height); left: 0; right: 0; height: 2px; background: var(--border-subtle); z-index: 999; }
.reading-progress__bar { height: 100%; background: var(--accent); width: 0%; transition: width 0.1s linear; }

@media (max-width: 900px) { .article-layout { grid-template-columns: 1fr; } .article-sidebar { display: none; } }
@media (max-width: 600px) { .article-header { padding: 36px 0 28px; } .article-body { font-size: 15px; } .article-header__title { font-size: 26px; } }

/* Autoevolution-style image slider */
.ae-slider { margin: 20px 0; }
.ae-slider-main {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-elevated);
}
.ae-slider-main img { width: 100%; height: 100%; object-fit: cover; }
.ae-slider-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.ae-slider-thumb {
  flex: 0 0 auto;
  width: 90px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: none;
  opacity: 0.6;
  transition: opacity 0.15s, border-color 0.15s;
}
.ae-slider-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ae-slider-thumb:hover { opacity: 0.85; }
.ae-slider-thumb.active { opacity: 1; border-color: var(--accent); }

/* Slider refinements + lightbox */
.ae-slider-thumbs { margin-top: 16px; gap: 8px; }
.ae-slider-thumb { width: 100px; height: 56px; position: relative; }
.ae-slider-main {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}
.ae-slider-main img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.ae-slider-view-all {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(13,13,13,0.75);
  color: #fff;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 50px;
}
.ae-slider-more {
  position: absolute;
  inset: 0;
  background: rgba(13,13,13,0.65);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ae-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 40px 60px;
}
.ae-modal.open { display: flex; }
.ae-modal-inner { position: relative; width: 100%; max-width: 900px; }
.ae-modal-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ae-modal-img-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ae-modal-close, .ae-modal-prev, .ae-modal-next {
  position: absolute;
  background: rgba(20,20,20,0.7);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.ae-modal-close:hover, .ae-modal-prev:hover, .ae-modal-next:hover { background: var(--accent); color: #0d0d0d; }
.ae-modal-close { top: -52px; right: 0; }
.ae-modal-prev { left: -52px; top: 50%; transform: translateY(-50%); }
.ae-modal-next { right: -52px; top: 50%; transform: translateY(-50%); }
.ae-modal-counter { position: absolute; bottom: -30px; left: 0; color: #999; font-size: 13px; }
@media (max-width: 700px) {
  .ae-modal { padding: 20px; }
  .ae-modal-prev { left: 4px; }
  .ae-modal-next { right: 4px; }
  .ae-modal-close { top: 4px; right: 4px; }
}

/* Thumbnail row: stretch to match main image width, uniform landscape shape */
.ae-slider-thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 16px;
  overflow-x: visible;
}
.ae-slider-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

/* Mobile: compact horizontal-scroll thumbnail strip instead of a tall stacked grid */
@media (max-width: 700px) {
  .ae-slider-thumbs {
    grid-template-columns: none;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .ae-slider-thumb {
    flex: 0 0 84px;
    width: 84px;
    height: 47px;
    scroll-snap-align: start;
  }
  .ae-slider-view-all { font-size: 11px; padding: 4px 10px; }
}
