/*
Theme Name: Baseline
Theme URI: https://modern-wordpress.pro
Author: Modern WordPress
Author URI: https://modern-wordpress.pro
Description: A high-assurance, Google Antigravity-inspired block theme with dark and light mode architecture and zero legacy chod.
Version: 0.5.0
Requires at least: 6.5
Tested up to: 7.1.5
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: baseline
*/

/* Antigravity Micro-Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  scroll-behavior: smooth;
  background-color: var(--wp--preset--color--base, #111111);
  color-scheme: dark light;
}

body {
  margin: 0;
  line-height: 1.65;
  background-color: var(--wp--preset--color--base, #111111);
  color: var(--wp--preset--color--contrast, #ffffff);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}

ul, menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   Dark / Light Mode Dynamic Variable Inversion
   ========================================================================== */

/* Light Mode: Automatic via OS preference when not explicitly dark */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --wp--preset--color--base: #f8f8f8;
    --wp--preset--color--surface: #ffffff;
    --wp--preset--color--surface-elevated: #f0f0f0;
    --wp--preset--color--surface-highest: #e5e5e5;
    --wp--preset--color--divider: rgba(0, 0, 0, 0.08);
    --wp--preset--color--contrast: #171717;
    --wp--preset--color--contrast-secondary: #525252;
    --wp--preset--color--muted: #737373;
    --wp--preset--color--accent: #171717;
    --wp--preset--color--accent-hover: #404040;
    --wp--preset--color--accent-glow: rgba(0, 0, 0, 0.08);
  }
}

/* Explicit Light Mode Override */
:root[data-theme="light"] {
  --wp--preset--color--base: #f8f8f8;
  --wp--preset--color--surface: #ffffff;
  --wp--preset--color--surface-elevated: #f0f0f0;
  --wp--preset--color--surface-highest: #e5e5e5;
  --wp--preset--color--divider: rgba(0, 0, 0, 0.08);
  --wp--preset--color--contrast: #171717;
  --wp--preset--color--contrast-secondary: #525252;
  --wp--preset--color--muted: #737373;
  --wp--preset--color--accent: #171717;
  --wp--preset--color--accent-hover: #404040;
  --wp--preset--color--accent-glow: rgba(0, 0, 0, 0.08);
}

/* Explicit Dark Mode Override */
:root[data-theme="dark"] {
  --wp--preset--color--base: #111111;
  --wp--preset--color--surface: #181818;
  --wp--preset--color--surface-elevated: #222222;
  --wp--preset--color--surface-highest: #2a2a2a;
  --wp--preset--color--divider: rgba(255, 255, 255, 0.08);
  --wp--preset--color--contrast: #ffffff;
  --wp--preset--color--contrast-secondary: #a3a3a3;
  --wp--preset--color--muted: #737373;
  --wp--preset--color--accent: #ffffff;
  --wp--preset--color--accent-hover: #e5e5e5;
  --wp--preset--color--accent-glow: rgba(255, 255, 255, 0.15);
}

/* Normal Weight Headings Invariant (h1, h2) */
h1,
h2,
.h1,
.h2,
h1.wp-block-heading,
h2.wp-block-heading,
.wp-block-post-title,
.wp-block-post-title a,
.wp-block-query-title,
.wp-block-site-title,
.wp-block-site-title a {
  font-weight: 400 !important;
}

/* Link Aesthetics */
a {
  color: var(--wp--preset--color--accent, #ffffff);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:not(.wp-block-button__link):not(.wp-element-button):hover {
  color: var(--wp--preset--color--accent-hover, #e5e5e5);
  text-decoration: none;
}

/* WCAG 2.2 AA High-Visibility Focus Ring */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--wp--preset--color--accent, #ffffff) !important;
  outline-offset: 3px !important;
}

/* Accessible Skip Link */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 1.5rem;
  z-index: 100000;
  padding: 0.75rem 1.5rem;
  background: var(--wp--preset--color--surface-elevated, #222222);
  color: var(--wp--preset--color--contrast, #ffffff);
  border: 1px solid var(--wp--preset--color--accent, #ffffff);
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.skip-link:focus {
  top: 1.5rem;
}

/* Antigravity Frosted Glass Header */
.site-header-frosted {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(17, 17, 17, 0.82) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: none !important;
  transition: background-color 0.2s ease;
}

:root[data-theme="light"] .site-header-frosted {
  background: rgba(255, 255, 255, 0.85) !important;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .site-header-frosted {
    background: rgba(255, 255, 255, 0.85) !important;
  }
}

/* Header Favicon Home Link & Dynamic Brand Logo */
.site-header-frosted .wp-block-image,
.site-header-frosted .wp-block-site-logo {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.site-header-frosted .wp-block-image a,
.site-header-frosted .wp-block-site-logo a {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.site-header-frosted .wp-block-image img,
.site-header-frosted .wp-block-site-logo img {
  border-radius: 6px;
  object-fit: cover;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.site-header-frosted .wp-block-image a:hover img,
.site-header-frosted .wp-block-site-logo a:hover img {
  transform: scale(1.06);
  opacity: 0.9;
}

/* ==========================================================================
   Header Logo Backgroundless Adaptivity & Kinetic Inversion
   ========================================================================== */

/* Background elimination: strictly suppress rounded background path in the frosted header */
.site-header-frosted .wp-block-site-logo .site-logo-bg,
.site-header-frosted .custom-logo .site-logo-bg,
.site-header-frosted .site-logo-svg #Path,
.site-header-frosted .site-logo-svg .site-logo-bg,
.site-header-frosted .site-logo-svg path[id="Path"] {
  display: none !important;
  opacity: 0 !important;
  fill: none !important;
}

/* Logo mark dynamic colour: defaults to contrast variable (white in dark mode, dark in light mode) */
.site-header-frosted .wp-block-site-logo .site-logo-hooks,
.site-header-frosted .custom-logo .site-logo-hooks,
.site-header-frosted .site-logo-svg #three_hooks {
  fill: var(--wp--preset--color--contrast, #ffffff) !important;
  transition: fill 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="light"] .site-header-frosted .wp-block-site-logo .site-logo-hooks,
:root[data-theme="light"] .site-header-frosted .custom-logo .site-logo-hooks,
:root[data-theme="light"] .site-header-frosted .site-logo-svg #three_hooks {
  fill: #171717 !important;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .site-header-frosted .wp-block-site-logo .site-logo-hooks,
  :root:not([data-theme="dark"]) .site-header-frosted .custom-logo .site-logo-hooks,
  :root:not([data-theme="dark"]) .site-header-frosted .site-logo-svg #three_hooks {
    fill: #171717 !important;
  }
}

:root[data-theme="dark"] .site-header-frosted .wp-block-site-logo .site-logo-hooks,
:root[data-theme="dark"] .site-header-frosted .custom-logo .site-logo-hooks,
:root[data-theme="dark"] .site-header-frosted .site-logo-svg #three_hooks {
  fill: #ffffff !important;
}

/* Light logo variant element hidden by default (dark mode active) */
.site-header-frosted .site-logo-light {
  display: none !important;
}

/* When light mode is active and light logo variant exists */
:root[data-theme="light"] .site-header-frosted .has-light-variant {
  display: none !important;
}

:root[data-theme="light"] .site-header-frosted .site-logo-light {
  display: inline-block !important;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .site-header-frosted .has-light-variant {
    display: none !important;
  }
  :root:not([data-theme="dark"]) .site-header-frosted .site-logo-light {
    display: inline-block !important;
  }
}

:root[data-theme="dark"] .site-header-frosted .has-light-variant {
  display: inline-block !important;
}

:root[data-theme="dark"] .site-header-frosted .site-logo-light {
  display: none !important;
}

/* Auto-inversion filter for primary logo on light mode (strictly for raster images, preserving SVG fills) */
:root[data-theme="light"] .site-header-frosted .site-logo-invert-on-light.site-logo-img,
:root[data-theme="light"] .site-header-frosted .site-logo-invert-on-light img {
  filter: invert(1);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .site-header-frosted .site-logo-invert-on-light.site-logo-img,
  :root:not([data-theme="dark"]) .site-header-frosted .site-logo-invert-on-light img {
    filter: invert(1);
  }
}

:root[data-theme="dark"] .site-header-frosted .site-logo-invert-on-light.site-logo-img,
:root[data-theme="dark"] .site-header-frosted .site-logo-invert-on-light img {
  filter: none !important;
}

/* Header logo dimensions & spring hover dynamics */
.site-header-frosted .wp-block-site-logo svg,
.site-header-frosted .wp-block-site-logo .custom-logo {
  display: block;
  width: 35px;
  height: 35px;
  vertical-align: middle;
  transform-origin: 50% 50%;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.site-header-frosted .wp-block-site-logo a:hover svg,
.site-header-frosted .wp-block-site-logo a:hover .custom-logo {
  transform: scale(1.12) rotate(-8deg);
  filter: drop-shadow(0 0 10px var(--wp--preset--color--accent-glow, rgba(255, 255, 255, 0.25)));
}

.site-header-frosted .wp-block-site-logo a:active svg,
.site-header-frosted .wp-block-site-logo a:active .custom-logo {
  transform: scale(0.95);
}

/* Theme Toggle Trigger Animation: 360-degree kinetic flip */
@keyframes logoThemeFlip {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(0.8);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

.site-logo-theme-flip {
  animation: logoThemeFlip 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

@media (prefers-reduced-motion: reduce) {
  .site-logo-theme-flip {
    animation: none !important;
  }
  .site-header-frosted .wp-block-site-logo svg,
  .site-header-frosted .wp-block-site-logo .custom-logo {
    transition: none !important;
  }
}

/* Standardised Below-The-Fold Layout Architecture */
main#main-content {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main#main-content > .wp-block-group:last-child {
  flex: 1 0 auto;
}

.error404 main#main-content .hero-glow-container,
main#main-content:has(.hero-glow-container:only-child) .hero-glow-container {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Atmospheric Hero Radial Glow */
.hero-glow-container {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse 70% 50% at 50% -10%, rgba(255, 255, 255, 0.08), rgba(17, 17, 17, 0) 75%);
  transition: background 0.3s ease;
  border-bottom: none !important;
}

:root[data-theme="light"] .hero-glow-container {
  background: radial-gradient(ellipse 70% 50% at 50% -10%, rgba(0, 0, 0, 0.04), rgba(248, 248, 248, 0) 75%) !important;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hero-glow-container {
    background: radial-gradient(ellipse 70% 50% at 50% -10%, rgba(0, 0, 0, 0.04), rgba(248, 248, 248, 0) 75%) !important;
  }
}

/* Hero Card Component */
.hero-card {
  position: relative;
  background-color: var(--wp--preset--color--surface, #181818);
  border: 1px solid var(--wp--preset--color--divider, rgba(255, 255, 255, 0.08));
  border-radius: 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-card:hover {
  border-color: var(--wp--preset--color--accent, #ffffff);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 0 25px var(--wp--preset--color--accent-glow, rgba(255, 255, 255, 0.1));
}

.hero-card-image img {
  transition: transform 0.25s ease;
}

.hero-card:hover .hero-card-image img {
  transform: scale(1.02);
}

@media (max-width: 781px) {
  .hero-card {
    padding: 1.5rem 1.25rem !important;
  }
}

/* Antigravity Card Grid Matrix */
.antigravity-card {
  position: relative;
  background: var(--wp--preset--color--surface, #181818) !important;
  border: 1px solid var(--wp--preset--color--divider, rgba(255, 255, 255, 0.08)) !important;
  border-radius: 16px !important;
  padding: 1.75rem !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
  display: flex;
  flex-direction: column;
  justifyContent: space-between;
  cursor: pointer;
}

.antigravity-card:hover {
  transform: translateY(-2px);
  border-color: var(--wp--preset--color--accent, #ffffff) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25), 0 0 20px var(--wp--preset--color--accent-glow, rgba(255, 255, 255, 0.1));
}

.antigravity-card:hover .wp-block-post-title a {
  color: var(--wp--preset--color--accent, #ffffff) !important;
}

/* Stretched Link: whole card clicks through to post content */
.antigravity-card .wp-block-post-title a::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

/* Allow taxonomy tags/categories to remain independently clickable */
.antigravity-card .wp-block-post-terms a,
.antigravity-card .wp-block-post-date time {
  position: relative;
  z-index: 2;
}

/* Full-Width List Card Architecture */
.antigravity-card--full-width {
  width: 100% !important;
  max-width: 100% !important;
}

ul.wp-block-post-template:not(.is-layout-grid) {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.5rem !important;
  width: 100% !important;
  padding-left: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

ul.wp-block-post-template:not(.is-layout-grid) > li {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

:root[data-theme="light"] .antigravity-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .antigravity-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }
}

/* Pill Badges */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wp--preset--color--contrast, #ffffff);
  width: fit-content;
}

:root[data-theme="light"] .badge-pill {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--wp--preset--color--contrast, #171717);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .badge-pill {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--wp--preset--color--contrast, #171717);
  }
}

.badge-pill--green {
  color: #e5e5e5;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

:root[data-theme="light"] .badge-pill--green {
  color: #333333;
  border-color: rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .badge-pill--green {
    color: #333333;
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.05);
  }
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* Modern Primary Pill Button */
.wp-block-button:not(.is-style-outline) .wp-block-button__link,
.wp-element-button:not(.is-style-outline) {
  background-color: var(--wp--preset--color--accent, #ffffff) !important;
  color: var(--wp--preset--color--base, #111111) !important;
  border-radius: 9999px !important;
  transition: all 0.2s ease !important;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
.wp-element-button:not(.is-style-outline):hover {
  background-color: var(--wp--preset--color--accent-hover, #e5e5e5) !important;
  color: var(--wp--preset--color--base, #111111) !important;
}

:root[data-theme="light"] .wp-block-button:not(.is-style-outline) .wp-block-button__link,
:root[data-theme="light"] .wp-element-button:not(.is-style-outline) {
  background-color: var(--wp--preset--color--accent, #171717) !important;
  color: #ffffff !important;
}

:root[data-theme="light"] .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
:root[data-theme="light"] .wp-element-button:not(.is-style-outline):hover {
  background-color: var(--wp--preset--color--accent-hover, #404040) !important;
  color: #ffffff !important;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .wp-block-button:not(.is-style-outline) .wp-block-button__link,
  :root:not([data-theme="dark"]) .wp-element-button:not(.is-style-outline) {
    background-color: var(--wp--preset--color--accent, #171717) !important;
    color: #ffffff !important;
  }
  :root:not([data-theme="dark"]) .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
  :root:not([data-theme="dark"]) .wp-element-button:not(.is-style-outline):hover {
    background-color: var(--wp--preset--color--accent-hover, #404040) !important;
    color: #ffffff !important;
  }
}

/* Modern Outline Pill Button */
.wp-block-button.is-style-outline .wp-block-button__link {
  border: 1px solid var(--wp--preset--color--divider, rgba(255, 255, 255, 0.16)) !important;
  color: var(--wp--preset--color--contrast, #ffffff) !important;
  background-color: transparent !important;
  border-radius: 9999px !important;
  transition: all 0.2s ease !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  border-color: var(--wp--preset--color--accent, #ffffff) !important;
  color: var(--wp--preset--color--accent, #ffffff) !important;
}

/* Theme Toggle Button (WCAG 44x44px Touch Target) */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--wp--preset--color--contrast, #ffffff);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--wp--preset--color--accent, #ffffff);
}

:root[data-theme="light"] .theme-toggle-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: #171717;
}

:root[data-theme="light"] .theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: var(--wp--preset--color--accent, #171717);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: #171717;
  }
  :root:not([data-theme="dark"]) .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: var(--wp--preset--color--accent, #171717);
  }
}

/* Code Snippet Polish */
pre.wp-block-code {
  background: var(--wp--preset--color--surface, #181818) !important;
  border: 1px solid var(--wp--preset--color--divider, rgba(255, 255, 255, 0.08)) !important;
  border-radius: 12px !important;
}

:root[data-theme="light"] pre.wp-block-code {
  background: #f0f0f0 !important;
  color: #171717 !important;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) pre.wp-block-code {
    background: #f0f0f0 !important;
    color: #171717 !important;
  }
}

/* Post Featured Image (Center Aligned, 200px Max Height Cover) */
.wp-block-post-featured-image,
.wp-block-post-featured-image.aligncenter,
.aligncenter.wp-block-post-featured-image {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
  max-height: 200px !important;
  overflow: hidden !important;
  border-radius: 12px;
}

.wp-block-post-featured-image a {
  display: block;
  width: 100%;
  max-height: 200px !important;
  overflow: hidden;
  border-radius: 12px;
}

.wp-block-post-featured-image img,
.wp-block-post-featured-image.aligncenter img,
.aligncenter.wp-block-post-featured-image img {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  height: 200px !important;
  max-height: 200px !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 12px;
}

/* ==========================================================================
   Tag Cloud & Badge Architecture
   ========================================================================== */
.wp-block-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.625rem;
  align-items: center;
  margin: 1.5rem 0;
  line-height: 1.4;
}

.wp-block-tag-cloud a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background-color: var(--wp--preset--color--surface-elevated, #222222);
  border: 1px solid var(--wp--preset--color--divider, rgba(255, 255, 255, 0.08));
  color: var(--wp--preset--color--contrast, #ffffff);
  text-decoration: none;
  font-size: 0.875rem !important;
  font-weight: 500;
  transition: all 0.15s ease;
}

.wp-block-tag-cloud a:hover {
  background-color: var(--wp--preset--color--surface-highest, #2a2a2a);
  border-color: var(--wp--preset--color--muted, #737373);
  color: var(--wp--preset--color--accent, #ffffff);
}

.wp-block-tag-cloud a .tag-link-count {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: var(--wp--preset--color--surface-highest, #2a2a2a);
  color: var(--wp--preset--color--contrast-secondary, #a3a3a3);
}

:root[data-theme="light"] .wp-block-tag-cloud a {
  background-color: var(--wp--preset--color--surface, #ffffff);
  border-color: var(--wp--preset--color--divider, rgba(0, 0, 0, 0.08));
  color: var(--wp--preset--color--contrast, #171717);
}

:root[data-theme="light"] .wp-block-tag-cloud a:hover {
  background-color: var(--wp--preset--color--surface-elevated, #f0f0f0);
  border-color: var(--wp--preset--color--muted, #737373);
}

:root[data-theme="light"] .wp-block-tag-cloud a .tag-link-count {
  background: var(--wp--preset--color--surface-elevated, #f0f0f0);
  color: var(--wp--preset--color--contrast-secondary, #525252);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .wp-block-tag-cloud a {
    background-color: var(--wp--preset--color--surface, #ffffff);
    border-color: var(--wp--preset--color--divider, rgba(0, 0, 0, 0.08));
    color: var(--wp--preset--color--contrast, #171717);
  }

  :root:not([data-theme="dark"]) .wp-block-tag-cloud a:hover {
    background-color: var(--wp--preset--color--surface-elevated, #f0f0f0);
    border-color: var(--wp--preset--color--muted, #737373);
  }

  :root:not([data-theme="dark"]) .wp-block-tag-cloud a .tag-link-count {
    background: var(--wp--preset--color--surface-elevated, #f0f0f0);
    color: var(--wp--preset--color--contrast-secondary, #525252);
  }
}

/* Footer & List-Style Tag Cloud Architecture */
footer .wp-block-tag-cloud,
.wp-block-tag-cloud.is-style-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin: 0;
  line-height: 1.65;
}

footer .wp-block-tag-cloud a,
.wp-block-tag-cloud.is-style-list a {
  display: inline;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent !important;
  color: var(--wp--preset--color--contrast, #ffffff);
  font-size: 0.8125rem !important;
  font-weight: 400;
  line-height: 1.65;
  margin: 0;
  transition: color 0.15s ease;
}

footer .wp-block-tag-cloud a:hover,
.wp-block-tag-cloud.is-style-list a:hover {
  background: transparent !important;
  border: none;
  color: var(--wp--preset--color--accent-hover, #e5e5e5);
  text-decoration: none;
}

:root[data-theme="light"] footer .wp-block-tag-cloud a,
:root[data-theme="light"] .wp-block-tag-cloud.is-style-list a {
  background: transparent !important;
  border: none;
  color: var(--wp--preset--color--contrast, #171717);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) footer .wp-block-tag-cloud a,
  :root:not([data-theme="dark"]) .wp-block-tag-cloud.is-style-list a {
    background: transparent !important;
    border: none;
    color: var(--wp--preset--color--contrast, #171717);
  }
}

/* Footer Categories List Alignment */
footer .wp-block-categories {
  font-size: 0.8125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

footer .wp-block-categories li {
  line-height: 1.65;
  margin: 0;
}

footer .wp-block-categories li a {
  color: var(--wp--preset--color--contrast, #ffffff);
  text-decoration: none;
  transition: color 0.15s ease;
}

footer .wp-block-categories li a:hover {
  color: var(--wp--preset--color--accent-hover, #e5e5e5);
  text-decoration: none;
}

:root[data-theme="light"] footer .wp-block-categories li a {
  color: var(--wp--preset--color--contrast, #171717);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) footer .wp-block-categories li a {
    color: var(--wp--preset--color--contrast, #171717);
  }
}

/* Zero Dividers & Underlines Reset */
footer.wp-block-group {
  border-top: none !important;
}

hr,
.wp-block-separator {
  display: none !important;
  border: none !important;
  height: 0 !important;
}

.wp-block-navigation-item a,
.wp-block-navigation__container a {
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

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