/*
Theme Name: ADHDHacker
Theme URI: https://adhdhacker.com
Author: ADHDHacker
Author URI: https://adhdhacker.com
Description: A fast, focus-friendly WordPress theme for the ADHDHacker tech news site. Built for distraction-free reading with a dark-first design, reading progress, focus mode, category rails, trending panels and a newsletter-ready layout. Accessible, responsive and block-editor compatible.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: adhdhacker
Tags: news, blog, technology, magazine, dark-mode, custom-menu, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks, accessibility-ready
*/

/* =========================================================================
   ADHDHacker — Theme Stylesheet
   Table of Contents
   1.  Design Tokens (CSS custom properties) + themes
   2.  Reset & Base
   3.  Typography
   4.  Layout primitives
   5.  Accessibility helpers
   6.  Buttons & forms
   7.  Site header + navigation
   8.  Reading progress + focus mode
   9.  Hero / featured
   10. Post cards & grids
   11. Category rails
   12. Trending / sidebar widgets
   13. Single post
   14. Author box / related / share
   15. Comments
   16. Pagination
   17. Newsletter CTA
   18. Footer
   19. 404 / search / archive headers
   20. WordPress core classes (alignments, captions, gallery)
   21. Block editor support
   22. Utilities & animations
   23. Responsive
   ========================================================================= */

/* 1. ---------- DESIGN TOKENS ---------- */
:root {
  /* Brand */
  --ah-violet-500: #8b5cf6;
  --ah-violet-600: #7c3aed;
  --ah-violet-400: #a78bfa;
  --ah-green-400: #a3e635;
  --ah-green-500: #84cc16;
  --ah-cyan-400: #22d3ee;

  /* Semantic — light theme defaults */
  --ah-bg: #f7f7fb;
  --ah-bg-elevated: #ffffff;
  --ah-surface: #ffffff;
  --ah-surface-2: #f1f1f7;
  --ah-border: #e5e5ee;
  --ah-border-strong: #d3d3e0;
  --ah-text: #16161d;
  --ah-text-soft: #4b4b57;
  --ah-text-muted: #71717f;
  --ah-heading: #0c0c14;
  --ah-primary: var(--ah-violet-600);
  --ah-primary-hover: var(--ah-violet-500);
  --ah-on-primary: #ffffff;
  --ah-accent: var(--ah-green-500);
  --ah-link: var(--ah-violet-600);
  --ah-code-bg: #f0eefe;
  --ah-code-text: #5b21b6;
  --ah-shadow: 0 1px 2px rgba(16,16,29,.06), 0 8px 24px rgba(16,16,29,.06);
  --ah-shadow-lg: 0 12px 40px rgba(16,16,29,.14);
  --ah-selection: rgba(139,92,246,.24);

  /* Type scale */
  --ah-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --ah-font-display: 'Space Grotesk', var(--ah-font-body);
  --ah-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ah-fs-xs: .78rem;
  --ah-fs-sm: .875rem;
  --ah-fs-base: 1.0625rem;
  --ah-fs-md: 1.15rem;
  --ah-fs-lg: 1.4rem;
  --ah-fs-xl: 1.85rem;
  --ah-fs-2xl: 2.4rem;
  --ah-fs-3xl: 3.1rem;
  --ah-fs-hero: clamp(2.2rem, 5vw, 4rem);

  --ah-lh-tight: 1.15;
  --ah-lh-snug: 1.35;
  --ah-lh-body: 1.72;

  /* Space + radius */
  --ah-gap: 1.5rem;
  --ah-radius-sm: 8px;
  --ah-radius: 14px;
  --ah-radius-lg: 22px;
  --ah-radius-pill: 999px;

  /* Layout */
  --ah-content-width: 1200px;
  --ah-reading-width: 720px;
  --ah-header-h: 68px;

  --ah-ease: cubic-bezier(.22,.61,.36,1);
  --ah-transition: 180ms var(--ah-ease);
}

/* Dark theme — applied via [data-theme="dark"] or prefers-color-scheme */
[data-theme="dark"] {
  --ah-bg: #0a0a10;
  --ah-bg-elevated: #101019;
  --ah-surface: #14141f;
  --ah-surface-2: #1b1b28;
  --ah-border: #262636;
  --ah-border-strong: #34344a;
  --ah-text: #e7e7f0;
  --ah-text-soft: #b9b9c8;
  --ah-text-muted: #8888a0;
  --ah-heading: #f6f6fb;
  --ah-primary: var(--ah-violet-500);
  --ah-primary-hover: var(--ah-violet-400);
  --ah-accent: var(--ah-green-400);
  --ah-link: var(--ah-violet-400);
  --ah-code-bg: #1c1730;
  --ah-code-text: #c4b5fd;
  --ah-shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.5);
  --ah-shadow-lg: 0 18px 50px rgba(0,0,0,.6);
  --ah-selection: rgba(139,92,246,.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ah-bg: #0a0a10;
    --ah-bg-elevated: #101019;
    --ah-surface: #14141f;
    --ah-surface-2: #1b1b28;
    --ah-border: #262636;
    --ah-border-strong: #34344a;
    --ah-text: #e7e7f0;
    --ah-text-soft: #b9b9c8;
    --ah-text-muted: #8888a0;
    --ah-heading: #f6f6fb;
    --ah-primary: var(--ah-violet-500);
    --ah-primary-hover: var(--ah-violet-400);
    --ah-accent: var(--ah-green-400);
    --ah-link: var(--ah-violet-400);
    --ah-code-bg: #1c1730;
    --ah-code-text: #c4b5fd;
    --ah-shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.5);
    --ah-shadow-lg: 0 18px 50px rgba(0,0,0,.6);
    --ah-selection: rgba(139,92,246,.4);
  }
}

/* 2. ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--ah-font-body);
  font-size: var(--ah-fs-base);
  line-height: var(--ah-lh-body);
  color: var(--ah-text);
  background: var(--ah-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  overflow-x: hidden;
}
::selection { background: var(--ah-selection); }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
p, li { overflow-wrap: break-word; }
a { color: var(--ah-link); text-decoration: none; transition: color var(--ah-transition); }
a:hover { color: var(--ah-primary-hover); }
hr { border: 0; border-top: 1px solid var(--ah-border); margin: 2rem 0; }
:focus-visible { outline: 3px solid var(--ah-primary); outline-offset: 2px; border-radius: 4px; }

/* 3. ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ah-font-display);
  color: var(--ah-heading);
  line-height: var(--ah-lh-tight);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: .5em;
}
h1 { font-size: var(--ah-fs-2xl); }
h2 { font-size: var(--ah-fs-xl); }
h3 { font-size: var(--ah-fs-lg); }
h4 { font-size: var(--ah-fs-md); }
h5 { font-size: var(--ah-fs-base); }
h6 { font-size: var(--ah-fs-sm); text-transform: uppercase; letter-spacing: .06em; }
p { margin-bottom: 1.15em; }
strong, b { font-weight: 700; color: var(--ah-heading); }
small { font-size: var(--ah-fs-sm); color: var(--ah-text-muted); }
blockquote {
  margin: 1.8rem 0;
  padding: 1.2rem 1.6rem;
  border-left: 4px solid var(--ah-primary);
  background: var(--ah-surface-2);
  border-radius: 0 var(--ah-radius) var(--ah-radius) 0;
  font-size: var(--ah-fs-md);
  color: var(--ah-text-soft);
  font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }
code, kbd, pre, samp { font-family: var(--ah-font-mono); font-size: .92em; }
code {
  background: var(--ah-code-bg);
  color: var(--ah-code-text);
  padding: .15em .45em;
  border-radius: 6px;
  font-size: .88em;
}
pre {
  background: #0d0d16;
  color: #e7e7f0;
  padding: 1.25rem 1.4rem;
  border-radius: var(--ah-radius);
  overflow-x: auto;
  line-height: 1.6;
  margin: 1.6rem 0;
  border: 1px solid var(--ah-border);
  tab-size: 2;
}
pre code { background: none; color: inherit; padding: 0; font-size: .9rem; }
kbd {
  background: var(--ah-surface-2);
  border: 1px solid var(--ah-border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: .1em .45em;
  font-size: .85em;
}
mark { background: linear-gradient(120deg, transparent 0, var(--ah-selection) 0); padding: 0 .1em; color: inherit; }
abbr[title] { text-decoration: underline dotted; cursor: help; }

/* 4. ---------- LAYOUT PRIMITIVES ---------- */
.ah-container { width: 100%; max-width: var(--ah-content-width); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.ah-container--wide { max-width: 1440px; }
.ah-container--reading { max-width: var(--ah-reading-width); }
.site-content { padding-block: clamp(2rem, 5vw, 4rem); min-height: 55vh; }
.ah-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.ah-section { margin-block: clamp(2.5rem, 6vw, 4.5rem); }
.ah-section:first-child { margin-top: 0; }
.ah-grid { display: grid; gap: var(--ah-gap); }
.ah-grid--3 { grid-template-columns: repeat(3, 1fr); }
.ah-grid--4 { grid-template-columns: repeat(4, 1fr); }
.ah-flow > * + * { margin-top: 1.2rem; }

/* Section header */
.ah-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; padding-bottom: .9rem; border-bottom: 2px solid var(--ah-border); }
.ah-section__title { font-size: var(--ah-fs-lg); display: inline-flex; align-items: center; gap: .6rem; margin: 0; }
.ah-section__title::before { content: ""; width: 10px; height: 26px; border-radius: 4px; background: linear-gradient(180deg, var(--ah-primary), var(--ah-accent)); }
.ah-section__more { font-family: var(--ah-font-mono); font-size: var(--ah-fs-sm); color: var(--ah-text-muted); white-space: nowrap; display: inline-flex; align-items: center; gap: .35rem; }
.ah-section__more:hover { color: var(--ah-primary); }
.ah-section__more::after { content: "→"; transition: transform var(--ah-transition); }
.ah-section__more:hover::after { transform: translateX(3px); }

/* 5. ---------- ACCESSIBILITY ---------- */
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; padding: 0; overflow: hidden; position: absolute !important; word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: var(--ah-surface); clip: auto; clip-path: none; color: var(--ah-primary);
  display: block; height: auto; left: 6px; top: 6px; padding: 12px 18px; width: auto; z-index: 100000;
  border-radius: var(--ah-radius-sm); box-shadow: var(--ah-shadow-lg); font-weight: 600;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100000;
  background: var(--ah-primary); color: var(--ah-on-primary); padding: 12px 20px;
  border-radius: 0 0 var(--ah-radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; color: var(--ah-on-primary); }

/* 6. ---------- BUTTONS & FORMS ---------- */
.ah-btn, button, input[type="submit"], .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--ah-font-display); font-weight: 600; font-size: var(--ah-fs-sm);
  padding: .7rem 1.4rem; border-radius: var(--ah-radius-pill); border: 1px solid transparent;
  cursor: pointer; transition: transform var(--ah-transition), background var(--ah-transition), box-shadow var(--ah-transition); line-height: 1;
}
.ah-btn { background: var(--ah-primary); color: var(--ah-on-primary); }
.ah-btn:hover { background: var(--ah-primary-hover); color: var(--ah-on-primary); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(124,58,237,.35); }
.ah-btn:active { transform: translateY(0); }
.ah-btn--ghost { background: transparent; color: var(--ah-text); border-color: var(--ah-border-strong); }
.ah-btn--ghost:hover { background: var(--ah-surface-2); color: var(--ah-text); box-shadow: none; transform: translateY(-2px); }
.ah-btn--accent { background: var(--ah-accent); color: #0c0c14; }
.ah-btn--sm { padding: .45rem 1rem; font-size: var(--ah-fs-xs); }
.ah-btn--block { width: 100%; }

input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], input[type="tel"], input[type="date"], textarea, select {
  width: 100%; background: var(--ah-surface); color: var(--ah-text);
  border: 1px solid var(--ah-border-strong); border-radius: var(--ah-radius-sm);
  padding: .7rem .9rem; transition: border-color var(--ah-transition), box-shadow var(--ah-transition);
  font-size: var(--ah-fs-sm);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ah-primary); box-shadow: 0 0 0 3px var(--ah-selection); }
label { display: block; font-weight: 600; font-size: var(--ah-fs-sm); margin-bottom: .35rem; color: var(--ah-text-soft); }
::placeholder { color: var(--ah-text-muted); opacity: 1; }

/* Search form */
.ah-search { display: flex; gap: .5rem; }
.ah-search input[type="search"] { flex: 1; }

/* Tag / pill / badge */
.ah-badge { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--ah-font-mono); font-size: var(--ah-fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: .3em .7em; border-radius: var(--ah-radius-pill); }
.ah-cat-badge { background: color-mix(in srgb, var(--ah-primary) 14%, transparent); color: var(--ah-primary); }
[data-theme="dark"] .ah-cat-badge { background: color-mix(in srgb, var(--ah-primary) 22%, transparent); }
.ah-tag { display: inline-block; font-family: var(--ah-font-mono); font-size: var(--ah-fs-xs); color: var(--ah-text-soft); background: var(--ah-surface-2); border: 1px solid var(--ah-border); padding: .3em .7em; border-radius: var(--ah-radius-pill); transition: all var(--ah-transition); }
.ah-tag::before { content: "#"; opacity: .5; }
.ah-tag:hover { border-color: var(--ah-primary); color: var(--ah-primary); }

/* 7. ---------- SITE HEADER + NAV ---------- */
.site-header { position: sticky; top: 0; z-index: 900; background: color-mix(in srgb, var(--ah-bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--ah-border); transition: box-shadow var(--ah-transition); }
.site-header.is-scrolled { box-shadow: var(--ah-shadow); }
.site-header__bar { display: flex; align-items: center; gap: 1.25rem; height: var(--ah-header-h); }
.site-branding { display: flex; align-items: center; gap: .7rem; flex-shrink: 0; }
.site-logo-mark { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--ah-violet-600), var(--ah-cyan-400)); color: #fff; font-family: var(--ah-font-mono); font-weight: 700; font-size: 1.1rem; box-shadow: 0 4px 14px rgba(124,58,237,.4); }
.site-title { font-family: var(--ah-font-display); font-size: 1.35rem; font-weight: 700; letter-spacing: -.03em; margin: 0; line-height: 1; }
.site-title a { color: var(--ah-heading); }
.site-title .ah-accent-text { color: var(--ah-primary); }
.site-description { font-size: var(--ah-fs-xs); color: var(--ah-text-muted); font-family: var(--ah-font-mono); }

.main-navigation { margin-left: auto; }
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.main-navigation li { position: relative; }
.main-navigation a { display: block; padding: .5rem .85rem; font-family: var(--ah-font-display); font-weight: 600; font-size: var(--ah-fs-sm); color: var(--ah-text-soft); border-radius: var(--ah-radius-sm); transition: all var(--ah-transition); }
.main-navigation a:hover, .main-navigation .current-menu-item > a, .main-navigation .current_page_item > a { color: var(--ah-heading); background: var(--ah-surface-2); }
.main-navigation .current-menu-item > a { color: var(--ah-primary); }
/* Dropdowns */
.main-navigation ul ul { position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px; flex-direction: column; align-items: stretch; gap: 0; background: var(--ah-surface); border: 1px solid var(--ah-border); border-radius: var(--ah-radius); box-shadow: var(--ah-shadow-lg); padding: .4rem; opacity: 0; visibility: hidden; transform: translateY(6px); transition: all var(--ah-transition); z-index: 10; }
.main-navigation li:hover > ul, .main-navigation li:focus-within > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.main-navigation ul ul a { padding: .55rem .8rem; }
.menu-item-has-children > a::after { content: "▾"; margin-left: .3rem; font-size: .7em; opacity: .6; }

.header-actions { display: flex; align-items: center; gap: .4rem; }
.ah-icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--ah-radius-sm); background: transparent; border: 1px solid transparent; color: var(--ah-text-soft); cursor: pointer; transition: all var(--ah-transition); padding: 0; }
.ah-icon-btn:hover { background: var(--ah-surface-2); color: var(--ah-heading); }
.ah-icon-btn svg { width: 20px; height: 20px; }

/* Theme toggle icon swap */
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* Mobile menu toggle */
.menu-toggle { display: none; }
.mobile-nav { display: none; }

/* Breaking-news ticker */
.ah-ticker { background: var(--ah-heading); color: var(--ah-bg); overflow: hidden; border-bottom: 1px solid var(--ah-border); }
.ah-ticker__inner { display: flex; align-items: center; gap: 1rem; height: 38px; }
.ah-ticker__label { flex-shrink: 0; background: var(--ah-accent); color: #0c0c14; font-family: var(--ah-font-mono); font-weight: 700; font-size: var(--ah-fs-xs); text-transform: uppercase; letter-spacing: .08em; padding: .35em .8em; border-radius: var(--ah-radius-pill); }
.ah-ticker__track { display: flex; gap: 2.5rem; white-space: nowrap; animation: ah-marquee 32s linear infinite; }
.ah-ticker__track a { color: var(--ah-bg); font-size: var(--ah-fs-sm); font-weight: 500; }
.ah-ticker__track a:hover { color: var(--ah-accent); }
.ah-ticker:hover .ah-ticker__track { animation-play-state: paused; }
@keyframes ah-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* 8. ---------- READING PROGRESS + FOCUS MODE ---------- */
.ah-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--ah-primary), var(--ah-accent)); z-index: 1000; transition: width 60ms linear; }
body.focus-mode .site-header, body.focus-mode .site-footer, body.focus-mode .ah-sidebar,
body.focus-mode .ah-ticker, body.focus-mode .entry-share, body.focus-mode .ah-related,
body.focus-mode .comments-area, body.focus-mode .ah-author-box { display: none !important; }
body.focus-mode .ah-layout { grid-template-columns: 1fr; }
body.focus-mode .single-article { max-width: var(--ah-reading-width); margin-inline: auto; }
.focus-exit { position: fixed; top: 1rem; right: 1rem; z-index: 1001; display: none; }
body.focus-mode .focus-exit { display: inline-flex; }

/* 9. ---------- HERO / FEATURED ---------- */
.ah-hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--ah-gap); margin-bottom: clamp(2rem,5vw,3.5rem); }
.ah-hero__main { position: relative; border-radius: var(--ah-radius-lg); overflow: hidden; min-height: 460px; display: flex; align-items: flex-end; box-shadow: var(--ah-shadow); isolation: isolate; }
.ah-hero__main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 600ms var(--ah-ease); }
.ah-hero__main:hover img { transform: scale(1.05); }
.ah-hero__main::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6,6,12,0) 20%, rgba(6,6,12,.55) 60%, rgba(6,6,12,.92) 100%); }
.ah-hero__body { padding: clamp(1.5rem, 4vw, 2.5rem); color: #fff; }
.ah-hero__body .ah-cat-badge { background: var(--ah-accent); color: #0c0c14; }
.ah-hero__title { font-size: var(--ah-fs-hero); color: #fff; margin: .6rem 0 .5rem; text-wrap: balance; }
.ah-hero__title a { color: #fff; }
.ah-hero__title a:hover { color: var(--ah-green-400); }
.ah-hero__excerpt { color: rgba(255,255,255,.82); font-size: var(--ah-fs-md); max-width: 60ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ah-hero__meta { color: rgba(255,255,255,.7); }
.ah-hero__meta a { color: rgba(255,255,255,.9); }
.ah-hero__side { display: grid; grid-template-rows: repeat(3, 1fr); gap: var(--ah-gap); }
.ah-hero__side .ah-card { flex-direction: row; align-items: stretch; min-height: 0; }

/* 10. ---------- POST CARDS ---------- */
.ah-card { display: flex; flex-direction: column; background: var(--ah-surface); border: 1px solid var(--ah-border); border-radius: var(--ah-radius); overflow: hidden; transition: transform var(--ah-transition), box-shadow var(--ah-transition), border-color var(--ah-transition); height: 100%; }
.ah-card:hover { transform: translateY(-4px); box-shadow: var(--ah-shadow-lg); border-color: var(--ah-border-strong); }
.ah-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ah-surface-2); flex-shrink: 0; }
.ah-card__media-link { display: block; width: 100%; height: 100%; }
.ah-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ah-ease); }
.ah-card:hover .ah-card__media img { transform: scale(1.06); }
.ah-card__media .ah-cat-badge { position: absolute; top: .8rem; left: .8rem; background: rgba(10,10,16,.82); color: #fff; backdrop-filter: blur(4px); }
.ah-card__body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.ah-card__title { font-size: var(--ah-fs-md); line-height: var(--ah-lh-snug); margin: 0; text-wrap: balance; }
.ah-card__title a { color: var(--ah-heading); background-image: linear-gradient(var(--ah-primary), var(--ah-primary)); background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size var(--ah-transition), color var(--ah-transition); }
.ah-card__title a:hover { color: var(--ah-primary); background-size: 100% 2px; }
.ah-card__excerpt { font-size: var(--ah-fs-sm); color: var(--ah-text-soft); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.ah-card__foot { margin-top: auto; padding-top: .35rem; }

/* Card variant: horizontal (side rail) */
.ah-card--row { flex-direction: row; }
.ah-card--row .ah-card__media { aspect-ratio: 1; width: 120px; flex-shrink: 0; }
.ah-card--row .ah-card__body { padding: .85rem 1rem; }
.ah-card--row .ah-card__title { font-size: var(--ah-fs-sm); }

/* Card variant: minimal (no image) */
.ah-card--minimal { background: transparent; border: none; border-bottom: 1px solid var(--ah-border); border-radius: 0; padding: 0 0 1.1rem; }
.ah-card--minimal:hover { transform: none; box-shadow: none; }

/* Post meta */
.ah-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .8rem; font-size: var(--ah-fs-xs); color: var(--ah-text-muted); font-family: var(--ah-font-mono); }
.ah-meta a { color: var(--ah-text-soft); }
.ah-meta a:hover { color: var(--ah-primary); }
.ah-meta__item { display: inline-flex; align-items: center; gap: .3rem; }
.ah-meta__item svg { width: 14px; height: 14px; opacity: .7; }
.ah-meta .ah-dot::before { content: "•"; color: var(--ah-border-strong); }
.ah-author-chip { display: inline-flex; align-items: center; gap: .45rem; }
.ah-author-chip img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

/* 11. ---------- CATEGORY RAILS ---------- */
.ah-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: var(--ah-gap); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; scrollbar-width: thin; }
.ah-rail > * { scroll-snap-align: start; }
.ah-rail::-webkit-scrollbar { height: 8px; }
.ah-rail::-webkit-scrollbar-thumb { background: var(--ah-border-strong); border-radius: 4px; }
.ah-cat-pills { display: flex; flex-wrap: wrap; gap: .5rem; }

/* 12. ---------- SIDEBAR / WIDGETS ---------- */
.ah-sidebar { display: flex; flex-direction: column; gap: 2rem; position: sticky; top: calc(var(--ah-header-h) + 1.5rem); }
.widget { background: var(--ah-surface); border: 1px solid var(--ah-border); border-radius: var(--ah-radius); padding: 1.4rem; }
.widget-title { font-size: var(--ah-fs-md); margin-bottom: 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--ah-border); display: flex; align-items: center; gap: .5rem; }
.widget-title::before { content: ""; width: 8px; height: 20px; border-radius: 3px; background: linear-gradient(180deg, var(--ah-primary), var(--ah-accent)); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: .55rem 0; border-bottom: 1px solid var(--ah-border); }
.widget ul li:last-child { border-bottom: none; padding-bottom: 0; }
.widget a { color: var(--ah-text-soft); }
.widget a:hover { color: var(--ah-primary); }

/* Trending list */
.ah-trending { counter-reset: trend; }
.ah-trending li { display: flex; gap: .9rem; align-items: flex-start; counter-increment: trend; }
.ah-trending li::before { content: counter(trend, decimal-leading-zero); font-family: var(--ah-font-mono); font-weight: 700; font-size: 1.1rem; background: linear-gradient(180deg, var(--ah-primary), var(--ah-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; flex-shrink: 0; }
.ah-trending .ah-trending__title { font-family: var(--ah-font-display); font-weight: 600; font-size: var(--ah-fs-sm); line-height: 1.35; color: var(--ah-heading); display: block; }
.ah-trending a:hover .ah-trending__title { color: var(--ah-primary); }
.ah-trending .ah-meta { margin-top: .25rem; }

/* Tag cloud widget */
.tagcloud, .wp-block-tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.tagcloud a, .wp-block-tag-cloud a { font-size: var(--ah-fs-xs) !important; font-family: var(--ah-font-mono); color: var(--ah-text-soft); background: var(--ah-surface-2); border: 1px solid var(--ah-border); padding: .3em .7em; border-radius: var(--ah-radius-pill); }
.tagcloud a:hover, .wp-block-tag-cloud a:hover { border-color: var(--ah-primary); color: var(--ah-primary); }

/* 13. ---------- SINGLE POST ---------- */
.single-article { }
.entry-header { margin-bottom: 2rem; }
.entry-header__meta { margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.entry-title { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.08; margin: .4rem 0 1rem; text-wrap: balance; }
.entry-lead { font-size: var(--ah-fs-lg); color: var(--ah-text-soft); line-height: 1.5; font-family: var(--ah-font-display); font-weight: 400; margin-bottom: 1.4rem; }
.entry-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; padding: 1.1rem 0; border-top: 1px solid var(--ah-border); border-bottom: 1px solid var(--ah-border); }
.entry-byline .ah-author-chip img { width: 44px; height: 44px; }
.entry-byline__name { font-family: var(--ah-font-display); font-weight: 600; color: var(--ah-heading); display: block; line-height: 1.2; }
.entry-byline__role { font-size: var(--ah-fs-xs); color: var(--ah-text-muted); }
.entry-tools { margin-left: auto; display: flex; gap: .4rem; }

.entry-featured { margin: 0 0 2rem; border-radius: var(--ah-radius-lg); overflow: hidden; box-shadow: var(--ah-shadow); }
.entry-featured img { width: 100%; }
.entry-featured figcaption { font-size: var(--ah-fs-xs); color: var(--ah-text-muted); padding: .7rem 1rem; text-align: center; background: var(--ah-surface); }

/* Article body typographic rhythm */
.entry-content { font-size: var(--ah-fs-md); }
.entry-content > * { max-width: var(--ah-reading-width); margin-inline: auto; }
.entry-content > .alignwide { max-width: 1040px; }
.entry-content > .alignfull { max-width: none; }
.entry-content p, .entry-content ul, .entry-content ol { margin-bottom: 1.4em; }
.entry-content h2 { margin-top: 2.4rem; font-size: var(--ah-fs-xl); scroll-margin-top: calc(var(--ah-header-h) + 1rem); }
.entry-content h3 { margin-top: 2rem; scroll-margin-top: calc(var(--ah-header-h) + 1rem); }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content li { margin-bottom: .5em; }
.entry-content ul li::marker { color: var(--ah-primary); }
.entry-content ol li::marker { color: var(--ah-primary); font-family: var(--ah-font-mono); font-weight: 700; }
.entry-content img { border-radius: var(--ah-radius); }
.entry-content a:not(.wp-block-button__link) { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ah-primary) 45%, transparent); text-underline-offset: 3px; }
.entry-content a:not(.wp-block-button__link):hover { text-decoration-color: var(--ah-primary); }

/* TL;DR box */
.ah-tldr { background: linear-gradient(135deg, color-mix(in srgb, var(--ah-primary) 8%, var(--ah-surface)), var(--ah-surface)); border: 1px solid var(--ah-border-strong); border-left: 4px solid var(--ah-primary); border-radius: var(--ah-radius); padding: 1.2rem 1.4rem; margin: 0 auto 2rem; max-width: var(--ah-reading-width); }
.ah-tldr__label { font-family: var(--ah-font-mono); font-weight: 700; font-size: var(--ah-fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--ah-primary); margin-bottom: .4rem; display: block; }

/* Table of contents */
.ah-toc { background: var(--ah-surface); border: 1px solid var(--ah-border); border-radius: var(--ah-radius); padding: 1.2rem 1.4rem; }
.ah-toc__title { font-family: var(--ah-font-mono); font-size: var(--ah-fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--ah-text-muted); margin-bottom: .7rem; }
.ah-toc ol { list-style: none; counter-reset: toc; padding: 0; margin: 0; }
.ah-toc li { counter-increment: toc; padding: .3rem 0; font-size: var(--ah-fs-sm); }
.ah-toc a { color: var(--ah-text-soft); display: flex; gap: .6rem; }
.ah-toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--ah-font-mono); color: var(--ah-primary); font-size: var(--ah-fs-xs); }
.ah-toc a:hover, .ah-toc a.is-active { color: var(--ah-primary); }

/* Post tables */
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.6rem auto; font-size: var(--ah-fs-sm); }
.entry-content th, .entry-content td { padding: .7rem .9rem; border: 1px solid var(--ah-border); text-align: left; }
.entry-content th { background: var(--ah-surface-2); font-family: var(--ah-font-display); }
.entry-content tbody tr:nth-child(even) { background: var(--ah-surface); }

/* 14. AUTHOR / RELATED / SHARE */
.entry-share { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: 2.5rem auto; max-width: var(--ah-reading-width); padding-top: 1.5rem; border-top: 1px solid var(--ah-border); }
.entry-share__label { font-family: var(--ah-font-mono); font-size: var(--ah-fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--ah-text-muted); }
.share-btn { width: 42px; height: 42px; border-radius: var(--ah-radius-sm); display: grid; place-items: center; background: var(--ah-surface-2); border: 1px solid var(--ah-border); color: var(--ah-text-soft); transition: all var(--ah-transition); }
.share-btn:hover { transform: translateY(-2px); background: var(--ah-primary); color: #fff; border-color: var(--ah-primary); }
.share-btn svg { width: 18px; height: 18px; }

.ah-author-box { display: flex; gap: 1.3rem; background: var(--ah-surface); border: 1px solid var(--ah-border); border-radius: var(--ah-radius-lg); padding: 1.6rem; margin: 2.5rem auto; max-width: var(--ah-reading-width); }
.ah-author-box img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--ah-border); }
.ah-author-box__name { font-size: var(--ah-fs-md); margin-bottom: .25rem; }
.ah-author-box__bio { font-size: var(--ah-fs-sm); color: var(--ah-text-soft); margin-bottom: .6rem; }
.ah-author-box__links { display: flex; gap: .8rem; font-size: var(--ah-fs-xs); font-family: var(--ah-font-mono); }

.ah-related { margin: 3rem 0; }

/* Post navigation (prev/next) */
.post-navigation { margin: 2.5rem auto; max-width: var(--ah-reading-width); display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.post-navigation .nav-links > div { }
.post-navigation a { display: block; padding: 1.1rem 1.3rem; background: var(--ah-surface); border: 1px solid var(--ah-border); border-radius: var(--ah-radius); transition: all var(--ah-transition); height: 100%; }
.post-navigation a:hover { border-color: var(--ah-primary); transform: translateY(-2px); }
.post-navigation .nav-subtitle { font-family: var(--ah-font-mono); font-size: var(--ah-fs-xs); color: var(--ah-text-muted); text-transform: uppercase; letter-spacing: .06em; display: block; margin-bottom: .3rem; }
.post-navigation .nav-title { font-family: var(--ah-font-display); font-weight: 600; color: var(--ah-heading); font-size: var(--ah-fs-sm); }
.post-navigation .nav-next { text-align: right; }

/* 15. ---------- COMMENTS ---------- */
.comments-area { margin: 3rem auto; max-width: var(--ah-reading-width); }
.comments-title, .comment-reply-title { font-size: var(--ah-fs-lg); margin-bottom: 1.5rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 1.2rem 0 0 clamp(1rem, 4vw, 2.5rem); padding-left: 1.2rem; border-left: 2px solid var(--ah-border); }
.comment-body { background: var(--ah-surface); border: 1px solid var(--ah-border); border-radius: var(--ah-radius); padding: 1.3rem; margin-bottom: 1.2rem; }
.comment-author { display: flex; align-items: center; gap: .7rem; margin-bottom: .7rem; }
.comment-author img { width: 40px; height: 40px; border-radius: 50%; }
.comment-author .fn { font-family: var(--ah-font-display); font-weight: 600; font-style: normal; color: var(--ah-heading); }
.comment-metadata { font-size: var(--ah-fs-xs); color: var(--ah-text-muted); font-family: var(--ah-font-mono); }
.comment-content { font-size: var(--ah-fs-sm); }
.reply { margin-top: .6rem; }
.reply a { font-size: var(--ah-fs-xs); font-family: var(--ah-font-mono); font-weight: 600; color: var(--ah-primary); }
.comment-form { background: var(--ah-surface); border: 1px solid var(--ah-border); border-radius: var(--ah-radius-lg); padding: 1.6rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-respond { margin-top: 2rem; }
.bypostauthor > .comment-body { border-color: var(--ah-primary); }

/* 16. ---------- PAGINATION ---------- */
.ah-pagination { margin-top: 3rem; display: flex; justify-content: center; }
.ah-pagination .page-numbers { display: inline-flex; align-items: center; gap: .35rem; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.ah-pagination .page-numbers li { margin: 0; }
.nav-links .page-numbers { min-width: 42px; height: 42px; padding: 0 .7rem; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--ah-radius-sm); border: 1px solid var(--ah-border); background: var(--ah-surface); color: var(--ah-text-soft); font-family: var(--ah-font-mono); font-weight: 600; transition: all var(--ah-transition); }
.nav-links a.page-numbers:hover { border-color: var(--ah-primary); color: var(--ah-primary); transform: translateY(-2px); }
.nav-links .page-numbers.current { background: var(--ah-primary); color: var(--ah-on-primary); border-color: var(--ah-primary); }
.nav-links .page-numbers.dots { border: none; background: none; }

/* 17. ---------- NEWSLETTER CTA ---------- */
.ah-newsletter { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--ah-violet-600), #4c1d95); color: #fff; border-radius: var(--ah-radius-lg); padding: clamp(2rem, 5vw, 3.5rem); text-align: center; }
.ah-newsletter::before, .ah-newsletter::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; filter: blur(60px); opacity: .5; }
.ah-newsletter::before { background: var(--ah-cyan-400); top: -120px; right: -80px; }
.ah-newsletter::after { background: var(--ah-green-400); bottom: -140px; left: -60px; opacity: .35; }
.ah-newsletter > * { position: relative; z-index: 1; }
.ah-newsletter__eyebrow { font-family: var(--ah-font-mono); font-size: var(--ah-fs-xs); text-transform: uppercase; letter-spacing: .12em; color: var(--ah-green-400); }
.ah-newsletter__title { color: #fff; font-size: var(--ah-fs-2xl); margin: .5rem 0; text-wrap: balance; }
.ah-newsletter__text { color: rgba(255,255,255,.85); max-width: 46ch; margin: 0 auto 1.6rem; }
.ah-newsletter form { display: flex; gap: .6rem; max-width: 460px; margin: 0 auto; }
.ah-newsletter input[type="email"] { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff; }
.ah-newsletter input[type="email"]::placeholder { color: rgba(255,255,255,.65); }
.ah-newsletter input[type="email"]:focus { background: rgba(255,255,255,.2); border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.2); }
.ah-newsletter .ah-btn { background: var(--ah-green-400); color: #0c0c14; flex-shrink: 0; }
.ah-newsletter .ah-btn:hover { background: #fff; }
.ah-newsletter__fineprint { font-size: var(--ah-fs-xs); color: rgba(255,255,255,.6); margin-top: .9rem; }

/* 18. ---------- FOOTER ---------- */
.site-footer { background: var(--ah-bg-elevated); border-top: 1px solid var(--ah-border); margin-top: clamp(3rem, 8vw, 6rem); }
.site-footer__top { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); padding-block: clamp(2.5rem, 5vw, 4rem); }
.site-footer__brand .site-title { margin-bottom: .7rem; }
.site-footer__brand p { color: var(--ah-text-muted); font-size: var(--ah-fs-sm); max-width: 40ch; }
.footer-col h4 { font-size: var(--ah-fs-sm); text-transform: uppercase; letter-spacing: .06em; color: var(--ah-text-muted); font-family: var(--ah-font-mono); margin-bottom: 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.footer-col a { color: var(--ah-text-soft); font-size: var(--ah-fs-sm); }
.footer-col a:hover { color: var(--ah-primary); }
.footer-social { display: flex; gap: .6rem; margin-top: 1.2rem; }
.footer-social a { width: 38px; height: 38px; border-radius: var(--ah-radius-sm); display: grid; place-items: center; background: var(--ah-surface-2); color: var(--ah-text-soft); border: 1px solid var(--ah-border); }
.footer-social a:hover { background: var(--ah-primary); color: #fff; border-color: var(--ah-primary); transform: translateY(-2px); }
.footer-social svg { width: 18px; height: 18px; }
.site-footer__bottom { border-top: 1px solid var(--ah-border); padding-block: 1.4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer__bottom p { margin: 0; color: var(--ah-text-muted); font-size: var(--ah-fs-xs); font-family: var(--ah-font-mono); }
.site-footer__bottom .ah-heart { color: var(--ah-primary); }

/* 19. ---------- PAGE / ARCHIVE / SEARCH / 404 HEADERS ---------- */
.page-hero { padding-block: clamp(2rem, 5vw, 3.5rem); border-bottom: 1px solid var(--ah-border); margin-bottom: clamp(2rem, 4vw, 3rem); background: radial-gradient(1200px 320px at 50% -40%, color-mix(in srgb, var(--ah-primary) 12%, transparent), transparent); }
.page-hero__eyebrow { font-family: var(--ah-font-mono); font-size: var(--ah-fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--ah-primary); margin-bottom: .5rem; }
.page-hero__title { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0; text-wrap: balance; }
.page-hero__desc { color: var(--ah-text-soft); max-width: 60ch; margin-top: .8rem; }
.breadcrumbs { font-family: var(--ah-font-mono); font-size: var(--ah-fs-xs); color: var(--ah-text-muted); margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.breadcrumbs a { color: var(--ah-text-soft); }
.breadcrumbs .sep { opacity: .5; }

.error-404 { text-align: center; padding-block: clamp(3rem, 8vw, 6rem); }
.error-404__code { font-family: var(--ah-font-mono); font-size: clamp(5rem, 18vw, 12rem); font-weight: 700; line-height: 1; background: linear-gradient(135deg, var(--ah-primary), var(--ah-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -.04em; }
.error-404__glitch { position: relative; display: inline-block; }
.no-results { text-align: center; padding: 3rem 1rem; background: var(--ah-surface); border: 1px dashed var(--ah-border-strong); border-radius: var(--ah-radius-lg); }

/* 20. ---------- WP CORE CLASSES ---------- */
.alignleft { float: left; margin: .4rem 1.6rem 1rem 0; }
.alignright { float: right; margin: .4rem 0 1rem 1.6rem; }
.aligncenter { display: block; margin-inline: auto; }
.alignwide { }
.alignfull { }
.wp-caption { max-width: 100%; }
.wp-caption-text, .wp-element-caption { font-size: var(--ah-fs-xs); color: var(--ah-text-muted); text-align: center; margin-top: .5rem; font-style: italic; }
.sticky .ah-card, .post-sticky { position: relative; }
.wp-block-image img { border-radius: var(--ah-radius); }
.gallery { display: grid; grid-template-columns: repeat(var(--gallery-cols, 3), 1fr); gap: .8rem; margin: 1.6rem 0; }
.gallery-item img { border-radius: var(--ah-radius-sm); width: 100%; }
.gallery-columns-2 { --gallery-cols: 2; } .gallery-columns-4 { --gallery-cols: 4; }

/* 21. ---------- BLOCK EDITOR SUPPORT ---------- */
.wp-block-pullquote { border-top: 3px solid var(--ah-primary); border-bottom: 3px solid var(--ah-primary); padding: 1.6rem 0; text-align: center; }
.wp-block-quote { border-left: 4px solid var(--ah-primary); padding-left: 1.4rem; }
.wp-block-code { background: #0d0d16; color: #e7e7f0; border-radius: var(--ah-radius); padding: 1.25rem; }
.wp-block-button__link { text-decoration: none; }
.wp-block-separator { border-top: 1px solid var(--ah-border); }
.wp-block-cover { border-radius: var(--ah-radius); overflow: hidden; }
.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }
.wp-block-embed { margin: 1.8rem 0; }
.wp-block-table { overflow-x: auto; }
figure.wp-block-pullquote cite, .wp-block-quote cite { font-size: var(--ah-fs-sm); color: var(--ah-text-muted); font-style: normal; font-family: var(--ah-font-mono); }
/* Palette classes */
.has-ah-violet-color { color: var(--ah-violet-600); } .has-ah-violet-background-color { background-color: var(--ah-violet-600); }
.has-ah-green-color { color: var(--ah-green-500); } .has-ah-green-background-color { background-color: var(--ah-green-500); }
.has-ah-ink-color { color: var(--ah-heading); } .has-ah-ink-background-color { background-color: var(--ah-heading); }

/* 22. ---------- UTILITIES & ANIMATIONS ---------- */
.ah-eyebrow { font-family: var(--ah-font-mono); font-size: var(--ah-fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--ah-primary); }
.ah-muted { color: var(--ah-text-muted); }
.ah-mono { font-family: var(--ah-font-mono); }
.ah-hide { display: none !important; }
.ah-sr-focusable:not(:focus) { position: absolute; left: -9999px; }
.ah-reveal { opacity: 0; transform: translateY(16px); transition: opacity 500ms var(--ah-ease), transform 500ms var(--ah-ease); }
.ah-reveal.is-visible { opacity: 1; transform: none; }
.ah-skeleton { background: linear-gradient(90deg, var(--ah-surface-2) 25%, var(--ah-surface) 37%, var(--ah-surface-2) 63%); background-size: 400% 100%; animation: ah-shimmer 1.4s ease infinite; }
@keyframes ah-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.ah-back-to-top { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 800; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all var(--ah-transition); }
.ah-back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* 23. ---------- RESPONSIVE ---------- */
@media (max-width: 1080px) {
  .ah-layout { grid-template-columns: 1fr; }
  .ah-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .ah-sidebar > .widget { flex: 1 1 300px; }
  .ah-hero { grid-template-columns: 1fr; }
  .ah-hero__side { grid-template-rows: none; grid-template-columns: repeat(3, 1fr); }
  .site-footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  :root { --ah-header-h: 60px; }
  .main-navigation { position: fixed; inset: 0 0 0 auto; width: min(320px, 84vw); background: var(--ah-bg-elevated); border-left: 1px solid var(--ah-border); transform: translateX(100%); transition: transform var(--ah-ease) 260ms; z-index: 950; padding: calc(var(--ah-header-h) + 1rem) 1.2rem 2rem; overflow-y: auto; box-shadow: var(--ah-shadow-lg); }
  .main-navigation.is-open { transform: translateX(0); }
  .main-navigation ul { flex-direction: column; align-items: stretch; gap: .2rem; }
  .main-navigation a { padding: .8rem 1rem; }
  .main-navigation ul ul { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; background: var(--ah-surface-2); margin: .2rem 0 .4rem .6rem; }
  .menu-toggle { display: grid; }
  .nav-overlay { position: fixed; inset: 0; background: rgba(4,4,10,.5); z-index: 940; opacity: 0; visibility: hidden; transition: opacity var(--ah-transition); }
  .nav-overlay.is-open { opacity: 1; visibility: visible; }
  .ah-grid--3, .ah-grid--4 { grid-template-columns: 1fr 1fr; }
  .entry-tools { width: 100%; margin-left: 0; }
  .post-navigation { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  :root { --ah-fs-base: 1rem; }
  .ah-grid--3, .ah-grid--4 { grid-template-columns: 1fr; }
  .ah-hero__side { grid-template-columns: 1fr; }
  .ah-hero__main { min-height: 340px; }
  .site-footer__top { grid-template-columns: 1fr; }
  .ah-newsletter form { flex-direction: column; }
  .ah-card--row .ah-card__media { width: 96px; }
  .site-description { display: none; }
  .comment-list .children { margin-left: .6rem; }
}

/* Print */
@media print {
  .site-header, .site-footer, .ah-sidebar, .entry-share, .comments-area, .ah-related, .ah-back-to-top, .ah-progress, .ah-ticker { display: none !important; }
  body { background: #fff; color: #000; }
  .entry-content { max-width: none; }
}
