/*
Theme Name: Aurora Flow
Author: Aurora Flow Team
Description: 一款支持明暗模式、三栏卡片布局、滚动渐显和标准分页的中文 WordPress 博客主题。
Version: 0.4.4
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aurora-flow
Tags: blog, news, three-columns, custom-background, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

:root {
  color-scheme: light;
  --af-bg: #f4f6fa;
  --af-bg-soft: rgba(244, 246, 250, 0.82);
  --af-surface: #ffffff;
  --af-surface-2: #f7f8fb;
  --af-text: #202532;
  --af-muted: #687083;
  --af-border: #e7eaf0;
  --af-accent: #356df3;
  --af-accent-soft: #edf3ff;
  --af-danger: #f05252;
  --af-shadow: 0 14px 40px rgba(31, 39, 58, 0.06);
  --af-radius: 16px;
  --af-header-height: 78px;
  --af-container: 1360px;
  --af-light-bg-image: none;
  --af-dark-bg-image: none;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --af-bg: #090a0d;
  --af-bg-soft: rgba(9, 10, 13, 0.72);
  --af-surface: #202124;
  --af-surface-2: #292b30;
  --af-text: #f4f5f7;
  --af-muted: #b2b7c2;
  --af-border: #34363d;
  --af-accent: #7ea2ff;
  --af-accent-soft: #29334a;
  --af-danger: #ff6868;
  --af-shadow: 0 18px 55px rgba(0, 0, 0, 0.24);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --af-bg: #090a0d;
    --af-bg-soft: rgba(9, 10, 13, 0.72);
    --af-surface: #202124;
    --af-surface-2: #292b30;
    --af-text: #f4f5f7;
    --af-muted: #b2b7c2;
    --af-border: #34363d;
    --af-accent: #7ea2ff;
    --af-accent-soft: #29334a;
    --af-danger: #ff6868;
    --af-shadow: 0 18px 55px rgba(0, 0, 0, 0.24);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--af-bg);
  color: var(--af-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  transition: color 180ms ease, background-color 180ms ease;
}

body.admin-bar {
  --af-admin-offset: 32px;
}

body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  background-color: var(--af-bg);
  background-image: var(--af-light-bg-image);
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
  content: "";
}

:root[data-theme="dark"] body::before {
  background-image: var(--af-dark-bg-image);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body::before {
    background-image: var(--af-dark-bg-image);
  }
}

body::after {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: var(--af-bg-soft);
  content: "";
  pointer-events: none;
}

a {
  color: var(--af-accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button,
input[type="submit"] {
  cursor: pointer;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  background: var(--af-surface);
  border-radius: 8px;
}

.site-container {
  width: min(calc(100% - 40px), var(--af-container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: var(--af-admin-offset, 0px);
  min-height: var(--af-header-height);
  border-bottom: 1px solid color-mix(in srgb, var(--af-border) 72%, transparent);
  background: var(--af-bg-soft);
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
  align-items: center;
  min-height: var(--af-header-height);
  gap: 24px;
}

.site-branding {
  display: flex;
  align-items: center;
  min-width: 0;
}

.custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.custom-logo {
  width: auto;
  max-height: 42px;
}

.theme-option-logo-link {
  display: inline-flex;
  align-items: center;
}

.theme-option-logo {
  display: block;
  width: auto;
  max-width: 230px;
  max-height: 44px;
}

.mobile-site-logo {
  display: none;
}

.site-title {
  margin: 0;
  color: var(--af-text);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-title a {
  color: inherit;
}

.site-title a:hover {
  text-decoration: none;
}

.primary-navigation ul {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-navigation li {
  position: relative;
}

.primary-navigation a {
  display: block;
  padding: 10px 14px;
  border-radius: 9px;
  color: var(--af-muted);
  font-size: 0.95rem;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a,
.primary-navigation .current-menu-ancestor > a,
.primary-navigation .current_page_item > a,
.primary-navigation .current_page_ancestor > a,
.primary-navigation .current-cat > a,
.primary-navigation .current-cat-ancestor > a {
  background: var(--af-accent-soft);
  color: var(--af-accent);
  text-decoration: none;
}

.primary-navigation .sub-menu,
.primary-navigation .children {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  min-width: 180px;
  padding: 8px;
  background: var(--af-surface);
  border: 1px solid var(--af-border);
  border-radius: 12px;
  box-shadow: var(--af-shadow);
}

.primary-navigation li:hover > .sub-menu,
.primary-navigation li:focus-within > .sub-menu,
.primary-navigation li:hover > .children,
.primary-navigation li:focus-within > .children {
  display: block;
}

.header-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.icon-button,
.menu-toggle {
  display: inline-grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--af-muted);
}

.icon-button:hover,
.icon-button:focus-visible,
.menu-toggle:hover,
.menu-toggle:focus-visible {
  background: var(--af-surface);
  color: var(--af-accent);
  outline: 2px solid transparent;
  box-shadow: var(--af-shadow);
}

.af-icon {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon-moon,
.theme-icon-sun {
  place-items: center;
}

.theme-icon-moon {
  display: inline-grid;
}

.theme-icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-icon-sun {
  display: inline-grid;
}

:root[data-theme="dark"] .theme-icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-sun {
    display: inline-grid;
  }

  :root:not([data-theme="light"]) .theme-icon-moon {
    display: none;
  }
}

.menu-toggle {
  display: none;
}

.search-panel {
  display: none;
  padding-bottom: 16px;
}

.search-panel.is-open {
  display: block;
}

.search-form {
  display: flex;
  max-width: 680px;
  margin-inline: auto;
}

.search-field {
  min-width: 0;
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--af-border);
  border-radius: 12px 0 0 12px;
  background: var(--af-surface);
}

.search-submit {
  padding: 12px 18px;
  border: 0;
  border-radius: 0 12px 12px 0;
  background: var(--af-accent);
  color: #fff;
  font-weight: 700;
}

.site-main-wrap {
  padding: 34px 0 70px;
}

.site-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 280px;
  align-items: start;
  gap: 18px;
}

.content-column {
  min-width: 0;
}

.left-sidebar,
.right-sidebar {
  min-width: 0;
}

.left-sidebar-inner,
.right-sidebar-inner {
  display: grid;
  gap: 18px;
}

@media (min-width: 1101px) {
  .left-sidebar,
  .right-sidebar {
    position: sticky;
    top: calc(var(--af-admin-offset, 0px) + var(--af-header-height) + 18px);
    align-self: start;
    max-height: calc(100vh - var(--af-admin-offset, 0px) - var(--af-header-height) - 36px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .left-sidebar::-webkit-scrollbar,
  .right-sidebar::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .left-sidebar-inner,
  .right-sidebar-inner {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

.card,
.widget {
  overflow: hidden;
  background: var(--af-surface);
  border: 1px solid rgba(127, 127, 127, 0.06);
  border-radius: var(--af-radius);
  box-shadow: var(--af-shadow);
}

.profile-card {
  padding: 36px 24px;
  text-align: center;
}

.profile-avatar-wrap {
  position: relative;
  display: inline-block;
}

.profile-avatar-wrap img {
  display: block;
  border-radius: 50%;
}

.verified-badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid var(--af-surface);
  border-radius: 50%;
  background: #ff9f24;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.profile-name {
  margin: 18px 0 2px;
  font-size: 1.15rem;
}

.profile-role {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid var(--af-muted);
  border-radius: 999px;
  color: var(--af-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.profile-description {
  margin: 18px 0 0;
  color: var(--af-text);
  font-size: 0.9rem;
  line-height: 1.65;
}

.profile-location {
  margin: 8px 0 0;
  color: var(--af-muted);
  font-size: 0.82rem;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.stat-card {
  position: relative;
  min-height: 132px;
  padding: 16px;
  color: var(--af-text);
}

.stat-card:hover,
.stat-card:focus-visible {
  color: var(--af-accent);
  text-decoration: none;
  transform: translateY(-2px);
}

.stat-label {
  display: block;
  color: var(--af-text);
  font-size: 0.82rem;
}

.stat-number {
  position: absolute;
  bottom: 10px;
  left: 14px;
  font-size: 1.5rem;
  font-weight: 800;
}

.stat-decoration {
  position: absolute;
  right: -18px;
  bottom: -20px;
  width: 70px;
  height: 70px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--af-accent-soft), transparent);
  transform: rotate(8deg);
}

.hero-card {
  padding: 16px;
  margin-bottom: 18px;
}

.hero-media {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 11px;
  background: linear-gradient(135deg, #17202a, #43313b);
}

.hero-media img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-placeholder {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 30%, rgba(255,255,255,.08) 31%, transparent 55%),
    linear-gradient(135deg, #35404a, #211c24);
}

.hero-title {
  position: absolute;
  right: 28px;
  bottom: 24px;
  max-width: 55%;
  margin: 0;
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  line-height: 1.1;
  text-align: right;
  text-shadow: 0 3px 16px rgba(0,0,0,.45);
}

.recommendations {
  padding: 12px 16px;
  margin-bottom: 18px;
}

.recommendation-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 3px 0;
  color: var(--af-text);
  line-height: 1.55;
}

.recommendation-item:hover {
  color: var(--af-accent);
  text-decoration: none;
}

.recommendation-label {
  flex: none;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(240, 82, 82, 0.14);
  background: color-mix(in srgb, var(--af-danger) 14%, transparent);
  color: var(--af-danger);
  font-size: 0.72rem;
}

.post-list {
  display: grid;
  gap: 18px;
}

.post-card {
  padding: 24px;
}

.author-line,
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--af-muted);
  font-size: 0.82rem;
}

.author-line img {
  border-radius: 50%;
}

.author-name {
  color: var(--af-text);
  font-weight: 600;
}

.entry-title {
  margin: 16px 0 8px;
  font-size: 1.08rem;
  line-height: 1.48;
}

.entry-title a {
  color: var(--af-text);
}

.entry-title a:hover {
  color: var(--af-accent);
  text-decoration: none;
}

.entry-summary {
  color: var(--af-muted);
  font-size: 0.92rem;
  line-height: 1.72;
}

.entry-summary p {
  margin: 0;
}

.post-thumbnail {
  display: block;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--af-surface-2);
}

.post-thumbnail img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  transition: transform 300ms ease;
}

.post-thumbnail:hover img {
  transform: scale(1.015);
}

.post-taxonomies,
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.post-taxonomies {
  margin-top: 18px;
}

.post-tags a,
.category-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--af-surface-2);
  color: var(--af-muted);
  font-size: 0.75rem;
}

.category-pill {
  gap: 4px;
  color: var(--af-accent);
}

.category-pill .af-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.post-tags a::before {
  margin-right: 3px;
  color: var(--af-danger);
  content: "#";
  font-weight: 800;
}

.post-tags a:hover {
  color: var(--af-accent);
  text-decoration: none;
}

.post-footer-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding-top: 18px;
  margin-top: 16px;
  border-top: 1px solid var(--af-border);
  color: var(--af-muted);
  font-size: 0.82rem;
  text-align: center;
}

.post-stat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  padding: 5px;
  border: 0;
  background: transparent;
  color: var(--af-muted);
  font-size: inherit;
  line-height: 1;
}

a.post-stat:hover {
  color: var(--af-accent);
  text-decoration: none;
}

.widget {
  padding: 24px;
}

.widget-title,
.widget-title-like {
  margin: 0 0 18px;
  color: var(--af-text);
  font-size: 0.9rem;
  line-height: 1.45;
}

.sidebar-module .widget-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sidebar-module .widget-title .af-icon {
  width: 16px;
  height: 16px;
  color: var(--af-accent);
}

.sidebar-announcement {
  border-top: 3px solid var(--af-accent);
}

.sidebar-announcement .widget-title {
  margin-bottom: 10px;
}

.announcement-text {
  display: block;
  margin: 0;
  color: var(--af-muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

a.announcement-text:hover {
  color: var(--af-accent);
  text-decoration: none;
}

.sidebar-post-list,
.recent-comment-list {
  display: grid;
  gap: 9px;
  padding: 0 !important;
  margin: 0;
  list-style: none;
}

.sidebar-post-list a {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--af-surface-2);
  color: var(--af-text);
  font-size: 0.82rem;
}

.sidebar-post-list a:hover {
  background: var(--af-accent-soft);
  text-decoration: none;
}

.sidebar-post-list a > span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-post-list em {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--af-danger);
  color: #fff;
  font-size: 0.66rem;
  font-style: normal;
}

.recent-comment-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--af-border);
}

.recent-comment-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.recent-comment-list img {
  border-radius: 50%;
}

.recent-comment-list a {
  min-width: 0;
  color: var(--af-text);
  font-size: 0.78rem;
  line-height: 1.45;
}

.recent-comment-list a:hover {
  text-decoration: none;
}

.recent-comment-list strong,
.recent-comment-list span {
  display: block;
}

.recent-comment-list span {
  margin-top: 2px;
  color: var(--af-muted);
}

.sidebar-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sidebar-tag-cloud a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--af-surface-2);
  color: var(--af-muted);
  font-size: 0.74rem;
}

.sidebar-tag-cloud a:hover {
  background: var(--af-accent-soft);
  color: var(--af-accent);
  text-decoration: none;
}

.sidebar-tag-cloud span {
  opacity: 0.65;
}

.widget ul {
  padding-left: 18px;
  margin: 0;
}

.promo-card a {
  color: inherit;
}

.promo-card a:hover {
  text-decoration: none;
}

.promo-card img {
  display: block;
  width: 100%;
  border-radius: 3px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.promo-placeholder {
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--af-accent-soft), var(--af-surface-2));
  color: var(--af-muted);
  font-size: 0.82rem;
}

.archive-header {
  padding: 22px 24px;
  margin-bottom: 18px;
}

.archive-title {
  margin: 0;
  font-size: 1.3rem;
}

.archive-description {
  margin-top: 7px;
  color: var(--af-muted);
  font-size: 0.9rem;
}

.single-card,
.page-card,
.comments-area {
  padding: clamp(24px, 4vw, 42px);
}

.single-card .entry-title,
.page-card .entry-title {
  margin: 18px 0 10px;
  font-size: clamp(1.55rem, 4vw, 2rem);
}

.single-stats {
  display: flex;
  justify-content: center;
  gap: 22px;
  padding: 8px 14px;
  margin: 18px 0;
  border: 1px solid var(--af-border);
  border-radius: 8px;
  color: var(--af-muted);
  font-size: 0.82rem;
}

.entry-content {
  overflow-wrap: anywhere;
}

.entry-content > * {
  max-width: 100%;
}

.entry-content a {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 1.8em;
  line-height: 1.4;
}

.entry-content blockquote {
  padding: 12px 20px;
  margin: 24px 0;
  border-left: 4px solid var(--af-accent);
  background: var(--af-surface-2);
  color: var(--af-muted);
}

.entry-content pre,
.entry-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.entry-content code {
  padding: 0.12em 0.35em;
  border-radius: 4px;
  background: var(--af-surface-2);
}

.entry-content pre {
  max-width: 100%;
  padding: 18px;
  overflow: auto;
  border: 1px solid var(--af-border);
  border-radius: 10px;
  background: var(--af-surface-2);
  line-height: 1.6;
}

.entry-content pre code {
  padding: 0;
  background: transparent;
}

.entry-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.entry-content th,
.entry-content td {
  padding: 9px 12px;
  border: 1px solid var(--af-border);
}

.alignwide {
  width: min(110%, 900px);
  max-width: none !important;
  margin-left: 50%;
  transform: translateX(-50%);
}

.alignfull {
  width: calc(100% + clamp(48px, 8vw, 84px));
  max-width: none !important;
  margin-left: calc(clamp(24px, 4vw, 42px) * -1);
}

.post-navigation {
  margin-top: 18px;
}

.post-navigation .nav-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.post-navigation a {
  display: block;
  height: 100%;
  padding: 18px;
  border-radius: var(--af-radius);
  background: var(--af-surface);
  color: var(--af-text);
  box-shadow: var(--af-shadow);
}

.post-navigation a:hover {
  color: var(--af-accent);
  text-decoration: none;
}

.comments-area {
  margin-top: 18px;
}

.comments-title,
.comment-reply-title {
  margin-top: 0;
  font-size: 1.2rem;
}

.comment-list {
  padding: 0;
  list-style: none;
}

.comment-list .children {
  list-style: none;
}

.comment-body {
  padding: 18px 0;
  border-bottom: 1px solid var(--af-border);
}

.comment-meta {
  color: var(--af-muted);
  font-size: 0.82rem;
}

.comment-form-comment label,
.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
  display: block;
  margin-bottom: 4px;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--af-border);
  border-radius: 8px;
  background: var(--af-surface-2);
}

.comment-form .submit {
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--af-accent);
  color: #fff;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 7px;
  width: 100%;
  margin-top: 24px;
  text-align: center;
}

.pagination .nav-links {
  width: 100%;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.page-numbers {
  display: inline-grid;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  place-items: center;
  border-radius: 8px;
  background: var(--af-surface);
  color: var(--af-muted);
}

.page-numbers.current {
  background: var(--af-accent);
  color: #fff;
}

.post-card.will-reveal {
  position: relative;
  opacity: 0.12;
  filter: saturate(0.4);
  transform: translateY(28px);
  transition: opacity 520ms ease, filter 520ms ease, transform 520ms ease;
}

.post-card.will-reveal::after {
  position: absolute;
  z-index: 4;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, 0.52) 48%, transparent 64%);
  background-size: 220% 100%;
  content: "";
  pointer-events: none;
  animation: af-reveal-shimmer 1.2s linear infinite;
  transition: opacity 260ms ease;
}

.post-card.will-reveal.is-revealed {
  opacity: 1;
  filter: none;
  transform: none;
}

.post-card.will-reveal.is-revealed::after {
  opacity: 0;
  animation: none;
}

@keyframes af-reveal-shimmer {
  to { background-position: -220% 0; }
}

.back-to-top {
  position: fixed;
  z-index: 30;
  right: 26px;
  bottom: 34px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--af-border);
  border-radius: 50%;
  background: var(--af-surface);
  color: var(--af-muted);
  box-shadow: var(--af-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, color 180ms ease, transform 180ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  color: var(--af-accent);
}

.empty-state,
.error-404 {
  padding: 42px;
  text-align: center;
}

.site-footer {
  padding: 34px 0;
  color: var(--af-muted);
  font-size: 0.82rem;
  text-align: center;
}

.footer-copyright {
  margin-bottom: 5px;
}

.footer-records {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 10px;
}

.footer-records a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--af-muted);
}

.footer-records a:hover {
  color: var(--af-accent);
  text-decoration: none;
}

.footer-records img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.footer-extra {
  margin-top: 7px;
}

.footer-extra p {
  margin: 0;
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  padding: 0;
  margin: 0 0 10px;
  list-style: none;
}

.footer-menu a {
  color: var(--af-muted);
}

@media (max-width: 1100px) {
  .site-grid {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .right-sidebar {
    display: none;
  }
}

@media (max-width: 820px) {
  :root {
    --af-header-height: 66px;
  }

  .site-container {
    width: min(calc(100% - 24px), var(--af-container));
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .desktop-site-logo {
    display: none;
  }

  .mobile-site-logo {
    display: block;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .primary-navigation {
    position: absolute;
    top: 62px;
    right: 12px;
    left: 12px;
    display: none;
    padding: 10px;
    border: 1px solid var(--af-border);
    border-radius: 14px;
    background: var(--af-surface);
    box-shadow: var(--af-shadow);
  }

  .primary-navigation.is-open {
    display: block;
  }

  .primary-navigation ul {
    display: block;
  }

  .primary-navigation .sub-menu,
  .primary-navigation .children {
    position: static;
    display: block;
    padding: 0 0 0 16px;
    border: 0;
    box-shadow: none;
  }

  .site-main-wrap {
    padding-top: 18px;
  }

  .site-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .left-sidebar {
    order: 2;
  }

  .content-column {
    order: 1;
  }

  .left-sidebar-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-card {
    padding: 24px;
  }
}

@media screen and (max-width: 782px) {
  body.admin-bar {
    --af-admin-offset: 46px;
  }
}

@media (max-width: 520px) {
  .site-container {
    width: min(calc(100% - 16px), var(--af-container));
  }

  .site-main-wrap {
    padding-bottom: 42px;
  }

  .hero-card {
    padding: 10px;
  }

  .hero-media {
    min-height: 160px;
  }

  .hero-title {
    right: 16px;
    bottom: 16px;
    max-width: 78%;
  }

  .post-card,
  .archive-header {
    padding: 18px;
  }

  .single-card,
  .page-card,
  .comments-area {
    padding: 20px;
  }

  .alignfull {
    width: calc(100% + 40px);
    margin-left: -20px;
  }

  .single-stats {
    justify-content: flex-start;
    overflow-x: auto;
  }

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

  .back-to-top {
    right: 14px;
    bottom: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

}
