/* ========================================
   NovaAero WP - Unified Stylesheet
   Dark/Light dual-track via [data-theme]
   Fonts loaded via <link> in functions.php for performance
   ======================================== */

/* ===== DARK THEME (default via :root) ===== */
:root {
  --bg: #0f0f17;
  --bg-alt: #16161f;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --fg: #e8e8f0;
  --fg-dim: #b8b8cc;
  --muted: #8b8ba7;
  --accent: #6c5ce7;
  --accent2: #a29bfe;
  --accent3: #fd79a8;
  --glow: rgba(108, 92, 231, 0.4);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(162, 155, 254, 0.3);
  --success: #00b894;
  --warning: #fdcb6e;
  --danger: #e17055;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --nav-height: 64px;

  /* --- Semantic: shadows --- */
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.3);
  --card-hover-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);

  /* --- Semantic: links & accents --- */
  --link-color: var(--accent2);
  --nav-active-color: var(--accent2);
  --focus-border: var(--accent2);
  --focus-ring: 0 0 0 3px rgba(108, 92, 231, 0.1);

  /* --- Semantic: surfaces --- */
  --nav-bg: rgba(15, 15, 23, 0.85);
  --nav-mobile-bg: rgba(15, 15, 23, 0.98);
  --nav-hover-bg: var(--bg-card);
  --input-bg: var(--bg-alt);
  --scrollbar-track: var(--bg-alt);
  --table-head-bg: var(--bg-alt);
  --footer-shadow: none;
  --breadcrumb-sep: var(--border);

  /* --- Semantic: decoration --- */
  --blob-1: rgba(108, 92, 231, 0.08);
  --blob-2: rgba(253, 121, 168, 0.06);
  --logo-icon-shadow: 0 0 20px var(--glow);
  --logo-gradient: linear-gradient(135deg, var(--accent2), var(--accent3));
  --stat-gradient: linear-gradient(135deg, var(--accent2), var(--accent3));

  /* --- Badge variants --- */
  --badge-bg: rgba(108, 92, 231, 0.15);
  --badge-color: var(--accent2);
  --badge-border: rgba(108, 92, 231, 0.2);
  --badge-success-bg: rgba(0, 184, 148, 0.15);
  --badge-success-border: rgba(0, 184, 148, 0.2);
  --badge-warning-bg: rgba(253, 203, 110, 0.15);
  --badge-warning-border: rgba(253, 203, 110, 0.2);
  --badge-danger-bg: rgba(225, 112, 85, 0.15);
  --badge-danger-border: rgba(225, 112, 85, 0.2);
  --badge-neutral-bg: rgba(139, 139, 167, 0.15);
  --badge-neutral-border: rgba(139, 139, 167, 0.2);

  /* --- Progress tracker --- */
  --progress-done-bg: rgba(0, 184, 148, 0.1);
  --progress-done-border: rgba(0, 184, 148, 0.3);
  --progress-current-bg: rgba(108, 92, 231, 0.15);
  --progress-current-color: var(--accent2);
  --progress-current-shadow: 0 0 15px var(--glow);

  /* --- Filter clear --- */
  --filter-clear-bg: rgba(253, 121, 168, 0.1);
  --filter-clear-hover-bg: rgba(253, 121, 168, 0.18);
  --filter-clear-border: rgba(253, 121, 168, 0.2);

  /* --- Theme toggle button --- */
  --toggle-bg: var(--bg-card);
  --toggle-border: var(--border);
  --toggle-hover-bg: var(--bg-card-hover);
  --toggle-icon-color: var(--fg-dim);
}

/* ===== LIGHT THEME (override via [data-theme="light"]) ===== */
[data-theme="light"] {
  --bg: #f4f5fa;
  --bg-alt: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9ff;
  --fg: #1a1a2e;
  --fg-dim: #3d3d56;
  --muted: #7a7a96;
  --accent: #6c5ce7;
  --accent2: #5b4cdb;
  --accent3: #e84393;
  --glow: rgba(108, 92, 231, 0.25);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(108, 92, 231, 0.3);
  --success: #00a884;
  --warning: #e8a317;
  --danger: #d63031;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(108, 92, 231, 0.12);
  --card-hover-shadow: var(--shadow-lg);

  --link-color: var(--accent);
  --nav-active-color: var(--accent);
  --focus-border: var(--accent);
  --focus-ring: 0 0 0 3px rgba(108, 92, 231, 0.12);

  --nav-bg: rgba(255, 255, 255, 0.82);
  --nav-mobile-bg: rgba(255, 255, 255, 0.98);
  --nav-hover-bg: rgba(108, 92, 231, 0.06);
  --input-bg: var(--bg);
  --scrollbar-track: #e8e9f0;
  --table-head-bg: var(--bg);
  --footer-shadow: 0 -2px 20px rgba(0, 0, 0, 0.03);
  --breadcrumb-sep: #ccc;

  --blob-1: rgba(108, 92, 231, 0.1);
  --blob-2: rgba(232, 67, 147, 0.08);
  --logo-icon-shadow: 0 2px 12px var(--glow);
  --logo-gradient: linear-gradient(135deg, var(--accent), var(--accent3));
  --stat-gradient: linear-gradient(135deg, var(--accent), var(--accent3));

  --badge-bg: rgba(108, 92, 231, 0.1);
  --badge-color: var(--accent);
  --badge-border: rgba(108, 92, 231, 0.15);
  --badge-success-bg: rgba(0, 168, 132, 0.1);
  --badge-success-border: rgba(0, 168, 132, 0.15);
  --badge-warning-bg: rgba(232, 163, 23, 0.1);
  --badge-warning-border: rgba(232, 163, 23, 0.15);
  --badge-danger-bg: rgba(214, 48, 49, 0.1);
  --badge-danger-border: rgba(214, 48, 49, 0.15);
  --badge-neutral-bg: rgba(122, 122, 150, 0.1);
  --badge-neutral-border: rgba(122, 122, 150, 0.15);

  --progress-done-bg: rgba(0, 168, 132, 0.08);
  --progress-done-border: rgba(0, 168, 132, 0.25);
  --progress-current-bg: rgba(108, 92, 231, 0.12);
  --progress-current-color: var(--accent);
  --progress-current-shadow: 0 0 12px var(--glow);

  --filter-clear-bg: rgba(232, 67, 147, 0.08);
  --filter-clear-hover-bg: rgba(232, 67, 147, 0.15);
  --filter-clear-border: rgba(232, 67, 147, 0.2);

  --toggle-hover-bg: rgba(108, 92, 231, 0.06);
}

/* ===== Transition for smooth theme switch ===== */
body, .navbar, .nav-links, .card, .filter-bar, .data-table,
.sidebar-card, .footer, .badge, .progress-step, .filter-clear,
.theme-toggle, .bg-decoration::before, .bg-decoration::after {
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Skip link (accessibility) ===== */
.skip-link {
  position: absolute;
  top: -40px; left: 0;
  background: var(--accent);
  color: #fff !important;
  padding: 0.5rem 1rem;
  z-index: 9999;
  border-radius: 0 0 var(--radius-sm) 0;
  font-size: 0.85rem; font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
}
a { color: var(--link-color); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent3); }
img { max-width: 100%; height: auto; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent2); }

/* ===== Background decoration ===== */
.bg-decoration {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.bg-decoration::before {
  content: ''; position: absolute; top: -10%; left: -5%;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(ellipse, var(--blob-1), transparent 60%);
  animation: floatBlob 20s ease-in-out infinite;
}
.bg-decoration::after {
  content: ''; position: absolute; bottom: -10%; right: -5%;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(ellipse, var(--blob-2), transparent 60%);
  animation: floatBlob 25s ease-in-out infinite reverse;
}
@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.1); }
}

/* ===== Navigation ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000; display: flex; align-items: center;
}
.nav-container {
  max-width: var(--max-width); width: 100%; margin: 0 auto;
  padding: 0 1.5rem; display: flex; align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 1.25rem; font-weight: 900; color: var(--fg);
  letter-spacing: -0.02em;
}
.nav-logo .logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 1rem; color: white;
  box-shadow: var(--logo-icon-shadow);
}
.nav-logo span {
  background: var(--logo-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-links {
  display: flex; align-items: center; gap: 0.25rem; list-style: none;
}
.nav-links a {
  display: block; padding: 0.5rem 0.85rem; color: var(--fg-dim);
  font-size: 0.875rem; font-weight: 500; border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--fg); background: var(--nav-hover-bg); }
.nav-links a.active {
  color: var(--nav-active-color);
  background: rgba(108, 92, 231, 0.1);
}
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 0.5rem;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--fg); border-radius: 2px; transition: all 0.3s;
}
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== Theme toggle button ===== */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; margin-left: 0.75rem;
  background: var(--toggle-bg); border: 1px solid var(--toggle-border);
  border-radius: var(--radius-sm); cursor: pointer;
  color: var(--toggle-icon-color); transition: all 0.3s; flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--toggle-hover-bg);
  border-color: var(--accent); transform: scale(1.05);
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ===== Main content ===== */
.main { flex: 1; padding-top: var(--nav-height); position: relative; z-index: 1; }
.page-container { max-width: var(--max-width); margin: 0 auto; padding: 2.5rem 1.5rem; }

/* ===== Hero section ===== */
.hero { text-align: center; padding: 4rem 1.5rem 3rem; position: relative; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900;
  line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 1rem;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 50%, var(--accent3) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 1.1rem; color: var(--muted);
  max-width: 600px; margin: 0 auto 2rem; line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.6rem; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 600; font-family: inherit;
  cursor: pointer; border: none; transition: all 0.3s; text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white; box-shadow: 0 4px 20px var(--glow);
}
.btn-primary:hover {
  transform: translateY(-2px); box-shadow: 0 6px 30px var(--glow); color: white;
}
.btn-secondary {
  background: var(--bg-card); color: var(--fg);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--bg-card-hover); border-color: var(--accent);
  transform: translateY(-2px); color: var(--fg);
}

/* ===== Stats bar ===== */
.stats-bar {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 2rem; padding: 2rem; margin: 0 auto 3rem; max-width: 800px;
}
.stat-item { text-align: center; }
.stat-num {
  font-size: 2rem; font-weight: 900;
  background: var(--stat-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }

/* ===== Section ===== */
.section { margin-bottom: 3.5rem; }
.section-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem;
}
.section-title {
  font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem;
}
.section-title::before {
  content: ''; width: 4px; height: 24px;
  background: linear-gradient(180deg, var(--accent), var(--accent3)); border-radius: 2px;
}
.section-link { font-size: 0.875rem; font-weight: 600; }

/* ===== Card grid ===== */
.card-grid { display: grid; gap: 1.25rem; }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }
.card-grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ===== Card ===== */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; transition: all 0.3s;
  display: flex; flex-direction: column; gap: 0.75rem; box-shadow: var(--shadow-sm);
}
.card:hover {
  background: var(--bg-card-hover); border-color: var(--border-hover);
  transform: translateY(-3px); box-shadow: var(--card-hover-shadow);
}
.card-link { display: block; color: inherit; }
.card-link:hover { color: inherit; }
.card-title { font-size: 1.1rem; font-weight: 700; color: var(--fg); }
.card-subtitle { font-size: 0.8rem; color: var(--muted); }
.card-cover {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  border-radius: var(--radius-sm); margin-bottom: 0.5rem;
}

/* Tags / Badges */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.2rem 0.6rem; border-radius: 20px;
  font-size: 0.7rem; font-weight: 600;
  background: var(--badge-bg); color: var(--badge-color);
  border: 1px solid var(--badge-border);
}
.badge-success { background: var(--badge-success-bg); color: var(--success); border-color: var(--badge-success-border); }
.badge-warning { background: var(--badge-warning-bg); color: var(--warning); border-color: var(--badge-warning-border); }
.badge-danger { background: var(--badge-danger-bg); color: var(--danger); border-color: var(--badge-danger-border); }
.badge-neutral { background: var(--badge-neutral-bg); color: var(--muted); border-color: var(--badge-neutral-border); }

.card-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.8rem; color: var(--muted); }
.card-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }

/* ===== Filter bar ===== */
.filter-bar {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  margin-bottom: 2rem; box-shadow: var(--shadow-sm);
}
.filter-row {
  display: flex; align-items: center; gap: 0.75rem;
  flex-wrap: wrap; margin-bottom: 0.75rem;
}
.filter-row:last-child { margin-bottom: 0; }
.filter-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.filter-select, .filter-input {
  background: var(--input-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.5rem 0.75rem;
  font-size: 0.8rem; color: var(--fg); font-family: inherit;
  cursor: pointer; transition: border-color 0.2s;
}
.filter-select:focus, .filter-input:focus {
  outline: none; border-color: var(--focus-border); box-shadow: var(--focus-ring);
}
.filter-input { flex: 1; min-width: 180px; cursor: text; }

/* ===== Table ===== */
.data-table {
  width: 100%; border-collapse: collapse; background: var(--bg-card);
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.data-table th {
  text-align: left; padding: 0.75rem 1rem; font-size: 0.75rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); background: var(--table-head-bg); border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.75rem 1rem; font-size: 0.875rem;
  border-bottom: 1px solid var(--border); color: var(--fg-dim);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-card-hover); }

/* ===== Progress tracker ===== */
.progress-tracker {
  display: flex; align-items: center; gap: 0;
  margin: 1.5rem 0; overflow-x: auto; padding-bottom: 0.5rem;
}
.progress-step {
  flex-shrink: 0; text-align: center; font-size: 0.7rem; color: var(--muted);
  padding: 0.5rem 0.75rem; border: 1px solid var(--border);
  background: var(--bg-card); position: relative;
}
.progress-step:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.progress-step:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.progress-step.done {
  background: var(--progress-done-bg); border-color: var(--progress-done-border); color: var(--success);
}
.progress-step.current {
  background: var(--progress-current-bg); border-color: var(--accent);
  color: var(--progress-current-color); font-weight: 700; box-shadow: var(--progress-current-shadow);
}
.progress-step + .progress-step { border-left: none; }

/* ===== Timeline / Event list ===== */
.timeline { list-style: none; }
.timeline-item {
  display: flex; gap: 1.25rem; padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-date { flex-shrink: 0; width: 120px; font-size: 0.8rem; color: var(--muted); padding-top: 0.1rem; }
.timeline-body { flex: 1; }
.timeline-title { font-size: 1rem; font-weight: 600; color: var(--fg); margin-bottom: 0.4rem; }
.timeline-title a { color: inherit; }
.timeline-title a:hover { color: var(--link-color); }
.timeline-cover {
  width: 100%; max-height: 180px; object-fit: cover;
  border-radius: var(--radius-sm); margin-bottom: 0.5rem;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: var(--muted); margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--link-color); }
.breadcrumb-sep { color: var(--breadcrumb-sep); }

/* ===== Detail page ===== */
.detail-header { margin-bottom: 2rem; }
.detail-header h1 { font-size: 2rem; font-weight: 900; margin-bottom: 0.5rem; }
.detail-header .detail-sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 1rem; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; }
.detail-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-sm);
}
.sidebar-card h3 {
  font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.75rem;
}
.detail-info-table { width: 100%; border-collapse: collapse; }
.detail-info-table th, .detail-info-table td {
  padding: 0.5rem 0; font-size: 0.85rem; border-bottom: 1px solid var(--border);
}
.detail-info-table th { color: var(--muted); text-align: left; width: 40%; font-weight: 600; }
.detail-info-table td { color: var(--fg-dim); }
.detail-info-table tr:last-child th, .detail-info-table tr:last-child td { border-bottom: none; }
.detail-section { margin-bottom: 2rem; }
.detail-section h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; color: var(--fg); }
.detail-section h3 { font-size: 1.05rem; font-weight: 600; margin: 1.5rem 0 0.75rem; color: var(--fg); }
.detail-section p { color: var(--fg-dim); margin-bottom: 1rem; line-height: 1.8; }
.source-list { font-size: 0.8rem; color: var(--muted); }
.source-list li { margin-bottom: 0.3rem; }
.source-list a { color: var(--link-color); }

/* ===== Form ===== */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--fg-dim); }
.form-input, .form-textarea, .form-select {
  width: 100%; background: var(--input-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.6rem 0.85rem;
  font-size: 0.875rem; color: var(--fg); font-family: inherit;
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none; border-color: var(--focus-border); box-shadow: var(--focus-ring);
}
.form-textarea { min-height: 120px; resize: vertical; }

/* ===== Footer ===== */
.footer {
  background: var(--bg-alt); border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 1.5rem; margin-top: auto;
  position: relative; z-index: 1; box-shadow: var(--footer-shadow);
}
.footer-container { max-width: var(--max-width); margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem; margin-bottom: 2rem;
}
.footer-brand {
  font-size: 1.2rem; font-weight: 900; margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.footer-brand .logo-icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  border-radius: 6px; display: flex; align-items: center;
  justify-content: center; font-size: 0.85rem; color: white;
}
.footer-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.7; margin-bottom: 1rem; }
.footer-col h4 { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--fg); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { font-size: 0.8rem; color: var(--muted); }
.footer-col a:hover { color: var(--link-color); }
.footer-bottom {
  padding-top: 1.5rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.5rem;
}
.footer-bottom p { font-size: 0.75rem; color: var(--muted); }
.footer-bottom a { font-size: 0.75rem; color: var(--muted); }

/* ===== Misc utilities ===== */
.text-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 50%, var(--accent3) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }

.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--muted); }

.filter-clear {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.45rem 0.85rem; background: var(--filter-clear-bg);
  color: var(--accent3); border: 1px solid var(--filter-clear-border);
  border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: all 0.2s; margin-left: auto;
}
.filter-clear:hover { background: var(--filter-clear-hover-bg); transform: translateY(-1px); }

.filter-input-wrap { position: relative; flex: 1; min-width: 180px; }
.filter-input-wrap .filter-input { width: 100%; padding-right: 2rem; }
.filter-input-wrap .filter-clear-inline {
  position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1.1rem;
  color: var(--muted); padding: 0.2rem; line-height: 1; display: none;
}
.filter-input-wrap .filter-clear-inline.visible { display: block; }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.6s ease forwards; }
.fade-in-delay-1 { animation: fadeInUp 0.6s ease 0.1s forwards; opacity: 0; }
.fade-in-delay-2 { animation: fadeInUp 0.6s ease 0.2s forwards; opacity: 0; }
.fade-in-delay-3 { animation: fadeInUp 0.6s ease 0.3s forwards; opacity: 0; }

/* ===== Pure CSS Mouse Interaction Effects (no JS) ===== */

/* --- Card hover: lift + glow + border shimmer --- */
.card {
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--bg-card-hover), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
  z-index: 0;
}
.card:hover::before {
  left: 100%;
}
.card > * { position: relative; z-index: 1; }
.card:active {
  transform: translateY(-1px) scale(0.99);
  transition: all 0.1s;
}

/* --- Button click feedback --- */
.btn:active {
  transform: translateY(0) scale(0.97);
  transition: all 0.08s;
}
.btn::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  pointer-events: none;
}
.btn { position: relative; overflow: hidden; }
.btn:active::after {
  width: 200px; height: 200px;
  transition: width 0s, height 0s;
}

/* --- Nav link underline animation --- */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent3));
  border-radius: 2px;
  transition: width 0.3s ease, left 0.3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 70%; left: 15%;
}
.nav-links a:active {
  transform: scale(0.95);
  transition: transform 0.08s;
}

/* --- Theme toggle button spin on hover --- */
.theme-toggle .icon-moon,
.theme-toggle .icon-sun {
  transition: transform 0.4s ease;
}
.theme-toggle:hover .icon-moon {
  transform: rotate(-25deg);
}
.theme-toggle:hover .icon-sun {
  transform: rotate(25deg);
}
.theme-toggle:active {
  transform: scale(0.92);
  transition: transform 0.08s;
}

/* --- Logo hover: icon pulse --- */
.nav-logo .logo-icon {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.nav-logo:hover .logo-icon {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 0 30px var(--glow);
}
.nav-logo:active .logo-icon {
  transform: scale(0.95);
  transition: transform 0.08s;
}

/* --- Badge hover: subtle lift + color shift --- */
.badge {
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  cursor: default;
}
.badge:hover {
  transform: translateY(-1px) scale(1.05);
}

/* --- Table row hover: slide highlight --- */
.data-table tr {
  transition: background 0.2s ease;
}
.data-table tr:hover td {
  background: var(--bg-card-hover);
}
.data-table tr:active td {
  background: var(--nav-hover-bg);
}

/* --- Timeline item hover: left border accent --- */
.timeline-item {
  transition: padding-left 0.3s ease, border-color 0.3s ease;
  border-left: 3px solid transparent;
  padding-left: 0.75rem;
  margin-left: -0.75rem;
  border-radius: 0;
}
.timeline-item:hover {
  border-left-color: var(--accent);
  padding-left: 1rem;
}

/* --- Section link arrow animation --- */
.section-link {
  transition: gap 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.section-link::after {
  content: '\2192';
  transition: transform 0.2s ease;
}
.section-link:hover::after {
  transform: translateX(4px);
}

/* --- Stat number hover: count-up feel via scale --- */
.stat-item {
  transition: transform 0.3s ease;
  cursor: default;
}
.stat-item:hover {
  transform: translateY(-3px);
}
.stat-item:hover .stat-num {
  animation: statPulse 0.6s ease;
}
@keyframes statPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* --- Filter select focus: border glow --- */
.filter-select:hover,
.filter-input:hover {
  border-color: var(--border-hover);
}
.filter-select:active,
.filter-input:active {
  border-color: var(--accent);
}

/* --- Pagination hover: scale + color --- */
.pagination .page-numbers:active {
  transform: scale(0.95);
  transition: transform 0.08s;
}

/* --- Footer link hover: arrow slide --- */
.footer-col a {
  transition: padding-left 0.2s ease, color 0.2s ease;
  display: inline-block;
}
.footer-col a:hover {
  padding-left: 0.3rem;
}

/* --- Sidebar card hover: subtle lift --- */
.sidebar-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.sidebar-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* --- Progress step hover: pulse --- */
.progress-step {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.progress-step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.progress-step.current {
  animation: currentPulse 2s ease-in-out infinite;
}
@keyframes currentPulse {
  0%, 100% { box-shadow: var(--progress-current-shadow); }
  50% { box-shadow: 0 0 20px var(--glow); }
}

/* --- Form input focus: border glow expansion --- */
.form-input, .form-textarea, .form-select {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--focus-border);
  box-shadow: var(--focus-ring), 0 0 0 1px var(--accent);
}

/* --- Breadcrumb link hover --- */
.breadcrumb a {
  transition: color 0.2s ease;
}
.breadcrumb a:hover {
  color: var(--link-color);
}

/* --- Focus-visible accessibility outline --- */
*:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Scrollbar hover: thumb grow --- */
::-webkit-scrollbar-thumb:hover {
  background: var(--accent2);
  border-radius: 6px;
}

/* ===== WordPress core alignment ===== */
.alignleft { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { max-width: calc(var(--max-width) + 200px); }
.alignfull { max-width: 100%; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.entry-content p { color: var(--fg-dim); margin-bottom: 1.2rem; line-height: 1.8; }
.entry-content h2, .entry-content h3 { color: var(--fg); margin: 1.5rem 0 0.75rem; }
.entry-content ul, .entry-content ol { margin-bottom: 1.2rem; padding-left: 1.5rem; }
.entry-content li { color: var(--fg-dim); margin-bottom: 0.5rem; }
.entry-content blockquote {
  border-left: 3px solid var(--accent); padding-left: 1rem;
  margin: 1.5rem 0; color: var(--muted); font-style: italic;
}
.entry-content code {
  background: var(--bg-card); padding: 0.15rem 0.4rem;
  border-radius: 4px; font-size: 0.85em; border: 1px solid var(--border);
}
.entry-content pre {
  background: var(--bg-alt); padding: 1rem; border-radius: var(--radius-sm);
  overflow-x: auto; border: 1px solid var(--border); margin-bottom: 1.5rem;
}
.entry-content pre code { background: none; border: none; padding: 0; }
.sticky { display: block; }
.bypostauthor { display: block; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2.5rem; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 0.5rem;
  border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 600;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--fg-dim); transition: all 0.2s;
}
.pagination .page-numbers:hover { border-color: var(--accent); color: var(--fg); }
.pagination .page-numbers.current {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white; border-color: transparent;
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links {
    display: none; position: fixed; top: var(--nav-height);
    left: 0; right: 0; flex-direction: column;
    background: var(--nav-mobile-bg); backdrop-filter: blur(20px);
    padding: 1rem; gap: 0; border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; width: 100%; }
  .nav-toggle { display: block; }
  .card-grid-2, .card-grid-3, .card-grid-4 { grid-template-columns: 1fr; }
  .stats-bar { gap: 1.5rem; }
  .timeline-item { flex-direction: column; gap: 0.5rem; }
  .timeline-date { width: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .progress-tracker { font-size: 0.65rem; }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
  .stat-num { font-size: 1.5rem; }
}

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